Radix cross Linux

The main Radix cross Linux repository contains the build scripts of packages, which have the most complete and common functionality for desktop machines

452 Commits   2 Branches   1 Tag
Index: appstream-glib/Makefile
===================================================================
--- appstream-glib/Makefile	(nonexistent)
+++ appstream-glib/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/appstream-glib
+
+versions    = 0.8.2
+pkgname     = appstream-glib
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: appstream-glib
===================================================================
--- appstream-glib	(nonexistent)
+++ appstream-glib	(revision 385)

Property changes on: appstream-glib
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana/Makefile
===================================================================
--- ayatana/Makefile	(nonexistent)
+++ ayatana/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: ayatana/appindicator/Makefile
===================================================================
--- ayatana/appindicator/Makefile	(nonexistent)
+++ ayatana/appindicator/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/ayatana/appindicator
+
+versions    = 0.5.93
+pkgname     = appindicator
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: ayatana/appindicator
===================================================================
--- ayatana/appindicator	(nonexistent)
+++ ayatana/appindicator	(revision 385)

Property changes on: ayatana/appindicator
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana/ido/Makefile
===================================================================
--- ayatana/ido/Makefile	(nonexistent)
+++ ayatana/ido/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/ayatana/ido
+
+versions    = 0.10.1
+pkgname     = ido
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: ayatana/ido
===================================================================
--- ayatana/ido	(nonexistent)
+++ ayatana/ido	(revision 385)

Property changes on: ayatana/ido
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana/indicator/Makefile
===================================================================
--- ayatana/indicator/Makefile	(nonexistent)
+++ ayatana/indicator/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/ayatana/indicator
+
+versions    = 0.9.4
+pkgname     = indicator
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: ayatana/indicator
===================================================================
--- ayatana/indicator	(nonexistent)
+++ ayatana/indicator	(revision 385)

Property changes on: ayatana/indicator
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana/libdbusmenu/Makefile
===================================================================
--- ayatana/libdbusmenu/Makefile	(nonexistent)
+++ ayatana/libdbusmenu/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/ayatana/libdbusmenu
+
+versions    = 16.04.0
+pkgname     = libdbusmenu
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches      = $(CURDIR)/patches/libdbusmenu-16.04.0-valgrind.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-16.04.0-valgrind-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: ayatana/libdbusmenu/create-16.04.0-valgrind-patch/create.patch.sh
===================================================================
--- ayatana/libdbusmenu/create-16.04.0-valgrind-patch/create.patch.sh	(nonexistent)
+++ ayatana/libdbusmenu/create-16.04.0-valgrind-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=16.04.0
+
+tar --files-from=file.list -xJvf ../libdbusmenu-$VERSION.tar.xz
+mv libdbusmenu-$VERSION libdbusmenu-$VERSION-orig
+
+cp -rf ./libdbusmenu-$VERSION-new ./libdbusmenu-$VERSION
+
+diff --unified -Nr  libdbusmenu-$VERSION-orig  libdbusmenu-$VERSION > libdbusmenu-$VERSION-valgrind.patch
+
+mv libdbusmenu-$VERSION-valgrind.patch ../patches
+
+rm -rf ./libdbusmenu-$VERSION
+rm -rf ./libdbusmenu-$VERSION-orig

Property changes on: ayatana/libdbusmenu/create-16.04.0-valgrind-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: ayatana/libdbusmenu/create-16.04.0-valgrind-patch/file.list
===================================================================
--- ayatana/libdbusmenu/create-16.04.0-valgrind-patch/file.list	(nonexistent)
+++ ayatana/libdbusmenu/create-16.04.0-valgrind-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libdbusmenu-16.04.0/configure.ac
Index: ayatana/libdbusmenu/create-16.04.0-valgrind-patch/libdbusmenu-16.04.0-new/configure.ac
===================================================================
--- ayatana/libdbusmenu/create-16.04.0-valgrind-patch/libdbusmenu-16.04.0-new/configure.ac	(nonexistent)
+++ ayatana/libdbusmenu/create-16.04.0-valgrind-patch/libdbusmenu-16.04.0-new/configure.ac	(revision 385)
@@ -0,0 +1,278 @@
+
+AC_INIT(libdbusmenu, 17.09.29.1, ted@canonical.com)
+AC_COPYRIGHT([Copyright 2009-2016 Canonical])
+
+AC_PREREQ(2.62)
+
+AM_CONFIG_HEADER(config.h)
+AM_INIT_AUTOMAKE(libdbusmenu, 16.04.0, [-Wno-portability])
+
+AM_MAINTAINER_MODE
+
+IT_PROG_INTLTOOL([0.35.0])
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_STDC_HEADERS
+AC_PROG_LIBTOOL
+
+AC_SUBST(VERSION)
+AC_CONFIG_MACRO_DIR([m4])
+
+m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
+
+AC_PATH_PROG([GLIB_MKENUMS], [glib-mkenums])
+
+###########################
+# GTK Doc 
+###########################
+
+GTK_DOC_CHECK([1.14],[--flavour no-tmpl])
+
+###########################
+# Dependencies - GLib
+###########################
+
+GLIB_REQUIRED_VERSION=2.35.4
+
+PKG_CHECK_MODULES(DBUSMENUGLIB, glib-2.0 >= $GLIB_REQUIRED_VERSION
+                                gio-2.0 >= $GLIB_REQUIRED_VERSION)
+
+AC_SUBST(DBUSMENUGLIB_CFLAGS)
+AC_SUBST(DBUSMENUGLIB_LIBS)
+
+###########################
+# Dependencies - GTK
+###########################
+
+GTK_REQUIRED_VERSION=2.16
+GTK3_REQUIRED_VERSION=2.91
+
+AC_ARG_ENABLE([gtk],
+	AC_HELP_STRING([--disable-gtk], [Disable libdbusmenu-gtk library]),
+	[enable_gtk=$enableval], [enable_gtk=auto])
+AM_CONDITIONAL([WANT_LIBDBUSMENUGTK], [test "x$enable_gtk" != "xno"])
+
+AC_ARG_WITH([gtk],
+  [AS_HELP_STRING([--with-gtk],
+    [Which version of gtk to use @<:@default=3@:>@])],
+  [],
+  [with_gtk=3])
+AM_CONDITIONAL([USE_GTK3], [test "x$with_gtk" = "x3"])
+
+AS_IF([test "x$enable_gtk" != "xno"],[
+AS_IF([test "x$with_gtk" = x3],
+        [PKG_CHECK_MODULES(DBUSMENUGTK,  gtk+-3.0 >= $GTK3_REQUIRED_VERSION
+                                         atk
+                                         glib-2.0 >= $GLIB_REQUIRED_VERSION,
+                                         [have_gtk=yes]
+)
+        ],
+      [test "x$with_gtk" = x2],
+        [PKG_CHECK_MODULES(DBUSMENUGTK,  gtk+-2.0 >= $GTK_REQUIRED_VERSION
+                                         atk
+                                         glib-2.0 >= $GLIB_REQUIRED_VERSION,
+                                         [have_gtk=yes]
+)
+        ],
+      [AC_MSG_FAILURE([Value for --with-gtk was neither 2 nor 3])]
+)
+])
+AC_SUBST(DBUSMENUGTK_CFLAGS)
+AC_SUBST(DBUSMENUGTK_LIBS)
+
+###########################
+# Dependencies - dumper
+###########################
+
+X11_REQUIRED_VERSION=1.3
+
+AC_ARG_ENABLE([dumper],
+	AC_HELP_STRING([--disable-dumper], [Disable dbusmenudumper tool]),
+	[enable_dumper=$enableval], [enable_dumper=auto])
+AM_CONDITIONAL([WANT_DBUSMENUDUMPER], [test "x$enable_dumper" != "xno"])
+
+AS_IF([test "x$enable_dumper" != "xno"],[
+PKG_CHECK_MODULES(DBUSMENUDUMPER, gtk+-2.0 >= $GTK_REQUIRED_VERSION
+                                  x11 >= $X11_REQUIRED_VERSION,
+                                  [have_dumper=yes]
+)
+])
+
+AC_SUBST(DBUSMENUDUMPER_CFLAGS)
+AC_SUBST(DBUSMENUDUMPER_LIBS)
+
+###########################
+# Dependencies - Testing
+###########################
+
+JSON_GLIB_REQUIRED_VERSION=0.13.4
+GIO_UNIX_REQUIRED_VERSION=2.24
+
+AC_ARG_ENABLE([tests],
+	AC_HELP_STRING([--disable-tests], [Disable tests]),
+	[enable_tests=$enableval], [enable_tests=auto])
+AM_CONDITIONAL([WANT_TESTS], [test "x$enable_tests" != "xno"])
+
+AS_IF([test "x$enable_tests" != "xno"],[
+PKG_CHECK_MODULES(DBUSMENUTESTS,  json-glib-1.0 >= $JSON_GLIB_REQUIRED_VERSION
+                                  gio-unix-2.0  >= $GIO_UNIX_REQUIRED_VERSION,
+                                  [have_tests=yes]
+)
+PKG_CHECK_MODULES(DBUSMENUTESTSVALGRIND, valgrind, have_valgrind=yes, have_valgrind=no)
+])
+AM_CONDITIONAL([HAVE_VALGRIND], [test "x$have_valgrind" = "xyes"])
+
+AC_SUBST(DBUSMENUTESTS_CFLAGS)
+AC_SUBST(DBUSMENUTESTS_LIBS)
+
+###########################
+# GObject Introspection
+###########################
+
+GOBJECT_INTROSPECTION_CHECK([0.6.7])
+
+PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.10],
+				 introspection_ten=yes,
+				 introspection_ten=no)
+
+AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"])
+
+if test "$enable_introspection" = "yes"; then
+	# Redefine introspection dirs using proper prefixes
+
+	INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir=${datadir} --variable=girdir gobject-introspection-1.0`
+	AC_SUBST(INTROSPECTION_GIRDIR)
+
+	INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0`
+	AC_SUBST(INTROSPECTION_TYPELIBDIR)
+fi
+
+###########################
+# Vala API Generation
+###########################
+
+AC_ARG_ENABLE([vala],
+	AC_HELP_STRING([--disable-vala], [Disable vala]),
+	[enable_vala=$enableval], [enable_vala=auto])
+
+AS_IF([test "x$enable_vala" != "xno"],[
+	AM_COND_IF([HAVE_INTROSPECTION],,[
+		AC_MSG_ERROR([Vala bindings require introspection support, please --enable-introspection])
+	])
+AC_PATH_PROG([VALA_API_GEN], [vapigen])
+])
+AM_CONDITIONAL([HAVE_VALA], [test -n "$VALA_API_GEN"])
+
+###########################
+# XSLT Processor
+###########################
+
+AC_PATH_PROG([XSLT_PROC], [xsltproc])
+
+###########################
+# Lib versioning 
+###########################
+
+LIBDBUSMENU_CURRENT=4
+LIBDBUSMENU_REVISION=12
+LIBDBUSMENU_AGE=0
+
+AC_SUBST(LIBDBUSMENU_CURRENT)
+AC_SUBST(LIBDBUSMENU_REVISION)
+AC_SUBST(LIBDBUSMENU_AGE)
+
+###########################
+# Internationalization
+###########################
+
+GETTEXT_PACKAGE=libdbusmenu
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default gettext domain])
+
+AM_GLIB_GNU_GETTEXT
+
+###########################
+# Massive Debugging
+###########################
+
+with_massivedebugging="no"
+AC_ARG_ENABLE(massivedebugging, AS_HELP_STRING([--enable-massivedebugging], [Print out so much information your brain will hurt]), with_massivedebugging=$enableval, with_massivedebugging=no)
+if test "x$with_massivedebugging" = "xyes"; then
+	AC_DEFINE([MASSIVEDEBUGGING], [1], [Print everyting])
+fi
+
+###########################
+# gcov coverage reporting
+###########################
+
+m4_include([m4/gcov.m4])
+AC_TDD_GCOV
+AM_CONDITIONAL([HAVE_GCOV], [test "x$ac_cv_check_gcov" = xyes])
+AM_CONDITIONAL([HAVE_LCOV], [test "x$ac_cv_check_lcov" = xyes])
+AM_CONDITIONAL([HAVE_GCOVR], [test "x$ac_cv_check_gcovr" = xyes])
+AC_SUBST(COVERAGE_CFLAGS)
+AC_SUBST(COVERAGE_LDFLAGS)
+
+###########################
+# Files
+###########################
+
+AC_OUTPUT([
+Makefile
+po/Makefile.in
+libdbusmenu-glib/Makefile
+libdbusmenu-glib/dbusmenu-glib-0.4.pc
+libdbusmenu-gtk/Makefile
+libdbusmenu-gtk/dbusmenu-gtk-0.4.pc
+libdbusmenu-gtk/dbusmenu-gtk3-0.4.pc
+tools/Makefile
+tools/testapp/Makefile
+tests/Makefile
+tests/dbusmenu-jsonloader-0.4.pc
+docs/Makefile
+docs/libdbusmenu-glib/Makefile
+docs/libdbusmenu-glib/reference/Makefile
+docs/libdbusmenu-glib/reference/version.xml
+docs/libdbusmenu-gtk/Makefile
+docs/libdbusmenu-gtk/reference/Makefile
+docs/libdbusmenu-gtk/reference/version.xml
+])
+
+###########################
+# Results
+###########################
+
+AC_MSG_NOTICE([
+
+libdbusmenu Configuration:
+
+	Prefix:                 $prefix
+	Massive Debugging:      $with_massivedebugging
+	GTK+ Version:           $with_gtk
+])
+
+AS_IF([test "x$have_tests" = "xyes"],
+	AC_MSG_NOTICE([	Tests:                  yes]),
+	AC_MSG_NOTICE([	Tests:                  no])
+)
+
+AS_IF([test "x$enable_gtk" = "xno"],
+	AC_MSG_NOTICE([	Gtk:                    no]),
+	AC_MSG_NOTICE([	Gtk:                    yes (gtk$with_gtk)])
+)
+
+AM_COND_IF([HAVE_VALA],
+	AC_MSG_NOTICE([	Vala bindings:          yes]),
+	AC_MSG_NOTICE([	Vala bindings           no])
+)
+
+AS_IF([test "x$have_dumper" = "xyes"],
+   AC_MSG_NOTICE([	Dumper:                 yes]),
+   AC_MSG_NOTICE([	Dumper:                 no])
+)
+
+AS_IF([test "x$use_gcov" = "xyes"],
+	AC_MSG_NOTICE([	Coverage reporting:     yes]),
+	AC_MSG_NOTICE([	Coverage reporting:     no])
+)
Index: ayatana/libdbusmenu/patches/README
===================================================================
--- ayatana/libdbusmenu/patches/README	(nonexistent)
+++ ayatana/libdbusmenu/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: ayatana/libdbusmenu/patches
===================================================================
--- ayatana/libdbusmenu/patches	(nonexistent)
+++ ayatana/libdbusmenu/patches	(revision 385)

Property changes on: ayatana/libdbusmenu/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana/libdbusmenu
===================================================================
--- ayatana/libdbusmenu	(nonexistent)
+++ ayatana/libdbusmenu	(revision 385)

Property changes on: ayatana/libdbusmenu
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: ayatana
===================================================================
--- ayatana	(nonexistent)
+++ ayatana	(revision 385)

Property changes on: ayatana
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: babl/Makefile
===================================================================
--- babl/Makefile	(nonexistent)
+++ babl/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/babl
+
+versions    = 0.1.106
+pkgname     = babl
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: babl
===================================================================
--- babl	(nonexistent)
+++ babl	(revision 385)

Property changes on: babl
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: blueman/Makefile
===================================================================
--- blueman/Makefile	(nonexistent)
+++ blueman/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/blueman
+
+versions    = 2.3.5
+pkgname     = blueman
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: blueman
===================================================================
--- blueman	(nonexistent)
+++ blueman	(revision 385)

Property changes on: blueman
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: cfitsio/Makefile
===================================================================
--- cfitsio/Makefile	(nonexistent)
+++ cfitsio/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/cfitsio
+
+versions    = 4.3.1
+pkgname     = cfitsio
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: cfitsio
===================================================================
--- cfitsio	(nonexistent)
+++ cfitsio	(revision 385)

Property changes on: cfitsio
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: chromium/Makefile
===================================================================
--- chromium/Makefile	(nonexistent)
+++ chromium/Makefile	(revision 385)
@@ -0,0 +1,68 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/fontconfig
+
+versions    = 123.0.6286.1 119.0.6026.1
+pkgname     = chromium
+
+patches     = $(CURDIR)/patches/chromium-123.0.6286.1-cross-compile.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-dangling-gsl.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-host-pkg-config.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-inc-drop-host-crash.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-oauth2-default.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-gfx-linux-5.10.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-target-aarch64.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-target-arm.patch
+patches    += $(CURDIR)/patches/chromium-123.0.6286.1-target-x86_64.patch
+
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-cross-compile.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-dangling-gsl.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-host-pkg-config.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-inc-drop-host-crash.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-oauth2-default.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-gfx-linux-5.10.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-target-aarch64.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-target-arm.patch
+patches    += $(CURDIR)/patches/chromium-119.0.6026.1-target-x86_64.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(patches):
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-123.0.6286.1-cross-compile-patch       ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-dangling-gsl-patch        ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-host-pkg-config-patch     ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-inc-drop-host-crash-patch ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-oauth2-default-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-gfx-linux-5.10-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-target-aarch64-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-target-arm-patch          ; ./create.patch.sh ) ; \
+	 ( cd create-123.0.6286.1-target-x86_64-patch       ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-cross-compile-patch       ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-dangling-gsl-patch        ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-host-pkg-config-patch     ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-inc-drop-host-crash-patch ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-oauth2-default-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-gfx-linux-5.10-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-target-aarch64-patch      ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-target-arm-patch          ; ./create.patch.sh ) ; \
+	 ( cd create-119.0.6026.1-target-x86_64-patch       ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(patches)
Index: chromium/create-119.0.6026.1-cross-compile-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-cross-compile-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-cross-compile-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-cross-compile.patch

Property changes on: chromium/create-119.0.6026.1-cross-compile-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn	(revision 385)
@@ -0,0 +1,41 @@
+# Copyright 2017 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/toolchain/gcc_toolchain.gni")
+
+gcc_toolchain("default") {
+  cc = getenv("CC")
+  cxx = getenv("CXX")
+  ar = getenv("AR")
+  nm = getenv("NM")
+  ld = cxx
+
+  extra_cflags = getenv("CFLAGS")
+  extra_cppflags = getenv("CPPFLAGS")
+  extra_cxxflags = getenv("CXXFLAGS")
+  extra_ldflags = getenv("LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
+
+gcc_toolchain("host") {
+  cc = getenv("BUILD_CC")
+  cxx = getenv("BUILD_CXX")
+  ar = getenv("BUILD_AR")
+  nm = getenv("BUILD_NM")
+  ld = cxx
+
+  extra_cflags = getenv("BUILD_CFLAGS")
+  extra_cppflags = getenv("BUILD_CPPFLAGS")
+  extra_cxxflags = getenv("BUILD_CXXFLAGS")
+  extra_ldflags = getenv("BUILD_LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = host_cpu
+    current_os = host_os
+  }
+}
Index: chromium/create-119.0.6026.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn	(revision 385)
@@ -0,0 +1,41 @@
+# Copyright 2017 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/toolchain/gcc_toolchain.gni")
+
+gcc_toolchain("default") {
+  cc = getenv("CC")
+  cxx = getenv("CXX")
+  ar = getenv("AR")
+  nm = getenv("NM")
+  ld = cxx
+
+  extra_cflags = getenv("CFLAGS")
+  extra_cppflags = getenv("CPPFLAGS")
+  extra_cxxflags = getenv("CXXFLAGS")
+  extra_ldflags = getenv("LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
+
+gcc_toolchain("host") {
+  cc = getenv("BUILD_CC")
+  cxx = getenv("BUILD_CXX")
+  ar = getenv("BUILD_AR")
+  nm = getenv("BUILD_NM")
+  ld = cxx
+
+  extra_cflags = getenv("BUILD_CFLAGS")
+  extra_cppflags = getenv("BUILD_CPPFLAGS")
+  extra_cxxflags = getenv("BUILD_CXXFLAGS")
+  extra_ldflags = getenv("BUILD_LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
Index: chromium/create-119.0.6026.1-dangling-gsl-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-dangling-gsl-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-dangling-gsl-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-dangling-gsl.patch

Property changes on: chromium/create-119.0.6026.1-dangling-gsl-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc
===================================================================
--- chromium/create-119.0.6026.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc	(nonexistent)
+++ chromium/create-119.0.6026.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc	(revision 385)
@@ -0,0 +1,5095 @@
+// Copyright 2017 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/platform/ax_platform_node_auralinux.h"
+#include "base/memory/raw_ptr.h"
+
+#include <dlfcn.h>
+#include <stdint.h>
+
+#include <algorithm>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/debug/leak_annotations.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
+#include "base/ranges/algorithm.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversion_utils.h"
+#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "ui/accessibility/ax_action_data.h"
+#include "ui/accessibility/ax_enum_util.h"
+#include "ui/accessibility/ax_enums.mojom.h"
+#include "ui/accessibility/ax_node_data.h"
+#include "ui/accessibility/ax_role_properties.h"
+#include "ui/accessibility/ax_selection.h"
+#include "ui/accessibility/platform/atk_util_auralinux.h"
+#include "ui/accessibility/platform/ax_platform_atk_hyperlink.h"
+#include "ui/accessibility/platform/ax_platform_node_delegate.h"
+#include "ui/accessibility/platform/ax_platform_text_boundary.h"
+#include "ui/accessibility/platform/child_iterator.h"
+#include "ui/gfx/geometry/rect_conversions.h"
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 10, 0)
+#define ATK_210
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 12, 0)
+#define ATK_212
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 16, 0)
+#define ATK_216
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 26, 0)
+#define ATK_226
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 30, 0)
+#define ATK_230
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 32, 0)
+#define ATK_232
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 34, 0)
+#define ATK_234
+#endif
+
+namespace ui {
+
+namespace {
+
+// IMPORTANT!
+// These values are written to logs.  Do not renumber or delete
+// existing items; add new entries to the end of the list.
+enum class UmaAtkApi {
+  kGetName = 0,
+  kGetDescription = 1,
+  kGetNChildren = 2,
+  kRefChild = 3,
+  kGetIndexInParent = 4,
+  kGetParent = 5,
+  kRefRelationSet = 6,
+  kGetAttributes = 7,
+  kGetRole = 8,
+  kRefStateSet = 9,
+  // This must always be the last enum. It's okay for its value to
+  // increase, but none of the other enum values may change.
+  kMaxValue = kRefStateSet,
+};
+
+void RecordAccessibilityAtkApi(UmaAtkApi enum_value) {
+  UMA_HISTOGRAM_ENUMERATION("Accessibility.ATK-APIs", enum_value);
+}
+
+// When accepting input from clients calling the API, an ATK character offset
+// of -1 can often represent the length of the string.
+static const int kStringLengthOffset = -1;
+
+// We must forward declare this because it is used by the traditional GObject
+// type manipulation macros.
+namespace atk_object {
+GType GetType();
+}  // namespace atk_object
+
+//
+// ax_platform_node_auralinux AtkObject definition and implementation.
+//
+#define AX_PLATFORM_NODE_AURALINUX_TYPE (atk_object::GetType())
+#define AX_PLATFORM_NODE_AURALINUX(obj)                               \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                              AXPlatformNodeAuraLinuxObject))
+#define AX_PLATFORM_NODE_AURALINUX_CLASS(klass)                      \
+  (G_TYPE_CHECK_CLASS_CAST((klass), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                           AXPlatformNodeAuraLinuxClass))
+#define IS_AX_PLATFORM_NODE_AURALINUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define IS_AX_PLATFORM_NODE_AURALINUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define AX_PLATFORM_NODE_AURALINUX_GET_CLASS(obj)                    \
+  (G_TYPE_INSTANCE_GET_CLASS((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                             AXPlatformNodeAuraLinuxClass))
+
+typedef struct _AXPlatformNodeAuraLinuxObject AXPlatformNodeAuraLinuxObject;
+typedef struct _AXPlatformNodeAuraLinuxClass AXPlatformNodeAuraLinuxClass;
+
+struct _AXPlatformNodeAuraLinuxObject {
+  AtkObject parent;
+  raw_ptr<AXPlatformNodeAuraLinux> m_object;
+};
+
+struct _AXPlatformNodeAuraLinuxClass {
+  AtkObjectClass parent_class;
+};
+
+// The root-level Application object that's the parent of all top-level windows.
+AXPlatformNode* g_root_application = nullptr;
+
+// The last AtkObject with keyboard focus. Tracking this is required to emit the
+// ATK_STATE_FOCUSED change to false.
+AtkObject* g_current_focused = nullptr;
+
+// The last object which was selected. Tracking this is required because
+// widgets in the browser UI only emit notifications upon becoming selected,
+// but clients also expect notifications when items become unselected.
+AXPlatformNodeAuraLinux* g_current_selected = nullptr;
+
+// The AtkObject with role=ATK_ROLE_FRAME that represents the toplevel desktop
+// window with focus. If this window is not one of our windows, this value
+// should be null. This is a weak pointer as well, so its value will also be
+// null if if the AtkObject is destroyed.
+AtkObject* g_active_top_level_frame = nullptr;
+
+AtkObject* g_active_views_dialog = nullptr;
+
+#if defined(ATK_216)
+constexpr AtkRole kStaticRole = ATK_ROLE_STATIC;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_SUBSCRIPT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_SUPERSCRIPT;
+#else
+constexpr AtkRole kStaticRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_TEXT;
+#endif
+
+#if defined(ATK_226)
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_FOOTNOTE;
+#else
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_LIST_ITEM;
+#endif
+
+#if defined(ATK_234)
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_CONTENT_DELETION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_CONTENT_INSERTION;
+#else
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_SECTION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_SECTION;
+#endif
+
+using GetTypeFunc = GType (*)();
+using GetColumnHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowColumnSpanFunc = bool (*)(AtkTableCell* cell,
+                                      gint* row,
+                                      gint* column,
+                                      gint* row_span,
+                                      gint* col_span);
+
+static GetTypeFunc g_atk_table_cell_get_type;
+static GetColumnHeaderCellsFunc g_atk_table_cell_get_column_header_cells;
+static GetRowHeaderCellsFunc g_atk_table_cell_get_row_header_cells;
+static GetRowColumnSpanFunc g_atk_table_cell_get_row_column_span;
+
+// The ATK API often requires pointers to be used as out arguments, while
+// allowing for those pointers to be null if the caller is not interested in
+// the value. This function is a simpler helper to avoid continually checking
+// for null and to help prevent forgetting to check for null.
+void SetIntPointerValueIfNotNull(int* pointer, int value) {
+  if (pointer)
+    *pointer = value;
+}
+
+#if defined(ATK_230)
+bool SupportsAtkComponentScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_component_scroll_to_point");
+}
+#endif
+
+#if defined(ATK_232)
+bool SupportsAtkTextScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_text_scroll_substring_to_point");
+}
+#endif
+
+AtkObject* FindAtkObjectParentFrame(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_FRAME)
+      return node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return nullptr;
+}
+
+AtkObject* FindAtkObjectToplevelParentDocument(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  AtkObject* toplevel_document = nullptr;
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+      toplevel_document = node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return toplevel_document;
+}
+
+bool IsFrameAncestorOfAtkObject(AtkObject* frame, AtkObject* atk_object) {
+  AtkObject* current_frame = FindAtkObjectParentFrame(atk_object);
+  while (current_frame) {
+    if (current_frame == frame)
+      return true;
+    AXPlatformNodeAuraLinux* frame_node =
+        AXPlatformNodeAuraLinux::FromAtkObject(current_frame);
+    current_frame = FindAtkObjectParentFrame(frame_node->GetParent());
+  }
+  return false;
+}
+
+// Returns a stack of AtkObjects of activated popup menus. Since each popup
+// menu and submenu has its own native window, we want to properly manage the
+// activated state for their containing frames.
+std::vector<AtkObject*>& GetActiveMenus() {
+  static base::NoDestructor<std::vector<AtkObject*>> active_menus;
+  return *active_menus;
+}
+
+std::map<AtkObject*, FindInPageResultInfo>& GetActiveFindInPageResults() {
+  static base::NoDestructor<std::map<AtkObject*, FindInPageResultInfo>>
+      active_results;
+  return *active_results;
+}
+
+// The currently active frame is g_active_top_level_frame, unless there is an
+// active menu. If there is an active menu the parent frame of the
+// most-recently opened active menu should be the currently active frame.
+AtkObject* ComputeActiveTopLevelFrame() {
+  if (!GetActiveMenus().empty())
+    return FindAtkObjectParentFrame(GetActiveMenus().back());
+  return g_active_top_level_frame;
+}
+
+const char* GetUniqueAccessibilityGTypeName(
+    ImplementedAtkInterfaces interface_mask) {
+  // 37 characters is enough for "AXPlatformNodeAuraLinux%x" with any integer
+  // value.
+  static char name[37];
+  snprintf(name, sizeof(name), "AXPlatformNodeAuraLinux%x",
+           interface_mask.value());
+  return name;
+}
+
+void SetWeakGPtrToAtkObject(AtkObject** weak_pointer, AtkObject* new_value) {
+  DCHECK(weak_pointer);
+  if (*weak_pointer == new_value)
+    return;
+
+  if (*weak_pointer) {
+    g_object_remove_weak_pointer(G_OBJECT(*weak_pointer),
+                                 reinterpret_cast<void**>(weak_pointer));
+  }
+
+  *weak_pointer = new_value;
+
+  if (new_value) {
+    g_object_add_weak_pointer(G_OBJECT(new_value),
+                              reinterpret_cast<void**>(weak_pointer));
+  }
+}
+
+void SetActiveTopLevelFrame(AtkObject* new_top_level_frame) {
+  SetWeakGPtrToAtkObject(&g_active_top_level_frame, new_top_level_frame);
+}
+
+AXCoordinateSystem AtkCoordTypeToAXCoordinateSystem(
+    AtkCoordType coordinate_type) {
+  switch (coordinate_type) {
+    case ATK_XY_SCREEN:
+      return AXCoordinateSystem::kScreenDIPs;
+    case ATK_XY_WINDOW:
+      return AXCoordinateSystem::kRootFrame;
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      // AXCoordinateSystem does not support parent coordinates.
+      NOTIMPLEMENTED();
+      return AXCoordinateSystem::kFrame;
+#endif
+    default:
+      return AXCoordinateSystem::kScreenDIPs;
+  }
+}
+
+const char* BuildDescriptionFromHeaders(AXPlatformNodeDelegate* delegate,
+                                        const std::vector<int32_t>& ids) {
+  std::vector<std::string> names;
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = delegate->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        if (const gchar* name = atk_object_get_name(atk_header))
+          names.push_back(name);
+      }
+    }
+  }
+
+  std::string result = base::JoinString(names, " ");
+
+#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)
+  // http://crbug.com/982839
+  // atk_table_get_column_description and atk_table_get_row_description return
+  // const gchar*, which suggests the caller does not gain ownership of the
+  // returned string. The g_strdup below causes a new allocation, which does not
+  // fit that pattern and causes a leak in tests.
+  ScopedLeakSanitizerDisabler lsan_disabler;
+#endif
+
+  return g_strdup(result.c_str());
+}
+
+AtkAttributeSet* PrependAtkAttributeToAtkAttributeSet(
+    const char* name,
+    const char* value,
+    AtkAttributeSet* attribute_set) {
+  AtkAttribute* attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  attribute->name = g_strdup(name);
+  attribute->value = g_strdup(value);
+  return g_slist_prepend(attribute_set, attribute);
+}
+
+void PrependTextAttributeToSet(const std::string& attribute,
+                               const std::string& value,
+                               AtkAttributeSet** attributes) {
+  DCHECK(attributes);
+
+  AtkAttribute* new_attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  new_attribute->name = g_strdup(attribute.c_str());
+  new_attribute->value = g_strdup(value.c_str());
+  *attributes = g_slist_prepend(*attributes, new_attribute);
+}
+
+void PrependAtkTextAttributeToSet(const AtkTextAttribute attribute,
+                                  const std::string& value,
+                                  AtkAttributeSet** attributes) {
+  PrependTextAttributeToSet(atk_text_attribute_get_name(attribute), value,
+                            attributes);
+}
+
+std::string ToAtkTextAttributeColor(const std::string color) {
+  // The platform-independent color string is in the form "rgb(r, g, b)",
+  // but ATK expects a string like "r, g, b". We convert the string here
+  // by stripping away the unnecessary characters.
+  DCHECK(base::StartsWith(color, "rgb(", base::CompareCase::INSENSITIVE_ASCII));
+  DCHECK(base::EndsWith(color, ")", base::CompareCase::INSENSITIVE_ASCII));
+  return color.substr(4, color.length() - 5);
+}
+
+AtkAttributeSet* ToAtkAttributeSet(const TextAttributeList& attributes) {
+  AtkAttributeSet* copied_attributes = nullptr;
+  for (const auto& attribute : attributes) {
+    if (attribute.first == "background-color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_BG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "font-family") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FAMILY_NAME, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-size") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_SIZE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-weight" && attribute.second == "bold") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_WEIGHT, "700",
+                                   &copied_attributes);
+    } else if (attribute.first == "font-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STYLE, "italic",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-line-through-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STRIKETHROUGH, "true",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-underline-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "single",
+                                   &copied_attributes);
+    } else if (attribute.first == "invalid") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_INVALID, attribute.second,
+                                   &copied_attributes);
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "error",
+                                   &copied_attributes);
+    } else if (attribute.first == "language") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_LANGUAGE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "writing-mode") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_DIRECTION, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "text-position") {
+      PrependTextAttributeToSet(attribute.first, attribute.second,
+                                &copied_attributes);
+    }
+  }
+
+  return g_slist_reverse(copied_attributes);
+}
+
+namespace atk_component {
+
+void GetExtents(AtkComponent* atk_component,
+                gint* x,
+                gint* y,
+                gint* width,
+                gint* height,
+                AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetExtents(x, y, width, height, coord_type);
+}
+
+void GetPosition(AtkComponent* atk_component,
+                 gint* x,
+                 gint* y,
+                 AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+void GetSize(AtkComponent* atk_component, gint* width, gint* height) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+AtkObject* RefAccesibleAtPoint(AtkComponent* atk_component,
+                               gint x,
+                               gint y,
+                               AtkCoordType coord_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), nullptr);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  AtkObject* result = obj->HitTestSync(x, y, coord_type);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+gboolean GrabFocus(AtkComponent* atk_component) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  return obj->GrabFocus();
+}
+
+#if defined(ATK_230)
+gboolean ScrollTo(AtkComponent* atk_component, AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollNodeIntoView(scroll_type);
+  return TRUE;
+}
+
+gboolean ScrollToPoint(AtkComponent* atk_component,
+                       AtkCoordType atk_coord_type,
+                       gint x,
+                       gint y) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollToPoint(atk_coord_type, x, y);
+  return TRUE;
+}
+#endif
+
+void Init(AtkComponentIface* iface) {
+  iface->get_extents = GetExtents;
+  iface->get_position = GetPosition;
+  iface->get_size = GetSize;
+  iface->ref_accessible_at_point = RefAccesibleAtPoint;
+  iface->grab_focus = GrabFocus;
+#if defined(ATK_230)
+  if (SupportsAtkComponentScrollingInterface()) {
+    iface->scroll_to = ScrollTo;
+    iface->scroll_to_point = ScrollToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_component
+
+namespace atk_action {
+
+gboolean DoAction(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), FALSE);
+  g_return_val_if_fail(index >= 0, FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), FALSE);
+
+  AXActionData data;
+  data.action = actions[index];
+  return obj->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gint GetNActions(AtkAction* atk_action) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return static_cast<gint>(obj->GetDelegate()->GetSupportedActions().size());
+}
+
+const gchar* GetDescription(AtkAction*, gint) {
+  // Not implemented. Right now Orca does not provide this and
+  // Chromium is not providing a string for the action description.
+  return nullptr;
+}
+
+const gchar* GetName(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0.
+    return obj->GetDefaultActionName();
+  }
+  return ToString(actions[index]);
+}
+
+const gchar* GetKeybinding(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0. Only the
+    // default action has a key binding.
+    return obj->GetStringAttribute(ax::mojom::StringAttribute::kAccessKey)
+        .c_str();
+  }
+  return nullptr;
+}
+
+void Init(AtkActionIface* iface) {
+  iface->do_action = DoAction;
+  iface->get_n_actions = GetNActions;
+  iface->get_description = GetDescription;
+  iface->get_name = GetName;
+  iface->get_keybinding = GetKeybinding;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_action
+
+namespace atk_document {
+
+const gchar* GetDocumentAttributeValue(AtkDocument* atk_doc,
+                                       const gchar* attribute) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributeValue(attribute);
+}
+
+AtkAttributeSet* GetDocumentAttributes(AtkDocument* atk_doc) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributes();
+}
+
+void Init(AtkDocumentIface* iface) {
+  iface->get_document_attribute_value = GetDocumentAttributeValue;
+  iface->get_document_attributes = GetDocumentAttributes;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_document
+
+namespace atk_image {
+
+void GetImagePosition(AtkImage* atk_img,
+                      gint* x,
+                      gint* y,
+                      AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+const gchar* GetImageDescription(AtkImage* atk_img) {
+  g_return_val_if_fail(ATK_IMAGE(atk_img), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+void GetImageSize(AtkImage* atk_img, gint* width, gint* height) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+void Init(AtkImageIface* iface) {
+  iface->get_image_position = GetImagePosition;
+  iface->get_image_description = GetImageDescription;
+  iface->get_image_size = GetImageSize;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_image
+
+namespace atk_value {
+
+void GetCurrentValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kValueForRange,
+                                 value);
+}
+
+void GetMinimumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMinValueForRange,
+                                 value);
+}
+
+void GetMaximumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMaxValueForRange,
+                                 value);
+}
+
+void GetMinimumIncrement(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kStepValueForRange,
+                                 value);
+}
+
+gboolean SetCurrentValue(AtkValue* atk_value, const GValue* value) {
+  g_return_val_if_fail(ATK_IS_VALUE(atk_value), FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  std::string new_value;
+  switch (G_VALUE_TYPE(value)) {
+    case G_TYPE_FLOAT:
+      new_value = base::NumberToString(g_value_get_float(value));
+      break;
+    case G_TYPE_INT:
+      new_value = base::NumberToString(g_value_get_int(value));
+      break;
+    case G_TYPE_INT64:
+      new_value = base::NumberToString(g_value_get_int64(value));
+      break;
+    case G_TYPE_STRING:
+      new_value = g_value_get_string(value);
+      break;
+    default:
+      return FALSE;
+  }
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kSetValue;
+  data.value = new_value;
+  obj->GetDelegate()->AccessibilityPerformAction(data);
+  return TRUE;
+}
+
+void Init(AtkValueIface* iface) {
+  iface->get_current_value = GetCurrentValue;
+  iface->get_maximum_value = GetMaximumValue;
+  iface->get_minimum_value = GetMinimumValue;
+  iface->get_minimum_increment = GetMinimumIncrement;
+  iface->set_current_value = SetCurrentValue;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_value
+
+namespace atk_hyperlink {
+
+AtkHyperlink* GetHyperlink(AtkHyperlinkImpl* atk_hyperlink_impl) {
+  g_return_val_if_fail(ATK_HYPERLINK_IMPL(atk_hyperlink_impl), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_hyperlink_impl);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  AtkHyperlink* atk_hyperlink = obj->GetAtkHyperlink();
+  g_object_ref(atk_hyperlink);
+
+  return atk_hyperlink;
+}
+
+void Init(AtkHyperlinkImplIface* iface) {
+  iface->get_hyperlink = GetHyperlink;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hyperlink
+
+namespace atk_hypertext {
+
+AtkHyperlink* GetLink(AtkHypertext* hypertext, int index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return nullptr;
+
+  const AXLegacyHypertext& ax_hypertext = obj->GetAXHypertext();
+  if (index >= static_cast<int>(ax_hypertext.hyperlinks.size()) || index < 0)
+    return nullptr;
+
+  int32_t id = ax_hypertext.hyperlinks[index];
+  auto* link = static_cast<AXPlatformNodeAuraLinux*>(
+      AXPlatformNodeBase::GetFromUniqueId(id));
+  if (!link)
+    return nullptr;
+
+  return link->GetAtkHyperlink();
+}
+
+int GetNLinks(AtkHypertext* hypertext) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  return obj ? obj->GetAXHypertext().hyperlinks.size() : 0;
+}
+
+int GetLinkIndex(AtkHypertext* hypertext, int char_index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return -1;
+
+  auto it = obj->GetAXHypertext().hyperlink_offset_to_index.find(char_index);
+  if (it == obj->GetAXHypertext().hyperlink_offset_to_index.end())
+    return -1;
+  return it->second;
+}
+
+void Init(AtkHypertextIface* iface) {
+  iface->get_link = GetLink;
+  iface->get_n_links = GetNLinks;
+  iface->get_link_index = GetLinkIndex;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hypertext
+
+namespace atk_text {
+
+gchar* GetText(AtkText* atk_text, gint start_offset, gint end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  std::u16string text = obj->GetHypertext();
+
+  start_offset = obj->UnicodeToUTF16OffsetInText(start_offset);
+  if (start_offset < 0 || start_offset >= static_cast<int>(text.size()))
+    return nullptr;
+
+  if (end_offset < 0) {
+    end_offset = text.size();
+  } else {
+    end_offset = obj->UnicodeToUTF16OffsetInText(end_offset);
+    end_offset =
+        std::clamp(static_cast<int>(text.size()), start_offset, end_offset);
+  }
+
+  DCHECK_GE(start_offset, 0);
+  DCHECK_GE(end_offset, start_offset);
+
+  const auto ret_substr = base::UTF16ToUTF8(text.substr(start_offset, end_offset - start_offset));
+  return g_strdup(ret_substr.c_str());
+}
+
+gint GetCharacterCount(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->UTF16ToUnicodeOffsetInText(obj->GetHypertext().length());
+}
+
+gunichar GetCharacterAtOffset(AtkText* atk_text, int offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  std::u16string text = obj->GetHypertext();
+  size_t text_length = text.length();
+
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+  offset = std::max(offset, 0);
+  size_t limited_offset = std::min(static_cast<size_t>(offset), text_length);
+
+  base_icu::UChar32 code_point;
+  base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &limited_offset,
+                             &code_point);
+  return code_point;
+}
+
+gint GetOffsetAtPoint(AtkText* text, gint x, gint y, AtkCoordType coords) {
+  g_return_val_if_fail(ATK_IS_TEXT(text), -1);
+
+  AtkObject* atk_object = ATK_OBJECT(text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  return obj->GetTextOffsetAtPoint(x, y, coords);
+}
+
+// This function returns a single character as a UTF-8 encoded C string because
+// the character may be encoded into more than one byte.
+char* GetCharacter(AtkText* atk_text,
+                   int offset,
+                   int* start_offset,
+                   int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= GetCharacterCount(atk_text))
+    return nullptr;
+
+  char* text = GetText(atk_text, offset, offset + 1);
+  if (!text)
+    return nullptr;
+
+  *start_offset = offset;
+  *end_offset = offset + 1;
+  return text;
+}
+
+char* GetTextWithBoundaryType(AtkText* atk_text,
+                              int offset,
+                              ax::mojom::TextBoundary boundary,
+                              int* start_offset_ptr,
+                              int* end_offset_ptr) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= atk_text_get_character_count(atk_text))
+    return nullptr;
+
+  // The offset that we receive from the API is a Unicode character offset.
+  // Since we calculate boundaries in terms of UTF-16 code point offsets, we
+  // need to convert this input value.
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+
+  int start_offset = obj->FindTextBoundary(
+      boundary, offset, ax::mojom::MoveDirection::kBackward,
+      ax::mojom::TextAffinity::kDownstream);
+  int end_offset = obj->FindTextBoundary(boundary, offset,
+                                         ax::mojom::MoveDirection::kForward,
+                                         ax::mojom::TextAffinity::kDownstream);
+  if (start_offset < 0 || end_offset < 0)
+    return nullptr;
+
+  DCHECK_LE(start_offset, end_offset)
+      << "Start offset should be less than or equal the end offset.";
+
+  // The ATK API is also expecting Unicode character offsets as output
+  // values.
+  *start_offset_ptr = obj->UTF16ToUnicodeOffsetInText(start_offset);
+  *end_offset_ptr = obj->UTF16ToUnicodeOffsetInText(end_offset);
+
+  std::u16string text = obj->GetHypertext();
+  DCHECK_LE(end_offset, static_cast<int>(text.size()));
+
+  std::u16string substr = text.substr(start_offset, end_offset - start_offset);
+  const auto ret_substr = base::UTF16ToUTF8(substr);
+  return g_strdup(ret_substr.c_str());
+}
+
+char* GetTextAtOffset(AtkText* atk_text,
+                      int offset,
+                      AtkTextBoundary atk_boundary,
+                      int* start_offset,
+                      int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+  ax::mojom::TextBoundary boundary = FromAtkTextBoundary(atk_boundary);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+
+char* GetTextAfterOffset(AtkText* atk_text,
+                         int offset,
+                         AtkTextBoundary boundary,
+                         int* start_offset,
+                         int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset + 1, start_offset, end_offset);
+}
+
+char* GetTextBeforeOffset(AtkText* atk_text,
+                          int offset,
+                          AtkTextBoundary boundary,
+                          int* start_offset,
+                          int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset - 1, start_offset, end_offset);
+}
+
+gint GetCaretOffset(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return -1;
+  return obj->GetCaretOffset();
+}
+
+gboolean SetCaretOffset(AtkText* atk_text, gint offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+  if (!obj->SetCaretOffset(offset))
+    return FALSE;
+
+  // Orca expects atk_text_set_caret_offset to either focus the target element
+  // or set the sequential focus navigation starting point there.
+  int utf16_offset = obj->UnicodeToUTF16OffsetInText(offset);
+  obj->GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(
+      utf16_offset);
+
+  return TRUE;
+}
+
+int GetNSelections(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return 0;
+
+  if (obj->HasSelection())
+    return 1;
+
+  absl::optional<FindInPageResultInfo> result =
+      obj->GetSelectionOffsetsFromFindInPage();
+  if (result.has_value() && result->node == ATK_OBJECT(atk_text))
+    return 1;
+
+  return 0;
+}
+
+gchar* GetSelection(AtkText* atk_text,
+                    int selection_num,
+                    int* start_offset,
+                    int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return nullptr;
+  if (selection_num != 0)
+    return nullptr;
+
+  return obj->GetSelectionWithText(start_offset, end_offset);
+}
+
+gboolean RemoveSelection(AtkText* atk_text, int selection_num) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  // Simply collapse the selection to the position of the caret if a caret is
+  // visible, otherwise set the selection to 0.
+  int selection_end = obj->UTF16ToUnicodeOffsetInText(
+      obj->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd));
+  return SetCaretOffset(atk_text, selection_end);
+}
+
+gboolean SetSelection(AtkText* atk_text,
+                      int selection_num,
+                      int start_offset,
+                      int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->SetTextSelectionForAtkText(start_offset, end_offset);
+}
+
+gboolean AddSelection(AtkText* atk_text, int start_offset, int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  // We only support one selection.
+  return SetSelection(atk_text, 0, start_offset, end_offset);
+}
+
+#if defined(ATK_210)
+char* GetStringAtOffset(AtkText* atk_text,
+                        int offset,
+                        AtkTextGranularity atk_granularity,
+                        int* start_offset,
+                        int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  ax::mojom::TextBoundary boundary = FromAtkTextGranularity(atk_granularity);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+#endif
+
+#if defined(ATK_230)
+gfx::Rect GetUnclippedParentHypertextRangeBoundsRect(
+    AXPlatformNodeDelegate* ax_platform_node_delegate,
+    const int start_offset,
+    const int end_offset) {
+  const AXPlatformNode* parent_platform_node =
+      AXPlatformNode::FromNativeViewAccessible(
+          ax_platform_node_delegate->GetParent());
+  if (!parent_platform_node)
+    return gfx::Rect();
+
+  const AXPlatformNodeDelegate* parent_ax_platform_node_delegate =
+      parent_platform_node->GetDelegate();
+  if (!parent_ax_platform_node_delegate)
+    return gfx::Rect();
+
+  return ax_platform_node_delegate->GetHypertextRangeBoundsRect(
+             start_offset, end_offset, AXCoordinateSystem::kRootFrame,
+             AXClippingBehavior::kUnclipped) -
+         parent_ax_platform_node_delegate
+             ->GetBoundsRect(AXCoordinateSystem::kRootFrame,
+                             AXClippingBehavior::kClipped)
+             .OffsetFromOrigin();
+}
+#endif
+
+void GetCharacterExtents(AtkText* atk_text,
+                         int offset,
+                         int* x,
+                         int* y,
+                         int* width,
+                         int* height,
+                         AtkCoordType coordinate_type) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(obj->GetDelegate(),
+                                                          offset, offset + 1);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(offset),
+            obj->UnicodeToUTF16OffsetInText(offset + 1),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  if (x)
+    *x = rect.x();
+  if (y)
+    *y = rect.y();
+  if (width)
+    *width = rect.width();
+  if (height)
+    *height = rect.height();
+}
+
+void GetRangeExtents(AtkText* atk_text,
+                     int start_offset,
+                     int end_offset,
+                     AtkCoordType coordinate_type,
+                     AtkTextRectangle* out_rectangle) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  if (!out_rectangle)
+    return;
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(
+            obj->GetDelegate(), start_offset, end_offset);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(start_offset),
+            obj->UnicodeToUTF16OffsetInText(end_offset),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  out_rectangle->x = rect.x();
+  out_rectangle->y = rect.y();
+  out_rectangle->width = rect.width();
+  out_rectangle->height = rect.height();
+}
+
+AtkAttributeSet* GetRunAttributes(AtkText* atk_text,
+                                  gint offset,
+                                  gint* start_offset,
+                                  gint* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  SetIntPointerValueIfNotNull(start_offset, -1);
+  SetIntPointerValueIfNotNull(end_offset, -1);
+
+  if (offset < 0 || offset > GetCharacterCount(atk_text))
+    return nullptr;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return ToAtkAttributeSet(
+      obj->GetTextAttributes(offset, start_offset, end_offset));
+}
+
+AtkAttributeSet* GetDefaultAttributes(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+  return ToAtkAttributeSet(obj->GetDefaultTextAttributes());
+}
+
+#if defined(ATK_232)
+gboolean ScrollSubstringTo(AtkText* atk_text,
+                           gint start_offset,
+                           gint end_offset,
+                           AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringIntoView(scroll_type, start_offset, end_offset);
+}
+
+gboolean ScrollSubstringToPoint(AtkText* atk_text,
+                                gint start_offset,
+                                gint end_offset,
+                                AtkCoordType atk_coord_type,
+                                gint x,
+                                gint y) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringToPoint(start_offset, end_offset, atk_coord_type,
+                                     x, y);
+}
+#endif  // ATK_232
+
+void Init(AtkTextIface* iface) {
+  iface->get_text = GetText;
+  iface->get_character_count = GetCharacterCount;
+  iface->get_character_at_offset = GetCharacterAtOffset;
+  iface->get_offset_at_point = GetOffsetAtPoint;
+  iface->get_text_after_offset = GetTextAfterOffset;
+  iface->get_text_before_offset = GetTextBeforeOffset;
+  iface->get_text_at_offset = GetTextAtOffset;
+  iface->get_caret_offset = GetCaretOffset;
+  iface->set_caret_offset = SetCaretOffset;
+  iface->get_character_extents = GetCharacterExtents;
+  iface->get_range_extents = GetRangeExtents;
+  iface->get_n_selections = GetNSelections;
+  iface->get_selection = GetSelection;
+  iface->add_selection = AddSelection;
+  iface->remove_selection = RemoveSelection;
+  iface->set_selection = SetSelection;
+
+  iface->get_run_attributes = GetRunAttributes;
+  iface->get_default_attributes = GetDefaultAttributes;
+
+#if defined(ATK_210)
+  iface->get_string_at_offset = GetStringAtOffset;
+#endif
+
+#if defined(ATK_232)
+  if (SupportsAtkTextScrollingInterface()) {
+    iface->scroll_substring_to = ScrollSubstringTo;
+    iface->scroll_substring_to_point = ScrollSubstringToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_text
+
+namespace atk_window {
+void Init(AtkWindowIface* iface) {}
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+}  // namespace atk_window
+
+namespace atk_selection {
+
+gboolean AddSelection(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  if (!child)
+    return FALSE;
+
+  if (!child->SupportsSelectionWithAtkSelection())
+    return FALSE;
+
+  bool selected = child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+  if (selected)
+    return TRUE;
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kDoDefault;
+  return child->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gboolean ClearSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (!selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+AtkObject* RefSelection(AtkSelection* selection, gint requested_child_index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return nullptr;
+
+  if (auto* selected_child = obj->GetSelectedItem(requested_child_index)) {
+    if (AtkObject* atk_object = selected_child->GetNativeViewAccessible()) {
+      g_object_ref(atk_object);
+      return atk_object;
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetSelectionCount(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return 0;
+
+  return obj->GetSelectionCount();
+}
+
+gboolean IsChildSelected(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  return child && child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+}
+
+gboolean RemoveSelection(AtkSelection* selection,
+                         gint index_into_selected_children) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected && index_into_selected_children == 0) {
+      if (!child->SupportsSelectionWithAtkSelection())
+        return FALSE;
+
+      AXActionData data;
+      data.action = ax::mojom::Action::kDoDefault;
+      return child->GetDelegate()->AccessibilityPerformAction(data);
+    } else if (selected) {
+      index_into_selected_children--;
+    }
+  }
+
+  return FALSE;
+}
+
+gboolean SelectAllSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+void Init(AtkSelectionIface* iface) {
+  iface->add_selection = AddSelection;
+  iface->clear_selection = ClearSelection;
+  iface->ref_selection = RefSelection;
+  iface->get_selection_count = GetSelectionCount;
+  iface->is_child_selected = IsChildSelected;
+  iface->remove_selection = RemoveSelection;
+  iface->select_all_selection = SelectAllSelection;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_selection
+
+namespace atk_table {
+
+AtkObject* RefAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      if (AtkObject* atk_cell = cell->GetNativeViewAccessible()) {
+        g_object_ref(atk_cell);
+        return atk_cell;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetIndexAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableCellIndex().has_value());
+      return cell->GetTableCellIndex().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetColumnAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableColumn().has_value());
+      return cell->GetTableColumn().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetRowAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableRow().has_value());
+      return cell->GetTableRow().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetNColumns(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableColumnCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetNRows(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableRowCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetColumnExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableColumnSpan().has_value());
+      return cell->GetTableColumnSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+gint GetRowExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableRowSpan().has_value());
+      return cell->GetTableRowSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+AtkObject* GetColumnHeader(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one column header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the column
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetRowHeader(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one row header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the row
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetCaption(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (auto* caption = obj->GetTableCaption())
+      return caption->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+const gchar* GetColumnDescription(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+const gchar* GetRowDescription(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+void Init(AtkTableIface* iface) {
+  iface->ref_at = RefAt;
+  iface->get_index_at = GetIndexAt;
+  iface->get_column_at_index = GetColumnAtIndex;
+  iface->get_row_at_index = GetRowAtIndex;
+  iface->get_n_columns = GetNColumns;
+  iface->get_n_rows = GetNRows;
+  iface->get_column_extent_at = GetColumnExtentAt;
+  iface->get_row_extent_at = GetRowExtentAt;
+  iface->get_column_header = GetColumnHeader;
+  iface->get_row_header = GetRowHeader;
+  iface->get_caption = GetCaption;
+  iface->get_column_description = GetColumnDescription;
+  iface->get_row_description = GetRowDescription;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table
+
+// The ATK table cell interface was added in ATK 2.12.
+#if defined(ATK_212)
+
+namespace atk_table_cell {
+
+gint GetColumnSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (const AXPlatformNodeBase* obj =
+          AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableColumnSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetColumnHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetColHeaderNodeIds() on a column header cell will include that
+  // column header, along with any other column headers in the column which
+  // may or may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> col_index = obj->GetTableColumn();
+  if (!col_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetColHeaderNodeIds(*col_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+gboolean GetCellPosition(AtkTableCell* cell, gint* row, gint* column) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      FALSE);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    absl::optional<int> row_index = obj->GetTableRow();
+    absl::optional<int> col_index = obj->GetTableColumn();
+    if (!row_index || !col_index)
+      return false;
+
+    *row = *row_index;
+    *column = *col_index;
+    return true;
+  }
+
+  return false;
+}
+
+gint GetRowSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableRowSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetRowHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetRowHeaderNodeIds() on a row header cell will include that
+  // row header, along with any other row headers in the row which may or
+  // may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> row_index = obj->GetTableRow();
+  if (!row_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetRowHeaderNodeIds(*row_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+AtkObject* GetTable(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    if (auto* table = obj->GetTable())
+      return table->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+using AtkTableCellIface = struct _AtkTableCellIface;
+
+void Init(AtkTableCellIface* iface) {
+  iface->get_column_span = GetColumnSpan;
+  iface->get_column_header_cells = GetColumnHeaderCells;
+  iface->get_position = GetCellPosition;
+  iface->get_row_span = GetRowSpan;
+  iface->get_row_header_cells = GetRowHeaderCells;
+  iface->get_table = GetTable;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table_cell
+
+#endif  // ATK_212
+
+namespace atk_object {
+
+gpointer kAXPlatformNodeAuraLinuxParentClass = nullptr;
+
+const gchar* GetName(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (!obj->IsNameExposed())
+    return nullptr;
+
+  ax::mojom::NameFrom name_from = obj->GetNameFrom();
+  if (obj->GetName().empty() &&
+      name_from != ax::mojom::NameFrom::kAttributeExplicitlyEmpty) {
+    return nullptr;
+  }
+
+  obj->accessible_name_ = obj->GetName();
+  return obj->accessible_name_.c_str();
+}
+
+const gchar* AtkGetName(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetName);
+  return GetName(atk_object);
+}
+
+const gchar* GetDescription(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+const gchar* AtkGetDescription(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetDescription);
+  return GetDescription(atk_object);
+}
+
+gint GetNChildren(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->GetChildCount();
+}
+
+gint AtkGetNChildren(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetNChildren);
+  return GetNChildren(atk_object);
+}
+
+AtkObject* RefChild(AtkObject* atk_object, gint index) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return nullptr;
+
+  AtkObject* result = obj->ChildAtIndex(index);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+AtkObject* AtkRefChild(AtkObject* atk_object, gint index) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefChild);
+  return RefChild(atk_object, index);
+}
+
+gint GetIndexInParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  auto index_in_parent = obj->GetIndexInParent();
+  return index_in_parent.has_value()
+             ? static_cast<gint>(index_in_parent.value())
+             : -1;
+}
+
+gint AtkGetIndexInParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetIndexInParent);
+  return GetIndexInParent(atk_object);
+}
+
+AtkObject* GetParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetParent();
+}
+
+AtkObject* AtkGetParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetParent);
+  return GetParent(atk_object);
+}
+
+AtkRelationSet* RefRelationSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return atk_relation_set_new();
+  return obj->GetAtkRelations();
+}
+
+AtkRelationSet* AtkRefRelationSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefRelationSet);
+  // Enables AX mode. Most AT does not call AtkRefRelationSet, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return RefRelationSet(atk_object);
+}
+
+AtkAttributeSet* GetAttributes(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetAtkAttributes();
+}
+
+AtkAttributeSet* AtkGetAttributes(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetAttributes);
+  // Enables AX mode. Most AT does not call AtkGetAttributes, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return GetAttributes(atk_object);
+}
+
+AtkRole GetRole(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), ATK_ROLE_INVALID);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return ATK_ROLE_INVALID;
+  return obj->GetAtkRole();
+}
+
+AtkRole AtkGetRole(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetRole);
+  return GetRole(atk_object);
+}
+
+AtkStateSet* RefStateSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AtkStateSet* atk_state_set =
+      ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+          ->ref_state_set(atk_object);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFUNCT);
+  } else {
+    obj->GetAtkState(atk_state_set);
+  }
+  return atk_state_set;
+}
+
+AtkStateSet* AtkRefStateSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefStateSet);
+  return RefStateSet(atk_object);
+}
+
+void Initialize(AtkObject* atk_object, gpointer data) {
+  if (ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->initialize) {
+    ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+        ->initialize(atk_object, data);
+  }
+
+  AX_PLATFORM_NODE_AURALINUX(atk_object)->m_object =
+      reinterpret_cast<AXPlatformNodeAuraLinux*>(data);
+}
+
+void Finalize(GObject* atk_object) {
+  G_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->finalize(atk_object);
+}
+
+void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
+  GObjectClass* gobject_class = G_OBJECT_CLASS(class_pointer);
+  kAXPlatformNodeAuraLinuxParentClass = g_type_class_peek_parent(gobject_class);
+  gobject_class->finalize = Finalize;
+
+  AtkObjectClass* atk_object_class = ATK_OBJECT_CLASS(gobject_class);
+  atk_object_class->initialize = Initialize;
+  atk_object_class->get_name = AtkGetName;
+  atk_object_class->get_description = AtkGetDescription;
+  atk_object_class->get_parent = AtkGetParent;
+  atk_object_class->get_n_children = AtkGetNChildren;
+  atk_object_class->ref_child = AtkRefChild;
+  atk_object_class->get_role = AtkGetRole;
+  atk_object_class->ref_state_set = AtkRefStateSet;
+  atk_object_class->get_index_in_parent = AtkGetIndexInParent;
+  atk_object_class->ref_relation_set = AtkRefRelationSet;
+  atk_object_class->get_attributes = AtkGetAttributes;
+}
+
+GType GetType() {
+  AXPlatformNodeAuraLinux::EnsureGTypeInit();
+
+  static gsize type_id = 0;
+  if (g_once_init_enter(&type_id)) {
+    static const GTypeInfo type_info = {
+        sizeof(AXPlatformNodeAuraLinuxClass),  // class_size
+        nullptr,                               // base_init
+        nullptr,                               // base_finalize
+        atk_object::ClassInit,
+        nullptr,                                // class_finalize
+        nullptr,                                // class_data
+        sizeof(AXPlatformNodeAuraLinuxObject),  // instance_size
+        0,                                      // n_preallocs
+        nullptr,                                // instance_init
+        nullptr                                 // value_table
+    };
+
+    GType type = g_type_register_static(
+        ATK_TYPE_OBJECT, "AXPlatformNodeAuraLinux", &type_info, GTypeFlags(0));
+    g_once_init_leave(&type_id, type);
+  }
+
+  return type_id;
+}
+
+void Detach(AXPlatformNodeAuraLinuxObject* atk_object) {
+  if (!atk_object->m_object)
+    return;
+
+  atk_object->m_object = nullptr;
+}
+
+}  //  namespace atk_object
+
+}  // namespace
+
+// static
+NO_SANITIZE("cfi-icall")
+GType AtkTableCellInterface::GetType() {
+  return g_atk_table_cell_get_type();
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetColumnHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_column_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetRowHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_row_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+bool AtkTableCellInterface::GetRowColumnSpan(AtkTableCell* cell,
+                                             gint* row,
+                                             gint* column,
+                                             gint* row_span,
+                                             gint* col_span) {
+  return g_atk_table_cell_get_row_column_span(cell, row, column, row_span,
+                                              col_span);
+}
+
+// static
+bool AtkTableCellInterface::Exists() {
+  g_atk_table_cell_get_type = reinterpret_cast<GetTypeFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_type"));
+  g_atk_table_cell_get_column_header_cells =
+      reinterpret_cast<GetColumnHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_column_header_cells"));
+  g_atk_table_cell_get_row_header_cells =
+      reinterpret_cast<GetRowHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_header_cells"));
+  g_atk_table_cell_get_row_column_span = reinterpret_cast<GetRowColumnSpanFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_column_span"));
+  return *g_atk_table_cell_get_type;
+}
+
+void AXPlatformNodeAuraLinux::EnsureGTypeInit() {
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+  static bool first_time = true;
+  if (UNLIKELY(first_time)) {
+    g_type_init();
+    first_time = false;
+  }
+#endif
+}
+
+// static
+ImplementedAtkInterfaces AXPlatformNodeAuraLinux::GetGTypeInterfaceMask(
+    const AXNodeData& data) {
+  // The default implementation set includes the AtkComponent and AtkAction
+  // interfaces, which are provided by all the AtkObjects that we produce.
+  ImplementedAtkInterfaces interface_mask;
+
+  if (!IsImageOrVideo(data.role)) {
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kText);
+    if (!data.IsAtomicTextField())
+      interface_mask.Add(ImplementedAtkInterfaces::Value::kHypertext);
+  }
+
+  if (data.IsRangeValueSupported())
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kValue);
+
+  if (ui::IsPlatformDocument(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kDocument);
+
+  if (IsImage(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kImage);
+
+  // The AtkHyperlinkImpl interface allows getting a AtkHyperlink from an
+  // AtkObject. It is indeed implemented by actual web hyperlinks, but also by
+  // objects that will become embedded objects in ATK hypertext, so the name is
+  // a bit of a misnomer from the ATK API.
+  if (IsLink(data.role) || !ui::IsText(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kHyperlink);
+
+  if (data.role == ax::mojom::Role::kWindow)
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kWindow);
+
+  if (IsContainerWithSelectableChildren(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kSelection);
+
+  if (IsTableLike(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTable);
+
+  // Because the TableCell Interface is only supported in ATK version 2.12 and
+  // later, GetAccessibilityGType has a runtime check to verify we have a recent
+  // enough version. If we don't, GetAccessibilityGType will exclude
+  // AtkTableCell from the supported interfaces and none of its methods or
+  // properties will be exposed to assistive technologies.
+  if (IsCellOrTableHeader(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTableCell);
+
+  return interface_mask;
+}
+
+GType AXPlatformNodeAuraLinux::GetAccessibilityGType() {
+  static const GTypeInfo type_info = {
+      sizeof(AXPlatformNodeAuraLinuxClass),
+      (GBaseInitFunc) nullptr,
+      (GBaseFinalizeFunc) nullptr,
+      (GClassInitFunc) nullptr,
+      (GClassFinalizeFunc) nullptr,
+      nullptr,                               /* class data */
+      sizeof(AXPlatformNodeAuraLinuxObject), /* instance size */
+      0,                                     /* nb preallocs */
+      (GInstanceInitFunc) nullptr,
+      nullptr /* value table */
+  };
+
+  const char* atk_type_name = GetUniqueAccessibilityGTypeName(interface_mask_);
+  GType type = g_type_from_name(atk_type_name);
+  if (type)
+    return type;
+
+  type = g_type_register_static(AX_PLATFORM_NODE_AURALINUX_TYPE, atk_type_name,
+                                &type_info, GTypeFlags(0));
+
+  // The AtkComponent and AtkAction interfaces are always supported.
+  g_type_add_interface_static(type, ATK_TYPE_COMPONENT, &atk_component::Info);
+  g_type_add_interface_static(type, ATK_TYPE_ACTION, &atk_action::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kDocument))
+    g_type_add_interface_static(type, ATK_TYPE_DOCUMENT, &atk_document::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kImage))
+    g_type_add_interface_static(type, ATK_TYPE_IMAGE, &atk_image::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kValue))
+    g_type_add_interface_static(type, ATK_TYPE_VALUE, &atk_value::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHyperlink)) {
+    g_type_add_interface_static(type, ATK_TYPE_HYPERLINK_IMPL,
+                                &atk_hyperlink::Info);
+  }
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHypertext))
+    g_type_add_interface_static(type, ATK_TYPE_HYPERTEXT, &atk_hypertext::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kText))
+    g_type_add_interface_static(type, ATK_TYPE_TEXT, &atk_text::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kWindow))
+    g_type_add_interface_static(type, ATK_TYPE_WINDOW, &atk_window::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kSelection))
+    g_type_add_interface_static(type, ATK_TYPE_SELECTION, &atk_selection::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTable))
+    g_type_add_interface_static(type, ATK_TYPE_TABLE, &atk_table::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTableCell)) {
+    // Run-time check to ensure AtkTableCell is supported (requires ATK 2.12).
+    if (AtkTableCellInterface::Exists()) {
+      g_type_add_interface_static(type, AtkTableCellInterface::GetType(),
+                                  &atk_table_cell::Info);
+    }
+  }
+
+  return type;
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParentOnFrameIfNecessary() {
+  if (GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return;
+
+  if (!GetDelegate()->IsWebContent())
+    return;
+
+  AtkObject* parent_atk_object = GetParent();
+  AXPlatformNodeAuraLinux* parent =
+      AXPlatformNodeAuraLinux::FromAtkObject(parent_atk_object);
+  if (!parent)
+    return;
+
+  if (parent->GetDelegate()->IsWebContent())
+    return;
+
+  AXPlatformNodeAuraLinux* frame = AXPlatformNodeAuraLinux::FromAtkObject(
+      FindAtkObjectParentFrame(parent_atk_object));
+  if (!frame)
+    return;
+
+  frame->SetDocumentParent(parent_atk_object);
+}
+
+AtkObject* AXPlatformNodeAuraLinux::FindPrimaryWebContentDocument() {
+  // It could get multiple web contents since additional web content is added,
+  // when the DevTools window is opened.
+  std::vector<AtkObject*> web_content_candidates;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    AtkObject* child = child_iterator_ptr->GetNativeViewAccessible();
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(child);
+    if (!child_node)
+      continue;
+    if (!child_node->GetDelegate()->IsWebContent())
+      continue;
+    if (child_node->GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+      continue;
+    web_content_candidates.push_back(child);
+  }
+
+  if (web_content_candidates.empty())
+    return nullptr;
+
+  // If it finds just one web content, return it.
+  if (web_content_candidates.size() == 1)
+    return web_content_candidates[0];
+
+  for (auto* object : web_content_candidates) {
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(object);
+    // If it is a primary web contents, return it.
+    if (child_node->GetDelegate()->IsPrimaryWebContentsForWindow()) {
+      return object;
+    }
+  }
+  return nullptr;
+}
+
+bool AXPlatformNodeAuraLinux::IsWebDocumentForRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+  AXPlatformNodeAuraLinux* parent = FromAtkObject(GetParent());
+  if (!parent || !GetDelegate()->IsWebContent() ||
+      GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return false;
+  return parent->FindPrimaryWebContentDocument() == atk_object;
+}
+
+AtkObject* AXPlatformNodeAuraLinux::CreateAtkObject() {
+  if (GetRole() != ax::mojom::Role::kApplication &&
+      !GetDelegate()->IsToplevelBrowserWindow() &&
+      !GetAccessibilityMode().has_mode(AXMode::kNativeAPIs)) {
+    return nullptr;
+  }
+  if (GetDelegate()->IsChildOfLeaf())
+    return nullptr;
+  EnsureGTypeInit();
+  interface_mask_ = GetGTypeInterfaceMask(GetData());
+  GType type = GetAccessibilityGType();
+  AtkObject* atk_object = static_cast<AtkObject*>(g_object_new(type, nullptr));
+
+  atk_object_initialize(atk_object, this);
+
+  SetDocumentParentOnFrameIfNecessary();
+
+  return ATK_OBJECT(atk_object);
+}
+
+void AXPlatformNodeAuraLinux::DestroyAtkObjects() {
+  if (atk_hyperlink_) {
+    ax_platform_atk_hyperlink_set_object(
+        AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), nullptr);
+    g_object_unref(atk_hyperlink_);
+    atk_hyperlink_ = nullptr;
+  }
+
+  if (atk_object_) {
+    // We explicitly clear g_current_focused just in case there is another
+    // reference to atk_object_ somewhere.
+    if (atk_object_ == g_current_focused)
+      SetWeakGPtrToAtkObject(&g_current_focused, nullptr);
+    atk_object::Detach(AX_PLATFORM_NODE_AURALINUX(atk_object_));
+
+    g_object_unref(atk_object_);
+    atk_object_ = nullptr;
+  }
+}
+
+// static
+AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) {
+  AXPlatformNodeAuraLinux* node = new AXPlatformNodeAuraLinux();
+  node->Init(delegate);
+  return node;
+}
+
+// static
+AXPlatformNode* AXPlatformNode::FromNativeViewAccessible(
+    gfx::NativeViewAccessible accessible) {
+  return AXPlatformNodeAuraLinux::FromAtkObject(accessible);
+}
+
+//
+// AXPlatformNodeAuraLinux implementation.
+//
+
+// static
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FromAtkObject(
+    const AtkObject* atk_object) {
+  if (!atk_object)
+    return nullptr;
+
+  if (IS_AX_PLATFORM_NODE_AURALINUX(atk_object)) {
+    AXPlatformNodeAuraLinuxObject* platform_object =
+        AX_PLATFORM_NODE_AURALINUX(atk_object);
+    return platform_object->m_object;
+  }
+
+  return nullptr;
+}
+
+// static
+void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) {
+  g_root_application = application;
+}
+
+// static
+AXPlatformNode* AXPlatformNodeAuraLinux::application() {
+  return g_root_application;
+}
+
+// static
+void AXPlatformNodeAuraLinux::StaticInitialize() {
+  AtkUtilAuraLinux::GetInstance()->InitializeAsync();
+}
+
+// static
+void AXPlatformNodeAuraLinux::EnableAXMode() {
+  AXPlatformNode::NotifyAddAXModeFlags(kAXModeComplete);
+}
+
+AtkRole AXPlatformNodeAuraLinux::GetAtkRole() const {
+  switch (GetRole()) {
+    case ax::mojom::Role::kAlert:
+      return ATK_ROLE_NOTIFICATION;
+    case ax::mojom::Role::kAlertDialog:
+      return ATK_ROLE_ALERT;
+    case ax::mojom::Role::kComment:
+    case ax::mojom::Role::kSuggestion:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kApplication:
+      // Only use ATK_ROLE_APPLICATION for elements with no parent, since it
+      // is only for top level app windows and not ARIA applications.
+      if (!GetParent()) {
+        return ATK_ROLE_APPLICATION;
+      } else {
+        return ATK_ROLE_EMBEDDED;
+      }
+    case ax::mojom::Role::kArticle:
+      return ATK_ROLE_ARTICLE;
+    case ax::mojom::Role::kAudio:
+      return ATK_ROLE_AUDIO;
+    case ax::mojom::Role::kBanner:
+    case ax::mojom::Role::kHeader:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kBlockquote:
+      return ATK_ROLE_BLOCK_QUOTE;
+    case ax::mojom::Role::kCaret:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kCanvas:
+      return ATK_ROLE_CANVAS;
+    case ax::mojom::Role::kCaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kCheckBox:
+      return ATK_ROLE_CHECK_BOX;
+    case ax::mojom::Role::kSwitch:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kColorWell:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kColumn:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kColumnHeader:
+      return ATK_ROLE_COLUMN_HEADER;
+    case ax::mojom::Role::kComboBoxGrouping:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxMenuButton:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxSelect:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComplementary:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kContentDeletion:
+      return kAtkRoleContentDeletion;
+    case ax::mojom::Role::kContentInsertion:
+      return kAtkRoleContentInsertion;
+    case ax::mojom::Role::kContentInfo:
+    case ax::mojom::Role::kFooter:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDate:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDateTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDefinition:
+    case ax::mojom::Role::kDescriptionListDetail:
+      return ATK_ROLE_DESCRIPTION_VALUE;
+    case ax::mojom::Role::kDescriptionList:
+      return ATK_ROLE_DESCRIPTION_LIST;
+    case ax::mojom::Role::kDescriptionListTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kDetails:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kDialog:
+      return ATK_ROLE_DIALOG;
+    case ax::mojom::Role::kDirectory:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kDisclosureTriangle:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kDocCover:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kDocBackLink:
+    case ax::mojom::Role::kDocBiblioRef:
+    case ax::mojom::Role::kDocGlossRef:
+    case ax::mojom::Role::kDocNoteRef:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kDocBiblioEntry:
+    case ax::mojom::Role::kDocEndnote:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kDocNotice:
+    case ax::mojom::Role::kDocTip:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kDocFootnote:
+      return kAtkFootnoteRole;
+    case ax::mojom::Role::kDocPageBreak:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kDocPageFooter:
+      return ATK_ROLE_FOOTER;
+    case ax::mojom::Role::kDocPageHeader:
+      return ATK_ROLE_HEADER;
+    case ax::mojom::Role::kDocAcknowledgments:
+    case ax::mojom::Role::kDocAfterword:
+    case ax::mojom::Role::kDocAppendix:
+    case ax::mojom::Role::kDocBibliography:
+    case ax::mojom::Role::kDocChapter:
+    case ax::mojom::Role::kDocConclusion:
+    case ax::mojom::Role::kDocCredits:
+    case ax::mojom::Role::kDocEndnotes:
+    case ax::mojom::Role::kDocEpilogue:
+    case ax::mojom::Role::kDocErrata:
+    case ax::mojom::Role::kDocForeword:
+    case ax::mojom::Role::kDocGlossary:
+    case ax::mojom::Role::kDocIndex:
+    case ax::mojom::Role::kDocIntroduction:
+    case ax::mojom::Role::kDocPageList:
+    case ax::mojom::Role::kDocPart:
+    case ax::mojom::Role::kDocPreface:
+    case ax::mojom::Role::kDocPrologue:
+    case ax::mojom::Role::kDocToc:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDocAbstract:
+    case ax::mojom::Role::kDocColophon:
+    case ax::mojom::Role::kDocCredit:
+    case ax::mojom::Role::kDocDedication:
+    case ax::mojom::Role::kDocEpigraph:
+    case ax::mojom::Role::kDocExample:
+    case ax::mojom::Role::kDocPullquote:
+    case ax::mojom::Role::kDocQna:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kDocSubtitle:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kEmbeddedObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kForm:
+      // TODO(accessibility) Forms which lack an accessible name are no longer
+      // exposed as forms. http://crbug.com/874384. Forms which have accessible
+      // names should be exposed as ATK_ROLE_LANDMARK according to Core AAM.
+      return ATK_ROLE_FORM;
+    case ax::mojom::Role::kFigure:
+    case ax::mojom::Role::kFeed:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGenericContainer:
+    case ax::mojom::Role::kFooterAsNonLandmark:
+    case ax::mojom::Role::kHeaderAsNonLandmark:
+    case ax::mojom::Role::kRuby:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kGraphicsDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kGraphicsObject:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGraphicsSymbol:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kHeading:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kIframe:
+    case ax::mojom::Role::kIframePresentational:
+      return ATK_ROLE_INTERNAL_FRAME;
+    case ax::mojom::Role::kImage:
+      return IsImageWithMap() ? ATK_ROLE_IMAGE_MAP : ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kInlineTextBox:
+      return kStaticRole;
+    case ax::mojom::Role::kInputTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kLabelText:
+      return ATK_ROLE_LABEL;
+    case ax::mojom::Role::kLegend:
+      return ATK_ROLE_LABEL;
+    // Layout table objects are treated the same as Role::kGenericContainer.
+    case ax::mojom::Role::kLayoutTable:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableCell:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLineBreak:
+      // TODO(Accessibility) Having a separate accessible object for line breaks
+      // is inconsistent with other implementations. http://crbug.com/873144#c1.
+      return kStaticRole;
+    case ax::mojom::Role::kLink:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kList:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kListBox:
+      return ATK_ROLE_LIST_BOX;
+    // TODO(Accessibility) Use ATK_ROLE_MENU_ITEM inside a combo box, see how
+    // ax_platform_node_win.cc code does this.
+    case ax::mojom::Role::kListBoxOption:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kListItem:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListMarker:
+      // Regular list markers only expose their alternative text, but do not
+      // expose their descendants; and the descendants should be ignored. This
+      // is because the alternative text depends on the counter style and can
+      // be different from the actual (visual) marker text, and hence,
+      // inconsistent with the descendants. We treat a list marker as non-text
+      // only if it still has non-ignored descendants, which happens only when:
+      // - The list marker itself is ignored but the descendants are not
+      // - Or the list marker contains images
+      if (!GetChildCount())
+        return kStaticRole;
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kLog:
+      return ATK_ROLE_LOG;
+    case ax::mojom::Role::kMain:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kMark:
+      return kStaticRole;
+    case ax::mojom::Role::kMath:
+    case ax::mojom::Role::kMathMLMath:
+      return ATK_ROLE_MATH;
+    // https://w3c.github.io/mathml-aam/#mathml-element-mappings
+    case ax::mojom::Role::kMathMLFraction:
+      return ATK_ROLE_MATH_FRACTION;
+    case ax::mojom::Role::kMathMLIdentifier:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLMultiscripts:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNoneScript:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNumber:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLPrescriptDelimiter:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLOperator:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSquareRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLStringLiteral:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLSub:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSubSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kMathMLTableCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kMathMLTableRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kMathMLText:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLUnder:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLUnderOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMarquee:
+      return ATK_ROLE_MARQUEE;
+    case ax::mojom::Role::kMenu:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuBar:
+      return ATK_ROLE_MENU_BAR;
+    case ax::mojom::Role::kMenuItem:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemCheckBox:
+      return ATK_ROLE_CHECK_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemRadio:
+      return ATK_ROLE_RADIO_MENU_ITEM;
+    case ax::mojom::Role::kMenuListPopup:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuListOption:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMeter:
+      return ATK_ROLE_LEVEL_BAR;
+    case ax::mojom::Role::kNavigation:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kNote:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kPane:
+    case ax::mojom::Role::kScrollView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kParagraph:
+      return ATK_ROLE_PARAGRAPH;
+    case ax::mojom::Role::kPdfActionableHighlight:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPdfRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kPluginObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kPopUpButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPortal:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kProgressIndicator:
+      return ATK_ROLE_PROGRESS_BAR;
+    case ax::mojom::Role::kRadioButton:
+      return ATK_ROLE_RADIO_BUTTON;
+    case ax::mojom::Role::kRadioGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRegion:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kRootWebArea:
+      return ATK_ROLE_DOCUMENT_WEB;
+    case ax::mojom::Role::kRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kRowGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRowHeader:
+      return ATK_ROLE_ROW_HEADER;
+    case ax::mojom::Role::kRubyAnnotation:
+      // Generally exposed as description on <ruby> (Role::kRuby) element, not
+      // as its own object in the tree.
+      // However, it's possible to make a kRubyAnnotation element show up in the
+      // AX tree, for example by adding tabindex="0" to the source <rp> or <rt>
+      // element or making the source element the target of an aria-owns.
+      // Therefore, browser side needs to gracefully handle it if it actually
+      // shows up in the tree.
+      return kStaticRole;
+    case ax::mojom::Role::kSection:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kScrollBar:
+      return ATK_ROLE_SCROLL_BAR;
+    case ax::mojom::Role::kSearch:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kSlider:
+      return ATK_ROLE_SLIDER;
+    case ax::mojom::Role::kSpinButton:
+      return ATK_ROLE_SPIN_BUTTON;
+    case ax::mojom::Role::kSplitter:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kStaticText:
+      return kStaticRole;
+    case ax::mojom::Role::kStatus:
+      return ATK_ROLE_STATUSBAR;
+    case ax::mojom::Role::kSubscript:
+      return kSubscriptRole;
+    case ax::mojom::Role::kSuperscript:
+      return kSuperscriptRole;
+    case ax::mojom::Role::kSvgRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kTab:
+      return ATK_ROLE_PAGE_TAB;
+    case ax::mojom::Role::kTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kTableHeaderContainer:
+      // TODO(accessibility) This mapping is correct, but it doesn't seem to be
+      // used. We don't necessarily want to always expose these containers, but
+      // we must do so if they are focusable. http://crbug.com/874043
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kTabList:
+      return ATK_ROLE_PAGE_TAB_LIST;
+    case ax::mojom::Role::kTabPanel:
+      return ATK_ROLE_SCROLL_PANE;
+    case ax::mojom::Role::kTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kTitleBar:
+      return ATK_ROLE_TITLE_BAR;
+    case ax::mojom::Role::kTextField:
+    case ax::mojom::Role::kSearchBox:
+      if (HasState(ax::mojom::State::kProtected))
+        return ATK_ROLE_PASSWORD_TEXT;
+      return ATK_ROLE_ENTRY;
+    case ax::mojom::Role::kTextFieldWithComboBox:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kAbbr:
+    case ax::mojom::Role::kCode:
+    case ax::mojom::Role::kEmphasis:
+    case ax::mojom::Role::kStrong:
+    case ax::mojom::Role::kTime:
+      return kStaticRole;
+    case ax::mojom::Role::kTimer:
+      return ATK_ROLE_TIMER;
+    case ax::mojom::Role::kToggleButton:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kToolbar:
+      return ATK_ROLE_TOOL_BAR;
+    case ax::mojom::Role::kTooltip:
+      return ATK_ROLE_TOOL_TIP;
+    case ax::mojom::Role::kTree:
+      return ATK_ROLE_TREE;
+    case ax::mojom::Role::kTreeItem:
+      return ATK_ROLE_TREE_ITEM;
+    case ax::mojom::Role::kTreeGrid:
+      return ATK_ROLE_TREE_TABLE;
+    case ax::mojom::Role::kVideo:
+      return ATK_ROLE_VIDEO;
+    case ax::mojom::Role::kWindow:
+      // In ATK elements with ATK_ROLE_FRAME are windows with titles and
+      // buttons, while those with ATK_ROLE_WINDOW are windows without those
+      // elements.
+      return ATK_ROLE_FRAME;
+    case ax::mojom::Role::kClient:
+    case ax::mojom::Role::kDesktop:
+    case ax::mojom::Role::kWebView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kFigcaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kUnknown:
+      // When we are not in web content, assume that a node with an unknown
+      // role is a view (which often have the unknown role).
+      return !GetDelegate()->IsWebContent() ? ATK_ROLE_PANEL : ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kImeCandidate:
+    case ax::mojom::Role::kKeyboard:
+    case ax::mojom::Role::kNone:
+      return ATK_ROLE_REDUNDANT_OBJECT;
+    case ax::mojom::Role::kPreDeprecated:
+      NOTREACHED_NORETURN();
+  }
+}
+
+// If we were compiled with a newer version of ATK than the runtime version,
+// it's possible that the state we want to expose and/or emit an event for
+// is not present. This will generate a runtime error.
+bool PlatformSupportsState(AtkStateType atk_state_type) {
+  static absl::optional<int> max_state_type = absl::nullopt;
+  if (!max_state_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_state_type_get_type()));
+    max_state_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  return atk_state_type < max_state_type.value();
+}
+
+void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
+  bool menu_active = !GetActiveMenus().empty();
+  if (!menu_active && atk_object_ == g_active_top_level_frame)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  if (menu_active &&
+      FindAtkObjectParentFrame(GetActiveMenus().back()) == atk_object_)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  if (atk_object_ && atk_object_ == g_active_views_dialog)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  bool is_minimized = delegate_->IsMinimized();
+  if (is_minimized && GetRole() == ax::mojom::Role::kWindow)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ICONIFIED);
+
+  if (HasState(ax::mojom::State::kCollapsed))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+  if (HasState(ax::mojom::State::kDefault))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
+  if ((HasState(ax::mojom::State::kEditable) ||
+       HasState(ax::mojom::State::kRichlyEditable)) &&
+      GetData().GetRestriction() != ax::mojom::Restriction::kReadOnly) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE);
+  }
+  if (HasState(ax::mojom::State::kExpanded)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
+  }
+  if (IsFocused())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED);
+  if (IsFocusable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
+  if (HasState(ax::mojom::State::kHorizontal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HORIZONTAL);
+  if (!IsInvisibleOrIgnored()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISIBLE);
+    if (!delegate_->IsOffscreen() && !is_minimized)
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SHOWING);
+  }
+  if (HasState(ax::mojom::State::kMultiselectable))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MULTISELECTABLE);
+  if (HasState(ax::mojom::State::kRequired))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_REQUIRED);
+  if (HasState(ax::mojom::State::kVertical))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VERTICAL);
+  if (HasState(ax::mojom::State::kVisited))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISITED);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kInvalidState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kInvalidState) !=
+          static_cast<int32_t>(ax::mojom::InvalidState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INVALID_ENTRY);
+  }
+  if (HasIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) !=
+          static_cast<int32_t>(ax::mojom::AriaCurrentState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  }
+#if defined(ATK_216)
+  // Runtime checks in case we were compiled with a newer version of ATK.
+  if (IsPlatformCheckable() && PlatformSupportsState(ATK_STATE_CHECKABLE))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKABLE);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kHasPopup) &&
+      PlatformSupportsState(ATK_STATE_HAS_POPUP))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP);
+#endif
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_BUSY);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kModal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MODAL);
+  if (GetData().IsSelectable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kSelected))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
+
+  if (IsTextField()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE_TEXT);
+    if (HasState(ax::mojom::State::kMultiline))
+      atk_state_set_add_state(atk_state_set, ATK_STATE_MULTI_LINE);
+    else
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SINGLE_LINE);
+  }
+
+  // Special case for indeterminate progressbar.
+  if (GetRole() == ax::mojom::Role::kProgressIndicator &&
+      !HasFloatAttribute(ax::mojom::FloatAttribute::kValueForRange)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INDETERMINATE);
+  }
+
+  if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete).empty() ||
+      HasState(ax::mojom::State::kAutofillAvailable)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION);
+  }
+
+  // Checked state
+  const auto checked_state = GetData().GetCheckedState();
+  if (checked_state == ax::mojom::CheckedState::kTrue ||
+      checked_state == ax::mojom::CheckedState::kMixed) {
+    atk_state_set_add_state(atk_state_set, GetAtkStateTypeForCheckableNode());
+  }
+
+  if (GetData().GetRestriction() != ax::mojom::Restriction::kDisabled) {
+    if (GetDelegate()->IsReadOnlySupported() &&
+        GetDelegate()->IsReadOnlyOrDisabled()) {
+#if defined(ATK_216)
+      // Runtime check in case we were compiled with a newer version of ATK.
+      if (PlatformSupportsState(ATK_STATE_READ_ONLY))
+        atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
+#endif
+    } else {
+      atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED);
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SENSITIVE);
+    }
+  }
+}
+
+// Some relations only exist in a high enough ATK version.
+// If a relation has a version requirement, it will be documented in
+// the link below.
+// https://docs.gtk.org/atk/enum.RelationType.html
+struct AtkIntRelation {
+  ax::mojom::IntAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntRelation kIntRelations[] = {
+    {ax::mojom::IntAttribute::kMemberOfId, ATK_RELATION_MEMBER_OF,
+     absl::nullopt},
+    {ax::mojom::IntAttribute::kPopupForId, ATK_RELATION_POPUP_FOR,
+     absl::nullopt},
+};
+
+struct AtkIntListRelation {
+  ax::mojom::IntListAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntListRelation kIntListRelations[] = {
+    {ax::mojom::IntListAttribute::kControlsIds, ATK_RELATION_CONTROLLER_FOR,
+     ATK_RELATION_CONTROLLED_BY},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kDetailsIds, ATK_RELATION_DETAILS,
+     ATK_RELATION_DETAILS_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kDescribedbyIds, ATK_RELATION_DESCRIBED_BY,
+     ATK_RELATION_DESCRIPTION_FOR},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kErrormessageIds, ATK_RELATION_ERROR_MESSAGE,
+     ATK_RELATION_ERROR_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kFlowtoIds, ATK_RELATION_FLOWS_TO,
+     ATK_RELATION_FLOWS_FROM},
+    {ax::mojom::IntListAttribute::kLabelledbyIds, ATK_RELATION_LABELLED_BY,
+     ATK_RELATION_LABEL_FOR},
+};
+
+void AXPlatformNodeAuraLinux::AddRelationToSet(AtkRelationSet* relation_set,
+                                               AtkRelationType relation,
+                                               AXPlatformNode* target) {
+  DCHECK(target);
+  DCHECK(GetDelegate()->IsValidRelationTarget(target));
+
+  // If we were compiled with a newer version of ATK than the runtime version,
+  // it's possible that we might try to add a relation that doesn't exist in
+  // the runtime version of the AtkRelationType enum. This will cause a runtime
+  // error, so return early here if we are about to do that.
+  static absl::optional<int> max_relation_type = absl::nullopt;
+  if (!max_relation_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_relation_type_get_type()));
+    max_relation_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  if (relation >= max_relation_type.value())
+    return;
+
+  atk_relation_set_add_relation_by_type(relation_set, relation,
+                                        target->GetNativeViewAccessible());
+}
+
+AtkRelationSet* AXPlatformNodeAuraLinux::GetAtkRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  AtkRelationSet* relation_set = atk_relation_set_new();
+
+  if (IsWebDocumentForRelations()) {
+    AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+    if (parent_frame) {
+      atk_relation_set_add_relation_by_type(
+          relation_set, ATK_RELATION_EMBEDDED_BY, parent_frame);
+    }
+  }
+
+  if (auto* document_parent = FromAtkObject(document_parent_)) {
+    AtkObject* document = document_parent->FindPrimaryWebContentDocument();
+    if (document) {
+      atk_relation_set_add_relation_by_type(relation_set, ATK_RELATION_EMBEDS,
+                                            document);
+    }
+  }
+
+  // For each possible relation defined by an IntAttribute, we test that
+  // attribute and then look for reverse relations.
+  for (auto relation : kIntRelations) {
+    if (AXPlatformNode* target =
+            GetDelegate()->GetTargetNodeForRelation(relation.attribute))
+      AddRelationToSet(relation_set, relation.relation, target);
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  // Now we do the same for each possible relation defined by an
+  // IntListAttribute. In this case we need to handle each target in the list.
+  for (const auto& relation : kIntListRelations) {
+    std::vector<AXPlatformNode*> targets =
+        GetDelegate()->GetTargetNodesForRelation(relation.attribute);
+    for (AXPlatformNode* target : targets) {
+      AddRelationToSet(relation_set, relation.relation, target);
+    }
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> reverse_target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : reverse_target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  return relation_set;
+}
+
+AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() = default;
+
+AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() {
+  if (g_current_selected == this)
+    g_current_selected = nullptr;
+
+  DestroyAtkObjects();
+
+  if (window_activate_event_postponed_)
+    AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+
+  SetWeakGPtrToAtkObject(&document_parent_, nullptr);
+}
+
+void AXPlatformNodeAuraLinux::Destroy() {
+  DestroyAtkObjects();
+  AXPlatformNodeBase::Destroy();
+}
+
+void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) {
+  // Initialize ATK.
+  AXPlatformNodeBase::Init(delegate);
+
+  // Only create the AtkObject if we know enough information.
+  if (GetRole() != ax::mojom::Role::kUnknown)
+    GetOrCreateAtkObject();
+}
+
+bool AXPlatformNodeAuraLinux::IsPlatformCheckable() const {
+  if (GetRole() == ax::mojom::Role::kToggleButton)
+    return false;
+
+  return AXPlatformNodeBase::IsPlatformCheckable();
+}
+
+absl::optional<size_t> AXPlatformNodeAuraLinux::GetIndexInParent() {
+  AXPlatformNode* parent =
+      AXPlatformNode::FromNativeViewAccessible(GetParent());
+  // Even though the node doesn't have its parent, GetParent() could return the
+  // application. Since the detached view has the kUnknown role and the
+  // restriction is kDisabled, it early returns before finding the index.
+  if (parent == AXPlatformNodeAuraLinux::application() &&
+      GetRole() == ax::mojom::Role::kUnknown &&
+      GetData().GetRestriction() == ax::mojom::Restriction::kDisabled) {
+    return absl::nullopt;
+  }
+
+  return AXPlatformNodeBase::GetIndexInParent();
+}
+
+void AXPlatformNodeAuraLinux::EnsureAtkObjectIsValid() {
+  if (atk_object_) {
+    // If the object's role changes and that causes its
+    // interface mask to change, we need to create a new
+    // AtkObject for it.
+    ImplementedAtkInterfaces interface_mask = GetGTypeInterfaceMask(GetData());
+    if (interface_mask != interface_mask_)
+      DestroyAtkObjects();
+  }
+
+  if (!atk_object_) {
+    GetOrCreateAtkObject();
+  }
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() {
+  return GetOrCreateAtkObject();
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetOrCreateAtkObject() {
+  if (!atk_object_) {
+    atk_object_ = CreateAtkObject();
+  }
+  return atk_object_;
+}
+
+void AXPlatformNodeAuraLinux::OnCheckedStateChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(obj), GetAtkStateTypeForCheckableNode(),
+      GetData().GetCheckedState() != ax::mojom::CheckedState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnEnabledChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_ENABLED,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_SENSITIVE,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+}
+
+void AXPlatformNodeAuraLinux::OnBusyStateChanged(bool is_busy) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_BUSY, is_busy);
+}
+
+void AXPlatformNodeAuraLinux::OnExpandedStateChanged(bool is_expanded) {
+  // When a list box is expanded, it becomes visible. This means that it might
+  // now have a different role (the role for hidden Views is kUnknown).  We
+  // need to recreate the AtkObject in this case because a change in roles
+  // might imply a change in ATK interfaces implemented.
+  EnsureAtkObjectIsValid();
+
+  DCHECK(HasState(ax::mojom::State::kCollapsed) ||
+         HasState(ax::mojom::State::kExpanded));
+
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_EXPANDED, is_expanded);
+}
+
+void AXPlatformNodeAuraLinux::OnShowingStateChanged(bool is_showing) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_SHOWING, is_showing);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupStart() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  // Exit early if kMenuPopupStart is sent multiple times for the same menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  bool menu_already_open = !active_menus.empty();
+  if (menu_already_open && active_menus.back() == atk_object)
+    return;
+
+  // We also want to inform the AT that menu the is now showing. Normally this
+  // event is not fired because the menu will be created with the
+  // ATK_STATE_SHOWING already set to TRUE.
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, TRUE);
+
+  // We need to compute this before modifying the active menu stack.
+  AtkObject* previous_active_frame = ComputeActiveTopLevelFrame();
+
+  active_menus.push_back(atk_object);
+
+  // We exit early if the newly activated menu has the same AtkWindow as the
+  // previous one.
+  if (previous_active_frame == parent_frame)
+    return;
+  if (previous_active_frame) {
+    g_signal_emit_by_name(previous_active_frame, "deactivate");
+    atk_object_notify_state_change(previous_active_frame, ATK_STATE_ACTIVE,
+                                   FALSE);
+  }
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupEnd() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, FALSE);
+
+  // kMenuPopupHide may be called multiple times for the same menu, so only
+  // remove it if our parent frame matches the most recently opened menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  DCHECK(!active_menus.empty())
+      << "Asymmetrical menupopupend events -- too many";
+
+  active_menus.pop_back();
+  AtkObject* new_active_item = ComputeActiveTopLevelFrame();
+  if (new_active_item != parent_frame) {
+    // Newly activated menu has the different AtkWindow as the previous one.
+    g_signal_emit_by_name(parent_frame, "deactivate");
+    atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+    if (new_active_item) {
+      g_signal_emit_by_name(new_active_item, "activate");
+      atk_object_notify_state_change(new_active_item, ATK_STATE_ACTIVE, TRUE);
+    }
+  }
+
+  // All menus are closed.
+  if (active_menus.empty())
+    OnAllMenusEnded();
+}
+
+void AXPlatformNodeAuraLinux::ResendFocusSignalsForCurrentlyFocusedNode() {
+  auto* frame = FromAtkObject(g_active_top_level_frame);
+  if (!frame)
+    return;
+
+  AtkObject* focused_node = frame->GetDelegate()->GetFocus();
+  if (!focused_node)
+    return;
+
+  g_signal_emit_by_name(focused_node, "focus-event", true);
+  atk_object_notify_state_change(focused_node, ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::SetAsCurrentlyFocusedNode() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_current_focused, obj);
+}
+
+// All menus have closed.
+void AXPlatformNodeAuraLinux::OnAllMenusEnded() {
+  if (!GetActiveMenus().empty() && g_active_top_level_frame &&
+      ComputeActiveTopLevelFrame() != g_active_top_level_frame) {
+    g_signal_emit_by_name(g_active_top_level_frame, "activate");
+    atk_object_notify_state_change(g_active_top_level_frame, ATK_STATE_ACTIVE,
+                                   TRUE);
+  }
+
+  GetActiveMenus().clear();
+  ResendFocusSignalsForCurrentlyFocusedNode();
+}
+
+void AXPlatformNodeAuraLinux::OnWindowActivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame == g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(parent_frame);
+
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+
+  // We also send a focus event for the currently focused element, so that
+  // the user knows where the focus is when the toplevel window regains focus.
+  if (g_current_focused &&
+      IsFrameAncestorOfAtkObject(parent_frame, g_current_focused)) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", true);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnWindowDeactivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame != g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(nullptr);
+
+  g_signal_emit_by_name(parent_frame, "deactivate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+}
+
+void AXPlatformNodeAuraLinux::OnWindowVisibilityChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (GetAtkRole() != ATK_ROLE_FRAME)
+    return;
+
+  bool minimized = delegate_->IsMinimized();
+  if (minimized == was_minimized_)
+    return;
+
+  was_minimized_ = minimized;
+  if (minimized)
+    g_signal_emit_by_name(atk_object, "minimize");
+  else
+    g_signal_emit_by_name(atk_object, "restore");
+  atk_object_notify_state_change(atk_object, ATK_STATE_ICONIFIED, minimized);
+}
+
+void AXPlatformNodeAuraLinux::OnScrolledToAnchor() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  // The text-caret-moved event is used to signal a scroll to anchor event.
+  if (ATK_IS_TEXT(atk_object)) {
+    g_signal_emit_by_name(atk_object, "text-caret-moved", 0);
+  }
+}
+
+void AXPlatformNodeAuraLinux::SetActiveViewsDialog() {
+  AtkObject* old_views_dialog = g_active_views_dialog;
+  AtkObject* new_views_dialog = nullptr;
+
+  AtkObject* parent = GetOrCreateAtkObject();
+  if (!parent)
+    return;
+
+  if (!GetDelegate()->IsWebContent()) {
+    while (parent) {
+      if (atk_object::GetRole(parent) == ATK_ROLE_DIALOG) {
+        new_views_dialog = parent;
+        break;
+      }
+      parent = atk_object::GetParent(parent);
+    }
+  }
+
+  if (old_views_dialog == new_views_dialog)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_active_views_dialog, new_views_dialog);
+  if (old_views_dialog)
+    atk_object_notify_state_change(old_views_dialog, ATK_STATE_ACTIVE, FALSE);
+  if (new_views_dialog)
+    atk_object_notify_state_change(new_views_dialog, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnFocused() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (atk_object::GetRole(atk_object) == ATK_ROLE_FRAME) {
+    OnWindowActivated();
+    return;
+  }
+
+  if (atk_object == g_current_focused)
+    return;
+
+  SetActiveViewsDialog();
+
+  if (g_current_focused) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", false);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, false);
+  }
+
+  SetWeakGPtrToAtkObject(&g_current_focused, atk_object);
+
+  g_signal_emit_by_name(g_current_focused, "focus-event", true);
+  atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                 ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::OnSelected() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  if (g_current_selected && !g_current_selected->GetBoolAttribute(
+                                ax::mojom::BoolAttribute::kSelected)) {
+    atk_object_notify_state_change(
+        ATK_OBJECT(g_current_selected->GetOrCreateAtkObject()),
+        ATK_STATE_SELECTED, false);
+  }
+
+  g_current_selected = this;
+  if (ATK_IS_OBJECT(atk_object)) {
+    atk_object_notify_state_change(ATK_OBJECT(atk_object), ATK_STATE_SELECTED,
+                                   true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnSelectedChildrenChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  g_signal_emit_by_name(obj, "selection-changed", true);
+}
+
+bool AXPlatformNodeAuraLinux::EmitsAtkTextEvents() const {
+  // Objects which do not implement AtkText cannot emit AtkText events.
+  if (!atk_object_ || !ATK_IS_TEXT(atk_object_))
+    return false;
+
+  // Objects which do implement AtkText, but are ignored or invisible should not
+  // emit AtkText events.
+  if (IsInvisibleOrIgnored())
+    return false;
+
+  // If this node is not a static text node, it supports the full AtkText
+  // interface.
+  if (GetAtkRole() != kStaticRole)
+    return true;
+
+  // If this node has children it is not a static text leaf node and supports
+  // the full AtkText interface.
+  if (GetChildCount())
+    return true;
+
+  return false;
+}
+
+void AXPlatformNodeAuraLinux::GetFullSelection(int32_t* anchor_node_id,
+                                               int* anchor_offset,
+                                               int32_t* focus_node_id,
+                                               int* focus_offset) {
+  DCHECK(anchor_node_id);
+  DCHECK(anchor_offset);
+  DCHECK(focus_node_id);
+  DCHECK(focus_offset);
+
+  if (IsAtomicTextField() &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelStart, anchor_offset) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd, focus_offset)) {
+    int32_t node_id = GetData().id != -1 ? GetData().id : GetUniqueId();
+    *anchor_node_id = *focus_node_id = node_id;
+    return;
+  }
+
+  AXSelection selection = GetDelegate()->GetUnignoredSelection();
+  *anchor_node_id = selection.anchor_object_id;
+  *anchor_offset = selection.anchor_offset;
+  *focus_node_id = selection.focus_object_id;
+  *focus_offset = selection.focus_offset;
+}
+
+AXPlatformNodeAuraLinux& AXPlatformNodeAuraLinux::FindEditableRootOrDocument() {
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return *this;
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kNonAtomicTextFieldRoot) &&
+      HasState(ax::mojom::State::kEditable))
+    return *this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindEditableRootOrDocument();
+  return *this;
+}
+
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FindCommonAncestor(
+    AXPlatformNodeAuraLinux* other) {
+  if (this == other || other->IsDescendantOf(this))
+    return this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindCommonAncestor(other);
+  return nullptr;
+}
+
+void AXPlatformNodeAuraLinux::UpdateSelectionInformation(int32_t anchor_node_id,
+                                                         int anchor_offset,
+                                                         int32_t focus_node_id,
+                                                         int focus_offset) {
+  had_nonzero_width_selection =
+      focus_node_id != anchor_node_id || focus_offset != anchor_offset;
+  current_caret_ = std::make_pair(focus_node_id, focus_offset);
+}
+
+void AXPlatformNodeAuraLinux::EmitSelectionChangedSignal(bool had_selection) {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitSelectionChangedSignal(had_selection);
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  // ATK does not consider a collapsed selection a selection, so
+  // when the collapsed selection changes (caret movement), we should
+  // avoid sending text-selection-changed events.
+  if (HasSelection() || had_selection)
+    g_signal_emit_by_name(atk_object, "text-selection-changed");
+}
+
+void AXPlatformNodeAuraLinux::EmitCaretChangedSignal() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitCaretChangedSignal();
+    return;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(selection.second));
+}
+
+void AXPlatformNodeAuraLinux::OnTextAttributesChanged() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->OnTextAttributesChanged();
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-attributes-changed");
+}
+
+void AXPlatformNodeAuraLinux::OnTextSelectionChanged() {
+  int32_t anchor_node_id, focus_node_id;
+  int anchor_offset, focus_offset;
+  GetFullSelection(&anchor_node_id, &anchor_offset, &focus_node_id,
+                   &focus_offset);
+
+  auto* anchor_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(anchor_node_id));
+  auto* focus_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(focus_node_id));
+  if (!anchor_node || !focus_node)
+    return;
+
+  AXPlatformNodeAuraLinux& editable_root = FindEditableRootOrDocument();
+  AXPlatformNodeAuraLinux* common_ancestor =
+      focus_node->FindCommonAncestor(anchor_node);
+  if (common_ancestor) {
+    common_ancestor->EmitSelectionChangedSignal(
+        editable_root.HadNonZeroWidthSelection());
+  }
+
+  // It's possible for the selection to change and for the caret to stay in
+  // place. This might happen if the selection is totally reset with a
+  // different anchor node, but the same focus node. We should avoid sending a
+  // caret changed signal in that case.
+  std::pair<int32_t, int> prev_caret = editable_root.GetCurrentCaret();
+  if (prev_caret.first != focus_node_id || prev_caret.second != focus_offset)
+    focus_node->EmitCaretChangedSignal();
+
+  editable_root.UpdateSelectionInformation(anchor_node_id, anchor_offset,
+                                           focus_node_id, focus_offset);
+}
+
+bool AXPlatformNodeAuraLinux::SupportsSelectionWithAtkSelection() {
+  return SupportsToggle(GetRole()) ||
+         GetRole() == ax::mojom::Role::kListBoxOption;
+}
+
+void AXPlatformNodeAuraLinux::OnDescriptionChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  std::string description;
+  GetStringAttribute(ax::mojom::StringAttribute::kDescription, &description);
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-description";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_STRING);
+  g_value_set_string(&property_values.new_value, description.c_str());
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-description",
+                        &property_values, nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnSortDirectionChanged() {
+  AXPlatformNodeBase* table = GetTable();
+  if (!table)
+    return;
+
+  AtkObject* atk_table = table->GetNativeViewAccessible();
+  DCHECK(ATK_IS_TABLE(atk_table));
+
+  if (GetRole() == ax::mojom::Role::kColumnHeader)
+    g_signal_emit_by_name(atk_table, "row-reordered");
+  else if (GetRole() == ax::mojom::Role::kRowHeader)
+    g_signal_emit_by_name(atk_table, "column-reordered");
+}
+
+void AXPlatformNodeAuraLinux::OnValueChanged() {
+  // For the AtkText interface to work on non-web content nodes, we need to
+  // update the nodes' hypertext and trigger text change signals when the value
+  // changes. Otherwise, for web and PDF content, this is handled by
+  // "BrowserAccessibilityAuraLinux".
+  if (!GetDelegate()->IsWebContent())
+    UpdateHypertext();
+
+  if (!GetData().IsRangeValueSupported())
+    return;
+
+  float float_val;
+  if (!GetFloatAttribute(ax::mojom::FloatAttribute::kValueForRange, &float_val))
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-value";
+
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_DOUBLE);
+  g_value_set_double(&property_values.new_value,
+                     static_cast<double>(float_val));
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-value", &property_values,
+                        nullptr);
+}
+
+void AXPlatformNodeAuraLinux::OnNameChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object) {
+    return;
+  }
+  std::string previous_accessible_name = accessible_name_;
+  // Calling atk_object_get_name will update the value of accessible_name_.
+  if (!g_strcmp0(atk_object::GetName(atk_object),
+                 previous_accessible_name.c_str()))
+    return;
+
+  g_object_notify(G_OBJECT(atk_object), "accessible-name");
+}
+
+void AXPlatformNodeAuraLinux::OnDocumentTitleChanged() {
+  if (!g_active_top_level_frame)
+    return;
+
+  // We always want to notify on the top frame.
+  AXPlatformNodeAuraLinux* window = FromAtkObject(g_active_top_level_frame);
+  if (window)
+    window->OnNameChanged();
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeCreated() {
+  // We might not have a parent, in that case we don't need to send the event.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::add", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeWillBeDeleted() {
+  // There is a chance there won't be a parent as we're in the deletion process.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::remove", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnParentChanged() {
+  if (!atk_object_)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-parent";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_OBJECT);
+  g_value_set_object(&property_values.new_value, GetParent());
+  g_signal_emit_by_name(G_OBJECT(atk_object_),
+                        "property-change::accessible-parent", &property_values,
+                        nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnReadonlyChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+#if defined(ATK_216)
+  // Runtime check in case we were compiled with a newer version of ATK.
+  if (!PlatformSupportsState(ATK_STATE_READ_ONLY))
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_READ_ONLY,
+      GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly);
+#endif
+}
+
+void AXPlatformNodeAuraLinux::OnInvalidStatusChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_INVALID_ENTRY,
+      GetData().GetInvalidState() != ax::mojom::InvalidState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAriaCurrentChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  ax::mojom::AriaCurrentState aria_current =
+      static_cast<ax::mojom::AriaCurrentState>(
+          GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState));
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_ACTIVE,
+      aria_current != ax::mojom::AriaCurrentState::kNone &&
+          aria_current != ax::mojom::AriaCurrentState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAlertShown() {
+  DCHECK(ui::IsAlert(GetRole()));
+  atk_object_notify_state_change(ATK_OBJECT(GetOrCreateAtkObject()),
+                                 ATK_STATE_SHOWING, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::RunPostponedEvents() {
+  if (window_activate_event_postponed_) {
+    OnWindowActivated();
+    window_activate_event_postponed_ = false;
+  }
+}
+
+void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(
+    ax::mojom::Event event_type) {
+  if (!GetOrCreateAtkObject())
+    return;
+  AXPlatformNodeBase::NotifyAccessibilityEvent(event_type);
+  switch (event_type) {
+    // kMenuStart/kMenuEnd: the menu system has started / stopped.
+    // kMenuPopupStart/kMenuPopupEnd: an individual menu/submenu has
+    // opened/closed.
+    case ax::mojom::Event::kMenuPopupStart:
+      OnMenuPopupStart();
+      break;
+    case ax::mojom::Event::kMenuPopupEnd:
+      OnMenuPopupEnd();
+      break;
+    case ax::mojom::Event::kCheckedStateChanged:
+      OnCheckedStateChanged();
+      break;
+    case ax::mojom::Event::kExpandedChanged:
+      OnExpandedStateChanged(HasState(ax::mojom::State::kExpanded));
+      break;
+    case ax::mojom::Event::kFocus:
+    case ax::mojom::Event::kFocusContext:
+      OnFocused();
+      break;
+    case ax::mojom::Event::kFocusAfterMenuClose:
+      // The saved focused object is not always getting cleared when a popup
+      // becomes active. As a result, when the popup is dismissed, OnFocused()
+      // will return early thinking focus has not changed. Rather than trying
+      // to catch every case, take kFocusAfterMenuClose as a clear indication
+      // that a focus change should be presented and reset the saved focus.
+      g_current_focused = nullptr;
+      OnFocused();
+      break;
+    case ax::mojom::Event::kSelection:
+      OnSelected();
+      // When changing tabs also fire a name changed event.
+      if (GetRole() == ax::mojom::Role::kTab)
+        OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kSelectedChildrenChanged:
+      OnSelectedChildrenChanged();
+      break;
+    case ax::mojom::Event::kStateChanged:
+      // We need to know what state changed and fire an event for that specific
+      // state. Because we don't know what state changed, we deliberately do
+      // nothing here.
+      break;
+    case ax::mojom::Event::kTextChanged:
+      OnNameChanged();
+      break;
+    case ax::mojom::Event::kTextSelectionChanged:
+      OnTextSelectionChanged();
+      break;
+    case ax::mojom::Event::kValueChanged:
+      OnValueChanged();
+      break;
+    case ax::mojom::Event::kWindowActivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowActivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->PostponeEventsFor(this);
+        window_activate_event_postponed_ = true;
+      }
+      break;
+    case ax::mojom::Event::kWindowDeactivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowDeactivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+        window_activate_event_postponed_ = false;
+      }
+      break;
+    case ax::mojom::Event::kWindowVisibilityChanged:
+      OnWindowVisibilityChanged();
+      break;
+    case ax::mojom::Event::kLoadComplete:
+    case ax::mojom::Event::kDocumentTitleChanged:
+      // Sometimes, e.g. upon navigating away from the page, the tree is
+      // rebuilt rather than modified. The kDocumentTitleChanged event occurs
+      // prior to the rebuild and so is added on the previous root node. When
+      // the tree is rebuilt and the old node removed, the events on the old
+      // node are removed and no new kDocumentTitleChanged will be emitted. To
+      // ensure we still fire the event, though, we also pay attention to
+      // kLoadComplete.
+      OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kAlert:
+      OnAlertShown();
+      break;
+    default:
+      break;
+  }
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndicesForId(int id) {
+  auto iterator = base::ranges::find(hypertext_.hyperlinks, id);
+  if (iterator == hypertext_.hyperlinks.end())
+    return absl::nullopt;
+  int hyperlink_index = std::distance(hypertext_.hyperlinks.begin(), iterator);
+
+  auto offset =
+      base::ranges::find(hypertext_.hyperlink_offset_to_index, hyperlink_index,
+                         &AXLegacyHypertext::OffsetToIndex::value_type::second);
+  if (offset == hypertext_.hyperlink_offset_to_index.end())
+    return absl::nullopt;
+
+  return std::make_pair(UTF16ToUnicodeOffsetInText(offset->first),
+                        UTF16ToUnicodeOffsetInText(offset->first + 1));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndices() {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return absl::nullopt;
+  return parent->GetEmbeddedObjectIndicesForId(GetUniqueId());
+}
+
+void AXPlatformNodeAuraLinux::UpdateHypertext() {
+  EnsureAtkObjectIsValid();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AXLegacyHypertext old_hypertext = hypertext_;
+  base::OffsetAdjuster::Adjustments old_adjustments = GetHypertextAdjustments();
+
+  UpdateComputedHypertext();
+  text_unicode_adjustments_ = absl::nullopt;
+  offset_to_text_attributes_.clear();
+
+  if ((!HasState(ax::mojom::State::kEditable) ||
+       GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly) &&
+      !IsInLiveRegion()) {
+    return;
+  }
+
+  if (!EmitsAtkTextEvents())
+    return;
+
+  size_t shared_prefix, old_len, new_len;
+  ComputeHypertextRemovedAndInserted(old_hypertext, &shared_prefix, &old_len,
+                                     &new_len);
+  if (old_len > 0) {
+    std::u16string removed_substring =
+        old_hypertext.hypertext.substr(shared_prefix, old_len);
+
+    size_t shared_unicode_prefix = shared_prefix;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_prefix);
+    size_t shared_unicode_suffix = shared_prefix + old_len;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_suffix);
+
+    g_signal_emit_by_name(
+        atk_object, "text-remove",
+        shared_unicode_prefix,                  // position of removal
+        shared_unicode_suffix - shared_prefix,  // length of removal
+        base::UTF16ToUTF8(removed_substring).c_str());
+  }
+
+  if (new_len > 0) {
+    std::u16string inserted_substring =
+        hypertext_.hypertext.substr(shared_prefix, new_len);
+    size_t shared_unicode_prefix = UTF16ToUnicodeOffsetInText(shared_prefix);
+    size_t shared_unicode_suffix =
+        UTF16ToUnicodeOffsetInText(shared_prefix + new_len);
+    g_signal_emit_by_name(
+        atk_object, "text-insert",
+        shared_unicode_prefix,                          // position of insertion
+        shared_unicode_suffix - shared_unicode_prefix,  // length of insertion
+        base::UTF16ToUTF8(inserted_substring).c_str());
+  }
+}
+
+const AXLegacyHypertext& AXPlatformNodeAuraLinux::GetAXHypertext() {
+  return hypertext_;
+}
+
+const base::OffsetAdjuster::Adjustments&
+AXPlatformNodeAuraLinux::GetHypertextAdjustments() {
+  if (text_unicode_adjustments_.has_value())
+    return *text_unicode_adjustments_;
+
+  text_unicode_adjustments_.emplace();
+
+  std::u16string text = GetHypertext();
+  size_t text_length = text.size();
+  for (size_t i = 0; i < text_length; i++) {
+    base_icu::UChar32 code_point;
+    size_t original_i = i;
+    base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &i, &code_point);
+
+    if ((i - original_i + 1) != 1) {
+      text_unicode_adjustments_->push_back(
+          base::OffsetAdjuster::Adjustment(original_i, i - original_i + 1, 1));
+    }
+  }
+
+  return *text_unicode_adjustments_;
+}
+
+size_t AXPlatformNodeAuraLinux::UTF16ToUnicodeOffsetInText(
+    size_t utf16_offset) {
+  size_t unicode_offset = utf16_offset;
+  base::OffsetAdjuster::AdjustOffset(GetHypertextAdjustments(),
+                                     &unicode_offset);
+  return unicode_offset;
+}
+
+size_t AXPlatformNodeAuraLinux::UnicodeToUTF16OffsetInText(int unicode_offset) {
+  if (unicode_offset == kStringLengthOffset)
+    return GetHypertext().size();
+
+  size_t utf16_offset = unicode_offset;
+  base::OffsetAdjuster::UnadjustOffset(GetHypertextAdjustments(),
+                                       &utf16_offset);
+  return utf16_offset;
+}
+
+int AXPlatformNodeAuraLinux::GetTextOffsetAtPoint(int x,
+                                                  int y,
+                                                  AtkCoordType atk_coord_type) {
+  if (!GetExtentsRelativeToAtkCoordinateType(atk_coord_type).Contains(x, y))
+    return -1;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return -1;
+
+  int count = atk_text::GetCharacterCount(ATK_TEXT(atk_object));
+  for (int i = 0; i < count; i++) {
+    int out_x, out_y, out_width, out_height;
+    atk_text::GetCharacterExtents(ATK_TEXT(atk_object), i, &out_x, &out_y,
+                                  &out_width, &out_height, atk_coord_type);
+    gfx::Rect rect(out_x, out_y, out_width, out_height);
+    if (rect.Contains(x, y))
+      return i;
+  }
+  return -1;
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentOriginInScreenCoordinates()
+    const {
+  AtkObject* parent = GetParent();
+  if (!parent)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* parent_node =
+      AXPlatformNode::FromNativeViewAccessible(parent);
+  if (!parent)
+    return gfx::Vector2d();
+
+  return parent_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentFrameOriginInScreenCoordinates()
+    const {
+  AtkObject* frame = FindAtkObjectParentFrame(atk_object_);
+  if (!frame)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* frame_node =
+      AXPlatformNode::FromNativeViewAccessible(frame);
+  if (!frame_node)
+    return gfx::Vector2d();
+
+  return frame_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Rect AXPlatformNodeAuraLinux::GetExtentsRelativeToAtkCoordinateType(
+    AtkCoordType coord_type) const {
+  gfx::Rect extents = delegate_->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                               AXClippingBehavior::kUnclipped);
+  switch (coord_type) {
+    case ATK_XY_SCREEN:
+      break;
+    case ATK_XY_WINDOW: {
+      gfx::Vector2d window_origin = -GetParentFrameOriginInScreenCoordinates();
+      extents.Offset(window_origin);
+      break;
+    }
+#if defined(ATK_230)
+    case ATK_XY_PARENT: {
+      gfx::Vector2d parent_origin = -GetParentOriginInScreenCoordinates();
+      extents.Offset(parent_origin);
+      break;
+    }
+#endif
+  }
+
+  return extents;
+}
+
+void AXPlatformNodeAuraLinux::GetExtents(gint* x,
+                                         gint* y,
+                                         gint* width,
+                                         gint* height,
+                                         AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+  if (width)
+    *width = extents.width();
+  if (height)
+    *height = extents.height();
+}
+
+void AXPlatformNodeAuraLinux::GetPosition(gint* x,
+                                          gint* y,
+                                          AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+}
+
+void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
+  gfx::Rect rect_size = gfx::ToEnclosingRect(GetData().relative_bounds.bounds);
+  if (width)
+    *width = rect_size.width();
+  if (height)
+    *height = rect_size.height();
+}
+
+gfx::NativeViewAccessible
+AXPlatformNodeAuraLinux::HitTestSync(gint x, gint y, AtkCoordType coord_type) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, coord_type);
+
+  AXPlatformNode* current_result = this;
+  while (true) {
+    gfx::NativeViewAccessible hit_child =
+        current_result->GetDelegate()->HitTestSync(scroll_to.x(),
+                                                   scroll_to.y());
+    if (!hit_child)
+      return nullptr;
+    AXPlatformNode* hit_child_node =
+        AXPlatformNode::FromNativeViewAccessible(hit_child);
+    if (!hit_child_node || !hit_child_node->IsDescendantOf(current_result))
+      break;
+
+    // If we get the same node, we're done.
+    if (hit_child_node == current_result)
+      break;
+
+    // Continue to check recursively. That's because HitTestSync may have
+    // returned the best result within a particular accessibility tree,
+    // but we might need to recurse further in a tree of a different type
+    // (for example, from Views to Web).
+    current_result = hit_child_node;
+  }
+  return current_result->GetNativeViewAccessible();
+}
+
+bool AXPlatformNodeAuraLinux::GrabFocus() {
+  AXActionData action_data;
+  action_data.action = ax::mojom::Action::kFocus;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::FocusFirstFocusableAncestorInWebContent() {
+  if (!GetDelegate()->IsWebContent())
+    return false;
+
+  // Don't cross document boundaries in order to avoid having this operation
+  // cross iframe boundaries or escape to non-document UI elements.
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return false;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  if (IsFocusable()) {
+    if (g_current_focused != atk_object)
+      GrabFocus();
+    return true;
+  }
+
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return false;
+
+  // If any of the siblings of this element are focusable, focusing the parent
+  // would be like moving the focus position backward, so we should fall back
+  // to setting the sequential focus navigation starting point.
+  for (auto child_iterator_ptr = parent->GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *parent->GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child || child == this)
+      continue;
+
+    if (child->IsFocusable())
+      return false;
+  }
+
+  return parent->FocusFirstFocusableAncestorInWebContent();
+}
+
+bool AXPlatformNodeAuraLinux::SetSequentialFocusNavigationStartingPoint() {
+  AXActionData action_data;
+  action_data.action =
+      ax::mojom::Action::kSetSequentialFocusNavigationStartingPoint;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPoint() {
+  // First we try to grab focus on this node if any ancestor in the same
+  // document is focusable. Otherwise we set the sequential navigation starting
+  // point.
+  if (!FocusFirstFocusableAncestorInWebContent())
+    return SetSequentialFocusNavigationStartingPoint();
+  else
+    return true;
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(int offset) {
+  int child_count = delegate_->GetChildCount();
+  if (IsAtomicTextField() || child_count == 0)
+    return GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+
+  // When this node has children, we walk through them to figure out what child
+  // node should get focus. We are essentially repeating the process used when
+  // building the hypertext here.
+  int current_offset = 0;
+  for (int i = 0; i < child_count; ++i) {
+    auto* child = FromAtkObject(delegate_->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (child->IsText()) {
+      current_offset += child->GetName().size();
+    } else {
+      // Add an offset for the embedded character.
+      current_offset += 1;
+    }
+
+    // If the offset is larger than our size, try to work with the last child,
+    // which is also the behavior of SetCaretOffset.
+    if (offset <= current_offset || i == child_count - 1)
+      return child->GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+  }
+
+  NOTREACHED();
+  return false;
+}
+
+const gchar* AXPlatformNodeAuraLinux::GetDefaultActionName() {
+  int action;
+  if (!GetIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb, &action))
+    return nullptr;
+
+  // If this object cannot receive focus and has a button role, use click as
+  // the default action. On the AuraLinux platform, the press action is a
+  // signal to users that they can trigger the action using the keyboard, while
+  // a click action means the user should trigger the action via a simulated
+  // click. If this object cannot receive focus, it's impossible to trigger it
+  // with a key press.
+  if (GetRole() == ax::mojom::Role::kButton &&
+      action == static_cast<int>(ax::mojom::DefaultActionVerb::kPress) &&
+      !IsFocusable()) {
+    action = static_cast<int>(ax::mojom::DefaultActionVerb::kClick);
+  }
+
+  std::string action_verb =
+      ui::ToString(static_cast<ax::mojom::DefaultActionVerb>(action));
+
+  ATK_AURALINUX_RETURN_STRING(action_verb);
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetAtkAttributes() {
+  AtkAttributeSet* attribute_list = nullptr;
+  ComputeAttributes(&attribute_list);
+  return attribute_list;
+}
+
+AtkStateType AXPlatformNodeAuraLinux::GetAtkStateTypeForCheckableNode() {
+  if (GetData().GetCheckedState() == ax::mojom::CheckedState::kMixed)
+    return ATK_STATE_INDETERMINATE;
+  if (IsPlatformCheckable())
+    return ATK_STATE_CHECKED;
+  return ATK_STATE_PRESSED;
+}
+
+// AtkDocumentHelpers
+
+const gchar* AXPlatformNodeAuraLinux::GetDocumentAttributeValue(
+    const gchar* attribute) const {
+  if (!g_ascii_strcasecmp(attribute, "DocType"))
+    return delegate_->GetTreeData().doctype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "MimeType"))
+    return delegate_->GetTreeData().mimetype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "Title"))
+    return delegate_->GetTreeData().title.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "URI"))
+    return delegate_->GetTreeData().url.c_str();
+
+  return nullptr;
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetDocumentAttributes() const {
+  AtkAttributeSet* attribute_set = nullptr;
+  const gchar* doc_attributes[] = {"DocType", "MimeType", "Title", "URI"};
+  const gchar* value = nullptr;
+
+  for (unsigned i = 0; i < G_N_ELEMENTS(doc_attributes); i++) {
+    value = GetDocumentAttributeValue(doc_attributes[i]);
+    if (value) {
+      attribute_set = PrependAtkAttributeToAtkAttributeSet(
+          doc_attributes[i], value, attribute_set);
+    }
+  }
+
+  return attribute_set;
+}
+
+//
+// AtkHyperlink helpers
+//
+
+AtkHyperlink* AXPlatformNodeAuraLinux::GetAtkHyperlink() {
+  if (atk_hyperlink_)
+    return atk_hyperlink_;
+
+  atk_hyperlink_ =
+      ATK_HYPERLINK(g_object_new(AX_PLATFORM_ATK_HYPERLINK_TYPE, 0));
+  ax_platform_atk_hyperlink_set_object(
+      AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), this);
+  return atk_hyperlink_;
+}
+
+//
+// Misc helpers
+//
+
+void AXPlatformNodeAuraLinux::GetFloatAttributeInGValue(
+    ax::mojom::FloatAttribute attr,
+    GValue* value) {
+  float float_val;
+  if (GetFloatAttribute(attr, &float_val)) {
+    memset(value, 0, sizeof(*value));
+    g_value_init(value, G_TYPE_FLOAT);
+    g_value_set_float(value, float_val);
+  }
+}
+
+void AXPlatformNodeAuraLinux::AddAttributeToList(const char* name,
+                                                 const char* value,
+                                                 AtkAttributeSet** attributes) {
+  *attributes = PrependAtkAttributeToAtkAttributeSet(name, value, *attributes);
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParent(
+    AtkObject* new_document_parent) {
+  DCHECK(GetAtkRole() == ATK_ROLE_FRAME);
+  SetWeakGPtrToAtkObject(&document_parent_, new_document_parent);
+}
+
+bool AXPlatformNodeAuraLinux::IsNameExposed() {
+  switch (GetRole()) {
+    case ax::mojom::Role::kListMarker:
+      return !GetChildCount();
+    default:
+      return true;
+  }
+}
+
+int AXPlatformNodeAuraLinux::GetCaretOffset() {
+  if (!HasVisibleCaretOrSelection()) {
+    absl::optional<FindInPageResultInfo> result =
+        GetSelectionOffsetsFromFindInPage();
+    AtkObject* atk_object = GetOrCreateAtkObject();
+    if (!atk_object)
+      return -1;
+    if (result.has_value() && result->node == atk_object)
+      return UTF16ToUnicodeOffsetInText(result->end_offset);
+    return -1;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return UTF16ToUnicodeOffsetInText(selection.second);
+}
+
+bool AXPlatformNodeAuraLinux::SetCaretOffset(int offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  int character_count = atk_text_get_character_count(ATK_TEXT(atk_object));
+  if (offset < 0 || offset > character_count)
+    offset = character_count;
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  if (offset == GetCaretOffset() && !HasSelection())
+    return true;
+
+  offset = UnicodeToUTF16OffsetInText(offset);
+  if (!SetHypertextSelection(offset, offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::SetTextSelectionForAtkText(int start_offset,
+                                                         int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return false;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return false;
+
+  // We must put these in the correct order so that we can do
+  // a comparison with the existing start and end below.
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  std::pair<int, int> old_offsets = GetSelectionOffsetsForAtk();
+  if (old_offsets.first == start_offset && old_offsets.second == end_offset)
+    return true;
+
+  if (!SetHypertextSelection(start_offset, end_offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::HasSelection() {
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return selection.first >= 0 && selection.second >= 0 &&
+         selection.first != selection.second;
+}
+
+void AXPlatformNodeAuraLinux::GetSelectionExtents(int* start_offset,
+                                                  int* end_offset) {
+  if (start_offset)
+    *start_offset = 0;
+  if (end_offset)
+    *end_offset = 0;
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  if (selection.first < 0 || selection.second < 0 ||
+      selection.first == selection.second)
+    return;
+
+  // We should ignore the direction of the selection when exposing start and
+  // end offsets. According to the ATK documentation the end offset is always
+  // the offset immediately past the end of the selection. This wouldn't make
+  // sense if end < start.
+  if (selection.second < selection.first)
+    std::swap(selection.first, selection.second);
+
+  selection.first = UTF16ToUnicodeOffsetInText(selection.first);
+  selection.second = UTF16ToUnicodeOffsetInText(selection.second);
+
+  if (start_offset)
+    *start_offset = selection.first;
+  if (end_offset)
+    *end_offset = selection.second;
+}
+
+// Since this method doesn't return a static gchar*, we expect the caller of
+// atk_text_get_selection to free the return value.
+gchar* AXPlatformNodeAuraLinux::GetSelectionWithText(int* start_offset,
+                                                     int* end_offset) {
+  int selection_start, selection_end;
+  GetSelectionExtents(&selection_start, &selection_end);
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    absl::optional<FindInPageResultInfo> find_in_page_result =
+        GetSelectionOffsetsFromFindInPage();
+    if (!find_in_page_result.has_value() ||
+        find_in_page_result->node != atk_object) {
+      *start_offset = 0;
+      *end_offset = 0;
+      return nullptr;
+    }
+
+    selection_start = find_in_page_result->start_offset;
+    selection_end = find_in_page_result->end_offset;
+  }
+
+  selection_start = UTF16ToUnicodeOffsetInText(selection_start);
+  selection_end = UTF16ToUnicodeOffsetInText(selection_end);
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    return nullptr;
+  }
+
+  if (start_offset)
+    *start_offset = selection_start;
+  if (end_offset)
+    *end_offset = selection_end;
+  return atk_text::GetText(ATK_TEXT(atk_object), selection_start,
+                           selection_end);
+}
+
+bool AXPlatformNodeAuraLinux::IsInLiveRegion() {
+  return HasStringAttribute(ax::mojom::StringAttribute::kContainerLiveStatus);
+}
+
+#if defined(ATK_230)
+void AXPlatformNodeAuraLinux::ScrollToPoint(AtkCoordType atk_coord_type,
+                                            int x,
+                                            int y) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, atk_coord_type);
+
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToPoint;
+  action_data.target_point = scroll_to;
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeRectIntoView(
+    gfx::Rect rect,
+    AtkScrollType atk_scroll_type) {
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToMakeVisible;
+  action_data.target_rect = rect;
+
+  action_data.scroll_behavior = ax::mojom::ScrollBehavior::kScrollIfVisible;
+  action_data.horizontal_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+  action_data.vertical_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+
+  switch (atk_scroll_type) {
+    case ATK_SCROLL_TOP_LEFT:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_BOTTOM_RIGHT:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_TOP_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      break;
+    case ATK_SCROLL_BOTTOM_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_LEFT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_RIGHT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      break;
+    case ATK_SCROLL_ANYWHERE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      break;
+  }
+
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeIntoView(
+    AtkScrollType atk_scroll_type) {
+  gfx::Rect rect = GetDelegate()->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                                AXClippingBehavior::kUnclipped);
+  rect -= rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+}
+#endif  // defined(ATK_230)
+
+#if defined(ATK_232)
+absl::optional<gfx::Rect>
+AXPlatformNodeAuraLinux::GetUnclippedHypertextRangeBoundsRect(int start_offset,
+                                                              int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  return GetDelegate()->GetHypertextRangeBoundsRect(
+      UnicodeToUTF16OffsetInText(start_offset),
+      UnicodeToUTF16OffsetInText(end_offset), AXCoordinateSystem::kScreenDIPs,
+      AXClippingBehavior::kUnclipped);
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringIntoView(
+    AtkScrollType atk_scroll_type,
+    int start_offset,
+    int end_offset) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  rect -= node_rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringToPoint(
+    int start_offset,
+    int end_offset,
+    AtkCoordType atk_coord_type,
+    int x,
+    int y) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  ScrollToPoint(atk_coord_type, x - (rect.x() - node_rect.x()),
+                y - (rect.y() - node_rect.y()));
+
+  return true;
+}
+#endif  // defined(ATK_232)
+
+void AXPlatformNodeAuraLinux::ComputeStylesIfNeeded() {
+  if (!offset_to_text_attributes_.empty())
+    return;
+
+  default_text_attributes_ = ComputeTextAttributes();
+  TextAttributeMap attributes_map =
+      GetDelegate()->ComputeTextAttributeMap(default_text_attributes_);
+  offset_to_text_attributes_.swap(attributes_map);
+}
+
+int AXPlatformNodeAuraLinux::FindStartOfStyle(
+    int start_offset,
+    ax::mojom::MoveDirection direction) {
+  int text_length = GetHypertext().length();
+  DCHECK_GE(start_offset, 0);
+  DCHECK_LE(start_offset, text_length);
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  switch (direction) {
+    case ax::mojom::MoveDirection::kNone:
+      NOTREACHED();
+      return start_offset;
+    case ax::mojom::MoveDirection::kBackward: {
+      auto iterator = offset_to_text_attributes_.upper_bound(start_offset);
+      --iterator;
+      return iterator->first;
+    }
+    case ax::mojom::MoveDirection::kForward: {
+      const auto iterator =
+          offset_to_text_attributes_.upper_bound(start_offset);
+      if (iterator == offset_to_text_attributes_.end())
+        return text_length;
+      return iterator->first;
+    }
+  }
+
+  NOTREACHED();
+  return start_offset;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetTextAttributes(
+    int offset,
+    int* start_offset,
+    int* end_offset) {
+  ComputeStylesIfNeeded();
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  int utf16_offset = UnicodeToUTF16OffsetInText(offset);
+  int style_start =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kBackward);
+  int style_end =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kForward);
+
+  auto iterator = offset_to_text_attributes_.find(style_start);
+  DCHECK(iterator != offset_to_text_attributes_.end());
+
+  SetIntPointerValueIfNotNull(start_offset,
+                              UTF16ToUnicodeOffsetInText(style_start));
+  SetIntPointerValueIfNotNull(end_offset,
+                              UTF16ToUnicodeOffsetInText(style_end));
+
+  if (iterator == offset_to_text_attributes_.end())
+    return default_text_attributes_;
+
+  return iterator->second;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetDefaultTextAttributes() {
+  ComputeStylesIfNeeded();
+  return default_text_attributes_;
+}
+
+void AXPlatformNodeAuraLinux::TerminateFindInPage() {
+  ForgetCurrentFindInPageResult();
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageResult(int start_offset,
+                                                       int end_offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  if (!EmitsAtkTextEvents()) {
+    ActivateFindInPageInParent(start_offset, end_offset);
+    return;
+  }
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  FindInPageResultInfo new_info = {atk_object, start_offset, end_offset};
+  if (iterator != active_results.end() && iterator->second == new_info)
+    return;
+
+  active_results[parent_doc] = new_info;
+  g_signal_emit_by_name(atk_object, "text-selection-changed");
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(end_offset));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetHypertextExtentsOfChild(
+    AXPlatformNodeAuraLinux* child_to_find) {
+  int current_offset = 0;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child)
+      continue;
+
+    // If this object is a text only object, it is included directly into this
+    // node's hypertext, otherwise it is represented as an embedded object
+    // character.
+    int size = child->IsText() ? child->GetName().size() : 1;
+    if (child == child_to_find)
+      return std::make_pair(current_offset, current_offset + size);
+    current_offset += size;
+  }
+
+  return absl::nullopt;
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageInParent(int start_offset,
+                                                         int end_offset) {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return;
+
+  absl::optional<std::pair<int, int>> extents_in_parent =
+      parent->GetHypertextExtentsOfChild(this);
+  if (!extents_in_parent.has_value())
+    return;
+
+  DCHECK(IsText());
+  parent->ActivateFindInPageResult(extents_in_parent->first + start_offset,
+                                   extents_in_parent->first + end_offset);
+}
+
+void AXPlatformNodeAuraLinux::ForgetCurrentFindInPageResult() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (parent_doc)
+    GetActiveFindInPageResults().erase(parent_doc);
+}
+
+absl::optional<FindInPageResultInfo>
+AXPlatformNodeAuraLinux::GetSelectionOffsetsFromFindInPage() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return absl::nullopt;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return absl::nullopt;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  if (iterator == active_results.end())
+    return absl::nullopt;
+
+  return iterator->second;
+}
+
+gfx::Point AXPlatformNodeAuraLinux::ConvertPointToScreenCoordinates(
+    const gfx::Point& point,
+    AtkCoordType atk_coord_type) {
+  switch (atk_coord_type) {
+    case ATK_XY_WINDOW:
+      return point + GetParentFrameOriginInScreenCoordinates();
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      return point + GetParentOriginInScreenCoordinates();
+#endif
+    case ATK_XY_SCREEN:
+    default:
+      return point;
+  }
+}
+
+std::pair<int, int> AXPlatformNodeAuraLinux::GetSelectionOffsetsForAtk() {
+  // In web content we always want to look at the selection from the tree
+  // instead of the selection that might be set via node attributes. This is
+  // because the tree selection is the absolute truth about what is visually
+  // selected, whereas node attributes might contain selection extents that are
+  // no longer part of the visual selection.
+  std::pair<int, int> selection;
+  if (GetDelegate()->IsWebContent()) {
+    AXSelection unignored_selection = GetDelegate()->GetUnignoredSelection();
+    GetSelectionOffsetsFromTree(&unignored_selection, &selection.first,
+                                &selection.second);
+  } else {
+    GetSelectionOffsets(&selection.first, &selection.second);
+  }
+  return selection;
+}
+
+}  // namespace ui
Index: chromium/create-119.0.6026.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc
===================================================================
--- chromium/create-119.0.6026.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc	(nonexistent)
+++ chromium/create-119.0.6026.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc	(revision 385)
@@ -0,0 +1,5095 @@
+// Copyright 2017 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/platform/ax_platform_node_auralinux.h"
+#include "base/memory/raw_ptr.h"
+
+#include <dlfcn.h>
+#include <stdint.h>
+
+#include <algorithm>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/debug/leak_annotations.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
+#include "base/ranges/algorithm.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversion_utils.h"
+#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "ui/accessibility/ax_action_data.h"
+#include "ui/accessibility/ax_enum_util.h"
+#include "ui/accessibility/ax_enums.mojom.h"
+#include "ui/accessibility/ax_node_data.h"
+#include "ui/accessibility/ax_role_properties.h"
+#include "ui/accessibility/ax_selection.h"
+#include "ui/accessibility/platform/atk_util_auralinux.h"
+#include "ui/accessibility/platform/ax_platform_atk_hyperlink.h"
+#include "ui/accessibility/platform/ax_platform_node_delegate.h"
+#include "ui/accessibility/platform/ax_platform_text_boundary.h"
+#include "ui/accessibility/platform/child_iterator.h"
+#include "ui/gfx/geometry/rect_conversions.h"
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 10, 0)
+#define ATK_210
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 12, 0)
+#define ATK_212
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 16, 0)
+#define ATK_216
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 26, 0)
+#define ATK_226
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 30, 0)
+#define ATK_230
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 32, 0)
+#define ATK_232
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 34, 0)
+#define ATK_234
+#endif
+
+namespace ui {
+
+namespace {
+
+// IMPORTANT!
+// These values are written to logs.  Do not renumber or delete
+// existing items; add new entries to the end of the list.
+enum class UmaAtkApi {
+  kGetName = 0,
+  kGetDescription = 1,
+  kGetNChildren = 2,
+  kRefChild = 3,
+  kGetIndexInParent = 4,
+  kGetParent = 5,
+  kRefRelationSet = 6,
+  kGetAttributes = 7,
+  kGetRole = 8,
+  kRefStateSet = 9,
+  // This must always be the last enum. It's okay for its value to
+  // increase, but none of the other enum values may change.
+  kMaxValue = kRefStateSet,
+};
+
+void RecordAccessibilityAtkApi(UmaAtkApi enum_value) {
+  UMA_HISTOGRAM_ENUMERATION("Accessibility.ATK-APIs", enum_value);
+}
+
+// When accepting input from clients calling the API, an ATK character offset
+// of -1 can often represent the length of the string.
+static const int kStringLengthOffset = -1;
+
+// We must forward declare this because it is used by the traditional GObject
+// type manipulation macros.
+namespace atk_object {
+GType GetType();
+}  // namespace atk_object
+
+//
+// ax_platform_node_auralinux AtkObject definition and implementation.
+//
+#define AX_PLATFORM_NODE_AURALINUX_TYPE (atk_object::GetType())
+#define AX_PLATFORM_NODE_AURALINUX(obj)                               \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                              AXPlatformNodeAuraLinuxObject))
+#define AX_PLATFORM_NODE_AURALINUX_CLASS(klass)                      \
+  (G_TYPE_CHECK_CLASS_CAST((klass), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                           AXPlatformNodeAuraLinuxClass))
+#define IS_AX_PLATFORM_NODE_AURALINUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define IS_AX_PLATFORM_NODE_AURALINUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define AX_PLATFORM_NODE_AURALINUX_GET_CLASS(obj)                    \
+  (G_TYPE_INSTANCE_GET_CLASS((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                             AXPlatformNodeAuraLinuxClass))
+
+typedef struct _AXPlatformNodeAuraLinuxObject AXPlatformNodeAuraLinuxObject;
+typedef struct _AXPlatformNodeAuraLinuxClass AXPlatformNodeAuraLinuxClass;
+
+struct _AXPlatformNodeAuraLinuxObject {
+  AtkObject parent;
+  raw_ptr<AXPlatformNodeAuraLinux> m_object;
+};
+
+struct _AXPlatformNodeAuraLinuxClass {
+  AtkObjectClass parent_class;
+};
+
+// The root-level Application object that's the parent of all top-level windows.
+AXPlatformNode* g_root_application = nullptr;
+
+// The last AtkObject with keyboard focus. Tracking this is required to emit the
+// ATK_STATE_FOCUSED change to false.
+AtkObject* g_current_focused = nullptr;
+
+// The last object which was selected. Tracking this is required because
+// widgets in the browser UI only emit notifications upon becoming selected,
+// but clients also expect notifications when items become unselected.
+AXPlatformNodeAuraLinux* g_current_selected = nullptr;
+
+// The AtkObject with role=ATK_ROLE_FRAME that represents the toplevel desktop
+// window with focus. If this window is not one of our windows, this value
+// should be null. This is a weak pointer as well, so its value will also be
+// null if if the AtkObject is destroyed.
+AtkObject* g_active_top_level_frame = nullptr;
+
+AtkObject* g_active_views_dialog = nullptr;
+
+#if defined(ATK_216)
+constexpr AtkRole kStaticRole = ATK_ROLE_STATIC;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_SUBSCRIPT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_SUPERSCRIPT;
+#else
+constexpr AtkRole kStaticRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_TEXT;
+#endif
+
+#if defined(ATK_226)
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_FOOTNOTE;
+#else
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_LIST_ITEM;
+#endif
+
+#if defined(ATK_234)
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_CONTENT_DELETION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_CONTENT_INSERTION;
+#else
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_SECTION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_SECTION;
+#endif
+
+using GetTypeFunc = GType (*)();
+using GetColumnHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowColumnSpanFunc = bool (*)(AtkTableCell* cell,
+                                      gint* row,
+                                      gint* column,
+                                      gint* row_span,
+                                      gint* col_span);
+
+static GetTypeFunc g_atk_table_cell_get_type;
+static GetColumnHeaderCellsFunc g_atk_table_cell_get_column_header_cells;
+static GetRowHeaderCellsFunc g_atk_table_cell_get_row_header_cells;
+static GetRowColumnSpanFunc g_atk_table_cell_get_row_column_span;
+
+// The ATK API often requires pointers to be used as out arguments, while
+// allowing for those pointers to be null if the caller is not interested in
+// the value. This function is a simpler helper to avoid continually checking
+// for null and to help prevent forgetting to check for null.
+void SetIntPointerValueIfNotNull(int* pointer, int value) {
+  if (pointer)
+    *pointer = value;
+}
+
+#if defined(ATK_230)
+bool SupportsAtkComponentScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_component_scroll_to_point");
+}
+#endif
+
+#if defined(ATK_232)
+bool SupportsAtkTextScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_text_scroll_substring_to_point");
+}
+#endif
+
+AtkObject* FindAtkObjectParentFrame(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_FRAME)
+      return node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return nullptr;
+}
+
+AtkObject* FindAtkObjectToplevelParentDocument(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  AtkObject* toplevel_document = nullptr;
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+      toplevel_document = node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return toplevel_document;
+}
+
+bool IsFrameAncestorOfAtkObject(AtkObject* frame, AtkObject* atk_object) {
+  AtkObject* current_frame = FindAtkObjectParentFrame(atk_object);
+  while (current_frame) {
+    if (current_frame == frame)
+      return true;
+    AXPlatformNodeAuraLinux* frame_node =
+        AXPlatformNodeAuraLinux::FromAtkObject(current_frame);
+    current_frame = FindAtkObjectParentFrame(frame_node->GetParent());
+  }
+  return false;
+}
+
+// Returns a stack of AtkObjects of activated popup menus. Since each popup
+// menu and submenu has its own native window, we want to properly manage the
+// activated state for their containing frames.
+std::vector<AtkObject*>& GetActiveMenus() {
+  static base::NoDestructor<std::vector<AtkObject*>> active_menus;
+  return *active_menus;
+}
+
+std::map<AtkObject*, FindInPageResultInfo>& GetActiveFindInPageResults() {
+  static base::NoDestructor<std::map<AtkObject*, FindInPageResultInfo>>
+      active_results;
+  return *active_results;
+}
+
+// The currently active frame is g_active_top_level_frame, unless there is an
+// active menu. If there is an active menu the parent frame of the
+// most-recently opened active menu should be the currently active frame.
+AtkObject* ComputeActiveTopLevelFrame() {
+  if (!GetActiveMenus().empty())
+    return FindAtkObjectParentFrame(GetActiveMenus().back());
+  return g_active_top_level_frame;
+}
+
+const char* GetUniqueAccessibilityGTypeName(
+    ImplementedAtkInterfaces interface_mask) {
+  // 37 characters is enough for "AXPlatformNodeAuraLinux%x" with any integer
+  // value.
+  static char name[37];
+  snprintf(name, sizeof(name), "AXPlatformNodeAuraLinux%x",
+           interface_mask.value());
+  return name;
+}
+
+void SetWeakGPtrToAtkObject(AtkObject** weak_pointer, AtkObject* new_value) {
+  DCHECK(weak_pointer);
+  if (*weak_pointer == new_value)
+    return;
+
+  if (*weak_pointer) {
+    g_object_remove_weak_pointer(G_OBJECT(*weak_pointer),
+                                 reinterpret_cast<void**>(weak_pointer));
+  }
+
+  *weak_pointer = new_value;
+
+  if (new_value) {
+    g_object_add_weak_pointer(G_OBJECT(new_value),
+                              reinterpret_cast<void**>(weak_pointer));
+  }
+}
+
+void SetActiveTopLevelFrame(AtkObject* new_top_level_frame) {
+  SetWeakGPtrToAtkObject(&g_active_top_level_frame, new_top_level_frame);
+}
+
+AXCoordinateSystem AtkCoordTypeToAXCoordinateSystem(
+    AtkCoordType coordinate_type) {
+  switch (coordinate_type) {
+    case ATK_XY_SCREEN:
+      return AXCoordinateSystem::kScreenDIPs;
+    case ATK_XY_WINDOW:
+      return AXCoordinateSystem::kRootFrame;
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      // AXCoordinateSystem does not support parent coordinates.
+      NOTIMPLEMENTED();
+      return AXCoordinateSystem::kFrame;
+#endif
+    default:
+      return AXCoordinateSystem::kScreenDIPs;
+  }
+}
+
+const char* BuildDescriptionFromHeaders(AXPlatformNodeDelegate* delegate,
+                                        const std::vector<int32_t>& ids) {
+  std::vector<std::string> names;
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = delegate->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        if (const gchar* name = atk_object_get_name(atk_header))
+          names.push_back(name);
+      }
+    }
+  }
+
+  std::string result = base::JoinString(names, " ");
+
+#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)
+  // http://crbug.com/982839
+  // atk_table_get_column_description and atk_table_get_row_description return
+  // const gchar*, which suggests the caller does not gain ownership of the
+  // returned string. The g_strdup below causes a new allocation, which does not
+  // fit that pattern and causes a leak in tests.
+  ScopedLeakSanitizerDisabler lsan_disabler;
+#endif
+
+  return g_strdup(result.c_str());
+}
+
+AtkAttributeSet* PrependAtkAttributeToAtkAttributeSet(
+    const char* name,
+    const char* value,
+    AtkAttributeSet* attribute_set) {
+  AtkAttribute* attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  attribute->name = g_strdup(name);
+  attribute->value = g_strdup(value);
+  return g_slist_prepend(attribute_set, attribute);
+}
+
+void PrependTextAttributeToSet(const std::string& attribute,
+                               const std::string& value,
+                               AtkAttributeSet** attributes) {
+  DCHECK(attributes);
+
+  AtkAttribute* new_attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  new_attribute->name = g_strdup(attribute.c_str());
+  new_attribute->value = g_strdup(value.c_str());
+  *attributes = g_slist_prepend(*attributes, new_attribute);
+}
+
+void PrependAtkTextAttributeToSet(const AtkTextAttribute attribute,
+                                  const std::string& value,
+                                  AtkAttributeSet** attributes) {
+  PrependTextAttributeToSet(atk_text_attribute_get_name(attribute), value,
+                            attributes);
+}
+
+std::string ToAtkTextAttributeColor(const std::string color) {
+  // The platform-independent color string is in the form "rgb(r, g, b)",
+  // but ATK expects a string like "r, g, b". We convert the string here
+  // by stripping away the unnecessary characters.
+  DCHECK(base::StartsWith(color, "rgb(", base::CompareCase::INSENSITIVE_ASCII));
+  DCHECK(base::EndsWith(color, ")", base::CompareCase::INSENSITIVE_ASCII));
+  return color.substr(4, color.length() - 5);
+}
+
+AtkAttributeSet* ToAtkAttributeSet(const TextAttributeList& attributes) {
+  AtkAttributeSet* copied_attributes = nullptr;
+  for (const auto& attribute : attributes) {
+    if (attribute.first == "background-color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_BG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "font-family") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FAMILY_NAME, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-size") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_SIZE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-weight" && attribute.second == "bold") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_WEIGHT, "700",
+                                   &copied_attributes);
+    } else if (attribute.first == "font-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STYLE, "italic",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-line-through-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STRIKETHROUGH, "true",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-underline-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "single",
+                                   &copied_attributes);
+    } else if (attribute.first == "invalid") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_INVALID, attribute.second,
+                                   &copied_attributes);
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "error",
+                                   &copied_attributes);
+    } else if (attribute.first == "language") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_LANGUAGE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "writing-mode") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_DIRECTION, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "text-position") {
+      PrependTextAttributeToSet(attribute.first, attribute.second,
+                                &copied_attributes);
+    }
+  }
+
+  return g_slist_reverse(copied_attributes);
+}
+
+namespace atk_component {
+
+void GetExtents(AtkComponent* atk_component,
+                gint* x,
+                gint* y,
+                gint* width,
+                gint* height,
+                AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetExtents(x, y, width, height, coord_type);
+}
+
+void GetPosition(AtkComponent* atk_component,
+                 gint* x,
+                 gint* y,
+                 AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+void GetSize(AtkComponent* atk_component, gint* width, gint* height) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+AtkObject* RefAccesibleAtPoint(AtkComponent* atk_component,
+                               gint x,
+                               gint y,
+                               AtkCoordType coord_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), nullptr);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  AtkObject* result = obj->HitTestSync(x, y, coord_type);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+gboolean GrabFocus(AtkComponent* atk_component) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  return obj->GrabFocus();
+}
+
+#if defined(ATK_230)
+gboolean ScrollTo(AtkComponent* atk_component, AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollNodeIntoView(scroll_type);
+  return TRUE;
+}
+
+gboolean ScrollToPoint(AtkComponent* atk_component,
+                       AtkCoordType atk_coord_type,
+                       gint x,
+                       gint y) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollToPoint(atk_coord_type, x, y);
+  return TRUE;
+}
+#endif
+
+void Init(AtkComponentIface* iface) {
+  iface->get_extents = GetExtents;
+  iface->get_position = GetPosition;
+  iface->get_size = GetSize;
+  iface->ref_accessible_at_point = RefAccesibleAtPoint;
+  iface->grab_focus = GrabFocus;
+#if defined(ATK_230)
+  if (SupportsAtkComponentScrollingInterface()) {
+    iface->scroll_to = ScrollTo;
+    iface->scroll_to_point = ScrollToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_component
+
+namespace atk_action {
+
+gboolean DoAction(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), FALSE);
+  g_return_val_if_fail(index >= 0, FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), FALSE);
+
+  AXActionData data;
+  data.action = actions[index];
+  return obj->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gint GetNActions(AtkAction* atk_action) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return static_cast<gint>(obj->GetDelegate()->GetSupportedActions().size());
+}
+
+const gchar* GetDescription(AtkAction*, gint) {
+  // Not implemented. Right now Orca does not provide this and
+  // Chromium is not providing a string for the action description.
+  return nullptr;
+}
+
+const gchar* GetName(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0.
+    return obj->GetDefaultActionName();
+  }
+  return ToString(actions[index]);
+}
+
+const gchar* GetKeybinding(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0. Only the
+    // default action has a key binding.
+    return obj->GetStringAttribute(ax::mojom::StringAttribute::kAccessKey)
+        .c_str();
+  }
+  return nullptr;
+}
+
+void Init(AtkActionIface* iface) {
+  iface->do_action = DoAction;
+  iface->get_n_actions = GetNActions;
+  iface->get_description = GetDescription;
+  iface->get_name = GetName;
+  iface->get_keybinding = GetKeybinding;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_action
+
+namespace atk_document {
+
+const gchar* GetDocumentAttributeValue(AtkDocument* atk_doc,
+                                       const gchar* attribute) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributeValue(attribute);
+}
+
+AtkAttributeSet* GetDocumentAttributes(AtkDocument* atk_doc) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributes();
+}
+
+void Init(AtkDocumentIface* iface) {
+  iface->get_document_attribute_value = GetDocumentAttributeValue;
+  iface->get_document_attributes = GetDocumentAttributes;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_document
+
+namespace atk_image {
+
+void GetImagePosition(AtkImage* atk_img,
+                      gint* x,
+                      gint* y,
+                      AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+const gchar* GetImageDescription(AtkImage* atk_img) {
+  g_return_val_if_fail(ATK_IMAGE(atk_img), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+void GetImageSize(AtkImage* atk_img, gint* width, gint* height) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+void Init(AtkImageIface* iface) {
+  iface->get_image_position = GetImagePosition;
+  iface->get_image_description = GetImageDescription;
+  iface->get_image_size = GetImageSize;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_image
+
+namespace atk_value {
+
+void GetCurrentValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kValueForRange,
+                                 value);
+}
+
+void GetMinimumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMinValueForRange,
+                                 value);
+}
+
+void GetMaximumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMaxValueForRange,
+                                 value);
+}
+
+void GetMinimumIncrement(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kStepValueForRange,
+                                 value);
+}
+
+gboolean SetCurrentValue(AtkValue* atk_value, const GValue* value) {
+  g_return_val_if_fail(ATK_IS_VALUE(atk_value), FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  std::string new_value;
+  switch (G_VALUE_TYPE(value)) {
+    case G_TYPE_FLOAT:
+      new_value = base::NumberToString(g_value_get_float(value));
+      break;
+    case G_TYPE_INT:
+      new_value = base::NumberToString(g_value_get_int(value));
+      break;
+    case G_TYPE_INT64:
+      new_value = base::NumberToString(g_value_get_int64(value));
+      break;
+    case G_TYPE_STRING:
+      new_value = g_value_get_string(value);
+      break;
+    default:
+      return FALSE;
+  }
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kSetValue;
+  data.value = new_value;
+  obj->GetDelegate()->AccessibilityPerformAction(data);
+  return TRUE;
+}
+
+void Init(AtkValueIface* iface) {
+  iface->get_current_value = GetCurrentValue;
+  iface->get_maximum_value = GetMaximumValue;
+  iface->get_minimum_value = GetMinimumValue;
+  iface->get_minimum_increment = GetMinimumIncrement;
+  iface->set_current_value = SetCurrentValue;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_value
+
+namespace atk_hyperlink {
+
+AtkHyperlink* GetHyperlink(AtkHyperlinkImpl* atk_hyperlink_impl) {
+  g_return_val_if_fail(ATK_HYPERLINK_IMPL(atk_hyperlink_impl), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_hyperlink_impl);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  AtkHyperlink* atk_hyperlink = obj->GetAtkHyperlink();
+  g_object_ref(atk_hyperlink);
+
+  return atk_hyperlink;
+}
+
+void Init(AtkHyperlinkImplIface* iface) {
+  iface->get_hyperlink = GetHyperlink;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hyperlink
+
+namespace atk_hypertext {
+
+AtkHyperlink* GetLink(AtkHypertext* hypertext, int index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return nullptr;
+
+  const AXLegacyHypertext& ax_hypertext = obj->GetAXHypertext();
+  if (index >= static_cast<int>(ax_hypertext.hyperlinks.size()) || index < 0)
+    return nullptr;
+
+  int32_t id = ax_hypertext.hyperlinks[index];
+  auto* link = static_cast<AXPlatformNodeAuraLinux*>(
+      AXPlatformNodeBase::GetFromUniqueId(id));
+  if (!link)
+    return nullptr;
+
+  return link->GetAtkHyperlink();
+}
+
+int GetNLinks(AtkHypertext* hypertext) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  return obj ? obj->GetAXHypertext().hyperlinks.size() : 0;
+}
+
+int GetLinkIndex(AtkHypertext* hypertext, int char_index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return -1;
+
+  auto it = obj->GetAXHypertext().hyperlink_offset_to_index.find(char_index);
+  if (it == obj->GetAXHypertext().hyperlink_offset_to_index.end())
+    return -1;
+  return it->second;
+}
+
+void Init(AtkHypertextIface* iface) {
+  iface->get_link = GetLink;
+  iface->get_n_links = GetNLinks;
+  iface->get_link_index = GetLinkIndex;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hypertext
+
+namespace atk_text {
+
+gchar* GetText(AtkText* atk_text, gint start_offset, gint end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  std::u16string text = obj->GetHypertext();
+
+  start_offset = obj->UnicodeToUTF16OffsetInText(start_offset);
+  if (start_offset < 0 || start_offset >= static_cast<int>(text.size()))
+    return nullptr;
+
+  if (end_offset < 0) {
+    end_offset = text.size();
+  } else {
+    end_offset = obj->UnicodeToUTF16OffsetInText(end_offset);
+    end_offset =
+        std::clamp(static_cast<int>(text.size()), start_offset, end_offset);
+  }
+
+  DCHECK_GE(start_offset, 0);
+  DCHECK_GE(end_offset, start_offset);
+
+  return g_strdup(
+      base::UTF16ToUTF8(text.substr(start_offset, end_offset - start_offset))
+          .c_str());
+}
+
+gint GetCharacterCount(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->UTF16ToUnicodeOffsetInText(obj->GetHypertext().length());
+}
+
+gunichar GetCharacterAtOffset(AtkText* atk_text, int offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  std::u16string text = obj->GetHypertext();
+  size_t text_length = text.length();
+
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+  offset = std::max(offset, 0);
+  size_t limited_offset = std::min(static_cast<size_t>(offset), text_length);
+
+  base_icu::UChar32 code_point;
+  base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &limited_offset,
+                             &code_point);
+  return code_point;
+}
+
+gint GetOffsetAtPoint(AtkText* text, gint x, gint y, AtkCoordType coords) {
+  g_return_val_if_fail(ATK_IS_TEXT(text), -1);
+
+  AtkObject* atk_object = ATK_OBJECT(text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  return obj->GetTextOffsetAtPoint(x, y, coords);
+}
+
+// This function returns a single character as a UTF-8 encoded C string because
+// the character may be encoded into more than one byte.
+char* GetCharacter(AtkText* atk_text,
+                   int offset,
+                   int* start_offset,
+                   int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= GetCharacterCount(atk_text))
+    return nullptr;
+
+  char* text = GetText(atk_text, offset, offset + 1);
+  if (!text)
+    return nullptr;
+
+  *start_offset = offset;
+  *end_offset = offset + 1;
+  return text;
+}
+
+char* GetTextWithBoundaryType(AtkText* atk_text,
+                              int offset,
+                              ax::mojom::TextBoundary boundary,
+                              int* start_offset_ptr,
+                              int* end_offset_ptr) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= atk_text_get_character_count(atk_text))
+    return nullptr;
+
+  // The offset that we receive from the API is a Unicode character offset.
+  // Since we calculate boundaries in terms of UTF-16 code point offsets, we
+  // need to convert this input value.
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+
+  int start_offset = obj->FindTextBoundary(
+      boundary, offset, ax::mojom::MoveDirection::kBackward,
+      ax::mojom::TextAffinity::kDownstream);
+  int end_offset = obj->FindTextBoundary(boundary, offset,
+                                         ax::mojom::MoveDirection::kForward,
+                                         ax::mojom::TextAffinity::kDownstream);
+  if (start_offset < 0 || end_offset < 0)
+    return nullptr;
+
+  DCHECK_LE(start_offset, end_offset)
+      << "Start offset should be less than or equal the end offset.";
+
+  // The ATK API is also expecting Unicode character offsets as output
+  // values.
+  *start_offset_ptr = obj->UTF16ToUnicodeOffsetInText(start_offset);
+  *end_offset_ptr = obj->UTF16ToUnicodeOffsetInText(end_offset);
+
+  std::u16string text = obj->GetHypertext();
+  DCHECK_LE(end_offset, static_cast<int>(text.size()));
+
+  std::u16string substr = text.substr(start_offset, end_offset - start_offset);
+  return g_strdup(base::UTF16ToUTF8(substr).c_str());
+}
+
+char* GetTextAtOffset(AtkText* atk_text,
+                      int offset,
+                      AtkTextBoundary atk_boundary,
+                      int* start_offset,
+                      int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+  ax::mojom::TextBoundary boundary = FromAtkTextBoundary(atk_boundary);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+
+char* GetTextAfterOffset(AtkText* atk_text,
+                         int offset,
+                         AtkTextBoundary boundary,
+                         int* start_offset,
+                         int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset + 1, start_offset, end_offset);
+}
+
+char* GetTextBeforeOffset(AtkText* atk_text,
+                          int offset,
+                          AtkTextBoundary boundary,
+                          int* start_offset,
+                          int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset - 1, start_offset, end_offset);
+}
+
+gint GetCaretOffset(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return -1;
+  return obj->GetCaretOffset();
+}
+
+gboolean SetCaretOffset(AtkText* atk_text, gint offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+  if (!obj->SetCaretOffset(offset))
+    return FALSE;
+
+  // Orca expects atk_text_set_caret_offset to either focus the target element
+  // or set the sequential focus navigation starting point there.
+  int utf16_offset = obj->UnicodeToUTF16OffsetInText(offset);
+  obj->GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(
+      utf16_offset);
+
+  return TRUE;
+}
+
+int GetNSelections(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return 0;
+
+  if (obj->HasSelection())
+    return 1;
+
+  absl::optional<FindInPageResultInfo> result =
+      obj->GetSelectionOffsetsFromFindInPage();
+  if (result.has_value() && result->node == ATK_OBJECT(atk_text))
+    return 1;
+
+  return 0;
+}
+
+gchar* GetSelection(AtkText* atk_text,
+                    int selection_num,
+                    int* start_offset,
+                    int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return nullptr;
+  if (selection_num != 0)
+    return nullptr;
+
+  return obj->GetSelectionWithText(start_offset, end_offset);
+}
+
+gboolean RemoveSelection(AtkText* atk_text, int selection_num) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  // Simply collapse the selection to the position of the caret if a caret is
+  // visible, otherwise set the selection to 0.
+  int selection_end = obj->UTF16ToUnicodeOffsetInText(
+      obj->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd));
+  return SetCaretOffset(atk_text, selection_end);
+}
+
+gboolean SetSelection(AtkText* atk_text,
+                      int selection_num,
+                      int start_offset,
+                      int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->SetTextSelectionForAtkText(start_offset, end_offset);
+}
+
+gboolean AddSelection(AtkText* atk_text, int start_offset, int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  // We only support one selection.
+  return SetSelection(atk_text, 0, start_offset, end_offset);
+}
+
+#if defined(ATK_210)
+char* GetStringAtOffset(AtkText* atk_text,
+                        int offset,
+                        AtkTextGranularity atk_granularity,
+                        int* start_offset,
+                        int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  ax::mojom::TextBoundary boundary = FromAtkTextGranularity(atk_granularity);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+#endif
+
+#if defined(ATK_230)
+gfx::Rect GetUnclippedParentHypertextRangeBoundsRect(
+    AXPlatformNodeDelegate* ax_platform_node_delegate,
+    const int start_offset,
+    const int end_offset) {
+  const AXPlatformNode* parent_platform_node =
+      AXPlatformNode::FromNativeViewAccessible(
+          ax_platform_node_delegate->GetParent());
+  if (!parent_platform_node)
+    return gfx::Rect();
+
+  const AXPlatformNodeDelegate* parent_ax_platform_node_delegate =
+      parent_platform_node->GetDelegate();
+  if (!parent_ax_platform_node_delegate)
+    return gfx::Rect();
+
+  return ax_platform_node_delegate->GetHypertextRangeBoundsRect(
+             start_offset, end_offset, AXCoordinateSystem::kRootFrame,
+             AXClippingBehavior::kUnclipped) -
+         parent_ax_platform_node_delegate
+             ->GetBoundsRect(AXCoordinateSystem::kRootFrame,
+                             AXClippingBehavior::kClipped)
+             .OffsetFromOrigin();
+}
+#endif
+
+void GetCharacterExtents(AtkText* atk_text,
+                         int offset,
+                         int* x,
+                         int* y,
+                         int* width,
+                         int* height,
+                         AtkCoordType coordinate_type) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(obj->GetDelegate(),
+                                                          offset, offset + 1);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(offset),
+            obj->UnicodeToUTF16OffsetInText(offset + 1),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  if (x)
+    *x = rect.x();
+  if (y)
+    *y = rect.y();
+  if (width)
+    *width = rect.width();
+  if (height)
+    *height = rect.height();
+}
+
+void GetRangeExtents(AtkText* atk_text,
+                     int start_offset,
+                     int end_offset,
+                     AtkCoordType coordinate_type,
+                     AtkTextRectangle* out_rectangle) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  if (!out_rectangle)
+    return;
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(
+            obj->GetDelegate(), start_offset, end_offset);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(start_offset),
+            obj->UnicodeToUTF16OffsetInText(end_offset),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  out_rectangle->x = rect.x();
+  out_rectangle->y = rect.y();
+  out_rectangle->width = rect.width();
+  out_rectangle->height = rect.height();
+}
+
+AtkAttributeSet* GetRunAttributes(AtkText* atk_text,
+                                  gint offset,
+                                  gint* start_offset,
+                                  gint* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  SetIntPointerValueIfNotNull(start_offset, -1);
+  SetIntPointerValueIfNotNull(end_offset, -1);
+
+  if (offset < 0 || offset > GetCharacterCount(atk_text))
+    return nullptr;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return ToAtkAttributeSet(
+      obj->GetTextAttributes(offset, start_offset, end_offset));
+}
+
+AtkAttributeSet* GetDefaultAttributes(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+  return ToAtkAttributeSet(obj->GetDefaultTextAttributes());
+}
+
+#if defined(ATK_232)
+gboolean ScrollSubstringTo(AtkText* atk_text,
+                           gint start_offset,
+                           gint end_offset,
+                           AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringIntoView(scroll_type, start_offset, end_offset);
+}
+
+gboolean ScrollSubstringToPoint(AtkText* atk_text,
+                                gint start_offset,
+                                gint end_offset,
+                                AtkCoordType atk_coord_type,
+                                gint x,
+                                gint y) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringToPoint(start_offset, end_offset, atk_coord_type,
+                                     x, y);
+}
+#endif  // ATK_232
+
+void Init(AtkTextIface* iface) {
+  iface->get_text = GetText;
+  iface->get_character_count = GetCharacterCount;
+  iface->get_character_at_offset = GetCharacterAtOffset;
+  iface->get_offset_at_point = GetOffsetAtPoint;
+  iface->get_text_after_offset = GetTextAfterOffset;
+  iface->get_text_before_offset = GetTextBeforeOffset;
+  iface->get_text_at_offset = GetTextAtOffset;
+  iface->get_caret_offset = GetCaretOffset;
+  iface->set_caret_offset = SetCaretOffset;
+  iface->get_character_extents = GetCharacterExtents;
+  iface->get_range_extents = GetRangeExtents;
+  iface->get_n_selections = GetNSelections;
+  iface->get_selection = GetSelection;
+  iface->add_selection = AddSelection;
+  iface->remove_selection = RemoveSelection;
+  iface->set_selection = SetSelection;
+
+  iface->get_run_attributes = GetRunAttributes;
+  iface->get_default_attributes = GetDefaultAttributes;
+
+#if defined(ATK_210)
+  iface->get_string_at_offset = GetStringAtOffset;
+#endif
+
+#if defined(ATK_232)
+  if (SupportsAtkTextScrollingInterface()) {
+    iface->scroll_substring_to = ScrollSubstringTo;
+    iface->scroll_substring_to_point = ScrollSubstringToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_text
+
+namespace atk_window {
+void Init(AtkWindowIface* iface) {}
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+}  // namespace atk_window
+
+namespace atk_selection {
+
+gboolean AddSelection(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  if (!child)
+    return FALSE;
+
+  if (!child->SupportsSelectionWithAtkSelection())
+    return FALSE;
+
+  bool selected = child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+  if (selected)
+    return TRUE;
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kDoDefault;
+  return child->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gboolean ClearSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (!selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+AtkObject* RefSelection(AtkSelection* selection, gint requested_child_index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return nullptr;
+
+  if (auto* selected_child = obj->GetSelectedItem(requested_child_index)) {
+    if (AtkObject* atk_object = selected_child->GetNativeViewAccessible()) {
+      g_object_ref(atk_object);
+      return atk_object;
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetSelectionCount(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return 0;
+
+  return obj->GetSelectionCount();
+}
+
+gboolean IsChildSelected(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  return child && child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+}
+
+gboolean RemoveSelection(AtkSelection* selection,
+                         gint index_into_selected_children) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected && index_into_selected_children == 0) {
+      if (!child->SupportsSelectionWithAtkSelection())
+        return FALSE;
+
+      AXActionData data;
+      data.action = ax::mojom::Action::kDoDefault;
+      return child->GetDelegate()->AccessibilityPerformAction(data);
+    } else if (selected) {
+      index_into_selected_children--;
+    }
+  }
+
+  return FALSE;
+}
+
+gboolean SelectAllSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+void Init(AtkSelectionIface* iface) {
+  iface->add_selection = AddSelection;
+  iface->clear_selection = ClearSelection;
+  iface->ref_selection = RefSelection;
+  iface->get_selection_count = GetSelectionCount;
+  iface->is_child_selected = IsChildSelected;
+  iface->remove_selection = RemoveSelection;
+  iface->select_all_selection = SelectAllSelection;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_selection
+
+namespace atk_table {
+
+AtkObject* RefAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      if (AtkObject* atk_cell = cell->GetNativeViewAccessible()) {
+        g_object_ref(atk_cell);
+        return atk_cell;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetIndexAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableCellIndex().has_value());
+      return cell->GetTableCellIndex().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetColumnAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableColumn().has_value());
+      return cell->GetTableColumn().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetRowAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableRow().has_value());
+      return cell->GetTableRow().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetNColumns(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableColumnCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetNRows(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableRowCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetColumnExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableColumnSpan().has_value());
+      return cell->GetTableColumnSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+gint GetRowExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableRowSpan().has_value());
+      return cell->GetTableRowSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+AtkObject* GetColumnHeader(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one column header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the column
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetRowHeader(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one row header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the row
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetCaption(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (auto* caption = obj->GetTableCaption())
+      return caption->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+const gchar* GetColumnDescription(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+const gchar* GetRowDescription(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+void Init(AtkTableIface* iface) {
+  iface->ref_at = RefAt;
+  iface->get_index_at = GetIndexAt;
+  iface->get_column_at_index = GetColumnAtIndex;
+  iface->get_row_at_index = GetRowAtIndex;
+  iface->get_n_columns = GetNColumns;
+  iface->get_n_rows = GetNRows;
+  iface->get_column_extent_at = GetColumnExtentAt;
+  iface->get_row_extent_at = GetRowExtentAt;
+  iface->get_column_header = GetColumnHeader;
+  iface->get_row_header = GetRowHeader;
+  iface->get_caption = GetCaption;
+  iface->get_column_description = GetColumnDescription;
+  iface->get_row_description = GetRowDescription;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table
+
+// The ATK table cell interface was added in ATK 2.12.
+#if defined(ATK_212)
+
+namespace atk_table_cell {
+
+gint GetColumnSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (const AXPlatformNodeBase* obj =
+          AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableColumnSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetColumnHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetColHeaderNodeIds() on a column header cell will include that
+  // column header, along with any other column headers in the column which
+  // may or may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> col_index = obj->GetTableColumn();
+  if (!col_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetColHeaderNodeIds(*col_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+gboolean GetCellPosition(AtkTableCell* cell, gint* row, gint* column) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      FALSE);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    absl::optional<int> row_index = obj->GetTableRow();
+    absl::optional<int> col_index = obj->GetTableColumn();
+    if (!row_index || !col_index)
+      return false;
+
+    *row = *row_index;
+    *column = *col_index;
+    return true;
+  }
+
+  return false;
+}
+
+gint GetRowSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableRowSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetRowHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetRowHeaderNodeIds() on a row header cell will include that
+  // row header, along with any other row headers in the row which may or
+  // may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> row_index = obj->GetTableRow();
+  if (!row_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetRowHeaderNodeIds(*row_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+AtkObject* GetTable(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    if (auto* table = obj->GetTable())
+      return table->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+using AtkTableCellIface = struct _AtkTableCellIface;
+
+void Init(AtkTableCellIface* iface) {
+  iface->get_column_span = GetColumnSpan;
+  iface->get_column_header_cells = GetColumnHeaderCells;
+  iface->get_position = GetCellPosition;
+  iface->get_row_span = GetRowSpan;
+  iface->get_row_header_cells = GetRowHeaderCells;
+  iface->get_table = GetTable;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table_cell
+
+#endif  // ATK_212
+
+namespace atk_object {
+
+gpointer kAXPlatformNodeAuraLinuxParentClass = nullptr;
+
+const gchar* GetName(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (!obj->IsNameExposed())
+    return nullptr;
+
+  ax::mojom::NameFrom name_from = obj->GetNameFrom();
+  if (obj->GetName().empty() &&
+      name_from != ax::mojom::NameFrom::kAttributeExplicitlyEmpty) {
+    return nullptr;
+  }
+
+  obj->accessible_name_ = obj->GetName();
+  return obj->accessible_name_.c_str();
+}
+
+const gchar* AtkGetName(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetName);
+  return GetName(atk_object);
+}
+
+const gchar* GetDescription(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+const gchar* AtkGetDescription(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetDescription);
+  return GetDescription(atk_object);
+}
+
+gint GetNChildren(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->GetChildCount();
+}
+
+gint AtkGetNChildren(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetNChildren);
+  return GetNChildren(atk_object);
+}
+
+AtkObject* RefChild(AtkObject* atk_object, gint index) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return nullptr;
+
+  AtkObject* result = obj->ChildAtIndex(index);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+AtkObject* AtkRefChild(AtkObject* atk_object, gint index) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefChild);
+  return RefChild(atk_object, index);
+}
+
+gint GetIndexInParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  auto index_in_parent = obj->GetIndexInParent();
+  return index_in_parent.has_value()
+             ? static_cast<gint>(index_in_parent.value())
+             : -1;
+}
+
+gint AtkGetIndexInParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetIndexInParent);
+  return GetIndexInParent(atk_object);
+}
+
+AtkObject* GetParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetParent();
+}
+
+AtkObject* AtkGetParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetParent);
+  return GetParent(atk_object);
+}
+
+AtkRelationSet* RefRelationSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return atk_relation_set_new();
+  return obj->GetAtkRelations();
+}
+
+AtkRelationSet* AtkRefRelationSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefRelationSet);
+  // Enables AX mode. Most AT does not call AtkRefRelationSet, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return RefRelationSet(atk_object);
+}
+
+AtkAttributeSet* GetAttributes(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetAtkAttributes();
+}
+
+AtkAttributeSet* AtkGetAttributes(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetAttributes);
+  // Enables AX mode. Most AT does not call AtkGetAttributes, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return GetAttributes(atk_object);
+}
+
+AtkRole GetRole(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), ATK_ROLE_INVALID);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return ATK_ROLE_INVALID;
+  return obj->GetAtkRole();
+}
+
+AtkRole AtkGetRole(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetRole);
+  return GetRole(atk_object);
+}
+
+AtkStateSet* RefStateSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AtkStateSet* atk_state_set =
+      ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+          ->ref_state_set(atk_object);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFUNCT);
+  } else {
+    obj->GetAtkState(atk_state_set);
+  }
+  return atk_state_set;
+}
+
+AtkStateSet* AtkRefStateSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefStateSet);
+  return RefStateSet(atk_object);
+}
+
+void Initialize(AtkObject* atk_object, gpointer data) {
+  if (ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->initialize) {
+    ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+        ->initialize(atk_object, data);
+  }
+
+  AX_PLATFORM_NODE_AURALINUX(atk_object)->m_object =
+      reinterpret_cast<AXPlatformNodeAuraLinux*>(data);
+}
+
+void Finalize(GObject* atk_object) {
+  G_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->finalize(atk_object);
+}
+
+void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
+  GObjectClass* gobject_class = G_OBJECT_CLASS(class_pointer);
+  kAXPlatformNodeAuraLinuxParentClass = g_type_class_peek_parent(gobject_class);
+  gobject_class->finalize = Finalize;
+
+  AtkObjectClass* atk_object_class = ATK_OBJECT_CLASS(gobject_class);
+  atk_object_class->initialize = Initialize;
+  atk_object_class->get_name = AtkGetName;
+  atk_object_class->get_description = AtkGetDescription;
+  atk_object_class->get_parent = AtkGetParent;
+  atk_object_class->get_n_children = AtkGetNChildren;
+  atk_object_class->ref_child = AtkRefChild;
+  atk_object_class->get_role = AtkGetRole;
+  atk_object_class->ref_state_set = AtkRefStateSet;
+  atk_object_class->get_index_in_parent = AtkGetIndexInParent;
+  atk_object_class->ref_relation_set = AtkRefRelationSet;
+  atk_object_class->get_attributes = AtkGetAttributes;
+}
+
+GType GetType() {
+  AXPlatformNodeAuraLinux::EnsureGTypeInit();
+
+  static gsize type_id = 0;
+  if (g_once_init_enter(&type_id)) {
+    static const GTypeInfo type_info = {
+        sizeof(AXPlatformNodeAuraLinuxClass),  // class_size
+        nullptr,                               // base_init
+        nullptr,                               // base_finalize
+        atk_object::ClassInit,
+        nullptr,                                // class_finalize
+        nullptr,                                // class_data
+        sizeof(AXPlatformNodeAuraLinuxObject),  // instance_size
+        0,                                      // n_preallocs
+        nullptr,                                // instance_init
+        nullptr                                 // value_table
+    };
+
+    GType type = g_type_register_static(
+        ATK_TYPE_OBJECT, "AXPlatformNodeAuraLinux", &type_info, GTypeFlags(0));
+    g_once_init_leave(&type_id, type);
+  }
+
+  return type_id;
+}
+
+void Detach(AXPlatformNodeAuraLinuxObject* atk_object) {
+  if (!atk_object->m_object)
+    return;
+
+  atk_object->m_object = nullptr;
+}
+
+}  //  namespace atk_object
+
+}  // namespace
+
+// static
+NO_SANITIZE("cfi-icall")
+GType AtkTableCellInterface::GetType() {
+  return g_atk_table_cell_get_type();
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetColumnHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_column_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetRowHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_row_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+bool AtkTableCellInterface::GetRowColumnSpan(AtkTableCell* cell,
+                                             gint* row,
+                                             gint* column,
+                                             gint* row_span,
+                                             gint* col_span) {
+  return g_atk_table_cell_get_row_column_span(cell, row, column, row_span,
+                                              col_span);
+}
+
+// static
+bool AtkTableCellInterface::Exists() {
+  g_atk_table_cell_get_type = reinterpret_cast<GetTypeFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_type"));
+  g_atk_table_cell_get_column_header_cells =
+      reinterpret_cast<GetColumnHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_column_header_cells"));
+  g_atk_table_cell_get_row_header_cells =
+      reinterpret_cast<GetRowHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_header_cells"));
+  g_atk_table_cell_get_row_column_span = reinterpret_cast<GetRowColumnSpanFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_column_span"));
+  return *g_atk_table_cell_get_type;
+}
+
+void AXPlatformNodeAuraLinux::EnsureGTypeInit() {
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+  static bool first_time = true;
+  if (UNLIKELY(first_time)) {
+    g_type_init();
+    first_time = false;
+  }
+#endif
+}
+
+// static
+ImplementedAtkInterfaces AXPlatformNodeAuraLinux::GetGTypeInterfaceMask(
+    const AXNodeData& data) {
+  // The default implementation set includes the AtkComponent and AtkAction
+  // interfaces, which are provided by all the AtkObjects that we produce.
+  ImplementedAtkInterfaces interface_mask;
+
+  if (!IsImageOrVideo(data.role)) {
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kText);
+    if (!data.IsAtomicTextField())
+      interface_mask.Add(ImplementedAtkInterfaces::Value::kHypertext);
+  }
+
+  if (data.IsRangeValueSupported())
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kValue);
+
+  if (ui::IsPlatformDocument(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kDocument);
+
+  if (IsImage(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kImage);
+
+  // The AtkHyperlinkImpl interface allows getting a AtkHyperlink from an
+  // AtkObject. It is indeed implemented by actual web hyperlinks, but also by
+  // objects that will become embedded objects in ATK hypertext, so the name is
+  // a bit of a misnomer from the ATK API.
+  if (IsLink(data.role) || !ui::IsText(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kHyperlink);
+
+  if (data.role == ax::mojom::Role::kWindow)
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kWindow);
+
+  if (IsContainerWithSelectableChildren(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kSelection);
+
+  if (IsTableLike(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTable);
+
+  // Because the TableCell Interface is only supported in ATK version 2.12 and
+  // later, GetAccessibilityGType has a runtime check to verify we have a recent
+  // enough version. If we don't, GetAccessibilityGType will exclude
+  // AtkTableCell from the supported interfaces and none of its methods or
+  // properties will be exposed to assistive technologies.
+  if (IsCellOrTableHeader(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTableCell);
+
+  return interface_mask;
+}
+
+GType AXPlatformNodeAuraLinux::GetAccessibilityGType() {
+  static const GTypeInfo type_info = {
+      sizeof(AXPlatformNodeAuraLinuxClass),
+      (GBaseInitFunc) nullptr,
+      (GBaseFinalizeFunc) nullptr,
+      (GClassInitFunc) nullptr,
+      (GClassFinalizeFunc) nullptr,
+      nullptr,                               /* class data */
+      sizeof(AXPlatformNodeAuraLinuxObject), /* instance size */
+      0,                                     /* nb preallocs */
+      (GInstanceInitFunc) nullptr,
+      nullptr /* value table */
+  };
+
+  const char* atk_type_name = GetUniqueAccessibilityGTypeName(interface_mask_);
+  GType type = g_type_from_name(atk_type_name);
+  if (type)
+    return type;
+
+  type = g_type_register_static(AX_PLATFORM_NODE_AURALINUX_TYPE, atk_type_name,
+                                &type_info, GTypeFlags(0));
+
+  // The AtkComponent and AtkAction interfaces are always supported.
+  g_type_add_interface_static(type, ATK_TYPE_COMPONENT, &atk_component::Info);
+  g_type_add_interface_static(type, ATK_TYPE_ACTION, &atk_action::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kDocument))
+    g_type_add_interface_static(type, ATK_TYPE_DOCUMENT, &atk_document::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kImage))
+    g_type_add_interface_static(type, ATK_TYPE_IMAGE, &atk_image::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kValue))
+    g_type_add_interface_static(type, ATK_TYPE_VALUE, &atk_value::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHyperlink)) {
+    g_type_add_interface_static(type, ATK_TYPE_HYPERLINK_IMPL,
+                                &atk_hyperlink::Info);
+  }
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHypertext))
+    g_type_add_interface_static(type, ATK_TYPE_HYPERTEXT, &atk_hypertext::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kText))
+    g_type_add_interface_static(type, ATK_TYPE_TEXT, &atk_text::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kWindow))
+    g_type_add_interface_static(type, ATK_TYPE_WINDOW, &atk_window::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kSelection))
+    g_type_add_interface_static(type, ATK_TYPE_SELECTION, &atk_selection::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTable))
+    g_type_add_interface_static(type, ATK_TYPE_TABLE, &atk_table::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTableCell)) {
+    // Run-time check to ensure AtkTableCell is supported (requires ATK 2.12).
+    if (AtkTableCellInterface::Exists()) {
+      g_type_add_interface_static(type, AtkTableCellInterface::GetType(),
+                                  &atk_table_cell::Info);
+    }
+  }
+
+  return type;
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParentOnFrameIfNecessary() {
+  if (GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return;
+
+  if (!GetDelegate()->IsWebContent())
+    return;
+
+  AtkObject* parent_atk_object = GetParent();
+  AXPlatformNodeAuraLinux* parent =
+      AXPlatformNodeAuraLinux::FromAtkObject(parent_atk_object);
+  if (!parent)
+    return;
+
+  if (parent->GetDelegate()->IsWebContent())
+    return;
+
+  AXPlatformNodeAuraLinux* frame = AXPlatformNodeAuraLinux::FromAtkObject(
+      FindAtkObjectParentFrame(parent_atk_object));
+  if (!frame)
+    return;
+
+  frame->SetDocumentParent(parent_atk_object);
+}
+
+AtkObject* AXPlatformNodeAuraLinux::FindPrimaryWebContentDocument() {
+  // It could get multiple web contents since additional web content is added,
+  // when the DevTools window is opened.
+  std::vector<AtkObject*> web_content_candidates;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    AtkObject* child = child_iterator_ptr->GetNativeViewAccessible();
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(child);
+    if (!child_node)
+      continue;
+    if (!child_node->GetDelegate()->IsWebContent())
+      continue;
+    if (child_node->GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+      continue;
+    web_content_candidates.push_back(child);
+  }
+
+  if (web_content_candidates.empty())
+    return nullptr;
+
+  // If it finds just one web content, return it.
+  if (web_content_candidates.size() == 1)
+    return web_content_candidates[0];
+
+  for (auto* object : web_content_candidates) {
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(object);
+    // If it is a primary web contents, return it.
+    if (child_node->GetDelegate()->IsPrimaryWebContentsForWindow()) {
+      return object;
+    }
+  }
+  return nullptr;
+}
+
+bool AXPlatformNodeAuraLinux::IsWebDocumentForRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+  AXPlatformNodeAuraLinux* parent = FromAtkObject(GetParent());
+  if (!parent || !GetDelegate()->IsWebContent() ||
+      GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return false;
+  return parent->FindPrimaryWebContentDocument() == atk_object;
+}
+
+AtkObject* AXPlatformNodeAuraLinux::CreateAtkObject() {
+  if (GetRole() != ax::mojom::Role::kApplication &&
+      !GetDelegate()->IsToplevelBrowserWindow() &&
+      !GetAccessibilityMode().has_mode(AXMode::kNativeAPIs)) {
+    return nullptr;
+  }
+  if (GetDelegate()->IsChildOfLeaf())
+    return nullptr;
+  EnsureGTypeInit();
+  interface_mask_ = GetGTypeInterfaceMask(GetData());
+  GType type = GetAccessibilityGType();
+  AtkObject* atk_object = static_cast<AtkObject*>(g_object_new(type, nullptr));
+
+  atk_object_initialize(atk_object, this);
+
+  SetDocumentParentOnFrameIfNecessary();
+
+  return ATK_OBJECT(atk_object);
+}
+
+void AXPlatformNodeAuraLinux::DestroyAtkObjects() {
+  if (atk_hyperlink_) {
+    ax_platform_atk_hyperlink_set_object(
+        AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), nullptr);
+    g_object_unref(atk_hyperlink_);
+    atk_hyperlink_ = nullptr;
+  }
+
+  if (atk_object_) {
+    // We explicitly clear g_current_focused just in case there is another
+    // reference to atk_object_ somewhere.
+    if (atk_object_ == g_current_focused)
+      SetWeakGPtrToAtkObject(&g_current_focused, nullptr);
+    atk_object::Detach(AX_PLATFORM_NODE_AURALINUX(atk_object_));
+
+    g_object_unref(atk_object_);
+    atk_object_ = nullptr;
+  }
+}
+
+// static
+AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) {
+  AXPlatformNodeAuraLinux* node = new AXPlatformNodeAuraLinux();
+  node->Init(delegate);
+  return node;
+}
+
+// static
+AXPlatformNode* AXPlatformNode::FromNativeViewAccessible(
+    gfx::NativeViewAccessible accessible) {
+  return AXPlatformNodeAuraLinux::FromAtkObject(accessible);
+}
+
+//
+// AXPlatformNodeAuraLinux implementation.
+//
+
+// static
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FromAtkObject(
+    const AtkObject* atk_object) {
+  if (!atk_object)
+    return nullptr;
+
+  if (IS_AX_PLATFORM_NODE_AURALINUX(atk_object)) {
+    AXPlatformNodeAuraLinuxObject* platform_object =
+        AX_PLATFORM_NODE_AURALINUX(atk_object);
+    return platform_object->m_object;
+  }
+
+  return nullptr;
+}
+
+// static
+void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) {
+  g_root_application = application;
+}
+
+// static
+AXPlatformNode* AXPlatformNodeAuraLinux::application() {
+  return g_root_application;
+}
+
+// static
+void AXPlatformNodeAuraLinux::StaticInitialize() {
+  AtkUtilAuraLinux::GetInstance()->InitializeAsync();
+}
+
+// static
+void AXPlatformNodeAuraLinux::EnableAXMode() {
+  AXPlatformNode::NotifyAddAXModeFlags(kAXModeComplete);
+}
+
+AtkRole AXPlatformNodeAuraLinux::GetAtkRole() const {
+  switch (GetRole()) {
+    case ax::mojom::Role::kAlert:
+      return ATK_ROLE_NOTIFICATION;
+    case ax::mojom::Role::kAlertDialog:
+      return ATK_ROLE_ALERT;
+    case ax::mojom::Role::kComment:
+    case ax::mojom::Role::kSuggestion:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kApplication:
+      // Only use ATK_ROLE_APPLICATION for elements with no parent, since it
+      // is only for top level app windows and not ARIA applications.
+      if (!GetParent()) {
+        return ATK_ROLE_APPLICATION;
+      } else {
+        return ATK_ROLE_EMBEDDED;
+      }
+    case ax::mojom::Role::kArticle:
+      return ATK_ROLE_ARTICLE;
+    case ax::mojom::Role::kAudio:
+      return ATK_ROLE_AUDIO;
+    case ax::mojom::Role::kBanner:
+    case ax::mojom::Role::kHeader:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kBlockquote:
+      return ATK_ROLE_BLOCK_QUOTE;
+    case ax::mojom::Role::kCaret:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kCanvas:
+      return ATK_ROLE_CANVAS;
+    case ax::mojom::Role::kCaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kCheckBox:
+      return ATK_ROLE_CHECK_BOX;
+    case ax::mojom::Role::kSwitch:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kColorWell:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kColumn:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kColumnHeader:
+      return ATK_ROLE_COLUMN_HEADER;
+    case ax::mojom::Role::kComboBoxGrouping:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxMenuButton:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxSelect:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComplementary:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kContentDeletion:
+      return kAtkRoleContentDeletion;
+    case ax::mojom::Role::kContentInsertion:
+      return kAtkRoleContentInsertion;
+    case ax::mojom::Role::kContentInfo:
+    case ax::mojom::Role::kFooter:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDate:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDateTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDefinition:
+    case ax::mojom::Role::kDescriptionListDetail:
+      return ATK_ROLE_DESCRIPTION_VALUE;
+    case ax::mojom::Role::kDescriptionList:
+      return ATK_ROLE_DESCRIPTION_LIST;
+    case ax::mojom::Role::kDescriptionListTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kDetails:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kDialog:
+      return ATK_ROLE_DIALOG;
+    case ax::mojom::Role::kDirectory:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kDisclosureTriangle:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kDocCover:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kDocBackLink:
+    case ax::mojom::Role::kDocBiblioRef:
+    case ax::mojom::Role::kDocGlossRef:
+    case ax::mojom::Role::kDocNoteRef:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kDocBiblioEntry:
+    case ax::mojom::Role::kDocEndnote:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kDocNotice:
+    case ax::mojom::Role::kDocTip:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kDocFootnote:
+      return kAtkFootnoteRole;
+    case ax::mojom::Role::kDocPageBreak:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kDocPageFooter:
+      return ATK_ROLE_FOOTER;
+    case ax::mojom::Role::kDocPageHeader:
+      return ATK_ROLE_HEADER;
+    case ax::mojom::Role::kDocAcknowledgments:
+    case ax::mojom::Role::kDocAfterword:
+    case ax::mojom::Role::kDocAppendix:
+    case ax::mojom::Role::kDocBibliography:
+    case ax::mojom::Role::kDocChapter:
+    case ax::mojom::Role::kDocConclusion:
+    case ax::mojom::Role::kDocCredits:
+    case ax::mojom::Role::kDocEndnotes:
+    case ax::mojom::Role::kDocEpilogue:
+    case ax::mojom::Role::kDocErrata:
+    case ax::mojom::Role::kDocForeword:
+    case ax::mojom::Role::kDocGlossary:
+    case ax::mojom::Role::kDocIndex:
+    case ax::mojom::Role::kDocIntroduction:
+    case ax::mojom::Role::kDocPageList:
+    case ax::mojom::Role::kDocPart:
+    case ax::mojom::Role::kDocPreface:
+    case ax::mojom::Role::kDocPrologue:
+    case ax::mojom::Role::kDocToc:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDocAbstract:
+    case ax::mojom::Role::kDocColophon:
+    case ax::mojom::Role::kDocCredit:
+    case ax::mojom::Role::kDocDedication:
+    case ax::mojom::Role::kDocEpigraph:
+    case ax::mojom::Role::kDocExample:
+    case ax::mojom::Role::kDocPullquote:
+    case ax::mojom::Role::kDocQna:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kDocSubtitle:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kEmbeddedObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kForm:
+      // TODO(accessibility) Forms which lack an accessible name are no longer
+      // exposed as forms. http://crbug.com/874384. Forms which have accessible
+      // names should be exposed as ATK_ROLE_LANDMARK according to Core AAM.
+      return ATK_ROLE_FORM;
+    case ax::mojom::Role::kFigure:
+    case ax::mojom::Role::kFeed:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGenericContainer:
+    case ax::mojom::Role::kFooterAsNonLandmark:
+    case ax::mojom::Role::kHeaderAsNonLandmark:
+    case ax::mojom::Role::kRuby:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kGraphicsDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kGraphicsObject:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGraphicsSymbol:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kHeading:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kIframe:
+    case ax::mojom::Role::kIframePresentational:
+      return ATK_ROLE_INTERNAL_FRAME;
+    case ax::mojom::Role::kImage:
+      return IsImageWithMap() ? ATK_ROLE_IMAGE_MAP : ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kInlineTextBox:
+      return kStaticRole;
+    case ax::mojom::Role::kInputTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kLabelText:
+      return ATK_ROLE_LABEL;
+    case ax::mojom::Role::kLegend:
+      return ATK_ROLE_LABEL;
+    // Layout table objects are treated the same as Role::kGenericContainer.
+    case ax::mojom::Role::kLayoutTable:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableCell:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLineBreak:
+      // TODO(Accessibility) Having a separate accessible object for line breaks
+      // is inconsistent with other implementations. http://crbug.com/873144#c1.
+      return kStaticRole;
+    case ax::mojom::Role::kLink:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kList:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kListBox:
+      return ATK_ROLE_LIST_BOX;
+    // TODO(Accessibility) Use ATK_ROLE_MENU_ITEM inside a combo box, see how
+    // ax_platform_node_win.cc code does this.
+    case ax::mojom::Role::kListBoxOption:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kListItem:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListMarker:
+      // Regular list markers only expose their alternative text, but do not
+      // expose their descendants; and the descendants should be ignored. This
+      // is because the alternative text depends on the counter style and can
+      // be different from the actual (visual) marker text, and hence,
+      // inconsistent with the descendants. We treat a list marker as non-text
+      // only if it still has non-ignored descendants, which happens only when:
+      // - The list marker itself is ignored but the descendants are not
+      // - Or the list marker contains images
+      if (!GetChildCount())
+        return kStaticRole;
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kLog:
+      return ATK_ROLE_LOG;
+    case ax::mojom::Role::kMain:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kMark:
+      return kStaticRole;
+    case ax::mojom::Role::kMath:
+    case ax::mojom::Role::kMathMLMath:
+      return ATK_ROLE_MATH;
+    // https://w3c.github.io/mathml-aam/#mathml-element-mappings
+    case ax::mojom::Role::kMathMLFraction:
+      return ATK_ROLE_MATH_FRACTION;
+    case ax::mojom::Role::kMathMLIdentifier:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLMultiscripts:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNoneScript:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNumber:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLPrescriptDelimiter:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLOperator:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSquareRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLStringLiteral:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLSub:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSubSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kMathMLTableCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kMathMLTableRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kMathMLText:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLUnder:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLUnderOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMarquee:
+      return ATK_ROLE_MARQUEE;
+    case ax::mojom::Role::kMenu:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuBar:
+      return ATK_ROLE_MENU_BAR;
+    case ax::mojom::Role::kMenuItem:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemCheckBox:
+      return ATK_ROLE_CHECK_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemRadio:
+      return ATK_ROLE_RADIO_MENU_ITEM;
+    case ax::mojom::Role::kMenuListPopup:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuListOption:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMeter:
+      return ATK_ROLE_LEVEL_BAR;
+    case ax::mojom::Role::kNavigation:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kNote:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kPane:
+    case ax::mojom::Role::kScrollView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kParagraph:
+      return ATK_ROLE_PARAGRAPH;
+    case ax::mojom::Role::kPdfActionableHighlight:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPdfRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kPluginObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kPopUpButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPortal:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kProgressIndicator:
+      return ATK_ROLE_PROGRESS_BAR;
+    case ax::mojom::Role::kRadioButton:
+      return ATK_ROLE_RADIO_BUTTON;
+    case ax::mojom::Role::kRadioGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRegion:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kRootWebArea:
+      return ATK_ROLE_DOCUMENT_WEB;
+    case ax::mojom::Role::kRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kRowGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRowHeader:
+      return ATK_ROLE_ROW_HEADER;
+    case ax::mojom::Role::kRubyAnnotation:
+      // Generally exposed as description on <ruby> (Role::kRuby) element, not
+      // as its own object in the tree.
+      // However, it's possible to make a kRubyAnnotation element show up in the
+      // AX tree, for example by adding tabindex="0" to the source <rp> or <rt>
+      // element or making the source element the target of an aria-owns.
+      // Therefore, browser side needs to gracefully handle it if it actually
+      // shows up in the tree.
+      return kStaticRole;
+    case ax::mojom::Role::kSection:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kScrollBar:
+      return ATK_ROLE_SCROLL_BAR;
+    case ax::mojom::Role::kSearch:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kSlider:
+      return ATK_ROLE_SLIDER;
+    case ax::mojom::Role::kSpinButton:
+      return ATK_ROLE_SPIN_BUTTON;
+    case ax::mojom::Role::kSplitter:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kStaticText:
+      return kStaticRole;
+    case ax::mojom::Role::kStatus:
+      return ATK_ROLE_STATUSBAR;
+    case ax::mojom::Role::kSubscript:
+      return kSubscriptRole;
+    case ax::mojom::Role::kSuperscript:
+      return kSuperscriptRole;
+    case ax::mojom::Role::kSvgRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kTab:
+      return ATK_ROLE_PAGE_TAB;
+    case ax::mojom::Role::kTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kTableHeaderContainer:
+      // TODO(accessibility) This mapping is correct, but it doesn't seem to be
+      // used. We don't necessarily want to always expose these containers, but
+      // we must do so if they are focusable. http://crbug.com/874043
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kTabList:
+      return ATK_ROLE_PAGE_TAB_LIST;
+    case ax::mojom::Role::kTabPanel:
+      return ATK_ROLE_SCROLL_PANE;
+    case ax::mojom::Role::kTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kTitleBar:
+      return ATK_ROLE_TITLE_BAR;
+    case ax::mojom::Role::kTextField:
+    case ax::mojom::Role::kSearchBox:
+      if (HasState(ax::mojom::State::kProtected))
+        return ATK_ROLE_PASSWORD_TEXT;
+      return ATK_ROLE_ENTRY;
+    case ax::mojom::Role::kTextFieldWithComboBox:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kAbbr:
+    case ax::mojom::Role::kCode:
+    case ax::mojom::Role::kEmphasis:
+    case ax::mojom::Role::kStrong:
+    case ax::mojom::Role::kTime:
+      return kStaticRole;
+    case ax::mojom::Role::kTimer:
+      return ATK_ROLE_TIMER;
+    case ax::mojom::Role::kToggleButton:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kToolbar:
+      return ATK_ROLE_TOOL_BAR;
+    case ax::mojom::Role::kTooltip:
+      return ATK_ROLE_TOOL_TIP;
+    case ax::mojom::Role::kTree:
+      return ATK_ROLE_TREE;
+    case ax::mojom::Role::kTreeItem:
+      return ATK_ROLE_TREE_ITEM;
+    case ax::mojom::Role::kTreeGrid:
+      return ATK_ROLE_TREE_TABLE;
+    case ax::mojom::Role::kVideo:
+      return ATK_ROLE_VIDEO;
+    case ax::mojom::Role::kWindow:
+      // In ATK elements with ATK_ROLE_FRAME are windows with titles and
+      // buttons, while those with ATK_ROLE_WINDOW are windows without those
+      // elements.
+      return ATK_ROLE_FRAME;
+    case ax::mojom::Role::kClient:
+    case ax::mojom::Role::kDesktop:
+    case ax::mojom::Role::kWebView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kFigcaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kUnknown:
+      // When we are not in web content, assume that a node with an unknown
+      // role is a view (which often have the unknown role).
+      return !GetDelegate()->IsWebContent() ? ATK_ROLE_PANEL : ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kImeCandidate:
+    case ax::mojom::Role::kKeyboard:
+    case ax::mojom::Role::kNone:
+      return ATK_ROLE_REDUNDANT_OBJECT;
+    case ax::mojom::Role::kPreDeprecated:
+      NOTREACHED_NORETURN();
+  }
+}
+
+// If we were compiled with a newer version of ATK than the runtime version,
+// it's possible that the state we want to expose and/or emit an event for
+// is not present. This will generate a runtime error.
+bool PlatformSupportsState(AtkStateType atk_state_type) {
+  static absl::optional<int> max_state_type = absl::nullopt;
+  if (!max_state_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_state_type_get_type()));
+    max_state_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  return atk_state_type < max_state_type.value();
+}
+
+void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
+  bool menu_active = !GetActiveMenus().empty();
+  if (!menu_active && atk_object_ == g_active_top_level_frame)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  if (menu_active &&
+      FindAtkObjectParentFrame(GetActiveMenus().back()) == atk_object_)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  if (atk_object_ && atk_object_ == g_active_views_dialog)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  bool is_minimized = delegate_->IsMinimized();
+  if (is_minimized && GetRole() == ax::mojom::Role::kWindow)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ICONIFIED);
+
+  if (HasState(ax::mojom::State::kCollapsed))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+  if (HasState(ax::mojom::State::kDefault))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
+  if ((HasState(ax::mojom::State::kEditable) ||
+       HasState(ax::mojom::State::kRichlyEditable)) &&
+      GetData().GetRestriction() != ax::mojom::Restriction::kReadOnly) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE);
+  }
+  if (HasState(ax::mojom::State::kExpanded)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
+  }
+  if (IsFocused())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED);
+  if (IsFocusable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
+  if (HasState(ax::mojom::State::kHorizontal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HORIZONTAL);
+  if (!IsInvisibleOrIgnored()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISIBLE);
+    if (!delegate_->IsOffscreen() && !is_minimized)
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SHOWING);
+  }
+  if (HasState(ax::mojom::State::kMultiselectable))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MULTISELECTABLE);
+  if (HasState(ax::mojom::State::kRequired))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_REQUIRED);
+  if (HasState(ax::mojom::State::kVertical))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VERTICAL);
+  if (HasState(ax::mojom::State::kVisited))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISITED);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kInvalidState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kInvalidState) !=
+          static_cast<int32_t>(ax::mojom::InvalidState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INVALID_ENTRY);
+  }
+  if (HasIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) !=
+          static_cast<int32_t>(ax::mojom::AriaCurrentState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  }
+#if defined(ATK_216)
+  // Runtime checks in case we were compiled with a newer version of ATK.
+  if (IsPlatformCheckable() && PlatformSupportsState(ATK_STATE_CHECKABLE))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKABLE);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kHasPopup) &&
+      PlatformSupportsState(ATK_STATE_HAS_POPUP))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP);
+#endif
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_BUSY);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kModal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MODAL);
+  if (GetData().IsSelectable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kSelected))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
+
+  if (IsTextField()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE_TEXT);
+    if (HasState(ax::mojom::State::kMultiline))
+      atk_state_set_add_state(atk_state_set, ATK_STATE_MULTI_LINE);
+    else
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SINGLE_LINE);
+  }
+
+  // Special case for indeterminate progressbar.
+  if (GetRole() == ax::mojom::Role::kProgressIndicator &&
+      !HasFloatAttribute(ax::mojom::FloatAttribute::kValueForRange)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INDETERMINATE);
+  }
+
+  if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete).empty() ||
+      HasState(ax::mojom::State::kAutofillAvailable)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION);
+  }
+
+  // Checked state
+  const auto checked_state = GetData().GetCheckedState();
+  if (checked_state == ax::mojom::CheckedState::kTrue ||
+      checked_state == ax::mojom::CheckedState::kMixed) {
+    atk_state_set_add_state(atk_state_set, GetAtkStateTypeForCheckableNode());
+  }
+
+  if (GetData().GetRestriction() != ax::mojom::Restriction::kDisabled) {
+    if (GetDelegate()->IsReadOnlySupported() &&
+        GetDelegate()->IsReadOnlyOrDisabled()) {
+#if defined(ATK_216)
+      // Runtime check in case we were compiled with a newer version of ATK.
+      if (PlatformSupportsState(ATK_STATE_READ_ONLY))
+        atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
+#endif
+    } else {
+      atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED);
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SENSITIVE);
+    }
+  }
+}
+
+// Some relations only exist in a high enough ATK version.
+// If a relation has a version requirement, it will be documented in
+// the link below.
+// https://docs.gtk.org/atk/enum.RelationType.html
+struct AtkIntRelation {
+  ax::mojom::IntAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntRelation kIntRelations[] = {
+    {ax::mojom::IntAttribute::kMemberOfId, ATK_RELATION_MEMBER_OF,
+     absl::nullopt},
+    {ax::mojom::IntAttribute::kPopupForId, ATK_RELATION_POPUP_FOR,
+     absl::nullopt},
+};
+
+struct AtkIntListRelation {
+  ax::mojom::IntListAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntListRelation kIntListRelations[] = {
+    {ax::mojom::IntListAttribute::kControlsIds, ATK_RELATION_CONTROLLER_FOR,
+     ATK_RELATION_CONTROLLED_BY},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kDetailsIds, ATK_RELATION_DETAILS,
+     ATK_RELATION_DETAILS_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kDescribedbyIds, ATK_RELATION_DESCRIBED_BY,
+     ATK_RELATION_DESCRIPTION_FOR},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kErrormessageIds, ATK_RELATION_ERROR_MESSAGE,
+     ATK_RELATION_ERROR_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kFlowtoIds, ATK_RELATION_FLOWS_TO,
+     ATK_RELATION_FLOWS_FROM},
+    {ax::mojom::IntListAttribute::kLabelledbyIds, ATK_RELATION_LABELLED_BY,
+     ATK_RELATION_LABEL_FOR},
+};
+
+void AXPlatformNodeAuraLinux::AddRelationToSet(AtkRelationSet* relation_set,
+                                               AtkRelationType relation,
+                                               AXPlatformNode* target) {
+  DCHECK(target);
+  DCHECK(GetDelegate()->IsValidRelationTarget(target));
+
+  // If we were compiled with a newer version of ATK than the runtime version,
+  // it's possible that we might try to add a relation that doesn't exist in
+  // the runtime version of the AtkRelationType enum. This will cause a runtime
+  // error, so return early here if we are about to do that.
+  static absl::optional<int> max_relation_type = absl::nullopt;
+  if (!max_relation_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_relation_type_get_type()));
+    max_relation_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  if (relation >= max_relation_type.value())
+    return;
+
+  atk_relation_set_add_relation_by_type(relation_set, relation,
+                                        target->GetNativeViewAccessible());
+}
+
+AtkRelationSet* AXPlatformNodeAuraLinux::GetAtkRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  AtkRelationSet* relation_set = atk_relation_set_new();
+
+  if (IsWebDocumentForRelations()) {
+    AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+    if (parent_frame) {
+      atk_relation_set_add_relation_by_type(
+          relation_set, ATK_RELATION_EMBEDDED_BY, parent_frame);
+    }
+  }
+
+  if (auto* document_parent = FromAtkObject(document_parent_)) {
+    AtkObject* document = document_parent->FindPrimaryWebContentDocument();
+    if (document) {
+      atk_relation_set_add_relation_by_type(relation_set, ATK_RELATION_EMBEDS,
+                                            document);
+    }
+  }
+
+  // For each possible relation defined by an IntAttribute, we test that
+  // attribute and then look for reverse relations.
+  for (auto relation : kIntRelations) {
+    if (AXPlatformNode* target =
+            GetDelegate()->GetTargetNodeForRelation(relation.attribute))
+      AddRelationToSet(relation_set, relation.relation, target);
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  // Now we do the same for each possible relation defined by an
+  // IntListAttribute. In this case we need to handle each target in the list.
+  for (const auto& relation : kIntListRelations) {
+    std::vector<AXPlatformNode*> targets =
+        GetDelegate()->GetTargetNodesForRelation(relation.attribute);
+    for (AXPlatformNode* target : targets) {
+      AddRelationToSet(relation_set, relation.relation, target);
+    }
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> reverse_target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : reverse_target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  return relation_set;
+}
+
+AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() = default;
+
+AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() {
+  if (g_current_selected == this)
+    g_current_selected = nullptr;
+
+  DestroyAtkObjects();
+
+  if (window_activate_event_postponed_)
+    AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+
+  SetWeakGPtrToAtkObject(&document_parent_, nullptr);
+}
+
+void AXPlatformNodeAuraLinux::Destroy() {
+  DestroyAtkObjects();
+  AXPlatformNodeBase::Destroy();
+}
+
+void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) {
+  // Initialize ATK.
+  AXPlatformNodeBase::Init(delegate);
+
+  // Only create the AtkObject if we know enough information.
+  if (GetRole() != ax::mojom::Role::kUnknown)
+    GetOrCreateAtkObject();
+}
+
+bool AXPlatformNodeAuraLinux::IsPlatformCheckable() const {
+  if (GetRole() == ax::mojom::Role::kToggleButton)
+    return false;
+
+  return AXPlatformNodeBase::IsPlatformCheckable();
+}
+
+absl::optional<size_t> AXPlatformNodeAuraLinux::GetIndexInParent() {
+  AXPlatformNode* parent =
+      AXPlatformNode::FromNativeViewAccessible(GetParent());
+  // Even though the node doesn't have its parent, GetParent() could return the
+  // application. Since the detached view has the kUnknown role and the
+  // restriction is kDisabled, it early returns before finding the index.
+  if (parent == AXPlatformNodeAuraLinux::application() &&
+      GetRole() == ax::mojom::Role::kUnknown &&
+      GetData().GetRestriction() == ax::mojom::Restriction::kDisabled) {
+    return absl::nullopt;
+  }
+
+  return AXPlatformNodeBase::GetIndexInParent();
+}
+
+void AXPlatformNodeAuraLinux::EnsureAtkObjectIsValid() {
+  if (atk_object_) {
+    // If the object's role changes and that causes its
+    // interface mask to change, we need to create a new
+    // AtkObject for it.
+    ImplementedAtkInterfaces interface_mask = GetGTypeInterfaceMask(GetData());
+    if (interface_mask != interface_mask_)
+      DestroyAtkObjects();
+  }
+
+  if (!atk_object_) {
+    GetOrCreateAtkObject();
+  }
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() {
+  return GetOrCreateAtkObject();
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetOrCreateAtkObject() {
+  if (!atk_object_) {
+    atk_object_ = CreateAtkObject();
+  }
+  return atk_object_;
+}
+
+void AXPlatformNodeAuraLinux::OnCheckedStateChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(obj), GetAtkStateTypeForCheckableNode(),
+      GetData().GetCheckedState() != ax::mojom::CheckedState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnEnabledChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_ENABLED,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_SENSITIVE,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+}
+
+void AXPlatformNodeAuraLinux::OnBusyStateChanged(bool is_busy) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_BUSY, is_busy);
+}
+
+void AXPlatformNodeAuraLinux::OnExpandedStateChanged(bool is_expanded) {
+  // When a list box is expanded, it becomes visible. This means that it might
+  // now have a different role (the role for hidden Views is kUnknown).  We
+  // need to recreate the AtkObject in this case because a change in roles
+  // might imply a change in ATK interfaces implemented.
+  EnsureAtkObjectIsValid();
+
+  DCHECK(HasState(ax::mojom::State::kCollapsed) ||
+         HasState(ax::mojom::State::kExpanded));
+
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_EXPANDED, is_expanded);
+}
+
+void AXPlatformNodeAuraLinux::OnShowingStateChanged(bool is_showing) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_SHOWING, is_showing);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupStart() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  // Exit early if kMenuPopupStart is sent multiple times for the same menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  bool menu_already_open = !active_menus.empty();
+  if (menu_already_open && active_menus.back() == atk_object)
+    return;
+
+  // We also want to inform the AT that menu the is now showing. Normally this
+  // event is not fired because the menu will be created with the
+  // ATK_STATE_SHOWING already set to TRUE.
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, TRUE);
+
+  // We need to compute this before modifying the active menu stack.
+  AtkObject* previous_active_frame = ComputeActiveTopLevelFrame();
+
+  active_menus.push_back(atk_object);
+
+  // We exit early if the newly activated menu has the same AtkWindow as the
+  // previous one.
+  if (previous_active_frame == parent_frame)
+    return;
+  if (previous_active_frame) {
+    g_signal_emit_by_name(previous_active_frame, "deactivate");
+    atk_object_notify_state_change(previous_active_frame, ATK_STATE_ACTIVE,
+                                   FALSE);
+  }
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupEnd() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, FALSE);
+
+  // kMenuPopupHide may be called multiple times for the same menu, so only
+  // remove it if our parent frame matches the most recently opened menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  DCHECK(!active_menus.empty())
+      << "Asymmetrical menupopupend events -- too many";
+
+  active_menus.pop_back();
+  AtkObject* new_active_item = ComputeActiveTopLevelFrame();
+  if (new_active_item != parent_frame) {
+    // Newly activated menu has the different AtkWindow as the previous one.
+    g_signal_emit_by_name(parent_frame, "deactivate");
+    atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+    if (new_active_item) {
+      g_signal_emit_by_name(new_active_item, "activate");
+      atk_object_notify_state_change(new_active_item, ATK_STATE_ACTIVE, TRUE);
+    }
+  }
+
+  // All menus are closed.
+  if (active_menus.empty())
+    OnAllMenusEnded();
+}
+
+void AXPlatformNodeAuraLinux::ResendFocusSignalsForCurrentlyFocusedNode() {
+  auto* frame = FromAtkObject(g_active_top_level_frame);
+  if (!frame)
+    return;
+
+  AtkObject* focused_node = frame->GetDelegate()->GetFocus();
+  if (!focused_node)
+    return;
+
+  g_signal_emit_by_name(focused_node, "focus-event", true);
+  atk_object_notify_state_change(focused_node, ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::SetAsCurrentlyFocusedNode() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_current_focused, obj);
+}
+
+// All menus have closed.
+void AXPlatformNodeAuraLinux::OnAllMenusEnded() {
+  if (!GetActiveMenus().empty() && g_active_top_level_frame &&
+      ComputeActiveTopLevelFrame() != g_active_top_level_frame) {
+    g_signal_emit_by_name(g_active_top_level_frame, "activate");
+    atk_object_notify_state_change(g_active_top_level_frame, ATK_STATE_ACTIVE,
+                                   TRUE);
+  }
+
+  GetActiveMenus().clear();
+  ResendFocusSignalsForCurrentlyFocusedNode();
+}
+
+void AXPlatformNodeAuraLinux::OnWindowActivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame == g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(parent_frame);
+
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+
+  // We also send a focus event for the currently focused element, so that
+  // the user knows where the focus is when the toplevel window regains focus.
+  if (g_current_focused &&
+      IsFrameAncestorOfAtkObject(parent_frame, g_current_focused)) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", true);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnWindowDeactivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame != g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(nullptr);
+
+  g_signal_emit_by_name(parent_frame, "deactivate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+}
+
+void AXPlatformNodeAuraLinux::OnWindowVisibilityChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (GetAtkRole() != ATK_ROLE_FRAME)
+    return;
+
+  bool minimized = delegate_->IsMinimized();
+  if (minimized == was_minimized_)
+    return;
+
+  was_minimized_ = minimized;
+  if (minimized)
+    g_signal_emit_by_name(atk_object, "minimize");
+  else
+    g_signal_emit_by_name(atk_object, "restore");
+  atk_object_notify_state_change(atk_object, ATK_STATE_ICONIFIED, minimized);
+}
+
+void AXPlatformNodeAuraLinux::OnScrolledToAnchor() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  // The text-caret-moved event is used to signal a scroll to anchor event.
+  if (ATK_IS_TEXT(atk_object)) {
+    g_signal_emit_by_name(atk_object, "text-caret-moved", 0);
+  }
+}
+
+void AXPlatformNodeAuraLinux::SetActiveViewsDialog() {
+  AtkObject* old_views_dialog = g_active_views_dialog;
+  AtkObject* new_views_dialog = nullptr;
+
+  AtkObject* parent = GetOrCreateAtkObject();
+  if (!parent)
+    return;
+
+  if (!GetDelegate()->IsWebContent()) {
+    while (parent) {
+      if (atk_object::GetRole(parent) == ATK_ROLE_DIALOG) {
+        new_views_dialog = parent;
+        break;
+      }
+      parent = atk_object::GetParent(parent);
+    }
+  }
+
+  if (old_views_dialog == new_views_dialog)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_active_views_dialog, new_views_dialog);
+  if (old_views_dialog)
+    atk_object_notify_state_change(old_views_dialog, ATK_STATE_ACTIVE, FALSE);
+  if (new_views_dialog)
+    atk_object_notify_state_change(new_views_dialog, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnFocused() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (atk_object::GetRole(atk_object) == ATK_ROLE_FRAME) {
+    OnWindowActivated();
+    return;
+  }
+
+  if (atk_object == g_current_focused)
+    return;
+
+  SetActiveViewsDialog();
+
+  if (g_current_focused) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", false);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, false);
+  }
+
+  SetWeakGPtrToAtkObject(&g_current_focused, atk_object);
+
+  g_signal_emit_by_name(g_current_focused, "focus-event", true);
+  atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                 ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::OnSelected() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  if (g_current_selected && !g_current_selected->GetBoolAttribute(
+                                ax::mojom::BoolAttribute::kSelected)) {
+    atk_object_notify_state_change(
+        ATK_OBJECT(g_current_selected->GetOrCreateAtkObject()),
+        ATK_STATE_SELECTED, false);
+  }
+
+  g_current_selected = this;
+  if (ATK_IS_OBJECT(atk_object)) {
+    atk_object_notify_state_change(ATK_OBJECT(atk_object), ATK_STATE_SELECTED,
+                                   true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnSelectedChildrenChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  g_signal_emit_by_name(obj, "selection-changed", true);
+}
+
+bool AXPlatformNodeAuraLinux::EmitsAtkTextEvents() const {
+  // Objects which do not implement AtkText cannot emit AtkText events.
+  if (!atk_object_ || !ATK_IS_TEXT(atk_object_))
+    return false;
+
+  // Objects which do implement AtkText, but are ignored or invisible should not
+  // emit AtkText events.
+  if (IsInvisibleOrIgnored())
+    return false;
+
+  // If this node is not a static text node, it supports the full AtkText
+  // interface.
+  if (GetAtkRole() != kStaticRole)
+    return true;
+
+  // If this node has children it is not a static text leaf node and supports
+  // the full AtkText interface.
+  if (GetChildCount())
+    return true;
+
+  return false;
+}
+
+void AXPlatformNodeAuraLinux::GetFullSelection(int32_t* anchor_node_id,
+                                               int* anchor_offset,
+                                               int32_t* focus_node_id,
+                                               int* focus_offset) {
+  DCHECK(anchor_node_id);
+  DCHECK(anchor_offset);
+  DCHECK(focus_node_id);
+  DCHECK(focus_offset);
+
+  if (IsAtomicTextField() &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelStart, anchor_offset) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd, focus_offset)) {
+    int32_t node_id = GetData().id != -1 ? GetData().id : GetUniqueId();
+    *anchor_node_id = *focus_node_id = node_id;
+    return;
+  }
+
+  AXSelection selection = GetDelegate()->GetUnignoredSelection();
+  *anchor_node_id = selection.anchor_object_id;
+  *anchor_offset = selection.anchor_offset;
+  *focus_node_id = selection.focus_object_id;
+  *focus_offset = selection.focus_offset;
+}
+
+AXPlatformNodeAuraLinux& AXPlatformNodeAuraLinux::FindEditableRootOrDocument() {
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return *this;
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kNonAtomicTextFieldRoot) &&
+      HasState(ax::mojom::State::kEditable))
+    return *this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindEditableRootOrDocument();
+  return *this;
+}
+
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FindCommonAncestor(
+    AXPlatformNodeAuraLinux* other) {
+  if (this == other || other->IsDescendantOf(this))
+    return this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindCommonAncestor(other);
+  return nullptr;
+}
+
+void AXPlatformNodeAuraLinux::UpdateSelectionInformation(int32_t anchor_node_id,
+                                                         int anchor_offset,
+                                                         int32_t focus_node_id,
+                                                         int focus_offset) {
+  had_nonzero_width_selection =
+      focus_node_id != anchor_node_id || focus_offset != anchor_offset;
+  current_caret_ = std::make_pair(focus_node_id, focus_offset);
+}
+
+void AXPlatformNodeAuraLinux::EmitSelectionChangedSignal(bool had_selection) {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitSelectionChangedSignal(had_selection);
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  // ATK does not consider a collapsed selection a selection, so
+  // when the collapsed selection changes (caret movement), we should
+  // avoid sending text-selection-changed events.
+  if (HasSelection() || had_selection)
+    g_signal_emit_by_name(atk_object, "text-selection-changed");
+}
+
+void AXPlatformNodeAuraLinux::EmitCaretChangedSignal() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitCaretChangedSignal();
+    return;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(selection.second));
+}
+
+void AXPlatformNodeAuraLinux::OnTextAttributesChanged() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->OnTextAttributesChanged();
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-attributes-changed");
+}
+
+void AXPlatformNodeAuraLinux::OnTextSelectionChanged() {
+  int32_t anchor_node_id, focus_node_id;
+  int anchor_offset, focus_offset;
+  GetFullSelection(&anchor_node_id, &anchor_offset, &focus_node_id,
+                   &focus_offset);
+
+  auto* anchor_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(anchor_node_id));
+  auto* focus_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(focus_node_id));
+  if (!anchor_node || !focus_node)
+    return;
+
+  AXPlatformNodeAuraLinux& editable_root = FindEditableRootOrDocument();
+  AXPlatformNodeAuraLinux* common_ancestor =
+      focus_node->FindCommonAncestor(anchor_node);
+  if (common_ancestor) {
+    common_ancestor->EmitSelectionChangedSignal(
+        editable_root.HadNonZeroWidthSelection());
+  }
+
+  // It's possible for the selection to change and for the caret to stay in
+  // place. This might happen if the selection is totally reset with a
+  // different anchor node, but the same focus node. We should avoid sending a
+  // caret changed signal in that case.
+  std::pair<int32_t, int> prev_caret = editable_root.GetCurrentCaret();
+  if (prev_caret.first != focus_node_id || prev_caret.second != focus_offset)
+    focus_node->EmitCaretChangedSignal();
+
+  editable_root.UpdateSelectionInformation(anchor_node_id, anchor_offset,
+                                           focus_node_id, focus_offset);
+}
+
+bool AXPlatformNodeAuraLinux::SupportsSelectionWithAtkSelection() {
+  return SupportsToggle(GetRole()) ||
+         GetRole() == ax::mojom::Role::kListBoxOption;
+}
+
+void AXPlatformNodeAuraLinux::OnDescriptionChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  std::string description;
+  GetStringAttribute(ax::mojom::StringAttribute::kDescription, &description);
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-description";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_STRING);
+  g_value_set_string(&property_values.new_value, description.c_str());
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-description",
+                        &property_values, nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnSortDirectionChanged() {
+  AXPlatformNodeBase* table = GetTable();
+  if (!table)
+    return;
+
+  AtkObject* atk_table = table->GetNativeViewAccessible();
+  DCHECK(ATK_IS_TABLE(atk_table));
+
+  if (GetRole() == ax::mojom::Role::kColumnHeader)
+    g_signal_emit_by_name(atk_table, "row-reordered");
+  else if (GetRole() == ax::mojom::Role::kRowHeader)
+    g_signal_emit_by_name(atk_table, "column-reordered");
+}
+
+void AXPlatformNodeAuraLinux::OnValueChanged() {
+  // For the AtkText interface to work on non-web content nodes, we need to
+  // update the nodes' hypertext and trigger text change signals when the value
+  // changes. Otherwise, for web and PDF content, this is handled by
+  // "BrowserAccessibilityAuraLinux".
+  if (!GetDelegate()->IsWebContent())
+    UpdateHypertext();
+
+  if (!GetData().IsRangeValueSupported())
+    return;
+
+  float float_val;
+  if (!GetFloatAttribute(ax::mojom::FloatAttribute::kValueForRange, &float_val))
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-value";
+
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_DOUBLE);
+  g_value_set_double(&property_values.new_value,
+                     static_cast<double>(float_val));
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-value", &property_values,
+                        nullptr);
+}
+
+void AXPlatformNodeAuraLinux::OnNameChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object) {
+    return;
+  }
+  std::string previous_accessible_name = accessible_name_;
+  // Calling atk_object_get_name will update the value of accessible_name_.
+  if (!g_strcmp0(atk_object::GetName(atk_object),
+                 previous_accessible_name.c_str()))
+    return;
+
+  g_object_notify(G_OBJECT(atk_object), "accessible-name");
+}
+
+void AXPlatformNodeAuraLinux::OnDocumentTitleChanged() {
+  if (!g_active_top_level_frame)
+    return;
+
+  // We always want to notify on the top frame.
+  AXPlatformNodeAuraLinux* window = FromAtkObject(g_active_top_level_frame);
+  if (window)
+    window->OnNameChanged();
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeCreated() {
+  // We might not have a parent, in that case we don't need to send the event.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::add", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeWillBeDeleted() {
+  // There is a chance there won't be a parent as we're in the deletion process.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::remove", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnParentChanged() {
+  if (!atk_object_)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-parent";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_OBJECT);
+  g_value_set_object(&property_values.new_value, GetParent());
+  g_signal_emit_by_name(G_OBJECT(atk_object_),
+                        "property-change::accessible-parent", &property_values,
+                        nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnReadonlyChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+#if defined(ATK_216)
+  // Runtime check in case we were compiled with a newer version of ATK.
+  if (!PlatformSupportsState(ATK_STATE_READ_ONLY))
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_READ_ONLY,
+      GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly);
+#endif
+}
+
+void AXPlatformNodeAuraLinux::OnInvalidStatusChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_INVALID_ENTRY,
+      GetData().GetInvalidState() != ax::mojom::InvalidState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAriaCurrentChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  ax::mojom::AriaCurrentState aria_current =
+      static_cast<ax::mojom::AriaCurrentState>(
+          GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState));
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_ACTIVE,
+      aria_current != ax::mojom::AriaCurrentState::kNone &&
+          aria_current != ax::mojom::AriaCurrentState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAlertShown() {
+  DCHECK(ui::IsAlert(GetRole()));
+  atk_object_notify_state_change(ATK_OBJECT(GetOrCreateAtkObject()),
+                                 ATK_STATE_SHOWING, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::RunPostponedEvents() {
+  if (window_activate_event_postponed_) {
+    OnWindowActivated();
+    window_activate_event_postponed_ = false;
+  }
+}
+
+void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(
+    ax::mojom::Event event_type) {
+  if (!GetOrCreateAtkObject())
+    return;
+  AXPlatformNodeBase::NotifyAccessibilityEvent(event_type);
+  switch (event_type) {
+    // kMenuStart/kMenuEnd: the menu system has started / stopped.
+    // kMenuPopupStart/kMenuPopupEnd: an individual menu/submenu has
+    // opened/closed.
+    case ax::mojom::Event::kMenuPopupStart:
+      OnMenuPopupStart();
+      break;
+    case ax::mojom::Event::kMenuPopupEnd:
+      OnMenuPopupEnd();
+      break;
+    case ax::mojom::Event::kCheckedStateChanged:
+      OnCheckedStateChanged();
+      break;
+    case ax::mojom::Event::kExpandedChanged:
+      OnExpandedStateChanged(HasState(ax::mojom::State::kExpanded));
+      break;
+    case ax::mojom::Event::kFocus:
+    case ax::mojom::Event::kFocusContext:
+      OnFocused();
+      break;
+    case ax::mojom::Event::kFocusAfterMenuClose:
+      // The saved focused object is not always getting cleared when a popup
+      // becomes active. As a result, when the popup is dismissed, OnFocused()
+      // will return early thinking focus has not changed. Rather than trying
+      // to catch every case, take kFocusAfterMenuClose as a clear indication
+      // that a focus change should be presented and reset the saved focus.
+      g_current_focused = nullptr;
+      OnFocused();
+      break;
+    case ax::mojom::Event::kSelection:
+      OnSelected();
+      // When changing tabs also fire a name changed event.
+      if (GetRole() == ax::mojom::Role::kTab)
+        OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kSelectedChildrenChanged:
+      OnSelectedChildrenChanged();
+      break;
+    case ax::mojom::Event::kStateChanged:
+      // We need to know what state changed and fire an event for that specific
+      // state. Because we don't know what state changed, we deliberately do
+      // nothing here.
+      break;
+    case ax::mojom::Event::kTextChanged:
+      OnNameChanged();
+      break;
+    case ax::mojom::Event::kTextSelectionChanged:
+      OnTextSelectionChanged();
+      break;
+    case ax::mojom::Event::kValueChanged:
+      OnValueChanged();
+      break;
+    case ax::mojom::Event::kWindowActivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowActivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->PostponeEventsFor(this);
+        window_activate_event_postponed_ = true;
+      }
+      break;
+    case ax::mojom::Event::kWindowDeactivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowDeactivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+        window_activate_event_postponed_ = false;
+      }
+      break;
+    case ax::mojom::Event::kWindowVisibilityChanged:
+      OnWindowVisibilityChanged();
+      break;
+    case ax::mojom::Event::kLoadComplete:
+    case ax::mojom::Event::kDocumentTitleChanged:
+      // Sometimes, e.g. upon navigating away from the page, the tree is
+      // rebuilt rather than modified. The kDocumentTitleChanged event occurs
+      // prior to the rebuild and so is added on the previous root node. When
+      // the tree is rebuilt and the old node removed, the events on the old
+      // node are removed and no new kDocumentTitleChanged will be emitted. To
+      // ensure we still fire the event, though, we also pay attention to
+      // kLoadComplete.
+      OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kAlert:
+      OnAlertShown();
+      break;
+    default:
+      break;
+  }
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndicesForId(int id) {
+  auto iterator = base::ranges::find(hypertext_.hyperlinks, id);
+  if (iterator == hypertext_.hyperlinks.end())
+    return absl::nullopt;
+  int hyperlink_index = std::distance(hypertext_.hyperlinks.begin(), iterator);
+
+  auto offset =
+      base::ranges::find(hypertext_.hyperlink_offset_to_index, hyperlink_index,
+                         &AXLegacyHypertext::OffsetToIndex::value_type::second);
+  if (offset == hypertext_.hyperlink_offset_to_index.end())
+    return absl::nullopt;
+
+  return std::make_pair(UTF16ToUnicodeOffsetInText(offset->first),
+                        UTF16ToUnicodeOffsetInText(offset->first + 1));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndices() {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return absl::nullopt;
+  return parent->GetEmbeddedObjectIndicesForId(GetUniqueId());
+}
+
+void AXPlatformNodeAuraLinux::UpdateHypertext() {
+  EnsureAtkObjectIsValid();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AXLegacyHypertext old_hypertext = hypertext_;
+  base::OffsetAdjuster::Adjustments old_adjustments = GetHypertextAdjustments();
+
+  UpdateComputedHypertext();
+  text_unicode_adjustments_ = absl::nullopt;
+  offset_to_text_attributes_.clear();
+
+  if ((!HasState(ax::mojom::State::kEditable) ||
+       GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly) &&
+      !IsInLiveRegion()) {
+    return;
+  }
+
+  if (!EmitsAtkTextEvents())
+    return;
+
+  size_t shared_prefix, old_len, new_len;
+  ComputeHypertextRemovedAndInserted(old_hypertext, &shared_prefix, &old_len,
+                                     &new_len);
+  if (old_len > 0) {
+    std::u16string removed_substring =
+        old_hypertext.hypertext.substr(shared_prefix, old_len);
+
+    size_t shared_unicode_prefix = shared_prefix;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_prefix);
+    size_t shared_unicode_suffix = shared_prefix + old_len;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_suffix);
+
+    g_signal_emit_by_name(
+        atk_object, "text-remove",
+        shared_unicode_prefix,                  // position of removal
+        shared_unicode_suffix - shared_prefix,  // length of removal
+        base::UTF16ToUTF8(removed_substring).c_str());
+  }
+
+  if (new_len > 0) {
+    std::u16string inserted_substring =
+        hypertext_.hypertext.substr(shared_prefix, new_len);
+    size_t shared_unicode_prefix = UTF16ToUnicodeOffsetInText(shared_prefix);
+    size_t shared_unicode_suffix =
+        UTF16ToUnicodeOffsetInText(shared_prefix + new_len);
+    g_signal_emit_by_name(
+        atk_object, "text-insert",
+        shared_unicode_prefix,                          // position of insertion
+        shared_unicode_suffix - shared_unicode_prefix,  // length of insertion
+        base::UTF16ToUTF8(inserted_substring).c_str());
+  }
+}
+
+const AXLegacyHypertext& AXPlatformNodeAuraLinux::GetAXHypertext() {
+  return hypertext_;
+}
+
+const base::OffsetAdjuster::Adjustments&
+AXPlatformNodeAuraLinux::GetHypertextAdjustments() {
+  if (text_unicode_adjustments_.has_value())
+    return *text_unicode_adjustments_;
+
+  text_unicode_adjustments_.emplace();
+
+  std::u16string text = GetHypertext();
+  size_t text_length = text.size();
+  for (size_t i = 0; i < text_length; i++) {
+    base_icu::UChar32 code_point;
+    size_t original_i = i;
+    base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &i, &code_point);
+
+    if ((i - original_i + 1) != 1) {
+      text_unicode_adjustments_->push_back(
+          base::OffsetAdjuster::Adjustment(original_i, i - original_i + 1, 1));
+    }
+  }
+
+  return *text_unicode_adjustments_;
+}
+
+size_t AXPlatformNodeAuraLinux::UTF16ToUnicodeOffsetInText(
+    size_t utf16_offset) {
+  size_t unicode_offset = utf16_offset;
+  base::OffsetAdjuster::AdjustOffset(GetHypertextAdjustments(),
+                                     &unicode_offset);
+  return unicode_offset;
+}
+
+size_t AXPlatformNodeAuraLinux::UnicodeToUTF16OffsetInText(int unicode_offset) {
+  if (unicode_offset == kStringLengthOffset)
+    return GetHypertext().size();
+
+  size_t utf16_offset = unicode_offset;
+  base::OffsetAdjuster::UnadjustOffset(GetHypertextAdjustments(),
+                                       &utf16_offset);
+  return utf16_offset;
+}
+
+int AXPlatformNodeAuraLinux::GetTextOffsetAtPoint(int x,
+                                                  int y,
+                                                  AtkCoordType atk_coord_type) {
+  if (!GetExtentsRelativeToAtkCoordinateType(atk_coord_type).Contains(x, y))
+    return -1;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return -1;
+
+  int count = atk_text::GetCharacterCount(ATK_TEXT(atk_object));
+  for (int i = 0; i < count; i++) {
+    int out_x, out_y, out_width, out_height;
+    atk_text::GetCharacterExtents(ATK_TEXT(atk_object), i, &out_x, &out_y,
+                                  &out_width, &out_height, atk_coord_type);
+    gfx::Rect rect(out_x, out_y, out_width, out_height);
+    if (rect.Contains(x, y))
+      return i;
+  }
+  return -1;
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentOriginInScreenCoordinates()
+    const {
+  AtkObject* parent = GetParent();
+  if (!parent)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* parent_node =
+      AXPlatformNode::FromNativeViewAccessible(parent);
+  if (!parent)
+    return gfx::Vector2d();
+
+  return parent_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentFrameOriginInScreenCoordinates()
+    const {
+  AtkObject* frame = FindAtkObjectParentFrame(atk_object_);
+  if (!frame)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* frame_node =
+      AXPlatformNode::FromNativeViewAccessible(frame);
+  if (!frame_node)
+    return gfx::Vector2d();
+
+  return frame_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Rect AXPlatformNodeAuraLinux::GetExtentsRelativeToAtkCoordinateType(
+    AtkCoordType coord_type) const {
+  gfx::Rect extents = delegate_->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                               AXClippingBehavior::kUnclipped);
+  switch (coord_type) {
+    case ATK_XY_SCREEN:
+      break;
+    case ATK_XY_WINDOW: {
+      gfx::Vector2d window_origin = -GetParentFrameOriginInScreenCoordinates();
+      extents.Offset(window_origin);
+      break;
+    }
+#if defined(ATK_230)
+    case ATK_XY_PARENT: {
+      gfx::Vector2d parent_origin = -GetParentOriginInScreenCoordinates();
+      extents.Offset(parent_origin);
+      break;
+    }
+#endif
+  }
+
+  return extents;
+}
+
+void AXPlatformNodeAuraLinux::GetExtents(gint* x,
+                                         gint* y,
+                                         gint* width,
+                                         gint* height,
+                                         AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+  if (width)
+    *width = extents.width();
+  if (height)
+    *height = extents.height();
+}
+
+void AXPlatformNodeAuraLinux::GetPosition(gint* x,
+                                          gint* y,
+                                          AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+}
+
+void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
+  gfx::Rect rect_size = gfx::ToEnclosingRect(GetData().relative_bounds.bounds);
+  if (width)
+    *width = rect_size.width();
+  if (height)
+    *height = rect_size.height();
+}
+
+gfx::NativeViewAccessible
+AXPlatformNodeAuraLinux::HitTestSync(gint x, gint y, AtkCoordType coord_type) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, coord_type);
+
+  AXPlatformNode* current_result = this;
+  while (true) {
+    gfx::NativeViewAccessible hit_child =
+        current_result->GetDelegate()->HitTestSync(scroll_to.x(),
+                                                   scroll_to.y());
+    if (!hit_child)
+      return nullptr;
+    AXPlatformNode* hit_child_node =
+        AXPlatformNode::FromNativeViewAccessible(hit_child);
+    if (!hit_child_node || !hit_child_node->IsDescendantOf(current_result))
+      break;
+
+    // If we get the same node, we're done.
+    if (hit_child_node == current_result)
+      break;
+
+    // Continue to check recursively. That's because HitTestSync may have
+    // returned the best result within a particular accessibility tree,
+    // but we might need to recurse further in a tree of a different type
+    // (for example, from Views to Web).
+    current_result = hit_child_node;
+  }
+  return current_result->GetNativeViewAccessible();
+}
+
+bool AXPlatformNodeAuraLinux::GrabFocus() {
+  AXActionData action_data;
+  action_data.action = ax::mojom::Action::kFocus;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::FocusFirstFocusableAncestorInWebContent() {
+  if (!GetDelegate()->IsWebContent())
+    return false;
+
+  // Don't cross document boundaries in order to avoid having this operation
+  // cross iframe boundaries or escape to non-document UI elements.
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return false;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  if (IsFocusable()) {
+    if (g_current_focused != atk_object)
+      GrabFocus();
+    return true;
+  }
+
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return false;
+
+  // If any of the siblings of this element are focusable, focusing the parent
+  // would be like moving the focus position backward, so we should fall back
+  // to setting the sequential focus navigation starting point.
+  for (auto child_iterator_ptr = parent->GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *parent->GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child || child == this)
+      continue;
+
+    if (child->IsFocusable())
+      return false;
+  }
+
+  return parent->FocusFirstFocusableAncestorInWebContent();
+}
+
+bool AXPlatformNodeAuraLinux::SetSequentialFocusNavigationStartingPoint() {
+  AXActionData action_data;
+  action_data.action =
+      ax::mojom::Action::kSetSequentialFocusNavigationStartingPoint;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPoint() {
+  // First we try to grab focus on this node if any ancestor in the same
+  // document is focusable. Otherwise we set the sequential navigation starting
+  // point.
+  if (!FocusFirstFocusableAncestorInWebContent())
+    return SetSequentialFocusNavigationStartingPoint();
+  else
+    return true;
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(int offset) {
+  int child_count = delegate_->GetChildCount();
+  if (IsAtomicTextField() || child_count == 0)
+    return GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+
+  // When this node has children, we walk through them to figure out what child
+  // node should get focus. We are essentially repeating the process used when
+  // building the hypertext here.
+  int current_offset = 0;
+  for (int i = 0; i < child_count; ++i) {
+    auto* child = FromAtkObject(delegate_->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (child->IsText()) {
+      current_offset += child->GetName().size();
+    } else {
+      // Add an offset for the embedded character.
+      current_offset += 1;
+    }
+
+    // If the offset is larger than our size, try to work with the last child,
+    // which is also the behavior of SetCaretOffset.
+    if (offset <= current_offset || i == child_count - 1)
+      return child->GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+  }
+
+  NOTREACHED();
+  return false;
+}
+
+const gchar* AXPlatformNodeAuraLinux::GetDefaultActionName() {
+  int action;
+  if (!GetIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb, &action))
+    return nullptr;
+
+  // If this object cannot receive focus and has a button role, use click as
+  // the default action. On the AuraLinux platform, the press action is a
+  // signal to users that they can trigger the action using the keyboard, while
+  // a click action means the user should trigger the action via a simulated
+  // click. If this object cannot receive focus, it's impossible to trigger it
+  // with a key press.
+  if (GetRole() == ax::mojom::Role::kButton &&
+      action == static_cast<int>(ax::mojom::DefaultActionVerb::kPress) &&
+      !IsFocusable()) {
+    action = static_cast<int>(ax::mojom::DefaultActionVerb::kClick);
+  }
+
+  std::string action_verb =
+      ui::ToString(static_cast<ax::mojom::DefaultActionVerb>(action));
+
+  ATK_AURALINUX_RETURN_STRING(action_verb);
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetAtkAttributes() {
+  AtkAttributeSet* attribute_list = nullptr;
+  ComputeAttributes(&attribute_list);
+  return attribute_list;
+}
+
+AtkStateType AXPlatformNodeAuraLinux::GetAtkStateTypeForCheckableNode() {
+  if (GetData().GetCheckedState() == ax::mojom::CheckedState::kMixed)
+    return ATK_STATE_INDETERMINATE;
+  if (IsPlatformCheckable())
+    return ATK_STATE_CHECKED;
+  return ATK_STATE_PRESSED;
+}
+
+// AtkDocumentHelpers
+
+const gchar* AXPlatformNodeAuraLinux::GetDocumentAttributeValue(
+    const gchar* attribute) const {
+  if (!g_ascii_strcasecmp(attribute, "DocType"))
+    return delegate_->GetTreeData().doctype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "MimeType"))
+    return delegate_->GetTreeData().mimetype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "Title"))
+    return delegate_->GetTreeData().title.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "URI"))
+    return delegate_->GetTreeData().url.c_str();
+
+  return nullptr;
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetDocumentAttributes() const {
+  AtkAttributeSet* attribute_set = nullptr;
+  const gchar* doc_attributes[] = {"DocType", "MimeType", "Title", "URI"};
+  const gchar* value = nullptr;
+
+  for (unsigned i = 0; i < G_N_ELEMENTS(doc_attributes); i++) {
+    value = GetDocumentAttributeValue(doc_attributes[i]);
+    if (value) {
+      attribute_set = PrependAtkAttributeToAtkAttributeSet(
+          doc_attributes[i], value, attribute_set);
+    }
+  }
+
+  return attribute_set;
+}
+
+//
+// AtkHyperlink helpers
+//
+
+AtkHyperlink* AXPlatformNodeAuraLinux::GetAtkHyperlink() {
+  if (atk_hyperlink_)
+    return atk_hyperlink_;
+
+  atk_hyperlink_ =
+      ATK_HYPERLINK(g_object_new(AX_PLATFORM_ATK_HYPERLINK_TYPE, 0));
+  ax_platform_atk_hyperlink_set_object(
+      AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), this);
+  return atk_hyperlink_;
+}
+
+//
+// Misc helpers
+//
+
+void AXPlatformNodeAuraLinux::GetFloatAttributeInGValue(
+    ax::mojom::FloatAttribute attr,
+    GValue* value) {
+  float float_val;
+  if (GetFloatAttribute(attr, &float_val)) {
+    memset(value, 0, sizeof(*value));
+    g_value_init(value, G_TYPE_FLOAT);
+    g_value_set_float(value, float_val);
+  }
+}
+
+void AXPlatformNodeAuraLinux::AddAttributeToList(const char* name,
+                                                 const char* value,
+                                                 AtkAttributeSet** attributes) {
+  *attributes = PrependAtkAttributeToAtkAttributeSet(name, value, *attributes);
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParent(
+    AtkObject* new_document_parent) {
+  DCHECK(GetAtkRole() == ATK_ROLE_FRAME);
+  SetWeakGPtrToAtkObject(&document_parent_, new_document_parent);
+}
+
+bool AXPlatformNodeAuraLinux::IsNameExposed() {
+  switch (GetRole()) {
+    case ax::mojom::Role::kListMarker:
+      return !GetChildCount();
+    default:
+      return true;
+  }
+}
+
+int AXPlatformNodeAuraLinux::GetCaretOffset() {
+  if (!HasVisibleCaretOrSelection()) {
+    absl::optional<FindInPageResultInfo> result =
+        GetSelectionOffsetsFromFindInPage();
+    AtkObject* atk_object = GetOrCreateAtkObject();
+    if (!atk_object)
+      return -1;
+    if (result.has_value() && result->node == atk_object)
+      return UTF16ToUnicodeOffsetInText(result->end_offset);
+    return -1;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return UTF16ToUnicodeOffsetInText(selection.second);
+}
+
+bool AXPlatformNodeAuraLinux::SetCaretOffset(int offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  int character_count = atk_text_get_character_count(ATK_TEXT(atk_object));
+  if (offset < 0 || offset > character_count)
+    offset = character_count;
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  if (offset == GetCaretOffset() && !HasSelection())
+    return true;
+
+  offset = UnicodeToUTF16OffsetInText(offset);
+  if (!SetHypertextSelection(offset, offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::SetTextSelectionForAtkText(int start_offset,
+                                                         int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return false;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return false;
+
+  // We must put these in the correct order so that we can do
+  // a comparison with the existing start and end below.
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  std::pair<int, int> old_offsets = GetSelectionOffsetsForAtk();
+  if (old_offsets.first == start_offset && old_offsets.second == end_offset)
+    return true;
+
+  if (!SetHypertextSelection(start_offset, end_offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::HasSelection() {
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return selection.first >= 0 && selection.second >= 0 &&
+         selection.first != selection.second;
+}
+
+void AXPlatformNodeAuraLinux::GetSelectionExtents(int* start_offset,
+                                                  int* end_offset) {
+  if (start_offset)
+    *start_offset = 0;
+  if (end_offset)
+    *end_offset = 0;
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  if (selection.first < 0 || selection.second < 0 ||
+      selection.first == selection.second)
+    return;
+
+  // We should ignore the direction of the selection when exposing start and
+  // end offsets. According to the ATK documentation the end offset is always
+  // the offset immediately past the end of the selection. This wouldn't make
+  // sense if end < start.
+  if (selection.second < selection.first)
+    std::swap(selection.first, selection.second);
+
+  selection.first = UTF16ToUnicodeOffsetInText(selection.first);
+  selection.second = UTF16ToUnicodeOffsetInText(selection.second);
+
+  if (start_offset)
+    *start_offset = selection.first;
+  if (end_offset)
+    *end_offset = selection.second;
+}
+
+// Since this method doesn't return a static gchar*, we expect the caller of
+// atk_text_get_selection to free the return value.
+gchar* AXPlatformNodeAuraLinux::GetSelectionWithText(int* start_offset,
+                                                     int* end_offset) {
+  int selection_start, selection_end;
+  GetSelectionExtents(&selection_start, &selection_end);
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    absl::optional<FindInPageResultInfo> find_in_page_result =
+        GetSelectionOffsetsFromFindInPage();
+    if (!find_in_page_result.has_value() ||
+        find_in_page_result->node != atk_object) {
+      *start_offset = 0;
+      *end_offset = 0;
+      return nullptr;
+    }
+
+    selection_start = find_in_page_result->start_offset;
+    selection_end = find_in_page_result->end_offset;
+  }
+
+  selection_start = UTF16ToUnicodeOffsetInText(selection_start);
+  selection_end = UTF16ToUnicodeOffsetInText(selection_end);
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    return nullptr;
+  }
+
+  if (start_offset)
+    *start_offset = selection_start;
+  if (end_offset)
+    *end_offset = selection_end;
+  return atk_text::GetText(ATK_TEXT(atk_object), selection_start,
+                           selection_end);
+}
+
+bool AXPlatformNodeAuraLinux::IsInLiveRegion() {
+  return HasStringAttribute(ax::mojom::StringAttribute::kContainerLiveStatus);
+}
+
+#if defined(ATK_230)
+void AXPlatformNodeAuraLinux::ScrollToPoint(AtkCoordType atk_coord_type,
+                                            int x,
+                                            int y) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, atk_coord_type);
+
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToPoint;
+  action_data.target_point = scroll_to;
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeRectIntoView(
+    gfx::Rect rect,
+    AtkScrollType atk_scroll_type) {
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToMakeVisible;
+  action_data.target_rect = rect;
+
+  action_data.scroll_behavior = ax::mojom::ScrollBehavior::kScrollIfVisible;
+  action_data.horizontal_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+  action_data.vertical_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+
+  switch (atk_scroll_type) {
+    case ATK_SCROLL_TOP_LEFT:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_BOTTOM_RIGHT:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_TOP_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      break;
+    case ATK_SCROLL_BOTTOM_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_LEFT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_RIGHT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      break;
+    case ATK_SCROLL_ANYWHERE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      break;
+  }
+
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeIntoView(
+    AtkScrollType atk_scroll_type) {
+  gfx::Rect rect = GetDelegate()->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                                AXClippingBehavior::kUnclipped);
+  rect -= rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+}
+#endif  // defined(ATK_230)
+
+#if defined(ATK_232)
+absl::optional<gfx::Rect>
+AXPlatformNodeAuraLinux::GetUnclippedHypertextRangeBoundsRect(int start_offset,
+                                                              int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  return GetDelegate()->GetHypertextRangeBoundsRect(
+      UnicodeToUTF16OffsetInText(start_offset),
+      UnicodeToUTF16OffsetInText(end_offset), AXCoordinateSystem::kScreenDIPs,
+      AXClippingBehavior::kUnclipped);
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringIntoView(
+    AtkScrollType atk_scroll_type,
+    int start_offset,
+    int end_offset) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  rect -= node_rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringToPoint(
+    int start_offset,
+    int end_offset,
+    AtkCoordType atk_coord_type,
+    int x,
+    int y) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  ScrollToPoint(atk_coord_type, x - (rect.x() - node_rect.x()),
+                y - (rect.y() - node_rect.y()));
+
+  return true;
+}
+#endif  // defined(ATK_232)
+
+void AXPlatformNodeAuraLinux::ComputeStylesIfNeeded() {
+  if (!offset_to_text_attributes_.empty())
+    return;
+
+  default_text_attributes_ = ComputeTextAttributes();
+  TextAttributeMap attributes_map =
+      GetDelegate()->ComputeTextAttributeMap(default_text_attributes_);
+  offset_to_text_attributes_.swap(attributes_map);
+}
+
+int AXPlatformNodeAuraLinux::FindStartOfStyle(
+    int start_offset,
+    ax::mojom::MoveDirection direction) {
+  int text_length = GetHypertext().length();
+  DCHECK_GE(start_offset, 0);
+  DCHECK_LE(start_offset, text_length);
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  switch (direction) {
+    case ax::mojom::MoveDirection::kNone:
+      NOTREACHED();
+      return start_offset;
+    case ax::mojom::MoveDirection::kBackward: {
+      auto iterator = offset_to_text_attributes_.upper_bound(start_offset);
+      --iterator;
+      return iterator->first;
+    }
+    case ax::mojom::MoveDirection::kForward: {
+      const auto iterator =
+          offset_to_text_attributes_.upper_bound(start_offset);
+      if (iterator == offset_to_text_attributes_.end())
+        return text_length;
+      return iterator->first;
+    }
+  }
+
+  NOTREACHED();
+  return start_offset;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetTextAttributes(
+    int offset,
+    int* start_offset,
+    int* end_offset) {
+  ComputeStylesIfNeeded();
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  int utf16_offset = UnicodeToUTF16OffsetInText(offset);
+  int style_start =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kBackward);
+  int style_end =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kForward);
+
+  auto iterator = offset_to_text_attributes_.find(style_start);
+  DCHECK(iterator != offset_to_text_attributes_.end());
+
+  SetIntPointerValueIfNotNull(start_offset,
+                              UTF16ToUnicodeOffsetInText(style_start));
+  SetIntPointerValueIfNotNull(end_offset,
+                              UTF16ToUnicodeOffsetInText(style_end));
+
+  if (iterator == offset_to_text_attributes_.end())
+    return default_text_attributes_;
+
+  return iterator->second;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetDefaultTextAttributes() {
+  ComputeStylesIfNeeded();
+  return default_text_attributes_;
+}
+
+void AXPlatformNodeAuraLinux::TerminateFindInPage() {
+  ForgetCurrentFindInPageResult();
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageResult(int start_offset,
+                                                       int end_offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  if (!EmitsAtkTextEvents()) {
+    ActivateFindInPageInParent(start_offset, end_offset);
+    return;
+  }
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  FindInPageResultInfo new_info = {atk_object, start_offset, end_offset};
+  if (iterator != active_results.end() && iterator->second == new_info)
+    return;
+
+  active_results[parent_doc] = new_info;
+  g_signal_emit_by_name(atk_object, "text-selection-changed");
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(end_offset));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetHypertextExtentsOfChild(
+    AXPlatformNodeAuraLinux* child_to_find) {
+  int current_offset = 0;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child)
+      continue;
+
+    // If this object is a text only object, it is included directly into this
+    // node's hypertext, otherwise it is represented as an embedded object
+    // character.
+    int size = child->IsText() ? child->GetName().size() : 1;
+    if (child == child_to_find)
+      return std::make_pair(current_offset, current_offset + size);
+    current_offset += size;
+  }
+
+  return absl::nullopt;
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageInParent(int start_offset,
+                                                         int end_offset) {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return;
+
+  absl::optional<std::pair<int, int>> extents_in_parent =
+      parent->GetHypertextExtentsOfChild(this);
+  if (!extents_in_parent.has_value())
+    return;
+
+  DCHECK(IsText());
+  parent->ActivateFindInPageResult(extents_in_parent->first + start_offset,
+                                   extents_in_parent->first + end_offset);
+}
+
+void AXPlatformNodeAuraLinux::ForgetCurrentFindInPageResult() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (parent_doc)
+    GetActiveFindInPageResults().erase(parent_doc);
+}
+
+absl::optional<FindInPageResultInfo>
+AXPlatformNodeAuraLinux::GetSelectionOffsetsFromFindInPage() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return absl::nullopt;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return absl::nullopt;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  if (iterator == active_results.end())
+    return absl::nullopt;
+
+  return iterator->second;
+}
+
+gfx::Point AXPlatformNodeAuraLinux::ConvertPointToScreenCoordinates(
+    const gfx::Point& point,
+    AtkCoordType atk_coord_type) {
+  switch (atk_coord_type) {
+    case ATK_XY_WINDOW:
+      return point + GetParentFrameOriginInScreenCoordinates();
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      return point + GetParentOriginInScreenCoordinates();
+#endif
+    case ATK_XY_SCREEN:
+    default:
+      return point;
+  }
+}
+
+std::pair<int, int> AXPlatformNodeAuraLinux::GetSelectionOffsetsForAtk() {
+  // In web content we always want to look at the selection from the tree
+  // instead of the selection that might be set via node attributes. This is
+  // because the tree selection is the absolute truth about what is visually
+  // selected, whereas node attributes might contain selection extents that are
+  // no longer part of the visual selection.
+  std::pair<int, int> selection;
+  if (GetDelegate()->IsWebContent()) {
+    AXSelection unignored_selection = GetDelegate()->GetUnignoredSelection();
+    GetSelectionOffsetsFromTree(&unignored_selection, &selection.first,
+                                &selection.second);
+  } else {
+    GetSelectionOffsets(&selection.first, &selection.second);
+  }
+  return selection;
+}
+
+}  // namespace ui
Index: chromium/create-119.0.6026.1-gfx-linux-5.10-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-gfx-linux-5.10-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-gfx-linux-5.10-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-gfx-linux-5.10.patch

Property changes on: chromium/create-119.0.6026.1-gfx-linux-5.10-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h
===================================================================
--- chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h	(nonexistent)
+++ chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h	(revision 385)
@@ -0,0 +1,48 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+#define UI_GFX_LINUX_DMABUF_UAPI_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/dma-buf.h>
+#else
+#include <linux/types.h>
+
+struct dma_buf_sync {
+  __u64 flags;
+};
+
+constexpr __u64 DMA_BUF_SYNC_READ = 1 << 0;
+constexpr __u64 DMA_BUF_SYNC_WRITE = 2 << 0;
+constexpr __u64 DMA_BUF_SYNC_RW = DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE;
+
+constexpr __u64 DMA_BUF_SYNC_START = 0 << 2;
+constexpr __u64 DMA_BUF_SYNC_END = 1 << 2;
+
+constexpr char DMA_BUF_BASE = 'b';
+constexpr unsigned long DMA_BUF_IOCTL_SYNC =
+    _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+struct dma_buf_export_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+struct dma_buf_import_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+constexpr unsigned long DMA_BUF_IOCTL_EXPORT_SYNC_FILE =
+    _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+    _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+#endif
+
+#endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
Index: chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h
===================================================================
--- chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h	(nonexistent)
+++ chromium/create-119.0.6026.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h	(revision 385)
@@ -0,0 +1,48 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+#define UI_GFX_LINUX_DMABUF_UAPI_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/dma-buf.h>
+#else
+#include <linux/types.h>
+
+struct dma_buf_sync {
+  __u64 flags;
+};
+
+constexpr __u64 DMA_BUF_SYNC_READ = 1 << 0;
+constexpr __u64 DMA_BUF_SYNC_WRITE = 2 << 0;
+constexpr __u64 DMA_BUF_SYNC_RW = DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE;
+
+constexpr __u64 DMA_BUF_SYNC_START = 0 << 2;
+constexpr __u64 DMA_BUF_SYNC_END = 1 << 2;
+
+constexpr char DMA_BUF_BASE = 'b';
+constexpr unsigned long DMA_BUF_IOCTL_SYNC =
+    _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+struct dma_buf_export_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+struct dma_buf_import_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+constexpr unsigned long DMA_BUF_IOCTL_EXPORT_SYNC_FILE =
+    _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+    _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+#endif
+
+#endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
Index: chromium/create-119.0.6026.1-host-pkg-config-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-host-pkg-config-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-host-pkg-config-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-host-pkg-config.patch

Property changes on: chromium/create-119.0.6026.1-host-pkg-config-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni
===================================================================
--- chromium/create-119.0.6026.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni	(nonexistent)
+++ chromium/create-119.0.6026.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni	(revision 385)
@@ -0,0 +1,129 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sysroot.gni")
+
+# Defines a config specifying the result of running pkg-config for the given
+# packages. Put the package names you want to query in the "packages" variable
+# inside the template invocation.
+#
+# You can also add defines via the "defines" variable. This can be useful to
+# add this to the config to pass defines that the library expects to get by
+# users of its headers.
+#
+# Example:
+#   pkg_config("mything") {
+#     packages = [ "mything1", "mything2" ]
+#     defines = [ "ENABLE_AWESOME" ]
+#   }
+#
+# You can also use "extra args" to filter out results (see pkg-config.py):
+#   extra_args = [ "-v, "foo" ]
+# To ignore libs and ldflags (only cflags/defines will be set, which is useful
+# when doing manual dynamic linking), set:
+#   ignore_libs = true
+
+declare_args() {
+  # A pkg-config wrapper to call instead of trying to find and call the right
+  # pkg-config directly. Wrappers like this are common in cross-compilation
+  # environments.
+  # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
+  # the sysroot mechanism to find the right .pc files.
+  pkg_config = ""
+
+  # A optional pkg-config wrapper to use for tools built on the host.
+  host_pkg_config = ""
+
+  # CrOS systemroots place pkgconfig files at <systemroot>/usr/share/pkgconfig
+  # and one of <systemroot>/usr/lib/pkgconfig or <systemroot>/usr/lib64/pkgconfig
+  # depending on whether the systemroot is for a 32 or 64 bit architecture.
+  #
+  # When build under GYP, CrOS board builds specify the 'system_libdir' variable
+  # as part of the GYP_DEFINES provided by the CrOS emerge build or simple
+  # chrome build scheme. This variable permits controlling this for GN builds
+  # in similar fashion by setting the `system_libdir` variable in the build's
+  # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture.
+  system_libdir = "lib"
+}
+
+pkg_config_script = "//build/config/linux/pkg-config.py"
+
+# Define the args we pass to the pkg-config script for other build files that
+# need to invoke it manually.
+pkg_config_args = []
+
+common_pkg_config_args = []
+if (sysroot != "") {
+  # Pass the sysroot if we're using one (it requires the CPU arch also).
+  common_pkg_config_args += [
+    "-s",
+    rebase_path(sysroot),
+    "-a",
+    current_cpu,
+  ]
+}
+
+if (pkg_config != "") {
+  pkg_config_args += [
+    "-p",
+    pkg_config,
+  ]
+}
+
+# Only use the custom libdir when building with the target sysroot.
+if (target_sysroot != "" && sysroot == target_sysroot) {
+  pkg_config_args += [
+    "--system_libdir",
+    system_libdir,
+  ]
+}
+
+if (host_pkg_config != "") {
+  host_pkg_config_args = [
+    "-p",
+    host_pkg_config,
+  ]
+} else {
+  host_pkg_config_args = pkg_config_args
+}
+
+template("pkg_config") {
+  assert(defined(invoker.packages),
+         "Variable |packages| must be defined to be a list in pkg_config.")
+  config(target_name) {
+    if (host_toolchain == current_toolchain || current_cpu == "x64") {
+      args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+    } else {
+      args = common_pkg_config_args + pkg_config_args + invoker.packages
+    }
+    if (defined(invoker.extra_args)) {
+      args += invoker.extra_args
+    }
+
+    pkgresult = exec_script(pkg_config_script, args, "json")
+    cflags = pkgresult[1]
+
+    foreach(include, pkgresult[0]) {
+      if (use_sysroot) {
+        # We want the system include paths to use -isystem instead of -I to
+        # suppress warnings in those headers.
+        include_relativized = rebase_path(include, root_build_dir)
+        cflags += [ "-isystem$include_relativized" ]
+      } else {
+        cflags += [ "-I$include" ]
+      }
+    }
+
+    if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
+      libs = pkgresult[2]
+      lib_dirs = pkgresult[3]
+    }
+
+    forward_variables_from(invoker,
+                           [
+                             "defines",
+                             "visibility",
+                           ])
+  }
+}
Index: chromium/create-119.0.6026.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni
===================================================================
--- chromium/create-119.0.6026.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni	(nonexistent)
+++ chromium/create-119.0.6026.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni	(revision 385)
@@ -0,0 +1,129 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sysroot.gni")
+
+# Defines a config specifying the result of running pkg-config for the given
+# packages. Put the package names you want to query in the "packages" variable
+# inside the template invocation.
+#
+# You can also add defines via the "defines" variable. This can be useful to
+# add this to the config to pass defines that the library expects to get by
+# users of its headers.
+#
+# Example:
+#   pkg_config("mything") {
+#     packages = [ "mything1", "mything2" ]
+#     defines = [ "ENABLE_AWESOME" ]
+#   }
+#
+# You can also use "extra args" to filter out results (see pkg-config.py):
+#   extra_args = [ "-v, "foo" ]
+# To ignore libs and ldflags (only cflags/defines will be set, which is useful
+# when doing manual dynamic linking), set:
+#   ignore_libs = true
+
+declare_args() {
+  # A pkg-config wrapper to call instead of trying to find and call the right
+  # pkg-config directly. Wrappers like this are common in cross-compilation
+  # environments.
+  # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
+  # the sysroot mechanism to find the right .pc files.
+  pkg_config = ""
+
+  # A optional pkg-config wrapper to use for tools built on the host.
+  host_pkg_config = ""
+
+  # CrOS systemroots place pkgconfig files at <systemroot>/usr/share/pkgconfig
+  # and one of <systemroot>/usr/lib/pkgconfig or <systemroot>/usr/lib64/pkgconfig
+  # depending on whether the systemroot is for a 32 or 64 bit architecture.
+  #
+  # When build under GYP, CrOS board builds specify the 'system_libdir' variable
+  # as part of the GYP_DEFINES provided by the CrOS emerge build or simple
+  # chrome build scheme. This variable permits controlling this for GN builds
+  # in similar fashion by setting the `system_libdir` variable in the build's
+  # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture.
+  system_libdir = "lib"
+}
+
+pkg_config_script = "//build/config/linux/pkg-config.py"
+
+# Define the args we pass to the pkg-config script for other build files that
+# need to invoke it manually.
+pkg_config_args = []
+
+common_pkg_config_args = []
+if (sysroot != "") {
+  # Pass the sysroot if we're using one (it requires the CPU arch also).
+  common_pkg_config_args += [
+    "-s",
+    rebase_path(sysroot),
+    "-a",
+    current_cpu,
+  ]
+}
+
+if (pkg_config != "") {
+  pkg_config_args += [
+    "-p",
+    pkg_config,
+  ]
+}
+
+# Only use the custom libdir when building with the target sysroot.
+if (target_sysroot != "" && sysroot == target_sysroot) {
+  pkg_config_args += [
+    "--system_libdir",
+    system_libdir,
+  ]
+}
+
+if (host_pkg_config != "") {
+  host_pkg_config_args = [
+    "-p",
+    host_pkg_config,
+  ]
+} else {
+  host_pkg_config_args = pkg_config_args
+}
+
+template("pkg_config") {
+  assert(defined(invoker.packages),
+         "Variable |packages| must be defined to be a list in pkg_config.")
+  config(target_name) {
+    if (host_toolchain == current_toolchain) {
+      args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+    } else {
+      args = common_pkg_config_args + pkg_config_args + invoker.packages
+    }
+    if (defined(invoker.extra_args)) {
+      args += invoker.extra_args
+    }
+
+    pkgresult = exec_script(pkg_config_script, args, "json")
+    cflags = pkgresult[1]
+
+    foreach(include, pkgresult[0]) {
+      if (use_sysroot) {
+        # We want the system include paths to use -isystem instead of -I to
+        # suppress warnings in those headers.
+        include_relativized = rebase_path(include, root_build_dir)
+        cflags += [ "-isystem$include_relativized" ]
+      } else {
+        cflags += [ "-I$include" ]
+      }
+    }
+
+    if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
+      libs = pkgresult[2]
+      lib_dirs = pkgresult[3]
+    }
+
+    forward_variables_from(invoker,
+                           [
+                             "defines",
+                             "visibility",
+                           ])
+  }
+}
Index: chromium/create-119.0.6026.1-inc-drop-host-crash-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-inc-drop-host-crash-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-inc-drop-host-crash-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-inc-drop-host-crash.patch

Property changes on: chromium/create-119.0.6026.1-inc-drop-host-crash-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h
===================================================================
--- chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h	(nonexistent)
+++ chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h	(revision 385)
@@ -0,0 +1,302 @@
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+#define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+
+#include <memory>
+
+#include "base/memory/raw_ptr.h"
+#include "third_party/abseil-cpp/absl/types/variant.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/color/color_id.h"
+#include "ui/color/color_provider.h"
+#include "ui/gfx/color_palette.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/views/animation/ink_drop_event_handler.h"
+#include "ui/views/metadata/view_factory.h"
+#include "ui/views/view.h"
+
+namespace ui {
+class Layer;
+class LocatedEvent;
+}  // namespace ui
+
+namespace views {
+
+class InkDrop;
+class InkDropHighlight;
+class InkDropImpl;
+class InkDropMask;
+class InkDropRipple;
+enum class InkDropState;
+
+namespace test {
+class InkDropHostTestApi;
+}  // namespace test
+
+// TODO(crbug.com/931964): Rename this type and move this header. Also consider
+// if InkDropHost should be what implements the InkDrop interface and have that
+// be the public interface.
+// The current division of labor is roughly as follows:
+// * InkDropHost manages an InkDrop and is responsible for a lot of its
+//   configuration and creating the parts of the InkDrop.
+// * InkDrop manages the parts of the ink-drop effect once it's up and running.
+// * InkDropRipple is a ripple effect that usually triggers as a result of
+//   clicking or activating the button / similar which hosts this.
+// * InkDropHighlight manages the hover/focus highlight layer.
+// TODO(pbos): See if this can be the only externally visible surface for an
+// ink-drop effect, and rename this InkDrop, or consolidate with InkDrop.
+class VIEWS_EXPORT InkDropHost {
+ public:
+  // Used in SetMode() to specify whether the ink drop effect is enabled
+  // or not for the view. In case of having an ink drop, it also specifies
+  // whether the default event handler for the ink drop should be installed or
+  // the subclass will handle ink drop events itself.
+  enum class InkDropMode {
+    OFF,
+    ON,
+    ON_NO_GESTURE_HANDLER,
+    ON_NO_ANIMATE,
+  };
+
+  explicit InkDropHost(View* host);
+  InkDropHost(const InkDropHost&) = delete;
+  InkDropHost& operator=(const InkDropHost&) = delete;
+  virtual ~InkDropHost();
+
+  // Returns a configured InkDrop. To override default behavior call
+  // SetCreateInkDropCallback().
+  std::unique_ptr<InkDrop> CreateInkDrop();
+
+  // Replace CreateInkDrop() behavior.
+  void SetCreateInkDropCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDrop>()> callback);
+
+  // Creates and returns the visual effect used for press. Used by InkDropImpl
+  // instances.
+  std::unique_ptr<InkDropRipple> CreateInkDropRipple() const;
+
+  // Replaces CreateInkDropRipple() behavior.
+  void SetCreateRippleCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropRipple>()> callback);
+
+  // Returns the point of the |last_ripple_triggering_event_| if it was a
+  // LocatedEvent, otherwise the center point of the local bounds is returned.
+  // This is nominally used by the InkDropRipple.
+  gfx::Point GetInkDropCenterBasedOnLastEvent() const;
+
+  // Creates and returns the visual effect used for hover and focus. Used by
+  // InkDropImpl instances. To override behavior call
+  // SetCreateHighlightCallback().
+  std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const;
+
+  // Replaces CreateInkDropHighlight() behavior.
+  void SetCreateHighlightCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()> callback);
+
+  // Callback replacement of CreateInkDropMask().
+  // TODO(pbos): Investigate removing this. It currently is only used by
+  // PieMenuView.
+  void SetCreateMaskCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropMask>()> callback);
+
+  // Toggles ink drop attention state on/off. If set on, a pulsing highlight
+  // is shown, prompting users to interact with `host_view_`.
+  // Called by components that want to call into user's attention, e.g. IPH.
+  void ToggleAttentionState(bool attention_on);
+
+  // Returns the base color for the ink drop.
+  SkColor GetBaseColor() const;
+
+  // Sets the base color of the ink drop. If `SetBaseColor` is called, the
+  // effect of previous calls to `SetBaseColorId` and `SetBaseColorCallback` is
+  // overwritten and vice versa.
+  // TODO(crbug.com/1341361): Replace SetBaseColor with SetBaseColorId.
+  void SetBaseColor(SkColor color);
+  void SetBaseColorId(ui::ColorId color_id);
+  // Callback version of `GetBaseColor`. If possible, prefer using
+  // `SetBaseColor` or `SetBaseColorId`.
+  void SetBaseColorCallback(base::RepeatingCallback<SkColor()> callback);
+
+  // Toggle to enable/disable an InkDrop on this View.  Descendants can override
+  // CreateInkDropHighlight() and CreateInkDropRipple() to change the look/feel
+  // of the InkDrop.
+  //
+  // TODO(bruthig): Add an easier mechanism than overriding functions to allow
+  // subclasses/clients to specify the flavor of ink drop.
+  void SetMode(InkDropMode ink_drop_mode);
+  InkDropMode GetMode() const;
+
+  // Set whether the ink drop layers should be placed into the region above or
+  // below the view layer. The default is kBelow;
+  void SetLayerRegion(LayerRegion region);
+  LayerRegion GetLayerRegion() const;
+
+  void SetVisibleOpacity(float visible_opacity);
+  float GetVisibleOpacity() const;
+
+  void SetHighlightOpacity(absl::optional<float> opacity);
+
+  void SetSmallCornerRadius(int small_radius);
+  int GetSmallCornerRadius() const;
+
+  void SetLargeCornerRadius(int large_radius);
+  int GetLargeCornerRadius() const;
+
+  // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the
+  // last_ripple_triggering_event().
+  //
+  // *** NOTE ***: |event| has been plumbed through on a best effort basis for
+  // the purposes of centering ink drop ripples on located Events.  Thus nullptr
+  // has been used by clients who do not have an Event instance available to
+  // them.
+  void AnimateToState(InkDropState state, const ui::LocatedEvent* event);
+
+  // Returns true if an ink drop instance has been created.
+  bool HasInkDrop() const;
+
+  // Provides public access to |ink_drop_| so that factory methods can configure
+  // the inkdrop. Implements lazy initialization of |ink_drop_| so as to avoid
+  // virtual method calls during construction since subclasses should be able to
+  // call SetMode() during construction.
+  InkDrop* GetInkDrop();
+
+  // Returns whether the ink drop should be considered "highlighted" (in or
+  // animating into "highlight visible" steady state).
+  bool GetHighlighted() const;
+
+  base::CallbackListSubscription AddHighlightedChangedCallback(
+      base::RepeatingClosure callback);
+
+  // Should be called by InkDrop implementations when their highlight state
+  // changes, to trigger the corresponding property change notification here.
+  void OnInkDropHighlightedChanged();
+
+  // Methods called by InkDrop for attaching its layer.
+  // TODO(pbos): Investigate using direct calls on View::AddLayerToRegion.
+  void AddInkDropLayer(ui::Layer* ink_drop_layer);
+  void RemoveInkDropLayer(ui::Layer* ink_drop_layer);
+
+  // Size used by default for the SquareInkDropRipple.
+  static constexpr gfx::Size kDefaultSquareInkDropSize = gfx::Size(24, 24);
+
+  // Returns a large scaled size used by SquareInkDropRipple and Highlight.
+  static gfx::Size GetLargeSize(gfx::Size small_size);
+
+  // Creates a SquareInkDropRipple centered on |center_point|.
+  std::unique_ptr<InkDropRipple> CreateSquareRipple(
+      const gfx::Point& center_point,
+      const gfx::Size& size = kDefaultSquareInkDropSize) const;
+
+  View* host_view() { return host_view_; }
+  const View* host_view() const { return host_view_; }
+
+ private:
+  friend class test::InkDropHostTestApi;
+
+  class ViewLayerTransformObserver : public ViewObserver {
+   public:
+    ViewLayerTransformObserver(InkDropHost* ink_drop_host, View* host);
+    ~ViewLayerTransformObserver() override;
+
+    void OnViewLayerTransformed(View* observed_view) override;
+
+   private:
+    base::ScopedObservation<View, ViewObserver> observation_{this};
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  class InkDropHostEventHandlerDelegate : public InkDropEventHandler::Delegate {
+   public:
+    explicit InkDropHostEventHandlerDelegate(InkDropHost* host);
+
+    // InkDropEventHandler::Delegate:
+    InkDrop* GetInkDrop() override;
+    bool HasInkDrop() const override;
+
+    bool SupportsGestureEvents() const override;
+
+   private:
+    // The host.
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  const InkDropEventHandler* GetEventHandler() const;
+  InkDropEventHandler* GetEventHandler();
+
+  // This generates a mask for the InkDrop.
+  std::unique_ptr<views::InkDropMask> CreateInkDropMask() const;
+
+  // Adds a clip rect on the root layer of the ink drop impl. This is a more
+  // performant alternative to using circles or rectangle mask layers. Returns
+  // true if a clip was added.
+  bool AddInkDropClip(ui::Layer* ink_drop_layer);
+
+  // Initializes and sets a mask on `ink_drop_layer`. This will not run if
+  // AddInkDropClip() succeeds in the default implementation of
+  // AddInkDropLayer().
+  void InstallInkDropMask(ui::Layer* ink_drop_layer);
+
+  const raw_ptr<View> host_view_;
+
+  // Defines what type of |ink_drop_| to create.
+  InkDropMode ink_drop_mode_ = views::InkDropHost::InkDropMode::OFF;
+
+  // Into which region should the ink drop layers be placed.
+  LayerRegion layer_region_ = LayerRegion::kBelow;
+
+  // Used to observe View and inform the InkDrop of host-transform changes.
+  ViewLayerTransformObserver host_view_transform_observer_;
+
+  // Declared before |ink_drop_|, because InkDropImpl may call
+  // RemoveInkDropLayer on partly destructed InkDropHost. In
+  // that case |ink_drop_mask_| must be still valid.
+  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+
+  // Should not be accessed directly. Use GetInkDrop() instead.
+  std::unique_ptr<InkDrop> ink_drop_;
+
+  // Intentionally declared after |ink_drop_| so that it doesn't access a
+  // destroyed |ink_drop_| during destruction.
+  InkDropHostEventHandlerDelegate ink_drop_event_handler_delegate_;
+  InkDropEventHandler ink_drop_event_handler_;
+
+  float ink_drop_visible_opacity_ = 0.175f;
+
+  // The color of the ripple and hover.
+  absl::variant<SkColor, ui::ColorId, base::RepeatingCallback<SkColor()>>
+      ink_drop_base_color_ = gfx::kPlaceholderColor;
+
+  // TODO(pbos): Audit call sites to make sure highlight opacity is either
+  // always set or using the default value. Then make this a non-optional float.
+  absl::optional<float> ink_drop_highlight_opacity_;
+
+  // Radii used for the SquareInkDropRipple.
+  int ink_drop_small_corner_radius_ = 2;
+  int ink_drop_large_corner_radius_ = 4;
+
+  base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
+      create_ink_drop_ripple_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()>
+      create_ink_drop_highlight_callback_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDropMask>()>
+      create_ink_drop_mask_callback_;
+
+  base::RepeatingClosureList highlighted_changed_callbacks_;
+
+  // Attention is a state we apply on Buttons' ink drop when we want to draw
+  // users' attention to this button and prompt users' interaction.
+  // It consists of two visual effects: a default light blue color and a pulsing
+  // effect. Current use case is IPH. Go to chrome://internals/user-education
+  // and press e.g. IPH_TabSearch to see the effects.
+  bool in_attention_state_ = false;
+};
+
+}  // namespace views
+
+#endif  // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
Index: chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h
===================================================================
--- chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h	(nonexistent)
+++ chromium/create-119.0.6026.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h	(revision 385)
@@ -0,0 +1,299 @@
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+#define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+
+#include <memory>
+
+#include "base/memory/raw_ptr.h"
+#include "third_party/abseil-cpp/absl/types/variant.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/color/color_id.h"
+#include "ui/color/color_provider.h"
+#include "ui/gfx/color_palette.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/views/animation/ink_drop_event_handler.h"
+#include "ui/views/metadata/view_factory.h"
+#include "ui/views/view.h"
+
+namespace ui {
+class Layer;
+class LocatedEvent;
+}  // namespace ui
+
+namespace views {
+
+class InkDrop;
+class InkDropHighlight;
+class InkDropImpl;
+class InkDropMask;
+class InkDropRipple;
+enum class InkDropState;
+
+namespace test {
+class InkDropHostTestApi;
+}  // namespace test
+
+// TODO(crbug.com/931964): Rename this type and move this header. Also consider
+// if InkDropHost should be what implements the InkDrop interface and have that
+// be the public interface.
+// The current division of labor is roughly as follows:
+// * InkDropHost manages an InkDrop and is responsible for a lot of its
+//   configuration and creating the parts of the InkDrop.
+// * InkDrop manages the parts of the ink-drop effect once it's up and running.
+// * InkDropRipple is a ripple effect that usually triggers as a result of
+//   clicking or activating the button / similar which hosts this.
+// * InkDropHighlight manages the hover/focus highlight layer.
+// TODO(pbos): See if this can be the only externally visible surface for an
+// ink-drop effect, and rename this InkDrop, or consolidate with InkDrop.
+class VIEWS_EXPORT InkDropHost {
+ public:
+  // Used in SetMode() to specify whether the ink drop effect is enabled
+  // or not for the view. In case of having an ink drop, it also specifies
+  // whether the default event handler for the ink drop should be installed or
+  // the subclass will handle ink drop events itself.
+  enum class InkDropMode {
+    OFF,
+    ON,
+    ON_NO_GESTURE_HANDLER,
+    ON_NO_ANIMATE,
+  };
+
+  explicit InkDropHost(View* host);
+  InkDropHost(const InkDropHost&) = delete;
+  InkDropHost& operator=(const InkDropHost&) = delete;
+  virtual ~InkDropHost();
+
+  // Returns a configured InkDrop. To override default behavior call
+  // SetCreateInkDropCallback().
+  std::unique_ptr<InkDrop> CreateInkDrop();
+
+  // Replace CreateInkDrop() behavior.
+  void SetCreateInkDropCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDrop>()> callback);
+
+  // Creates and returns the visual effect used for press. Used by InkDropImpl
+  // instances.
+  std::unique_ptr<InkDropRipple> CreateInkDropRipple() const;
+
+  // Replaces CreateInkDropRipple() behavior.
+  void SetCreateRippleCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropRipple>()> callback);
+
+  // Returns the point of the |last_ripple_triggering_event_| if it was a
+  // LocatedEvent, otherwise the center point of the local bounds is returned.
+  // This is nominally used by the InkDropRipple.
+  gfx::Point GetInkDropCenterBasedOnLastEvent() const;
+
+  // Creates and returns the visual effect used for hover and focus. Used by
+  // InkDropImpl instances. To override behavior call
+  // SetCreateHighlightCallback().
+  std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const;
+
+  // Replaces CreateInkDropHighlight() behavior.
+  void SetCreateHighlightCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()> callback);
+
+  // Callback replacement of CreateInkDropMask().
+  // TODO(pbos): Investigate removing this. It currently is only used by
+  // PieMenuView.
+  void SetCreateMaskCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropMask>()> callback);
+
+  // Toggles ink drop attention state on/off. If set on, a pulsing highlight
+  // is shown, prompting users to interact with `host_view_`.
+  // Called by components that want to call into user's attention, e.g. IPH.
+  void ToggleAttentionState(bool attention_on);
+
+  // Returns the base color for the ink drop.
+  SkColor GetBaseColor() const;
+
+  // Sets the base color of the ink drop. If `SetBaseColor` is called, the
+  // effect of previous calls to `SetBaseColorId` and `SetBaseColorCallback` is
+  // overwritten and vice versa.
+  // TODO(crbug.com/1341361): Replace SetBaseColor with SetBaseColorId.
+  void SetBaseColor(SkColor color);
+  void SetBaseColorId(ui::ColorId color_id);
+  // Callback version of `GetBaseColor`. If possible, prefer using
+  // `SetBaseColor` or `SetBaseColorId`.
+  void SetBaseColorCallback(base::RepeatingCallback<SkColor()> callback);
+
+  // Toggle to enable/disable an InkDrop on this View.  Descendants can override
+  // CreateInkDropHighlight() and CreateInkDropRipple() to change the look/feel
+  // of the InkDrop.
+  //
+  // TODO(bruthig): Add an easier mechanism than overriding functions to allow
+  // subclasses/clients to specify the flavor of ink drop.
+  void SetMode(InkDropMode ink_drop_mode);
+  InkDropMode GetMode() const;
+
+  // Set whether the ink drop layers should be placed into the region above or
+  // below the view layer. The default is kBelow;
+  void SetLayerRegion(LayerRegion region);
+  LayerRegion GetLayerRegion() const;
+
+  void SetVisibleOpacity(float visible_opacity);
+  float GetVisibleOpacity() const;
+
+  void SetHighlightOpacity(absl::optional<float> opacity);
+
+  void SetSmallCornerRadius(int small_radius);
+  int GetSmallCornerRadius() const;
+
+  void SetLargeCornerRadius(int large_radius);
+  int GetLargeCornerRadius() const;
+
+  // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the
+  // last_ripple_triggering_event().
+  //
+  // *** NOTE ***: |event| has been plumbed through on a best effort basis for
+  // the purposes of centering ink drop ripples on located Events.  Thus nullptr
+  // has been used by clients who do not have an Event instance available to
+  // them.
+  void AnimateToState(InkDropState state, const ui::LocatedEvent* event);
+
+  // Returns true if an ink drop instance has been created.
+  bool HasInkDrop() const;
+
+  // Provides public access to |ink_drop_| so that factory methods can configure
+  // the inkdrop. Implements lazy initialization of |ink_drop_| so as to avoid
+  // virtual method calls during construction since subclasses should be able to
+  // call SetMode() during construction.
+  InkDrop* GetInkDrop();
+
+  // Returns whether the ink drop should be considered "highlighted" (in or
+  // animating into "highlight visible" steady state).
+  bool GetHighlighted() const;
+
+  base::CallbackListSubscription AddHighlightedChangedCallback(
+      base::RepeatingClosure callback);
+
+  // Should be called by InkDrop implementations when their highlight state
+  // changes, to trigger the corresponding property change notification here.
+  void OnInkDropHighlightedChanged();
+
+  // Methods called by InkDrop for attaching its layer.
+  // TODO(pbos): Investigate using direct calls on View::AddLayerToRegion.
+  void AddInkDropLayer(ui::Layer* ink_drop_layer);
+  void RemoveInkDropLayer(ui::Layer* ink_drop_layer);
+
+  // Size used by default for the SquareInkDropRipple.
+  static constexpr gfx::Size kDefaultSquareInkDropSize = gfx::Size(24, 24);
+
+  // Returns a large scaled size used by SquareInkDropRipple and Highlight.
+  static gfx::Size GetLargeSize(gfx::Size small_size);
+
+  // Creates a SquareInkDropRipple centered on |center_point|.
+  std::unique_ptr<InkDropRipple> CreateSquareRipple(
+      const gfx::Point& center_point,
+      const gfx::Size& size = kDefaultSquareInkDropSize) const;
+
+  View* host_view() { return host_view_; }
+  const View* host_view() const { return host_view_; }
+
+ private:
+  friend class test::InkDropHostTestApi;
+
+  class ViewLayerTransformObserver : public ViewObserver {
+   public:
+    ViewLayerTransformObserver(InkDropHost* ink_drop_host, View* host);
+    ~ViewLayerTransformObserver() override;
+
+    void OnViewLayerTransformed(View* observed_view) override;
+
+   private:
+    base::ScopedObservation<View, ViewObserver> observation_{this};
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  class InkDropHostEventHandlerDelegate : public InkDropEventHandler::Delegate {
+   public:
+    explicit InkDropHostEventHandlerDelegate(InkDropHost* host);
+
+    // InkDropEventHandler::Delegate:
+    InkDrop* GetInkDrop() override;
+    bool HasInkDrop() const override;
+
+    bool SupportsGestureEvents() const override;
+
+   private:
+    // The host.
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  const InkDropEventHandler* GetEventHandler() const;
+  InkDropEventHandler* GetEventHandler();
+
+  // This generates a mask for the InkDrop.
+  std::unique_ptr<views::InkDropMask> CreateInkDropMask() const;
+
+  // Adds a clip rect on the root layer of the ink drop impl. This is a more
+  // performant alternative to using circles or rectangle mask layers. Returns
+  // true if a clip was added.
+  bool AddInkDropClip(ui::Layer* ink_drop_layer);
+
+  // Initializes and sets a mask on `ink_drop_layer`. This will not run if
+  // AddInkDropClip() succeeds in the default implementation of
+  // AddInkDropLayer().
+  void InstallInkDropMask(ui::Layer* ink_drop_layer);
+
+  const raw_ptr<View> host_view_;
+
+  // Defines what type of |ink_drop_| to create.
+  InkDropMode ink_drop_mode_ = views::InkDropHost::InkDropMode::OFF;
+
+  // Into which region should the ink drop layers be placed.
+  LayerRegion layer_region_ = LayerRegion::kBelow;
+
+  // Used to observe View and inform the InkDrop of host-transform changes.
+  ViewLayerTransformObserver host_view_transform_observer_;
+
+  // Should not be accessed directly. Use GetInkDrop() instead.
+  std::unique_ptr<InkDrop> ink_drop_;
+
+  // Intentionally declared after |ink_drop_| so that it doesn't access a
+  // destroyed |ink_drop_| during destruction.
+  InkDropHostEventHandlerDelegate ink_drop_event_handler_delegate_;
+  InkDropEventHandler ink_drop_event_handler_;
+
+  float ink_drop_visible_opacity_ = 0.175f;
+
+  // The color of the ripple and hover.
+  absl::variant<SkColor, ui::ColorId, base::RepeatingCallback<SkColor()>>
+      ink_drop_base_color_ = gfx::kPlaceholderColor;
+
+  // TODO(pbos): Audit call sites to make sure highlight opacity is either
+  // always set or using the default value. Then make this a non-optional float.
+  absl::optional<float> ink_drop_highlight_opacity_;
+
+  // Radii used for the SquareInkDropRipple.
+  int ink_drop_small_corner_radius_ = 2;
+  int ink_drop_large_corner_radius_ = 4;
+
+  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
+      create_ink_drop_ripple_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()>
+      create_ink_drop_highlight_callback_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDropMask>()>
+      create_ink_drop_mask_callback_;
+
+  base::RepeatingClosureList highlighted_changed_callbacks_;
+
+  // Attention is a state we apply on Buttons' ink drop when we want to draw
+  // users' attention to this button and prompt users' interaction.
+  // It consists of two visual effects: a default light blue color and a pulsing
+  // effect. Current use case is IPH. Go to chrome://internals/user-education
+  // and press e.g. IPH_TabSearch to see the effects.
+  bool in_attention_state_ = false;
+};
+
+}  // namespace views
+
+#endif  // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
Index: chromium/create-119.0.6026.1-oauth2-default-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-oauth2-default-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-oauth2-default-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-oauth2-default.patch

Property changes on: chromium/create-119.0.6026.1-oauth2-default-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-oauth2-default-patch/src/google_apis/google_api_keys.cc
===================================================================
--- chromium/create-119.0.6026.1-oauth2-default-patch/src/google_apis/google_api_keys.cc	(nonexistent)
+++ chromium/create-119.0.6026.1-oauth2-default-patch/src/google_apis/google_api_keys.cc	(revision 385)
@@ -0,0 +1,451 @@
+// Copyright 2012 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "google_apis/google_api_keys.h"
+
+// If you add more includes to this list, you also need to add them to
+// google_api_keys_unittest.cc and google_api_keys_mac_unittest.mm.
+
+#include <stddef.h>
+
+#include <memory>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/strings/stringize_macros.h"
+#include "build/branding_buildflags.h"
+#include "build/chromeos_buildflags.h"
+#include "google_apis/buildflags.h"
+#include "google_apis/gaia/gaia_config.h"
+#include "google_apis/gaia/gaia_switches.h"
+
+#if BUILDFLAG(IS_APPLE)
+#include "google_apis/google_api_keys_mac.h"
+#endif
+
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+#include "google_apis/internal/google_chrome_api_keys.h"
+#include "google_apis/internal/metrics_signing_key.h"
+#endif
+
+// Used to indicate an unset key/id/secret.  This works better with
+// various unit tests than leaving the token empty.
+#define DUMMY_API_TOKEN "dummytoken"
+
+#if !defined(GOOGLE_API_KEY)
+#define GOOGLE_API_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_METRICS_SIGNING_KEY)
+#define GOOGLE_METRICS_SIGNING_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_MAIN)
+#define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_MAIN)
+#define GOOGLE_CLIENT_SECRET_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING)
+#define GOOGLE_CLIENT_ID_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING)
+#define GOOGLE_CLIENT_SECRET_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING_HOST)
+#define GOOGLE_CLIENT_ID_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING_HOST)
+#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if BUILDFLAG(IS_ANDROID)
+#if !defined(GOOGLE_API_KEY_ANDROID_NON_STABLE)
+#define GOOGLE_API_KEY_ANDROID_NON_STABLE DUMMY_API_TOKEN
+#endif
+#endif
+
+#if !defined(GOOGLE_API_KEY_REMOTING)
+#define GOOGLE_API_KEY_REMOTING DUMMY_API_TOKEN
+#endif
+
+// API key for the Speech On-Device API (SODA).
+#if !defined(GOOGLE_API_KEY_SODA)
+#define GOOGLE_API_KEY_SODA DUMMY_API_TOKEN
+#endif
+
+#if !BUILDFLAG(IS_ANDROID)
+// API key for the HaTS API.
+#if !defined(GOOGLE_API_KEY_HATS)
+#define GOOGLE_API_KEY_HATS DUMMY_API_TOKEN
+#endif
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// API key for the Nearby Sharing Service.
+#if !defined(GOOGLE_API_KEY_SHARING)
+#define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN
+#endif
+
+// API key for the ReadAloud API.
+#if !defined(GOOGLE_API_KEY_READ_ALOUD)
+#define GOOGLE_API_KEY_READ_ALOUD DUMMY_API_TOKEN
+#endif
+
+// API key for the Fresnel API.
+#if !defined(GOOGLE_API_KEY_FRESNEL)
+#define GOOGLE_API_KEY_FRESNEL DUMMY_API_TOKEN
+#endif
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// These are used as shortcuts for developers and users providing
+// OAuth credentials via preprocessor defines or environment
+// variables.  If set, they will be used to replace any of the client
+// IDs and secrets above that have not been set (and only those; they
+// will not override already-set values).
+#if !defined(GOOGLE_DEFAULT_CLIENT_ID)
+#define GOOGLE_DEFAULT_CLIENT_ID ""
+#endif
+#if !defined(GOOGLE_DEFAULT_CLIENT_SECRET)
+#define GOOGLE_DEFAULT_CLIENT_SECRET ""
+#endif
+
+namespace google_apis {
+
+const char kAPIKeysDevelopersHowToURL[] =
+    "https://www.chromium.org/developers/how-tos/api-keys";
+
+// This is used as a lazy instance to determine keys once and cache them.
+class APIKeyCache {
+ public:
+  APIKeyCache() {
+    std::unique_ptr<base::Environment> environment(base::Environment::Create());
+    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+    GaiaConfig* gaia_config = GaiaConfig::GetInstance();
+
+    api_key_ = CalculateKeyValue(
+        GOOGLE_API_KEY, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+// A special non-stable key is at the moment defined only for Android Chrome.
+#if BUILDFLAG(IS_ANDROID)
+    api_key_non_stable_ = CalculateKeyValue(
+        GOOGLE_API_KEY_ANDROID_NON_STABLE,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_ANDROID_NON_STABLE), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+#else
+    api_key_non_stable_ = api_key_;
+#endif
+
+    api_key_remoting_ = CalculateKeyValue(
+        GOOGLE_API_KEY_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_REMOTING), nullptr, std::string(),
+        environment.get(), command_line, gaia_config);
+
+    api_key_soda_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SODA, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SODA),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#if !BUILDFLAG(IS_ANDROID)
+    api_key_hats_ = CalculateKeyValue(
+        GOOGLE_API_KEY_HATS, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_HATS),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+    api_key_sharing_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_read_aloud_ = CalculateKeyValue(
+        GOOGLE_API_KEY_READ_ALOUD,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_READ_ALOUD), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_fresnel_ = CalculateKeyValue(
+        GOOGLE_API_KEY_FRESNEL, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_FRESNEL),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+    metrics_key_ = CalculateKeyValue(
+        GOOGLE_METRICS_SIGNING_KEY,
+        STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    std::string default_client_id = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_ID,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+        std::string(), environment.get(), command_line, gaia_config);
+    std::string default_client_secret = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_SECRET,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    // We currently only allow overriding the baked-in values for the
+    // default OAuth2 client ID and secret using a command-line
+    // argument and gaia config, since that is useful to enable testing against
+    // staging servers, and since that was what was possible and
+    // likely practiced by the QA team before this implementation was
+    // written.
+    client_ids_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_MAIN, STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_MAIN),
+        ::switches::kOAuth2ClientID, default_client_id, environment.get(),
+        command_line, gaia_config);
+    client_secrets_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_MAIN,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_MAIN),
+        ::switches::kOAuth2ClientSecret, default_client_secret,
+        environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING_HOST), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING_HOST), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+  }
+
+  std::string api_key() const { return api_key_; }
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+  void set_api_key(const std::string& api_key) { api_key_ = api_key; }
+#endif
+  std::string api_key_non_stable() const { return api_key_non_stable_; }
+  std::string api_key_remoting() const { return api_key_remoting_; }
+  std::string api_key_soda() const { return api_key_soda_; }
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats() const { return api_key_hats_; }
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing() const { return api_key_sharing_; }
+  std::string api_key_read_aloud() const { return api_key_read_aloud_; }
+  std::string api_key_fresnel() const { return api_key_fresnel_; }
+#endif
+
+  std::string metrics_key() const { return metrics_key_; }
+
+  std::string GetClientID(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_ids_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientID(OAuth2Client client, const std::string& client_id) {
+    client_ids_[client] = client_id;
+  }
+#endif
+
+  std::string GetClientSecret(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_secrets_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientSecret(OAuth2Client client, const std::string& client_secret) {
+    client_secrets_[client] = client_secret;
+  }
+#endif
+
+ private:
+  // Gets a value for a key.  In priority order, this will be the value
+  // provided via:
+  // 1. Command-line switch
+  // 2. Config file
+  // 3. Environment variable
+  // 4. Baked into the build
+  // |command_line_switch| may be NULL. Official Google Chrome builds will not
+  // use the value provided by an environment variable.
+  static std::string CalculateKeyValue(const char* baked_in_value,
+                                       const char* environment_variable_name,
+                                       const char* command_line_switch,
+                                       const std::string& default_if_unset,
+                                       base::Environment* environment,
+                                       base::CommandLine* command_line,
+                                       GaiaConfig* gaia_config) {
+    std::string key_value = baked_in_value;
+    std::string temp;
+#if BUILDFLAG(IS_APPLE)
+    // macOS and iOS can also override the API key with a value from the
+    // Info.plist.
+    temp = ::google_apis::GetAPIKeyFromInfoPlist(environment_variable_name);
+    if (!temp.empty()) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from Info.plist.";
+    }
+#endif
+
+#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
+    // Don't allow using the environment to override API keys for official
+    // Google Chrome builds. There have been reports of mangled environments
+    // affecting users (crbug.com/710575).
+    if (environment->GetVar(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from environment variable.";
+    }
+#endif
+
+    if (gaia_config &&
+        gaia_config->GetAPIKeyIfExists(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from gaia config.";
+    }
+
+    if (command_line_switch && command_line->HasSwitch(command_line_switch)) {
+      key_value = command_line->GetSwitchValueASCII(command_line_switch);
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from command-line switch.";
+    }
+
+    if (key_value == DUMMY_API_TOKEN) {
+// TODO(crbug.com/1294915): Rewrite this condition using
+// BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY).
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_FUCHSIA)
+      // No key should be unset in an official build except the
+      // GOOGLE_DEFAULT_* keys.  The default keys don't trigger this
+      // check as their "unset" value is not DUMMY_API_TOKEN.
+      CHECK(false);
+#endif
+      if (default_if_unset.size() > 0) {
+        VLOG(1) << "Using default value \"" << default_if_unset
+                << "\" for API key " << environment_variable_name;
+        key_value = default_if_unset;
+      }
+    }
+
+    // This should remain a debug-only log.
+    DVLOG(1) << "API key " << environment_variable_name << "=" << key_value;
+
+    return key_value;
+  }
+
+  std::string api_key_;
+  std::string api_key_non_stable_;
+  std::string api_key_remoting_;
+  std::string api_key_soda_;
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats_;
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing_;
+  std::string api_key_read_aloud_;
+  std::string api_key_fresnel_;
+#endif
+  std::string metrics_key_;
+  std::string client_ids_[CLIENT_NUM_ITEMS];
+  std::string client_secrets_[CLIENT_NUM_ITEMS];
+};
+
+static base::LazyInstance<APIKeyCache>::DestructorAtExit g_api_key_cache =
+    LAZY_INSTANCE_INITIALIZER;
+
+bool HasAPIKeyConfigured() {
+  return GetAPIKey() != DUMMY_API_TOKEN;
+}
+
+std::string GetAPIKey() {
+  return g_api_key_cache.Get().api_key();
+}
+
+std::string GetNonStableAPIKey() {
+  return g_api_key_cache.Get().api_key_non_stable();
+}
+
+std::string GetRemotingAPIKey() {
+  return g_api_key_cache.Get().api_key_remoting();
+}
+
+std::string GetSodaAPIKey() {
+  return g_api_key_cache.Get().api_key_soda();
+}
+
+#if !BUILDFLAG(IS_ANDROID)
+std::string GetHatsAPIKey() {
+  return g_api_key_cache.Get().api_key_hats();
+}
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+std::string GetSharingAPIKey() {
+  return g_api_key_cache.Get().api_key_sharing();
+}
+
+std::string GetReadAloudAPIKey() {
+  return g_api_key_cache.Get().api_key_read_aloud();
+}
+
+std::string GetFresnelAPIKey() {
+  return g_api_key_cache.Get().api_key_fresnel();
+}
+#endif
+
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+void SetAPIKey(const std::string& api_key) {
+  g_api_key_cache.Get().set_api_key(api_key);
+}
+#endif
+
+std::string GetMetricsKey() {
+  return g_api_key_cache.Get().metrics_key();
+}
+
+bool HasOAuthClientConfigured() {
+  for (size_t client_id = 0; client_id < CLIENT_NUM_ITEMS; ++client_id) {
+    OAuth2Client client = static_cast<OAuth2Client>(client_id);
+    if (GetOAuth2ClientID(client) == DUMMY_API_TOKEN ||
+        GetOAuth2ClientSecret(client) == DUMMY_API_TOKEN) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+std::string GetOAuth2ClientID(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientID(client);
+}
+
+std::string GetOAuth2ClientSecret(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientSecret(client);
+}
+
+#if BUILDFLAG(IS_IOS)
+void SetOAuth2ClientID(OAuth2Client client, const std::string& client_id) {
+  g_api_key_cache.Get().SetClientID(client, client_id);
+}
+
+void SetOAuth2ClientSecret(OAuth2Client client,
+                           const std::string& client_secret) {
+  g_api_key_cache.Get().SetClientSecret(client, client_secret);
+}
+#endif
+
+bool IsGoogleChromeAPIKeyUsed() {
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+  return true;
+#else
+  return false;
+#endif
+}
+
+}  // namespace google_apis
Index: chromium/create-119.0.6026.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc
===================================================================
--- chromium/create-119.0.6026.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc	(nonexistent)
+++ chromium/create-119.0.6026.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc	(revision 385)
@@ -0,0 +1,451 @@
+// Copyright 2012 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "google_apis/google_api_keys.h"
+
+// If you add more includes to this list, you also need to add them to
+// google_api_keys_unittest.cc and google_api_keys_mac_unittest.mm.
+
+#include <stddef.h>
+
+#include <memory>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/strings/stringize_macros.h"
+#include "build/branding_buildflags.h"
+#include "build/chromeos_buildflags.h"
+#include "google_apis/buildflags.h"
+#include "google_apis/gaia/gaia_config.h"
+#include "google_apis/gaia/gaia_switches.h"
+
+#if BUILDFLAG(IS_APPLE)
+#include "google_apis/google_api_keys_mac.h"
+#endif
+
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+#include "google_apis/internal/google_chrome_api_keys.h"
+#include "google_apis/internal/metrics_signing_key.h"
+#endif
+
+// Used to indicate an unset key/id/secret.  This works better with
+// various unit tests than leaving the token empty.
+#define DUMMY_API_TOKEN "dummytoken"
+
+#if !defined(GOOGLE_API_KEY)
+#define GOOGLE_API_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_METRICS_SIGNING_KEY)
+#define GOOGLE_METRICS_SIGNING_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_MAIN)
+#define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_MAIN)
+#define GOOGLE_CLIENT_SECRET_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING)
+#define GOOGLE_CLIENT_ID_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING)
+#define GOOGLE_CLIENT_SECRET_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING_HOST)
+#define GOOGLE_CLIENT_ID_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING_HOST)
+#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if BUILDFLAG(IS_ANDROID)
+#if !defined(GOOGLE_API_KEY_ANDROID_NON_STABLE)
+#define GOOGLE_API_KEY_ANDROID_NON_STABLE DUMMY_API_TOKEN
+#endif
+#endif
+
+#if !defined(GOOGLE_API_KEY_REMOTING)
+#define GOOGLE_API_KEY_REMOTING DUMMY_API_TOKEN
+#endif
+
+// API key for the Speech On-Device API (SODA).
+#if !defined(GOOGLE_API_KEY_SODA)
+#define GOOGLE_API_KEY_SODA DUMMY_API_TOKEN
+#endif
+
+#if !BUILDFLAG(IS_ANDROID)
+// API key for the HaTS API.
+#if !defined(GOOGLE_API_KEY_HATS)
+#define GOOGLE_API_KEY_HATS DUMMY_API_TOKEN
+#endif
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// API key for the Nearby Sharing Service.
+#if !defined(GOOGLE_API_KEY_SHARING)
+#define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN
+#endif
+
+// API key for the ReadAloud API.
+#if !defined(GOOGLE_API_KEY_READ_ALOUD)
+#define GOOGLE_API_KEY_READ_ALOUD DUMMY_API_TOKEN
+#endif
+
+// API key for the Fresnel API.
+#if !defined(GOOGLE_API_KEY_FRESNEL)
+#define GOOGLE_API_KEY_FRESNEL DUMMY_API_TOKEN
+#endif
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// These are used as shortcuts for developers and users providing
+// OAuth credentials via preprocessor defines or environment
+// variables.  If set, they will be used to replace any of the client
+// IDs and secrets above that have not been set (and only those; they
+// will not override already-set values).
+#if !defined(GOOGLE_DEFAULT_CLIENT_ID)
+#define GOOGLE_DEFAULT_CLIENT_ID ""
+#endif
+#if !defined(GOOGLE_DEFAULT_CLIENT_SECRET)
+#define GOOGLE_DEFAULT_CLIENT_SECRET ""
+#endif
+
+namespace google_apis {
+
+const char kAPIKeysDevelopersHowToURL[] =
+    "https://www.chromium.org/developers/how-tos/api-keys";
+
+// This is used as a lazy instance to determine keys once and cache them.
+class APIKeyCache {
+ public:
+  APIKeyCache() {
+    std::unique_ptr<base::Environment> environment(base::Environment::Create());
+    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+    GaiaConfig* gaia_config = GaiaConfig::GetInstance();
+
+    api_key_ = CalculateKeyValue(
+        GOOGLE_API_KEY, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+// A special non-stable key is at the moment defined only for Android Chrome.
+#if BUILDFLAG(IS_ANDROID)
+    api_key_non_stable_ = CalculateKeyValue(
+        GOOGLE_API_KEY_ANDROID_NON_STABLE,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_ANDROID_NON_STABLE), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+#else
+    api_key_non_stable_ = api_key_;
+#endif
+
+    api_key_remoting_ = CalculateKeyValue(
+        GOOGLE_API_KEY_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_REMOTING), nullptr, std::string(),
+        environment.get(), command_line, gaia_config);
+
+    api_key_soda_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SODA, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SODA),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#if !BUILDFLAG(IS_ANDROID)
+    api_key_hats_ = CalculateKeyValue(
+        GOOGLE_API_KEY_HATS, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_HATS),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+    api_key_sharing_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_read_aloud_ = CalculateKeyValue(
+        GOOGLE_API_KEY_READ_ALOUD,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_READ_ALOUD), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_fresnel_ = CalculateKeyValue(
+        GOOGLE_API_KEY_FRESNEL, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_FRESNEL),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+    metrics_key_ = CalculateKeyValue(
+        GOOGLE_METRICS_SIGNING_KEY,
+        STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    std::string default_client_id = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_ID,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+    std::string default_client_secret = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_SECRET,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    // We currently only allow overriding the baked-in values for the
+    // default OAuth2 client ID and secret using a command-line
+    // argument and gaia config, since that is useful to enable testing against
+    // staging servers, and since that was what was possible and
+    // likely practiced by the QA team before this implementation was
+    // written.
+    client_ids_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_MAIN, STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_MAIN),
+        ::switches::kOAuth2ClientID, default_client_id, environment.get(),
+        command_line, gaia_config);
+    client_secrets_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_MAIN,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_MAIN),
+        ::switches::kOAuth2ClientSecret, default_client_secret,
+        environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING_HOST), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING_HOST), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+  }
+
+  std::string api_key() const { return api_key_; }
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+  void set_api_key(const std::string& api_key) { api_key_ = api_key; }
+#endif
+  std::string api_key_non_stable() const { return api_key_non_stable_; }
+  std::string api_key_remoting() const { return api_key_remoting_; }
+  std::string api_key_soda() const { return api_key_soda_; }
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats() const { return api_key_hats_; }
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing() const { return api_key_sharing_; }
+  std::string api_key_read_aloud() const { return api_key_read_aloud_; }
+  std::string api_key_fresnel() const { return api_key_fresnel_; }
+#endif
+
+  std::string metrics_key() const { return metrics_key_; }
+
+  std::string GetClientID(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_ids_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientID(OAuth2Client client, const std::string& client_id) {
+    client_ids_[client] = client_id;
+  }
+#endif
+
+  std::string GetClientSecret(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_secrets_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientSecret(OAuth2Client client, const std::string& client_secret) {
+    client_secrets_[client] = client_secret;
+  }
+#endif
+
+ private:
+  // Gets a value for a key.  In priority order, this will be the value
+  // provided via:
+  // 1. Command-line switch
+  // 2. Config file
+  // 3. Environment variable
+  // 4. Baked into the build
+  // |command_line_switch| may be NULL. Official Google Chrome builds will not
+  // use the value provided by an environment variable.
+  static std::string CalculateKeyValue(const char* baked_in_value,
+                                       const char* environment_variable_name,
+                                       const char* command_line_switch,
+                                       const std::string& default_if_unset,
+                                       base::Environment* environment,
+                                       base::CommandLine* command_line,
+                                       GaiaConfig* gaia_config) {
+    std::string key_value = baked_in_value;
+    std::string temp;
+#if BUILDFLAG(IS_APPLE)
+    // macOS and iOS can also override the API key with a value from the
+    // Info.plist.
+    temp = ::google_apis::GetAPIKeyFromInfoPlist(environment_variable_name);
+    if (!temp.empty()) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from Info.plist.";
+    }
+#endif
+
+#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
+    // Don't allow using the environment to override API keys for official
+    // Google Chrome builds. There have been reports of mangled environments
+    // affecting users (crbug.com/710575).
+    if (environment->GetVar(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from environment variable.";
+    }
+#endif
+
+    if (gaia_config &&
+        gaia_config->GetAPIKeyIfExists(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from gaia config.";
+    }
+
+    if (command_line_switch && command_line->HasSwitch(command_line_switch)) {
+      key_value = command_line->GetSwitchValueASCII(command_line_switch);
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from command-line switch.";
+    }
+
+    if (key_value == DUMMY_API_TOKEN) {
+// TODO(crbug.com/1294915): Rewrite this condition using
+// BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY).
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_FUCHSIA)
+      // No key should be unset in an official build except the
+      // GOOGLE_DEFAULT_* keys.  The default keys don't trigger this
+      // check as their "unset" value is not DUMMY_API_TOKEN.
+      CHECK(false);
+#endif
+      if (default_if_unset.size() > 0) {
+        VLOG(1) << "Using default value \"" << default_if_unset
+                << "\" for API key " << environment_variable_name;
+        key_value = default_if_unset;
+      }
+    }
+
+    // This should remain a debug-only log.
+    DVLOG(1) << "API key " << environment_variable_name << "=" << key_value;
+
+    return key_value;
+  }
+
+  std::string api_key_;
+  std::string api_key_non_stable_;
+  std::string api_key_remoting_;
+  std::string api_key_soda_;
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats_;
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing_;
+  std::string api_key_read_aloud_;
+  std::string api_key_fresnel_;
+#endif
+  std::string metrics_key_;
+  std::string client_ids_[CLIENT_NUM_ITEMS];
+  std::string client_secrets_[CLIENT_NUM_ITEMS];
+};
+
+static base::LazyInstance<APIKeyCache>::DestructorAtExit g_api_key_cache =
+    LAZY_INSTANCE_INITIALIZER;
+
+bool HasAPIKeyConfigured() {
+  return GetAPIKey() != DUMMY_API_TOKEN;
+}
+
+std::string GetAPIKey() {
+  return g_api_key_cache.Get().api_key();
+}
+
+std::string GetNonStableAPIKey() {
+  return g_api_key_cache.Get().api_key_non_stable();
+}
+
+std::string GetRemotingAPIKey() {
+  return g_api_key_cache.Get().api_key_remoting();
+}
+
+std::string GetSodaAPIKey() {
+  return g_api_key_cache.Get().api_key_soda();
+}
+
+#if !BUILDFLAG(IS_ANDROID)
+std::string GetHatsAPIKey() {
+  return g_api_key_cache.Get().api_key_hats();
+}
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+std::string GetSharingAPIKey() {
+  return g_api_key_cache.Get().api_key_sharing();
+}
+
+std::string GetReadAloudAPIKey() {
+  return g_api_key_cache.Get().api_key_read_aloud();
+}
+
+std::string GetFresnelAPIKey() {
+  return g_api_key_cache.Get().api_key_fresnel();
+}
+#endif
+
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+void SetAPIKey(const std::string& api_key) {
+  g_api_key_cache.Get().set_api_key(api_key);
+}
+#endif
+
+std::string GetMetricsKey() {
+  return g_api_key_cache.Get().metrics_key();
+}
+
+bool HasOAuthClientConfigured() {
+  for (size_t client_id = 0; client_id < CLIENT_NUM_ITEMS; ++client_id) {
+    OAuth2Client client = static_cast<OAuth2Client>(client_id);
+    if (GetOAuth2ClientID(client) == DUMMY_API_TOKEN ||
+        GetOAuth2ClientSecret(client) == DUMMY_API_TOKEN) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+std::string GetOAuth2ClientID(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientID(client);
+}
+
+std::string GetOAuth2ClientSecret(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientSecret(client);
+}
+
+#if BUILDFLAG(IS_IOS)
+void SetOAuth2ClientID(OAuth2Client client, const std::string& client_id) {
+  g_api_key_cache.Get().SetClientID(client, client_id);
+}
+
+void SetOAuth2ClientSecret(OAuth2Client client,
+                           const std::string& client_secret) {
+  g_api_key_cache.Get().SetClientSecret(client, client_secret);
+}
+#endif
+
+bool IsGoogleChromeAPIKeyUsed() {
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+  return true;
+#else
+  return false;
+#endif
+}
+
+}  // namespace google_apis
Index: chromium/create-119.0.6026.1-target-aarch64-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-target-aarch64-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-target-aarch64-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-target-aarch64.patch

Property changes on: chromium/create-119.0.6026.1-target-aarch64-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2932 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=@AARCH64_TARGET@" ]
+        ldflags += [ "--target=@AARCH64_TARGET@" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-119.0.6026.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2932 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-119.0.6026.1-target-arm-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-target-arm-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-target-arm-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-target-arm.patch

Property changes on: chromium/create-119.0.6026.1-target-arm-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-target-arm-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-arm-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-arm-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2932 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=@ARM_TARGET@" ]
+        ldflags += [ "--target=@ARM_TARGET@" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-119.0.6026.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2932 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-119.0.6026.1-target-x86_64-patch/create.patch.sh
===================================================================
--- chromium/create-119.0.6026.1-target-x86_64-patch/create.patch.sh	(nonexistent)
+++ chromium/create-119.0.6026.1-target-x86_64-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-119.0.6026.1-target-x86_64.patch

Property changes on: chromium/create-119.0.6026.1-target-x86_64-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-119.0.6026.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2933 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "--target=@X64_TARGET@",
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64", "--target=@X64_TARGET@" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-119.0.6026.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-119.0.6026.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-119.0.6026.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2932 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/rust.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if ((defined(use_cxx17) && use_cxx17) ||
+        (!is_clang && defined(msvc_use_cxx17) && msvc_use_cxx17)) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    # Limit the size of the ThinLTO cache to the lesser of 10% of
+    # available disk space, 40GB and 100000 files.
+    cache_policy = "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "/lldltocache:" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "/lldltocachepolicy:$cache_policy",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+      if (is_apple) {
+        ldflags += [
+          "-Wl,-cache_path_lto," +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+          "-Wcrl,object_path_lto",
+        ]
+      } else {
+        ldflags +=
+            [ "-Wl,--thinlto-cache-dir=" +
+              rebase_path("$root_out_dir/thinlto-cache", root_build_dir) ]
+      }
+
+      ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (!is_chromeos) {
+        # TODO(https://crbug.com/972449): turn on for ChromeOS when that
+        # toolchain has this flag.
+        # We only use one version of LLVM within a build so there's no need to
+        # upgrade debug info, which can be expensive since it runs the verifier.
+        ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+      }
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_ENABLE_SAFE_MODE=1" ]
+    }
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  # TODO(https://crbug.com/1383873): Remove this once figured out.
+  if (is_apple && current_cpu == "arm64") {
+    cflags += [ "-fno-global-isel" ]
+    ldflags += [ "-fno-global-isel" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+      ]
+
+      if (!is_nacl) {
+        cflags += [
+          # TODO(crbug.com/1343975) Evaluate and possibly enable.
+          "-Wno-deprecated-builtins",
+
+          # TODO(crbug.com/1352183) Evaluate and possibly enable.
+          "-Wno-bitfield-constant-conversion",
+
+          # TODO(crbug.com/1412713) Evaluate and possibly enable.
+          "-Wno-deprecated-this-capture",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS supports a high-quality _FORTIFY_SOURCE=3 implementation
+      # with a few custom glibc patches. Use that if it's available.
+      if (is_chromeos_ash) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-cross-compile-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-cross-compile-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-cross-compile-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-cross-compile.patch

Property changes on: chromium/create-123.0.6286.1-cross-compile-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-cross-compile-patch/src/build/toolchain/linux/unbundle/BUILD.gn	(revision 385)
@@ -0,0 +1,41 @@
+# Copyright 2017 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/toolchain/gcc_toolchain.gni")
+
+gcc_toolchain("default") {
+  cc = getenv("CC")
+  cxx = getenv("CXX")
+  ar = getenv("AR")
+  nm = getenv("NM")
+  ld = cxx
+
+  extra_cflags = getenv("CFLAGS")
+  extra_cppflags = getenv("CPPFLAGS")
+  extra_cxxflags = getenv("CXXFLAGS")
+  extra_ldflags = getenv("LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
+
+gcc_toolchain("host") {
+  cc = getenv("BUILD_CC")
+  cxx = getenv("BUILD_CXX")
+  ar = getenv("BUILD_AR")
+  nm = getenv("BUILD_NM")
+  ld = cxx
+
+  extra_cflags = getenv("BUILD_CFLAGS")
+  extra_cppflags = getenv("BUILD_CPPFLAGS")
+  extra_cxxflags = getenv("BUILD_CXXFLAGS")
+  extra_ldflags = getenv("BUILD_LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = host_cpu
+    current_os = host_os
+  }
+}
Index: chromium/create-123.0.6286.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-cross-compile-patch/src-orig/build/toolchain/linux/unbundle/BUILD.gn	(revision 385)
@@ -0,0 +1,41 @@
+# Copyright 2017 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/toolchain/gcc_toolchain.gni")
+
+gcc_toolchain("default") {
+  cc = getenv("CC")
+  cxx = getenv("CXX")
+  ar = getenv("AR")
+  nm = getenv("NM")
+  ld = cxx
+
+  extra_cflags = getenv("CFLAGS")
+  extra_cppflags = getenv("CPPFLAGS")
+  extra_cxxflags = getenv("CXXFLAGS")
+  extra_ldflags = getenv("LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
+
+gcc_toolchain("host") {
+  cc = getenv("BUILD_CC")
+  cxx = getenv("BUILD_CXX")
+  ar = getenv("BUILD_AR")
+  nm = getenv("BUILD_NM")
+  ld = cxx
+
+  extra_cflags = getenv("BUILD_CFLAGS")
+  extra_cppflags = getenv("BUILD_CPPFLAGS")
+  extra_cxxflags = getenv("BUILD_CXXFLAGS")
+  extra_ldflags = getenv("BUILD_LDFLAGS")
+
+  toolchain_args = {
+    current_cpu = current_cpu
+    current_os = current_os
+  }
+}
Index: chromium/create-123.0.6286.1-dangling-gsl-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-dangling-gsl-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-dangling-gsl-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-dangling-gsl.patch

Property changes on: chromium/create-123.0.6286.1-dangling-gsl-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc
===================================================================
--- chromium/create-123.0.6286.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc	(nonexistent)
+++ chromium/create-123.0.6286.1-dangling-gsl-patch/src/ui/accessibility/platform/ax_platform_node_auralinux.cc	(revision 385)
@@ -0,0 +1,5096 @@
+// Copyright 2017 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/platform/ax_platform_node_auralinux.h"
+#include "base/memory/raw_ptr.h"
+
+#include <dlfcn.h>
+#include <stdint.h>
+
+#include <algorithm>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/debug/leak_annotations.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
+#include "base/ranges/algorithm.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversion_utils.h"
+#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "ui/accessibility/ax_action_data.h"
+#include "ui/accessibility/ax_enum_util.h"
+#include "ui/accessibility/ax_enums.mojom.h"
+#include "ui/accessibility/ax_node_data.h"
+#include "ui/accessibility/ax_role_properties.h"
+#include "ui/accessibility/ax_selection.h"
+#include "ui/accessibility/platform/atk_util_auralinux.h"
+#include "ui/accessibility/platform/ax_platform.h"
+#include "ui/accessibility/platform/ax_platform_atk_hyperlink.h"
+#include "ui/accessibility/platform/ax_platform_node_delegate.h"
+#include "ui/accessibility/platform/ax_platform_text_boundary.h"
+#include "ui/accessibility/platform/child_iterator.h"
+#include "ui/gfx/geometry/rect_conversions.h"
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 10, 0)
+#define ATK_210
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 12, 0)
+#define ATK_212
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 16, 0)
+#define ATK_216
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 26, 0)
+#define ATK_226
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 30, 0)
+#define ATK_230
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 32, 0)
+#define ATK_232
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 34, 0)
+#define ATK_234
+#endif
+
+namespace ui {
+
+namespace {
+
+// IMPORTANT!
+// These values are written to logs.  Do not renumber or delete
+// existing items; add new entries to the end of the list.
+enum class UmaAtkApi {
+  kGetName = 0,
+  kGetDescription = 1,
+  kGetNChildren = 2,
+  kRefChild = 3,
+  kGetIndexInParent = 4,
+  kGetParent = 5,
+  kRefRelationSet = 6,
+  kGetAttributes = 7,
+  kGetRole = 8,
+  kRefStateSet = 9,
+  // This must always be the last enum. It's okay for its value to
+  // increase, but none of the other enum values may change.
+  kMaxValue = kRefStateSet,
+};
+
+void RecordAccessibilityAtkApi(UmaAtkApi enum_value) {
+  UMA_HISTOGRAM_ENUMERATION("Accessibility.ATK-APIs", enum_value);
+}
+
+// When accepting input from clients calling the API, an ATK character offset
+// of -1 can often represent the length of the string.
+static const int kStringLengthOffset = -1;
+
+// We must forward declare this because it is used by the traditional GObject
+// type manipulation macros.
+namespace atk_object {
+GType GetType();
+}  // namespace atk_object
+
+//
+// ax_platform_node_auralinux AtkObject definition and implementation.
+//
+#define AX_PLATFORM_NODE_AURALINUX_TYPE (atk_object::GetType())
+#define AX_PLATFORM_NODE_AURALINUX(obj)                               \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                              AXPlatformNodeAuraLinuxObject))
+#define AX_PLATFORM_NODE_AURALINUX_CLASS(klass)                      \
+  (G_TYPE_CHECK_CLASS_CAST((klass), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                           AXPlatformNodeAuraLinuxClass))
+#define IS_AX_PLATFORM_NODE_AURALINUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define IS_AX_PLATFORM_NODE_AURALINUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define AX_PLATFORM_NODE_AURALINUX_GET_CLASS(obj)                    \
+  (G_TYPE_INSTANCE_GET_CLASS((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                             AXPlatformNodeAuraLinuxClass))
+
+typedef struct _AXPlatformNodeAuraLinuxObject AXPlatformNodeAuraLinuxObject;
+typedef struct _AXPlatformNodeAuraLinuxClass AXPlatformNodeAuraLinuxClass;
+
+struct _AXPlatformNodeAuraLinuxObject {
+  AtkObject parent;
+  raw_ptr<AXPlatformNodeAuraLinux> m_object;
+};
+
+struct _AXPlatformNodeAuraLinuxClass {
+  AtkObjectClass parent_class;
+};
+
+// The root-level Application object that's the parent of all top-level windows.
+AXPlatformNode* g_root_application = nullptr;
+
+// The last AtkObject with keyboard focus. Tracking this is required to emit the
+// ATK_STATE_FOCUSED change to false.
+AtkObject* g_current_focused = nullptr;
+
+// The last object which was selected. Tracking this is required because
+// widgets in the browser UI only emit notifications upon becoming selected,
+// but clients also expect notifications when items become unselected.
+AXPlatformNodeAuraLinux* g_current_selected = nullptr;
+
+// The AtkObject with role=ATK_ROLE_FRAME that represents the toplevel desktop
+// window with focus. If this window is not one of our windows, this value
+// should be null. This is a weak pointer as well, so its value will also be
+// null if if the AtkObject is destroyed.
+AtkObject* g_active_top_level_frame = nullptr;
+
+AtkObject* g_active_views_dialog = nullptr;
+
+#if defined(ATK_216)
+constexpr AtkRole kStaticRole = ATK_ROLE_STATIC;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_SUBSCRIPT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_SUPERSCRIPT;
+#else
+constexpr AtkRole kStaticRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_TEXT;
+#endif
+
+#if defined(ATK_226)
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_FOOTNOTE;
+#else
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_LIST_ITEM;
+#endif
+
+#if defined(ATK_234)
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_CONTENT_DELETION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_CONTENT_INSERTION;
+#else
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_SECTION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_SECTION;
+#endif
+
+using GetTypeFunc = GType (*)();
+using GetColumnHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowColumnSpanFunc = bool (*)(AtkTableCell* cell,
+                                      gint* row,
+                                      gint* column,
+                                      gint* row_span,
+                                      gint* col_span);
+
+static GetTypeFunc g_atk_table_cell_get_type;
+static GetColumnHeaderCellsFunc g_atk_table_cell_get_column_header_cells;
+static GetRowHeaderCellsFunc g_atk_table_cell_get_row_header_cells;
+static GetRowColumnSpanFunc g_atk_table_cell_get_row_column_span;
+
+// The ATK API often requires pointers to be used as out arguments, while
+// allowing for those pointers to be null if the caller is not interested in
+// the value. This function is a simpler helper to avoid continually checking
+// for null and to help prevent forgetting to check for null.
+void SetIntPointerValueIfNotNull(int* pointer, int value) {
+  if (pointer)
+    *pointer = value;
+}
+
+#if defined(ATK_230)
+bool SupportsAtkComponentScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_component_scroll_to_point");
+}
+#endif
+
+#if defined(ATK_232)
+bool SupportsAtkTextScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_text_scroll_substring_to_point");
+}
+#endif
+
+AtkObject* FindAtkObjectParentFrame(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_FRAME)
+      return node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return nullptr;
+}
+
+AtkObject* FindAtkObjectToplevelParentDocument(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  AtkObject* toplevel_document = nullptr;
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+      toplevel_document = node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return toplevel_document;
+}
+
+bool IsFrameAncestorOfAtkObject(AtkObject* frame, AtkObject* atk_object) {
+  AtkObject* current_frame = FindAtkObjectParentFrame(atk_object);
+  while (current_frame) {
+    if (current_frame == frame)
+      return true;
+    AXPlatformNodeAuraLinux* frame_node =
+        AXPlatformNodeAuraLinux::FromAtkObject(current_frame);
+    current_frame = FindAtkObjectParentFrame(frame_node->GetParent());
+  }
+  return false;
+}
+
+// Returns a stack of AtkObjects of activated popup menus. Since each popup
+// menu and submenu has its own native window, we want to properly manage the
+// activated state for their containing frames.
+std::vector<AtkObject*>& GetActiveMenus() {
+  static base::NoDestructor<std::vector<AtkObject*>> active_menus;
+  return *active_menus;
+}
+
+std::map<AtkObject*, FindInPageResultInfo>& GetActiveFindInPageResults() {
+  static base::NoDestructor<std::map<AtkObject*, FindInPageResultInfo>>
+      active_results;
+  return *active_results;
+}
+
+// The currently active frame is g_active_top_level_frame, unless there is an
+// active menu. If there is an active menu the parent frame of the
+// most-recently opened active menu should be the currently active frame.
+AtkObject* ComputeActiveTopLevelFrame() {
+  if (!GetActiveMenus().empty())
+    return FindAtkObjectParentFrame(GetActiveMenus().back());
+  return g_active_top_level_frame;
+}
+
+const char* GetUniqueAccessibilityGTypeName(
+    ImplementedAtkInterfaces interface_mask) {
+  // 37 characters is enough for "AXPlatformNodeAuraLinux%x" with any integer
+  // value.
+  static char name[37];
+  snprintf(name, sizeof(name), "AXPlatformNodeAuraLinux%x",
+           interface_mask.value());
+  return name;
+}
+
+void SetWeakGPtrToAtkObject(AtkObject** weak_pointer, AtkObject* new_value) {
+  DCHECK(weak_pointer);
+  if (*weak_pointer == new_value)
+    return;
+
+  if (*weak_pointer) {
+    g_object_remove_weak_pointer(G_OBJECT(*weak_pointer),
+                                 reinterpret_cast<void**>(weak_pointer));
+  }
+
+  *weak_pointer = new_value;
+
+  if (new_value) {
+    g_object_add_weak_pointer(G_OBJECT(new_value),
+                              reinterpret_cast<void**>(weak_pointer));
+  }
+}
+
+void SetActiveTopLevelFrame(AtkObject* new_top_level_frame) {
+  SetWeakGPtrToAtkObject(&g_active_top_level_frame, new_top_level_frame);
+}
+
+AXCoordinateSystem AtkCoordTypeToAXCoordinateSystem(
+    AtkCoordType coordinate_type) {
+  switch (coordinate_type) {
+    case ATK_XY_SCREEN:
+      return AXCoordinateSystem::kScreenDIPs;
+    case ATK_XY_WINDOW:
+      return AXCoordinateSystem::kRootFrame;
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      // AXCoordinateSystem does not support parent coordinates.
+      NOTIMPLEMENTED();
+      return AXCoordinateSystem::kFrame;
+#endif
+    default:
+      return AXCoordinateSystem::kScreenDIPs;
+  }
+}
+
+const char* BuildDescriptionFromHeaders(AXPlatformNodeDelegate* delegate,
+                                        const std::vector<int32_t>& ids) {
+  std::vector<std::string> names;
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = delegate->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        if (const gchar* name = atk_object_get_name(atk_header))
+          names.push_back(name);
+      }
+    }
+  }
+
+  std::string result = base::JoinString(names, " ");
+
+#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)
+  // http://crbug.com/982839
+  // atk_table_get_column_description and atk_table_get_row_description return
+  // const gchar*, which suggests the caller does not gain ownership of the
+  // returned string. The g_strdup below causes a new allocation, which does not
+  // fit that pattern and causes a leak in tests.
+  ScopedLeakSanitizerDisabler lsan_disabler;
+#endif
+
+  return g_strdup(result.c_str());
+}
+
+AtkAttributeSet* PrependAtkAttributeToAtkAttributeSet(
+    const char* name,
+    const char* value,
+    AtkAttributeSet* attribute_set) {
+  AtkAttribute* attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  attribute->name = g_strdup(name);
+  attribute->value = g_strdup(value);
+  return g_slist_prepend(attribute_set, attribute);
+}
+
+void PrependTextAttributeToSet(const std::string& attribute,
+                               const std::string& value,
+                               AtkAttributeSet** attributes) {
+  DCHECK(attributes);
+
+  AtkAttribute* new_attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  new_attribute->name = g_strdup(attribute.c_str());
+  new_attribute->value = g_strdup(value.c_str());
+  *attributes = g_slist_prepend(*attributes, new_attribute);
+}
+
+void PrependAtkTextAttributeToSet(const AtkTextAttribute attribute,
+                                  const std::string& value,
+                                  AtkAttributeSet** attributes) {
+  PrependTextAttributeToSet(atk_text_attribute_get_name(attribute), value,
+                            attributes);
+}
+
+std::string ToAtkTextAttributeColor(const std::string color) {
+  // The platform-independent color string is in the form "rgb(r, g, b)",
+  // but ATK expects a string like "r, g, b". We convert the string here
+  // by stripping away the unnecessary characters.
+  DCHECK(base::StartsWith(color, "rgb(", base::CompareCase::INSENSITIVE_ASCII));
+  DCHECK(base::EndsWith(color, ")", base::CompareCase::INSENSITIVE_ASCII));
+  return color.substr(4, color.length() - 5);
+}
+
+AtkAttributeSet* ToAtkAttributeSet(const TextAttributeList& attributes) {
+  AtkAttributeSet* copied_attributes = nullptr;
+  for (const auto& attribute : attributes) {
+    if (attribute.first == "background-color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_BG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "font-family") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FAMILY_NAME, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-size") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_SIZE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-weight" && attribute.second == "bold") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_WEIGHT, "700",
+                                   &copied_attributes);
+    } else if (attribute.first == "font-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STYLE, "italic",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-line-through-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STRIKETHROUGH, "true",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-underline-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "single",
+                                   &copied_attributes);
+    } else if (attribute.first == "invalid") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_INVALID, attribute.second,
+                                   &copied_attributes);
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "error",
+                                   &copied_attributes);
+    } else if (attribute.first == "language") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_LANGUAGE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "writing-mode") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_DIRECTION, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "text-position") {
+      PrependTextAttributeToSet(attribute.first, attribute.second,
+                                &copied_attributes);
+    }
+  }
+
+  return g_slist_reverse(copied_attributes);
+}
+
+namespace atk_component {
+
+void GetExtents(AtkComponent* atk_component,
+                gint* x,
+                gint* y,
+                gint* width,
+                gint* height,
+                AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetExtents(x, y, width, height, coord_type);
+}
+
+void GetPosition(AtkComponent* atk_component,
+                 gint* x,
+                 gint* y,
+                 AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+void GetSize(AtkComponent* atk_component, gint* width, gint* height) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+AtkObject* RefAccesibleAtPoint(AtkComponent* atk_component,
+                               gint x,
+                               gint y,
+                               AtkCoordType coord_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), nullptr);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  AtkObject* result = obj->HitTestSync(x, y, coord_type);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+gboolean GrabFocus(AtkComponent* atk_component) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  return obj->GrabFocus();
+}
+
+#if defined(ATK_230)
+gboolean ScrollTo(AtkComponent* atk_component, AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollNodeIntoView(scroll_type);
+  return TRUE;
+}
+
+gboolean ScrollToPoint(AtkComponent* atk_component,
+                       AtkCoordType atk_coord_type,
+                       gint x,
+                       gint y) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollToPoint(atk_coord_type, x, y);
+  return TRUE;
+}
+#endif
+
+void Init(AtkComponentIface* iface) {
+  iface->get_extents = GetExtents;
+  iface->get_position = GetPosition;
+  iface->get_size = GetSize;
+  iface->ref_accessible_at_point = RefAccesibleAtPoint;
+  iface->grab_focus = GrabFocus;
+#if defined(ATK_230)
+  if (SupportsAtkComponentScrollingInterface()) {
+    iface->scroll_to = ScrollTo;
+    iface->scroll_to_point = ScrollToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_component
+
+namespace atk_action {
+
+gboolean DoAction(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), FALSE);
+  g_return_val_if_fail(index >= 0, FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), FALSE);
+
+  AXActionData data;
+  data.action = actions[index];
+  return obj->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gint GetNActions(AtkAction* atk_action) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return static_cast<gint>(obj->GetDelegate()->GetSupportedActions().size());
+}
+
+const gchar* GetDescription(AtkAction*, gint) {
+  // Not implemented. Right now Orca does not provide this and
+  // Chromium is not providing a string for the action description.
+  return nullptr;
+}
+
+const gchar* GetName(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0.
+    return obj->GetDefaultActionName();
+  }
+  return ToString(actions[index]);
+}
+
+const gchar* GetKeybinding(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0. Only the
+    // default action has a key binding.
+    return obj->GetStringAttribute(ax::mojom::StringAttribute::kAccessKey)
+        .c_str();
+  }
+  return nullptr;
+}
+
+void Init(AtkActionIface* iface) {
+  iface->do_action = DoAction;
+  iface->get_n_actions = GetNActions;
+  iface->get_description = GetDescription;
+  iface->get_name = GetName;
+  iface->get_keybinding = GetKeybinding;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_action
+
+namespace atk_document {
+
+const gchar* GetDocumentAttributeValue(AtkDocument* atk_doc,
+                                       const gchar* attribute) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributeValue(attribute);
+}
+
+AtkAttributeSet* GetDocumentAttributes(AtkDocument* atk_doc) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributes();
+}
+
+void Init(AtkDocumentIface* iface) {
+  iface->get_document_attribute_value = GetDocumentAttributeValue;
+  iface->get_document_attributes = GetDocumentAttributes;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_document
+
+namespace atk_image {
+
+void GetImagePosition(AtkImage* atk_img,
+                      gint* x,
+                      gint* y,
+                      AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+const gchar* GetImageDescription(AtkImage* atk_img) {
+  g_return_val_if_fail(ATK_IMAGE(atk_img), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+void GetImageSize(AtkImage* atk_img, gint* width, gint* height) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+void Init(AtkImageIface* iface) {
+  iface->get_image_position = GetImagePosition;
+  iface->get_image_description = GetImageDescription;
+  iface->get_image_size = GetImageSize;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_image
+
+namespace atk_value {
+
+void GetCurrentValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kValueForRange,
+                                 value);
+}
+
+void GetMinimumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMinValueForRange,
+                                 value);
+}
+
+void GetMaximumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMaxValueForRange,
+                                 value);
+}
+
+void GetMinimumIncrement(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kStepValueForRange,
+                                 value);
+}
+
+gboolean SetCurrentValue(AtkValue* atk_value, const GValue* value) {
+  g_return_val_if_fail(ATK_IS_VALUE(atk_value), FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  std::string new_value;
+  switch (G_VALUE_TYPE(value)) {
+    case G_TYPE_FLOAT:
+      new_value = base::NumberToString(g_value_get_float(value));
+      break;
+    case G_TYPE_INT:
+      new_value = base::NumberToString(g_value_get_int(value));
+      break;
+    case G_TYPE_INT64:
+      new_value = base::NumberToString(g_value_get_int64(value));
+      break;
+    case G_TYPE_STRING:
+      new_value = g_value_get_string(value);
+      break;
+    default:
+      return FALSE;
+  }
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kSetValue;
+  data.value = new_value;
+  obj->GetDelegate()->AccessibilityPerformAction(data);
+  return TRUE;
+}
+
+void Init(AtkValueIface* iface) {
+  iface->get_current_value = GetCurrentValue;
+  iface->get_maximum_value = GetMaximumValue;
+  iface->get_minimum_value = GetMinimumValue;
+  iface->get_minimum_increment = GetMinimumIncrement;
+  iface->set_current_value = SetCurrentValue;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_value
+
+namespace atk_hyperlink {
+
+AtkHyperlink* GetHyperlink(AtkHyperlinkImpl* atk_hyperlink_impl) {
+  g_return_val_if_fail(ATK_HYPERLINK_IMPL(atk_hyperlink_impl), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_hyperlink_impl);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  AtkHyperlink* atk_hyperlink = obj->GetAtkHyperlink();
+  g_object_ref(atk_hyperlink);
+
+  return atk_hyperlink;
+}
+
+void Init(AtkHyperlinkImplIface* iface) {
+  iface->get_hyperlink = GetHyperlink;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hyperlink
+
+namespace atk_hypertext {
+
+AtkHyperlink* GetLink(AtkHypertext* hypertext, int index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return nullptr;
+
+  const AXLegacyHypertext& ax_hypertext = obj->GetAXHypertext();
+  if (index >= static_cast<int>(ax_hypertext.hyperlinks.size()) || index < 0)
+    return nullptr;
+
+  int32_t id = ax_hypertext.hyperlinks[index];
+  auto* link = static_cast<AXPlatformNodeAuraLinux*>(
+      AXPlatformNodeBase::GetFromUniqueId(id));
+  if (!link)
+    return nullptr;
+
+  return link->GetAtkHyperlink();
+}
+
+int GetNLinks(AtkHypertext* hypertext) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  return obj ? obj->GetAXHypertext().hyperlinks.size() : 0;
+}
+
+int GetLinkIndex(AtkHypertext* hypertext, int char_index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return -1;
+
+  auto it = obj->GetAXHypertext().hyperlink_offset_to_index.find(char_index);
+  if (it == obj->GetAXHypertext().hyperlink_offset_to_index.end())
+    return -1;
+  return it->second;
+}
+
+void Init(AtkHypertextIface* iface) {
+  iface->get_link = GetLink;
+  iface->get_n_links = GetNLinks;
+  iface->get_link_index = GetLinkIndex;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hypertext
+
+namespace atk_text {
+
+gchar* GetText(AtkText* atk_text, gint start_offset, gint end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  std::u16string text = obj->GetHypertext();
+
+  start_offset = obj->UnicodeToUTF16OffsetInText(start_offset);
+  if (start_offset < 0 || start_offset >= static_cast<int>(text.size()))
+    return nullptr;
+
+  if (end_offset < 0) {
+    end_offset = text.size();
+  } else {
+    end_offset = obj->UnicodeToUTF16OffsetInText(end_offset);
+    end_offset =
+        std::clamp(static_cast<int>(text.size()), start_offset, end_offset);
+  }
+
+  DCHECK_GE(start_offset, 0);
+  DCHECK_GE(end_offset, start_offset);
+
+  const auto ret_substr = base::UTF16ToUTF8(text.substr(start_offset, end_offset - start_offset));
+  return g_strdup(ret_substr.c_str());
+}
+
+gint GetCharacterCount(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->UTF16ToUnicodeOffsetInText(obj->GetHypertext().length());
+}
+
+gunichar GetCharacterAtOffset(AtkText* atk_text, int offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  std::u16string text = obj->GetHypertext();
+  size_t text_length = text.length();
+
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+  offset = std::max(offset, 0);
+  size_t limited_offset = std::min(static_cast<size_t>(offset), text_length);
+
+  base_icu::UChar32 code_point;
+  base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &limited_offset,
+                             &code_point);
+  return code_point;
+}
+
+gint GetOffsetAtPoint(AtkText* text, gint x, gint y, AtkCoordType coords) {
+  g_return_val_if_fail(ATK_IS_TEXT(text), -1);
+
+  AtkObject* atk_object = ATK_OBJECT(text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  return obj->GetTextOffsetAtPoint(x, y, coords);
+}
+
+// This function returns a single character as a UTF-8 encoded C string because
+// the character may be encoded into more than one byte.
+char* GetCharacter(AtkText* atk_text,
+                   int offset,
+                   int* start_offset,
+                   int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= GetCharacterCount(atk_text))
+    return nullptr;
+
+  char* text = GetText(atk_text, offset, offset + 1);
+  if (!text)
+    return nullptr;
+
+  *start_offset = offset;
+  *end_offset = offset + 1;
+  return text;
+}
+
+char* GetTextWithBoundaryType(AtkText* atk_text,
+                              int offset,
+                              ax::mojom::TextBoundary boundary,
+                              int* start_offset_ptr,
+                              int* end_offset_ptr) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= atk_text_get_character_count(atk_text))
+    return nullptr;
+
+  // The offset that we receive from the API is a Unicode character offset.
+  // Since we calculate boundaries in terms of UTF-16 code point offsets, we
+  // need to convert this input value.
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+
+  int start_offset = obj->FindTextBoundary(
+      boundary, offset, ax::mojom::MoveDirection::kBackward,
+      ax::mojom::TextAffinity::kDownstream);
+  int end_offset = obj->FindTextBoundary(boundary, offset,
+                                         ax::mojom::MoveDirection::kForward,
+                                         ax::mojom::TextAffinity::kDownstream);
+  if (start_offset < 0 || end_offset < 0)
+    return nullptr;
+
+  DCHECK_LE(start_offset, end_offset)
+      << "Start offset should be less than or equal the end offset.";
+
+  // The ATK API is also expecting Unicode character offsets as output
+  // values.
+  *start_offset_ptr = obj->UTF16ToUnicodeOffsetInText(start_offset);
+  *end_offset_ptr = obj->UTF16ToUnicodeOffsetInText(end_offset);
+
+  std::u16string text = obj->GetHypertext();
+  DCHECK_LE(end_offset, static_cast<int>(text.size()));
+
+  std::u16string substr = text.substr(start_offset, end_offset - start_offset);
+  const auto ret_substr = base::UTF16ToUTF8(substr);
+  return g_strdup(ret_substr.c_str());
+}
+
+char* GetTextAtOffset(AtkText* atk_text,
+                      int offset,
+                      AtkTextBoundary atk_boundary,
+                      int* start_offset,
+                      int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+  ax::mojom::TextBoundary boundary = FromAtkTextBoundary(atk_boundary);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+
+char* GetTextAfterOffset(AtkText* atk_text,
+                         int offset,
+                         AtkTextBoundary boundary,
+                         int* start_offset,
+                         int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset + 1, start_offset, end_offset);
+}
+
+char* GetTextBeforeOffset(AtkText* atk_text,
+                          int offset,
+                          AtkTextBoundary boundary,
+                          int* start_offset,
+                          int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset - 1, start_offset, end_offset);
+}
+
+gint GetCaretOffset(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return -1;
+  return obj->GetCaretOffset();
+}
+
+gboolean SetCaretOffset(AtkText* atk_text, gint offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+  if (!obj->SetCaretOffset(offset))
+    return FALSE;
+
+  // Orca expects atk_text_set_caret_offset to either focus the target element
+  // or set the sequential focus navigation starting point there.
+  int utf16_offset = obj->UnicodeToUTF16OffsetInText(offset);
+  obj->GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(
+      utf16_offset);
+
+  return TRUE;
+}
+
+int GetNSelections(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return 0;
+
+  if (obj->HasSelection())
+    return 1;
+
+  absl::optional<FindInPageResultInfo> result =
+      obj->GetSelectionOffsetsFromFindInPage();
+  if (result.has_value() && result->node == ATK_OBJECT(atk_text))
+    return 1;
+
+  return 0;
+}
+
+gchar* GetSelection(AtkText* atk_text,
+                    int selection_num,
+                    int* start_offset,
+                    int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return nullptr;
+  if (selection_num != 0)
+    return nullptr;
+
+  return obj->GetSelectionWithText(start_offset, end_offset);
+}
+
+gboolean RemoveSelection(AtkText* atk_text, int selection_num) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  // Simply collapse the selection to the position of the caret if a caret is
+  // visible, otherwise set the selection to 0.
+  int selection_end = obj->UTF16ToUnicodeOffsetInText(
+      obj->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd));
+  return SetCaretOffset(atk_text, selection_end);
+}
+
+gboolean SetSelection(AtkText* atk_text,
+                      int selection_num,
+                      int start_offset,
+                      int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->SetTextSelectionForAtkText(start_offset, end_offset);
+}
+
+gboolean AddSelection(AtkText* atk_text, int start_offset, int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  // We only support one selection.
+  return SetSelection(atk_text, 0, start_offset, end_offset);
+}
+
+#if defined(ATK_210)
+char* GetStringAtOffset(AtkText* atk_text,
+                        int offset,
+                        AtkTextGranularity atk_granularity,
+                        int* start_offset,
+                        int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  ax::mojom::TextBoundary boundary = FromAtkTextGranularity(atk_granularity);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+#endif
+
+#if defined(ATK_230)
+gfx::Rect GetUnclippedParentHypertextRangeBoundsRect(
+    AXPlatformNodeDelegate* ax_platform_node_delegate,
+    const int start_offset,
+    const int end_offset) {
+  const AXPlatformNode* parent_platform_node =
+      AXPlatformNode::FromNativeViewAccessible(
+          ax_platform_node_delegate->GetParent());
+  if (!parent_platform_node)
+    return gfx::Rect();
+
+  const AXPlatformNodeDelegate* parent_ax_platform_node_delegate =
+      parent_platform_node->GetDelegate();
+  if (!parent_ax_platform_node_delegate)
+    return gfx::Rect();
+
+  return ax_platform_node_delegate->GetHypertextRangeBoundsRect(
+             start_offset, end_offset, AXCoordinateSystem::kRootFrame,
+             AXClippingBehavior::kUnclipped) -
+         parent_ax_platform_node_delegate
+             ->GetBoundsRect(AXCoordinateSystem::kRootFrame,
+                             AXClippingBehavior::kClipped)
+             .OffsetFromOrigin();
+}
+#endif
+
+void GetCharacterExtents(AtkText* atk_text,
+                         int offset,
+                         int* x,
+                         int* y,
+                         int* width,
+                         int* height,
+                         AtkCoordType coordinate_type) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(obj->GetDelegate(),
+                                                          offset, offset + 1);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(offset),
+            obj->UnicodeToUTF16OffsetInText(offset + 1),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  if (x)
+    *x = rect.x();
+  if (y)
+    *y = rect.y();
+  if (width)
+    *width = rect.width();
+  if (height)
+    *height = rect.height();
+}
+
+void GetRangeExtents(AtkText* atk_text,
+                     int start_offset,
+                     int end_offset,
+                     AtkCoordType coordinate_type,
+                     AtkTextRectangle* out_rectangle) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  if (!out_rectangle)
+    return;
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(
+            obj->GetDelegate(), start_offset, end_offset);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(start_offset),
+            obj->UnicodeToUTF16OffsetInText(end_offset),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  out_rectangle->x = rect.x();
+  out_rectangle->y = rect.y();
+  out_rectangle->width = rect.width();
+  out_rectangle->height = rect.height();
+}
+
+AtkAttributeSet* GetRunAttributes(AtkText* atk_text,
+                                  gint offset,
+                                  gint* start_offset,
+                                  gint* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  SetIntPointerValueIfNotNull(start_offset, -1);
+  SetIntPointerValueIfNotNull(end_offset, -1);
+
+  if (offset < 0 || offset > GetCharacterCount(atk_text))
+    return nullptr;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return ToAtkAttributeSet(
+      obj->GetTextAttributes(offset, start_offset, end_offset));
+}
+
+AtkAttributeSet* GetDefaultAttributes(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+  return ToAtkAttributeSet(obj->GetDefaultTextAttributes());
+}
+
+#if defined(ATK_232)
+gboolean ScrollSubstringTo(AtkText* atk_text,
+                           gint start_offset,
+                           gint end_offset,
+                           AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringIntoView(scroll_type, start_offset, end_offset);
+}
+
+gboolean ScrollSubstringToPoint(AtkText* atk_text,
+                                gint start_offset,
+                                gint end_offset,
+                                AtkCoordType atk_coord_type,
+                                gint x,
+                                gint y) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringToPoint(start_offset, end_offset, atk_coord_type,
+                                     x, y);
+}
+#endif  // ATK_232
+
+void Init(AtkTextIface* iface) {
+  iface->get_text = GetText;
+  iface->get_character_count = GetCharacterCount;
+  iface->get_character_at_offset = GetCharacterAtOffset;
+  iface->get_offset_at_point = GetOffsetAtPoint;
+  iface->get_text_after_offset = GetTextAfterOffset;
+  iface->get_text_before_offset = GetTextBeforeOffset;
+  iface->get_text_at_offset = GetTextAtOffset;
+  iface->get_caret_offset = GetCaretOffset;
+  iface->set_caret_offset = SetCaretOffset;
+  iface->get_character_extents = GetCharacterExtents;
+  iface->get_range_extents = GetRangeExtents;
+  iface->get_n_selections = GetNSelections;
+  iface->get_selection = GetSelection;
+  iface->add_selection = AddSelection;
+  iface->remove_selection = RemoveSelection;
+  iface->set_selection = SetSelection;
+
+  iface->get_run_attributes = GetRunAttributes;
+  iface->get_default_attributes = GetDefaultAttributes;
+
+#if defined(ATK_210)
+  iface->get_string_at_offset = GetStringAtOffset;
+#endif
+
+#if defined(ATK_232)
+  if (SupportsAtkTextScrollingInterface()) {
+    iface->scroll_substring_to = ScrollSubstringTo;
+    iface->scroll_substring_to_point = ScrollSubstringToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_text
+
+namespace atk_window {
+void Init(AtkWindowIface* iface) {}
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+}  // namespace atk_window
+
+namespace atk_selection {
+
+gboolean AddSelection(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  if (!child)
+    return FALSE;
+
+  if (!child->SupportsSelectionWithAtkSelection())
+    return FALSE;
+
+  bool selected = child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+  if (selected)
+    return TRUE;
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kDoDefault;
+  return child->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gboolean ClearSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (!selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+AtkObject* RefSelection(AtkSelection* selection, gint requested_child_index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return nullptr;
+
+  if (auto* selected_child = obj->GetSelectedItem(requested_child_index)) {
+    if (AtkObject* atk_object = selected_child->GetNativeViewAccessible()) {
+      g_object_ref(atk_object);
+      return atk_object;
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetSelectionCount(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return 0;
+
+  return obj->GetSelectionCount();
+}
+
+gboolean IsChildSelected(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  return child && child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+}
+
+gboolean RemoveSelection(AtkSelection* selection,
+                         gint index_into_selected_children) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected && index_into_selected_children == 0) {
+      if (!child->SupportsSelectionWithAtkSelection())
+        return FALSE;
+
+      AXActionData data;
+      data.action = ax::mojom::Action::kDoDefault;
+      return child->GetDelegate()->AccessibilityPerformAction(data);
+    } else if (selected) {
+      index_into_selected_children--;
+    }
+  }
+
+  return FALSE;
+}
+
+gboolean SelectAllSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+void Init(AtkSelectionIface* iface) {
+  iface->add_selection = AddSelection;
+  iface->clear_selection = ClearSelection;
+  iface->ref_selection = RefSelection;
+  iface->get_selection_count = GetSelectionCount;
+  iface->is_child_selected = IsChildSelected;
+  iface->remove_selection = RemoveSelection;
+  iface->select_all_selection = SelectAllSelection;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_selection
+
+namespace atk_table {
+
+AtkObject* RefAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      if (AtkObject* atk_cell = cell->GetNativeViewAccessible()) {
+        g_object_ref(atk_cell);
+        return atk_cell;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetIndexAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableCellIndex().has_value());
+      return cell->GetTableCellIndex().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetColumnAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableColumn().has_value());
+      return cell->GetTableColumn().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetRowAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableRow().has_value());
+      return cell->GetTableRow().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetNColumns(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableColumnCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetNRows(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableRowCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetColumnExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableColumnSpan().has_value());
+      return cell->GetTableColumnSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+gint GetRowExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableRowSpan().has_value());
+      return cell->GetTableRowSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+AtkObject* GetColumnHeader(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one column header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the column
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetRowHeader(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one row header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the row
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetCaption(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (auto* caption = obj->GetTableCaption())
+      return caption->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+const gchar* GetColumnDescription(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+const gchar* GetRowDescription(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+void Init(AtkTableIface* iface) {
+  iface->ref_at = RefAt;
+  iface->get_index_at = GetIndexAt;
+  iface->get_column_at_index = GetColumnAtIndex;
+  iface->get_row_at_index = GetRowAtIndex;
+  iface->get_n_columns = GetNColumns;
+  iface->get_n_rows = GetNRows;
+  iface->get_column_extent_at = GetColumnExtentAt;
+  iface->get_row_extent_at = GetRowExtentAt;
+  iface->get_column_header = GetColumnHeader;
+  iface->get_row_header = GetRowHeader;
+  iface->get_caption = GetCaption;
+  iface->get_column_description = GetColumnDescription;
+  iface->get_row_description = GetRowDescription;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table
+
+// The ATK table cell interface was added in ATK 2.12.
+#if defined(ATK_212)
+
+namespace atk_table_cell {
+
+gint GetColumnSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (const AXPlatformNodeBase* obj =
+          AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableColumnSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetColumnHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetColHeaderNodeIds() on a column header cell will include that
+  // column header, along with any other column headers in the column which
+  // may or may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> col_index = obj->GetTableColumn();
+  if (!col_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetColHeaderNodeIds(*col_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+gboolean GetCellPosition(AtkTableCell* cell, gint* row, gint* column) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      FALSE);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    absl::optional<int> row_index = obj->GetTableRow();
+    absl::optional<int> col_index = obj->GetTableColumn();
+    if (!row_index || !col_index)
+      return false;
+
+    *row = *row_index;
+    *column = *col_index;
+    return true;
+  }
+
+  return false;
+}
+
+gint GetRowSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableRowSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetRowHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetRowHeaderNodeIds() on a row header cell will include that
+  // row header, along with any other row headers in the row which may or
+  // may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> row_index = obj->GetTableRow();
+  if (!row_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetRowHeaderNodeIds(*row_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+AtkObject* GetTable(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    if (auto* table = obj->GetTable())
+      return table->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+using AtkTableCellIface = struct _AtkTableCellIface;
+
+void Init(AtkTableCellIface* iface) {
+  iface->get_column_span = GetColumnSpan;
+  iface->get_column_header_cells = GetColumnHeaderCells;
+  iface->get_position = GetCellPosition;
+  iface->get_row_span = GetRowSpan;
+  iface->get_row_header_cells = GetRowHeaderCells;
+  iface->get_table = GetTable;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table_cell
+
+#endif  // ATK_212
+
+namespace atk_object {
+
+gpointer kAXPlatformNodeAuraLinuxParentClass = nullptr;
+
+const gchar* GetName(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (!obj->IsNameExposed())
+    return nullptr;
+
+  ax::mojom::NameFrom name_from = obj->GetNameFrom();
+  if (obj->GetName().empty() &&
+      name_from != ax::mojom::NameFrom::kAttributeExplicitlyEmpty) {
+    return nullptr;
+  }
+
+  obj->accessible_name_ = obj->GetName();
+  return obj->accessible_name_.c_str();
+}
+
+const gchar* AtkGetName(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetName);
+  return GetName(atk_object);
+}
+
+const gchar* GetDescription(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+const gchar* AtkGetDescription(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetDescription);
+  return GetDescription(atk_object);
+}
+
+gint GetNChildren(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->GetChildCount();
+}
+
+gint AtkGetNChildren(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetNChildren);
+  return GetNChildren(atk_object);
+}
+
+AtkObject* RefChild(AtkObject* atk_object, gint index) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return nullptr;
+
+  AtkObject* result = obj->ChildAtIndex(index);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+AtkObject* AtkRefChild(AtkObject* atk_object, gint index) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefChild);
+  return RefChild(atk_object, index);
+}
+
+gint GetIndexInParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  auto index_in_parent = obj->GetIndexInParent();
+  return index_in_parent.has_value()
+             ? static_cast<gint>(index_in_parent.value())
+             : -1;
+}
+
+gint AtkGetIndexInParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetIndexInParent);
+  return GetIndexInParent(atk_object);
+}
+
+AtkObject* GetParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetParent();
+}
+
+AtkObject* AtkGetParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetParent);
+  return GetParent(atk_object);
+}
+
+AtkRelationSet* RefRelationSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return atk_relation_set_new();
+  return obj->GetAtkRelations();
+}
+
+AtkRelationSet* AtkRefRelationSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefRelationSet);
+  // Enables AX mode. Most AT does not call AtkRefRelationSet, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return RefRelationSet(atk_object);
+}
+
+AtkAttributeSet* GetAttributes(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetAtkAttributes();
+}
+
+AtkAttributeSet* AtkGetAttributes(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetAttributes);
+  // Enables AX mode. Most AT does not call AtkGetAttributes, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return GetAttributes(atk_object);
+}
+
+AtkRole GetRole(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), ATK_ROLE_INVALID);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return ATK_ROLE_INVALID;
+  return obj->GetAtkRole();
+}
+
+AtkRole AtkGetRole(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetRole);
+  return GetRole(atk_object);
+}
+
+AtkStateSet* RefStateSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AtkStateSet* atk_state_set =
+      ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+          ->ref_state_set(atk_object);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFUNCT);
+  } else {
+    obj->GetAtkState(atk_state_set);
+  }
+  return atk_state_set;
+}
+
+AtkStateSet* AtkRefStateSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefStateSet);
+  return RefStateSet(atk_object);
+}
+
+void Initialize(AtkObject* atk_object, gpointer data) {
+  if (ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->initialize) {
+    ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+        ->initialize(atk_object, data);
+  }
+
+  AX_PLATFORM_NODE_AURALINUX(atk_object)->m_object =
+      reinterpret_cast<AXPlatformNodeAuraLinux*>(data);
+}
+
+void Finalize(GObject* atk_object) {
+  G_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->finalize(atk_object);
+}
+
+void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
+  GObjectClass* gobject_class = G_OBJECT_CLASS(class_pointer);
+  kAXPlatformNodeAuraLinuxParentClass = g_type_class_peek_parent(gobject_class);
+  gobject_class->finalize = Finalize;
+
+  AtkObjectClass* atk_object_class = ATK_OBJECT_CLASS(gobject_class);
+  atk_object_class->initialize = Initialize;
+  atk_object_class->get_name = AtkGetName;
+  atk_object_class->get_description = AtkGetDescription;
+  atk_object_class->get_parent = AtkGetParent;
+  atk_object_class->get_n_children = AtkGetNChildren;
+  atk_object_class->ref_child = AtkRefChild;
+  atk_object_class->get_role = AtkGetRole;
+  atk_object_class->ref_state_set = AtkRefStateSet;
+  atk_object_class->get_index_in_parent = AtkGetIndexInParent;
+  atk_object_class->ref_relation_set = AtkRefRelationSet;
+  atk_object_class->get_attributes = AtkGetAttributes;
+}
+
+GType GetType() {
+  AXPlatformNodeAuraLinux::EnsureGTypeInit();
+
+  static gsize type_id = 0;
+  if (g_once_init_enter(&type_id)) {
+    static const GTypeInfo type_info = {
+        sizeof(AXPlatformNodeAuraLinuxClass),  // class_size
+        nullptr,                               // base_init
+        nullptr,                               // base_finalize
+        atk_object::ClassInit,
+        nullptr,                                // class_finalize
+        nullptr,                                // class_data
+        sizeof(AXPlatformNodeAuraLinuxObject),  // instance_size
+        0,                                      // n_preallocs
+        nullptr,                                // instance_init
+        nullptr                                 // value_table
+    };
+
+    GType type = g_type_register_static(
+        ATK_TYPE_OBJECT, "AXPlatformNodeAuraLinux", &type_info, GTypeFlags(0));
+    g_once_init_leave(&type_id, type);
+  }
+
+  return type_id;
+}
+
+void Detach(AXPlatformNodeAuraLinuxObject* atk_object) {
+  if (!atk_object->m_object)
+    return;
+
+  atk_object->m_object = nullptr;
+}
+
+}  //  namespace atk_object
+
+}  // namespace
+
+// static
+NO_SANITIZE("cfi-icall")
+GType AtkTableCellInterface::GetType() {
+  return g_atk_table_cell_get_type();
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetColumnHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_column_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetRowHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_row_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+bool AtkTableCellInterface::GetRowColumnSpan(AtkTableCell* cell,
+                                             gint* row,
+                                             gint* column,
+                                             gint* row_span,
+                                             gint* col_span) {
+  return g_atk_table_cell_get_row_column_span(cell, row, column, row_span,
+                                              col_span);
+}
+
+// static
+bool AtkTableCellInterface::Exists() {
+  g_atk_table_cell_get_type = reinterpret_cast<GetTypeFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_type"));
+  g_atk_table_cell_get_column_header_cells =
+      reinterpret_cast<GetColumnHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_column_header_cells"));
+  g_atk_table_cell_get_row_header_cells =
+      reinterpret_cast<GetRowHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_header_cells"));
+  g_atk_table_cell_get_row_column_span = reinterpret_cast<GetRowColumnSpanFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_column_span"));
+  return *g_atk_table_cell_get_type;
+}
+
+void AXPlatformNodeAuraLinux::EnsureGTypeInit() {
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+  static bool first_time = true;
+  if (UNLIKELY(first_time)) {
+    g_type_init();
+    first_time = false;
+  }
+#endif
+}
+
+// static
+ImplementedAtkInterfaces AXPlatformNodeAuraLinux::GetGTypeInterfaceMask(
+    const AXNodeData& data) {
+  // The default implementation set includes the AtkComponent and AtkAction
+  // interfaces, which are provided by all the AtkObjects that we produce.
+  ImplementedAtkInterfaces interface_mask;
+
+  if (!IsImageOrVideo(data.role)) {
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kText);
+    if (!data.IsAtomicTextField())
+      interface_mask.Add(ImplementedAtkInterfaces::Value::kHypertext);
+  }
+
+  if (data.IsRangeValueSupported())
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kValue);
+
+  if (ui::IsPlatformDocument(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kDocument);
+
+  if (IsImage(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kImage);
+
+  // The AtkHyperlinkImpl interface allows getting a AtkHyperlink from an
+  // AtkObject. It is indeed implemented by actual web hyperlinks, but also by
+  // objects that will become embedded objects in ATK hypertext, so the name is
+  // a bit of a misnomer from the ATK API.
+  if (IsLink(data.role) || !ui::IsText(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kHyperlink);
+
+  if (data.role == ax::mojom::Role::kWindow)
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kWindow);
+
+  if (IsContainerWithSelectableChildren(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kSelection);
+
+  if (IsTableLike(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTable);
+
+  // Because the TableCell Interface is only supported in ATK version 2.12 and
+  // later, GetAccessibilityGType has a runtime check to verify we have a recent
+  // enough version. If we don't, GetAccessibilityGType will exclude
+  // AtkTableCell from the supported interfaces and none of its methods or
+  // properties will be exposed to assistive technologies.
+  if (IsCellOrTableHeader(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTableCell);
+
+  return interface_mask;
+}
+
+GType AXPlatformNodeAuraLinux::GetAccessibilityGType() {
+  static const GTypeInfo type_info = {
+      sizeof(AXPlatformNodeAuraLinuxClass),
+      (GBaseInitFunc) nullptr,
+      (GBaseFinalizeFunc) nullptr,
+      (GClassInitFunc) nullptr,
+      (GClassFinalizeFunc) nullptr,
+      nullptr,                               /* class data */
+      sizeof(AXPlatformNodeAuraLinuxObject), /* instance size */
+      0,                                     /* nb preallocs */
+      (GInstanceInitFunc) nullptr,
+      nullptr /* value table */
+  };
+
+  const char* atk_type_name = GetUniqueAccessibilityGTypeName(interface_mask_);
+  GType type = g_type_from_name(atk_type_name);
+  if (type)
+    return type;
+
+  type = g_type_register_static(AX_PLATFORM_NODE_AURALINUX_TYPE, atk_type_name,
+                                &type_info, GTypeFlags(0));
+
+  // The AtkComponent and AtkAction interfaces are always supported.
+  g_type_add_interface_static(type, ATK_TYPE_COMPONENT, &atk_component::Info);
+  g_type_add_interface_static(type, ATK_TYPE_ACTION, &atk_action::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kDocument))
+    g_type_add_interface_static(type, ATK_TYPE_DOCUMENT, &atk_document::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kImage))
+    g_type_add_interface_static(type, ATK_TYPE_IMAGE, &atk_image::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kValue))
+    g_type_add_interface_static(type, ATK_TYPE_VALUE, &atk_value::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHyperlink)) {
+    g_type_add_interface_static(type, ATK_TYPE_HYPERLINK_IMPL,
+                                &atk_hyperlink::Info);
+  }
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHypertext))
+    g_type_add_interface_static(type, ATK_TYPE_HYPERTEXT, &atk_hypertext::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kText))
+    g_type_add_interface_static(type, ATK_TYPE_TEXT, &atk_text::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kWindow))
+    g_type_add_interface_static(type, ATK_TYPE_WINDOW, &atk_window::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kSelection))
+    g_type_add_interface_static(type, ATK_TYPE_SELECTION, &atk_selection::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTable))
+    g_type_add_interface_static(type, ATK_TYPE_TABLE, &atk_table::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTableCell)) {
+    // Run-time check to ensure AtkTableCell is supported (requires ATK 2.12).
+    if (AtkTableCellInterface::Exists()) {
+      g_type_add_interface_static(type, AtkTableCellInterface::GetType(),
+                                  &atk_table_cell::Info);
+    }
+  }
+
+  return type;
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParentOnFrameIfNecessary() {
+  if (GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return;
+
+  if (!GetDelegate()->IsWebContent())
+    return;
+
+  AtkObject* parent_atk_object = GetParent();
+  AXPlatformNodeAuraLinux* parent =
+      AXPlatformNodeAuraLinux::FromAtkObject(parent_atk_object);
+  if (!parent)
+    return;
+
+  if (parent->GetDelegate()->IsWebContent())
+    return;
+
+  AXPlatformNodeAuraLinux* frame = AXPlatformNodeAuraLinux::FromAtkObject(
+      FindAtkObjectParentFrame(parent_atk_object));
+  if (!frame)
+    return;
+
+  frame->SetDocumentParent(parent_atk_object);
+}
+
+AtkObject* AXPlatformNodeAuraLinux::FindPrimaryWebContentDocument() {
+  // It could get multiple web contents since additional web content is added,
+  // when the DevTools window is opened.
+  std::vector<AtkObject*> web_content_candidates;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    AtkObject* child = child_iterator_ptr->GetNativeViewAccessible();
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(child);
+    if (!child_node)
+      continue;
+    if (!child_node->GetDelegate()->IsWebContent())
+      continue;
+    if (child_node->GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+      continue;
+    web_content_candidates.push_back(child);
+  }
+
+  if (web_content_candidates.empty())
+    return nullptr;
+
+  // If it finds just one web content, return it.
+  if (web_content_candidates.size() == 1)
+    return web_content_candidates[0];
+
+  for (auto* object : web_content_candidates) {
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(object);
+    // If it is a primary web contents, return it.
+    if (child_node->GetDelegate()->IsPrimaryWebContentsForWindow()) {
+      return object;
+    }
+  }
+  return nullptr;
+}
+
+bool AXPlatformNodeAuraLinux::IsWebDocumentForRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+  AXPlatformNodeAuraLinux* parent = FromAtkObject(GetParent());
+  if (!parent || !GetDelegate()->IsWebContent() ||
+      GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return false;
+  return parent->FindPrimaryWebContentDocument() == atk_object;
+}
+
+AtkObject* AXPlatformNodeAuraLinux::CreateAtkObject() {
+  if (GetRole() != ax::mojom::Role::kApplication &&
+      !GetDelegate()->IsToplevelBrowserWindow() &&
+      !AXPlatform::GetInstance().GetMode().has_mode(AXMode::kNativeAPIs)) {
+    return nullptr;
+  }
+  if (GetDelegate()->IsChildOfLeaf())
+    return nullptr;
+  EnsureGTypeInit();
+  interface_mask_ = GetGTypeInterfaceMask(GetData());
+  GType type = GetAccessibilityGType();
+  AtkObject* atk_object = static_cast<AtkObject*>(g_object_new(type, nullptr));
+
+  atk_object_initialize(atk_object, this);
+
+  SetDocumentParentOnFrameIfNecessary();
+
+  return ATK_OBJECT(atk_object);
+}
+
+void AXPlatformNodeAuraLinux::DestroyAtkObjects() {
+  if (atk_hyperlink_) {
+    ax_platform_atk_hyperlink_set_object(
+        AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), nullptr);
+    g_object_unref(atk_hyperlink_);
+    atk_hyperlink_ = nullptr;
+  }
+
+  if (atk_object_) {
+    // We explicitly clear g_current_focused just in case there is another
+    // reference to atk_object_ somewhere.
+    if (atk_object_ == g_current_focused)
+      SetWeakGPtrToAtkObject(&g_current_focused, nullptr);
+    atk_object::Detach(AX_PLATFORM_NODE_AURALINUX(atk_object_));
+
+    g_object_unref(atk_object_);
+    atk_object_ = nullptr;
+  }
+}
+
+// static
+AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) {
+  AXPlatformNodeAuraLinux* node = new AXPlatformNodeAuraLinux();
+  node->Init(delegate);
+  return node;
+}
+
+// static
+AXPlatformNode* AXPlatformNode::FromNativeViewAccessible(
+    gfx::NativeViewAccessible accessible) {
+  return AXPlatformNodeAuraLinux::FromAtkObject(accessible);
+}
+
+//
+// AXPlatformNodeAuraLinux implementation.
+//
+
+// static
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FromAtkObject(
+    const AtkObject* atk_object) {
+  if (!atk_object)
+    return nullptr;
+
+  if (IS_AX_PLATFORM_NODE_AURALINUX(atk_object)) {
+    AXPlatformNodeAuraLinuxObject* platform_object =
+        AX_PLATFORM_NODE_AURALINUX(atk_object);
+    return platform_object->m_object;
+  }
+
+  return nullptr;
+}
+
+// static
+void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) {
+  g_root_application = application;
+}
+
+// static
+AXPlatformNode* AXPlatformNodeAuraLinux::application() {
+  return g_root_application;
+}
+
+// static
+void AXPlatformNodeAuraLinux::StaticInitialize() {
+  AtkUtilAuraLinux::GetInstance()->InitializeAsync();
+}
+
+// static
+void AXPlatformNodeAuraLinux::EnableAXMode() {
+  AXPlatformNode::NotifyAddAXModeFlags(kAXModeComplete);
+}
+
+AtkRole AXPlatformNodeAuraLinux::GetAtkRole() const {
+  switch (GetRole()) {
+    case ax::mojom::Role::kAlert:
+      return ATK_ROLE_NOTIFICATION;
+    case ax::mojom::Role::kAlertDialog:
+      return ATK_ROLE_ALERT;
+    case ax::mojom::Role::kComment:
+    case ax::mojom::Role::kSuggestion:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kApplication:
+      // Only use ATK_ROLE_APPLICATION for elements with no parent, since it
+      // is only for top level app windows and not ARIA applications.
+      if (!GetParent()) {
+        return ATK_ROLE_APPLICATION;
+      } else {
+        return ATK_ROLE_EMBEDDED;
+      }
+    case ax::mojom::Role::kArticle:
+      return ATK_ROLE_ARTICLE;
+    case ax::mojom::Role::kAudio:
+      return ATK_ROLE_AUDIO;
+    case ax::mojom::Role::kBanner:
+    case ax::mojom::Role::kHeader:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kBlockquote:
+      return ATK_ROLE_BLOCK_QUOTE;
+    case ax::mojom::Role::kCaret:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kCanvas:
+      return ATK_ROLE_CANVAS;
+    case ax::mojom::Role::kCaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kCheckBox:
+      return ATK_ROLE_CHECK_BOX;
+    case ax::mojom::Role::kSwitch:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kColorWell:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kColumn:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kColumnHeader:
+      return ATK_ROLE_COLUMN_HEADER;
+    case ax::mojom::Role::kComboBoxGrouping:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxMenuButton:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxSelect:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComplementary:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kContentDeletion:
+      return kAtkRoleContentDeletion;
+    case ax::mojom::Role::kContentInsertion:
+      return kAtkRoleContentInsertion;
+    case ax::mojom::Role::kContentInfo:
+    case ax::mojom::Role::kFooter:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDate:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDateTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDefinition:
+    case ax::mojom::Role::kDescriptionListDetail:
+      return ATK_ROLE_DESCRIPTION_VALUE;
+    case ax::mojom::Role::kDescriptionList:
+      return ATK_ROLE_DESCRIPTION_LIST;
+    case ax::mojom::Role::kDescriptionListTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kDetails:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kDialog:
+      return ATK_ROLE_DIALOG;
+    case ax::mojom::Role::kDirectory:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kDisclosureTriangle:
+    case ax::mojom::Role::kDisclosureTriangleGrouped:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kDocCover:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kDocBackLink:
+    case ax::mojom::Role::kDocBiblioRef:
+    case ax::mojom::Role::kDocGlossRef:
+    case ax::mojom::Role::kDocNoteRef:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kDocBiblioEntry:
+    case ax::mojom::Role::kDocEndnote:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kDocNotice:
+    case ax::mojom::Role::kDocTip:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kDocFootnote:
+      return kAtkFootnoteRole;
+    case ax::mojom::Role::kDocPageBreak:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kDocPageFooter:
+      return ATK_ROLE_FOOTER;
+    case ax::mojom::Role::kDocPageHeader:
+      return ATK_ROLE_HEADER;
+    case ax::mojom::Role::kDocAcknowledgments:
+    case ax::mojom::Role::kDocAfterword:
+    case ax::mojom::Role::kDocAppendix:
+    case ax::mojom::Role::kDocBibliography:
+    case ax::mojom::Role::kDocChapter:
+    case ax::mojom::Role::kDocConclusion:
+    case ax::mojom::Role::kDocCredits:
+    case ax::mojom::Role::kDocEndnotes:
+    case ax::mojom::Role::kDocEpilogue:
+    case ax::mojom::Role::kDocErrata:
+    case ax::mojom::Role::kDocForeword:
+    case ax::mojom::Role::kDocGlossary:
+    case ax::mojom::Role::kDocIndex:
+    case ax::mojom::Role::kDocIntroduction:
+    case ax::mojom::Role::kDocPageList:
+    case ax::mojom::Role::kDocPart:
+    case ax::mojom::Role::kDocPreface:
+    case ax::mojom::Role::kDocPrologue:
+    case ax::mojom::Role::kDocToc:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDocAbstract:
+    case ax::mojom::Role::kDocColophon:
+    case ax::mojom::Role::kDocCredit:
+    case ax::mojom::Role::kDocDedication:
+    case ax::mojom::Role::kDocEpigraph:
+    case ax::mojom::Role::kDocExample:
+    case ax::mojom::Role::kDocPullquote:
+    case ax::mojom::Role::kDocQna:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kDocSubtitle:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kEmbeddedObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kForm:
+      // TODO(accessibility) Forms which lack an accessible name are no longer
+      // exposed as forms. http://crbug.com/874384. Forms which have accessible
+      // names should be exposed as ATK_ROLE_LANDMARK according to Core AAM.
+      return ATK_ROLE_FORM;
+    case ax::mojom::Role::kFigure:
+    case ax::mojom::Role::kFeed:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGenericContainer:
+    case ax::mojom::Role::kFooterAsNonLandmark:
+    case ax::mojom::Role::kHeaderAsNonLandmark:
+    case ax::mojom::Role::kRuby:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kGraphicsDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kGraphicsObject:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGraphicsSymbol:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kHeading:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kIframe:
+    case ax::mojom::Role::kIframePresentational:
+      return ATK_ROLE_INTERNAL_FRAME;
+    case ax::mojom::Role::kImage:
+      return IsImageWithMap() ? ATK_ROLE_IMAGE_MAP : ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kInlineTextBox:
+      return kStaticRole;
+    case ax::mojom::Role::kInputTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kLabelText:
+      return ATK_ROLE_LABEL;
+    case ax::mojom::Role::kLegend:
+      return ATK_ROLE_LABEL;
+    // Layout table objects are treated the same as Role::kGenericContainer.
+    case ax::mojom::Role::kLayoutTable:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableCell:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLineBreak:
+      // TODO(Accessibility) Having a separate accessible object for line breaks
+      // is inconsistent with other implementations. http://crbug.com/873144#c1.
+      return kStaticRole;
+    case ax::mojom::Role::kLink:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kList:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kListBox:
+      return ATK_ROLE_LIST_BOX;
+    // TODO(Accessibility) Use ATK_ROLE_MENU_ITEM inside a combo box, see how
+    // ax_platform_node_win.cc code does this.
+    case ax::mojom::Role::kListBoxOption:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kListItem:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListMarker:
+      // Regular list markers only expose their alternative text, but do not
+      // expose their descendants; and the descendants should be ignored. This
+      // is because the alternative text depends on the counter style and can
+      // be different from the actual (visual) marker text, and hence,
+      // inconsistent with the descendants. We treat a list marker as non-text
+      // only if it still has non-ignored descendants, which happens only when:
+      // - The list marker itself is ignored but the descendants are not
+      // - Or the list marker contains images
+      if (!GetChildCount())
+        return kStaticRole;
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kLog:
+      return ATK_ROLE_LOG;
+    case ax::mojom::Role::kMain:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kMark:
+      return kStaticRole;
+    case ax::mojom::Role::kMath:
+    case ax::mojom::Role::kMathMLMath:
+      return ATK_ROLE_MATH;
+    // https://w3c.github.io/mathml-aam/#mathml-element-mappings
+    case ax::mojom::Role::kMathMLFraction:
+      return ATK_ROLE_MATH_FRACTION;
+    case ax::mojom::Role::kMathMLIdentifier:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLMultiscripts:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNoneScript:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNumber:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLPrescriptDelimiter:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLOperator:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSquareRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLStringLiteral:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLSub:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSubSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kMathMLTableCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kMathMLTableRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kMathMLText:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLUnder:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLUnderOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMarquee:
+      return ATK_ROLE_MARQUEE;
+    case ax::mojom::Role::kMenu:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuBar:
+      return ATK_ROLE_MENU_BAR;
+    case ax::mojom::Role::kMenuItem:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemCheckBox:
+      return ATK_ROLE_CHECK_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemRadio:
+      return ATK_ROLE_RADIO_MENU_ITEM;
+    case ax::mojom::Role::kMenuListPopup:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuListOption:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMeter:
+      return ATK_ROLE_LEVEL_BAR;
+    case ax::mojom::Role::kNavigation:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kNote:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kPane:
+    case ax::mojom::Role::kScrollView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kParagraph:
+      return ATK_ROLE_PARAGRAPH;
+    case ax::mojom::Role::kPdfActionableHighlight:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPdfRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kPluginObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kPopUpButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPortal:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kProgressIndicator:
+      return ATK_ROLE_PROGRESS_BAR;
+    case ax::mojom::Role::kRadioButton:
+      return ATK_ROLE_RADIO_BUTTON;
+    case ax::mojom::Role::kRadioGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRegion:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kRootWebArea:
+      return ATK_ROLE_DOCUMENT_WEB;
+    case ax::mojom::Role::kRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kRowGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRowHeader:
+      return ATK_ROLE_ROW_HEADER;
+    case ax::mojom::Role::kRubyAnnotation:
+      // Generally exposed as description on <ruby> (Role::kRuby) element, not
+      // as its own object in the tree.
+      // However, it's possible to make a kRubyAnnotation element show up in the
+      // AX tree, for example by adding tabindex="0" to the source <rp> or <rt>
+      // element or making the source element the target of an aria-owns.
+      // Therefore, browser side needs to gracefully handle it if it actually
+      // shows up in the tree.
+      return kStaticRole;
+    case ax::mojom::Role::kSection:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kScrollBar:
+      return ATK_ROLE_SCROLL_BAR;
+    case ax::mojom::Role::kSearch:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kSlider:
+      return ATK_ROLE_SLIDER;
+    case ax::mojom::Role::kSpinButton:
+      return ATK_ROLE_SPIN_BUTTON;
+    case ax::mojom::Role::kSplitter:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kStaticText:
+      return kStaticRole;
+    case ax::mojom::Role::kStatus:
+      return ATK_ROLE_STATUSBAR;
+    case ax::mojom::Role::kSubscript:
+      return kSubscriptRole;
+    case ax::mojom::Role::kSuperscript:
+      return kSuperscriptRole;
+    case ax::mojom::Role::kSvgRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kTab:
+      return ATK_ROLE_PAGE_TAB;
+    case ax::mojom::Role::kTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kTableHeaderContainer:
+      // TODO(accessibility) This mapping is correct, but it doesn't seem to be
+      // used. We don't necessarily want to always expose these containers, but
+      // we must do so if they are focusable. http://crbug.com/874043
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kTabList:
+      return ATK_ROLE_PAGE_TAB_LIST;
+    case ax::mojom::Role::kTabPanel:
+      return ATK_ROLE_SCROLL_PANE;
+    case ax::mojom::Role::kTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kTitleBar:
+      return ATK_ROLE_TITLE_BAR;
+    case ax::mojom::Role::kTextField:
+    case ax::mojom::Role::kSearchBox:
+      if (HasState(ax::mojom::State::kProtected))
+        return ATK_ROLE_PASSWORD_TEXT;
+      return ATK_ROLE_ENTRY;
+    case ax::mojom::Role::kTextFieldWithComboBox:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kAbbr:
+    case ax::mojom::Role::kCode:
+    case ax::mojom::Role::kEmphasis:
+    case ax::mojom::Role::kStrong:
+    case ax::mojom::Role::kTime:
+      return kStaticRole;
+    case ax::mojom::Role::kTimer:
+      return ATK_ROLE_TIMER;
+    case ax::mojom::Role::kToggleButton:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kToolbar:
+      return ATK_ROLE_TOOL_BAR;
+    case ax::mojom::Role::kTooltip:
+      return ATK_ROLE_TOOL_TIP;
+    case ax::mojom::Role::kTree:
+      return ATK_ROLE_TREE;
+    case ax::mojom::Role::kTreeItem:
+      return ATK_ROLE_TREE_ITEM;
+    case ax::mojom::Role::kTreeGrid:
+      return ATK_ROLE_TREE_TABLE;
+    case ax::mojom::Role::kVideo:
+      return ATK_ROLE_VIDEO;
+    case ax::mojom::Role::kWindow:
+      // In ATK elements with ATK_ROLE_FRAME are windows with titles and
+      // buttons, while those with ATK_ROLE_WINDOW are windows without those
+      // elements.
+      return ATK_ROLE_FRAME;
+    case ax::mojom::Role::kClient:
+    case ax::mojom::Role::kDesktop:
+    case ax::mojom::Role::kWebView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kFigcaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kUnknown:
+      // When we are not in web content, assume that a node with an unknown
+      // role is a view (which often have the unknown role).
+      return !GetDelegate()->IsWebContent() ? ATK_ROLE_PANEL : ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kImeCandidate:
+    case ax::mojom::Role::kKeyboard:
+    case ax::mojom::Role::kNone:
+      return ATK_ROLE_REDUNDANT_OBJECT;
+    case ax::mojom::Role::kPreDeprecated:
+      NOTREACHED_NORETURN();
+  }
+}
+
+// If we were compiled with a newer version of ATK than the runtime version,
+// it's possible that the state we want to expose and/or emit an event for
+// is not present. This will generate a runtime error.
+bool PlatformSupportsState(AtkStateType atk_state_type) {
+  static absl::optional<int> max_state_type = absl::nullopt;
+  if (!max_state_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_state_type_get_type()));
+    max_state_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  return atk_state_type < max_state_type.value();
+}
+
+void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
+  bool menu_active = !GetActiveMenus().empty();
+  if (!menu_active && atk_object_ == g_active_top_level_frame)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  if (menu_active &&
+      FindAtkObjectParentFrame(GetActiveMenus().back()) == atk_object_)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  if (atk_object_ && atk_object_ == g_active_views_dialog)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  bool is_minimized = delegate_->IsMinimized();
+  if (is_minimized && GetRole() == ax::mojom::Role::kWindow)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ICONIFIED);
+
+  if (HasState(ax::mojom::State::kCollapsed))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+  if (HasState(ax::mojom::State::kDefault))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
+  if ((HasState(ax::mojom::State::kEditable) ||
+       HasState(ax::mojom::State::kRichlyEditable)) &&
+      GetData().GetRestriction() != ax::mojom::Restriction::kReadOnly) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE);
+  }
+  if (HasState(ax::mojom::State::kExpanded)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
+  }
+  if (IsFocused())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED);
+  if (IsFocusable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
+  if (HasState(ax::mojom::State::kHorizontal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HORIZONTAL);
+  if (!IsInvisibleOrIgnored()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISIBLE);
+    if (!delegate_->IsOffscreen() && !is_minimized)
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SHOWING);
+  }
+  if (HasState(ax::mojom::State::kMultiselectable))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MULTISELECTABLE);
+  if (HasState(ax::mojom::State::kRequired))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_REQUIRED);
+  if (HasState(ax::mojom::State::kVertical))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VERTICAL);
+  if (HasState(ax::mojom::State::kVisited))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISITED);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kInvalidState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kInvalidState) !=
+          static_cast<int32_t>(ax::mojom::InvalidState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INVALID_ENTRY);
+  }
+  if (HasIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) !=
+          static_cast<int32_t>(ax::mojom::AriaCurrentState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  }
+#if defined(ATK_216)
+  // Runtime checks in case we were compiled with a newer version of ATK.
+  if (IsPlatformCheckable() && PlatformSupportsState(ATK_STATE_CHECKABLE))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKABLE);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kHasPopup) &&
+      PlatformSupportsState(ATK_STATE_HAS_POPUP))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP);
+#endif
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_BUSY);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kModal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MODAL);
+  if (GetData().IsSelectable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kSelected))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
+
+  if (IsTextField()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE_TEXT);
+    if (HasState(ax::mojom::State::kMultiline))
+      atk_state_set_add_state(atk_state_set, ATK_STATE_MULTI_LINE);
+    else
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SINGLE_LINE);
+  }
+
+  // Special case for indeterminate progressbar.
+  if (GetRole() == ax::mojom::Role::kProgressIndicator &&
+      !HasFloatAttribute(ax::mojom::FloatAttribute::kValueForRange)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INDETERMINATE);
+  }
+
+  if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete).empty() ||
+      HasState(ax::mojom::State::kAutofillAvailable)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION);
+  }
+
+  // Checked state
+  const auto checked_state = GetData().GetCheckedState();
+  if (checked_state == ax::mojom::CheckedState::kTrue ||
+      checked_state == ax::mojom::CheckedState::kMixed) {
+    atk_state_set_add_state(atk_state_set, GetAtkStateTypeForCheckableNode());
+  }
+
+  if (GetData().GetRestriction() != ax::mojom::Restriction::kDisabled) {
+    if (GetDelegate()->IsReadOnlySupported() &&
+        GetDelegate()->IsReadOnlyOrDisabled()) {
+#if defined(ATK_216)
+      // Runtime check in case we were compiled with a newer version of ATK.
+      if (PlatformSupportsState(ATK_STATE_READ_ONLY))
+        atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
+#endif
+    } else {
+      atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED);
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SENSITIVE);
+    }
+  }
+}
+
+// Some relations only exist in a high enough ATK version.
+// If a relation has a version requirement, it will be documented in
+// the link below.
+// https://docs.gtk.org/atk/enum.RelationType.html
+struct AtkIntRelation {
+  ax::mojom::IntAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntRelation kIntRelations[] = {
+    {ax::mojom::IntAttribute::kMemberOfId, ATK_RELATION_MEMBER_OF,
+     absl::nullopt},
+    {ax::mojom::IntAttribute::kPopupForId, ATK_RELATION_POPUP_FOR,
+     absl::nullopt},
+};
+
+struct AtkIntListRelation {
+  ax::mojom::IntListAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntListRelation kIntListRelations[] = {
+    {ax::mojom::IntListAttribute::kControlsIds, ATK_RELATION_CONTROLLER_FOR,
+     ATK_RELATION_CONTROLLED_BY},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kDetailsIds, ATK_RELATION_DETAILS,
+     ATK_RELATION_DETAILS_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kDescribedbyIds, ATK_RELATION_DESCRIBED_BY,
+     ATK_RELATION_DESCRIPTION_FOR},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kErrormessageIds, ATK_RELATION_ERROR_MESSAGE,
+     ATK_RELATION_ERROR_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kFlowtoIds, ATK_RELATION_FLOWS_TO,
+     ATK_RELATION_FLOWS_FROM},
+    {ax::mojom::IntListAttribute::kLabelledbyIds, ATK_RELATION_LABELLED_BY,
+     ATK_RELATION_LABEL_FOR},
+};
+
+void AXPlatformNodeAuraLinux::AddRelationToSet(AtkRelationSet* relation_set,
+                                               AtkRelationType relation,
+                                               AXPlatformNode* target) {
+  DCHECK(target);
+  DCHECK(GetDelegate()->IsValidRelationTarget(target));
+
+  // If we were compiled with a newer version of ATK than the runtime version,
+  // it's possible that we might try to add a relation that doesn't exist in
+  // the runtime version of the AtkRelationType enum. This will cause a runtime
+  // error, so return early here if we are about to do that.
+  static absl::optional<int> max_relation_type = absl::nullopt;
+  if (!max_relation_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_relation_type_get_type()));
+    max_relation_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  if (relation >= max_relation_type.value())
+    return;
+
+  atk_relation_set_add_relation_by_type(relation_set, relation,
+                                        target->GetNativeViewAccessible());
+}
+
+AtkRelationSet* AXPlatformNodeAuraLinux::GetAtkRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  AtkRelationSet* relation_set = atk_relation_set_new();
+
+  if (IsWebDocumentForRelations()) {
+    AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+    if (parent_frame) {
+      atk_relation_set_add_relation_by_type(
+          relation_set, ATK_RELATION_EMBEDDED_BY, parent_frame);
+    }
+  }
+
+  if (auto* document_parent = FromAtkObject(document_parent_)) {
+    AtkObject* document = document_parent->FindPrimaryWebContentDocument();
+    if (document) {
+      atk_relation_set_add_relation_by_type(relation_set, ATK_RELATION_EMBEDS,
+                                            document);
+    }
+  }
+
+  // For each possible relation defined by an IntAttribute, we test that
+  // attribute and then look for reverse relations.
+  for (auto relation : kIntRelations) {
+    if (AXPlatformNode* target =
+            GetDelegate()->GetTargetNodeForRelation(relation.attribute))
+      AddRelationToSet(relation_set, relation.relation, target);
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  // Now we do the same for each possible relation defined by an
+  // IntListAttribute. In this case we need to handle each target in the list.
+  for (const auto& relation : kIntListRelations) {
+    std::vector<AXPlatformNode*> targets =
+        GetDelegate()->GetTargetNodesForRelation(relation.attribute);
+    for (AXPlatformNode* target : targets) {
+      AddRelationToSet(relation_set, relation.relation, target);
+    }
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> reverse_target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : reverse_target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  return relation_set;
+}
+
+AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() = default;
+
+AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() {
+  if (g_current_selected == this)
+    g_current_selected = nullptr;
+
+  DestroyAtkObjects();
+
+  if (window_activate_event_postponed_)
+    AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+
+  SetWeakGPtrToAtkObject(&document_parent_, nullptr);
+}
+
+void AXPlatformNodeAuraLinux::Destroy() {
+  DestroyAtkObjects();
+  AXPlatformNodeBase::Destroy();
+}
+
+void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) {
+  // Initialize ATK.
+  AXPlatformNodeBase::Init(delegate);
+
+  // Only create the AtkObject if we know enough information.
+  if (GetRole() != ax::mojom::Role::kUnknown)
+    GetOrCreateAtkObject();
+}
+
+bool AXPlatformNodeAuraLinux::IsPlatformCheckable() const {
+  if (GetRole() == ax::mojom::Role::kToggleButton)
+    return false;
+
+  return AXPlatformNodeBase::IsPlatformCheckable();
+}
+
+absl::optional<size_t> AXPlatformNodeAuraLinux::GetIndexInParent() {
+  AXPlatformNode* parent =
+      AXPlatformNode::FromNativeViewAccessible(GetParent());
+  // Even though the node doesn't have its parent, GetParent() could return the
+  // application. Since the detached view has the kUnknown role and the
+  // restriction is kDisabled, it early returns before finding the index.
+  if (parent == AXPlatformNodeAuraLinux::application() &&
+      GetRole() == ax::mojom::Role::kUnknown &&
+      GetData().GetRestriction() == ax::mojom::Restriction::kDisabled) {
+    return absl::nullopt;
+  }
+
+  return AXPlatformNodeBase::GetIndexInParent();
+}
+
+void AXPlatformNodeAuraLinux::EnsureAtkObjectIsValid() {
+  if (atk_object_) {
+    // If the object's role changes and that causes its
+    // interface mask to change, we need to create a new
+    // AtkObject for it.
+    ImplementedAtkInterfaces interface_mask = GetGTypeInterfaceMask(GetData());
+    if (interface_mask != interface_mask_)
+      DestroyAtkObjects();
+  }
+
+  if (!atk_object_) {
+    GetOrCreateAtkObject();
+  }
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() {
+  return GetOrCreateAtkObject();
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetOrCreateAtkObject() {
+  if (!atk_object_) {
+    atk_object_ = CreateAtkObject();
+  }
+  return atk_object_;
+}
+
+void AXPlatformNodeAuraLinux::OnCheckedStateChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(obj), GetAtkStateTypeForCheckableNode(),
+      GetData().GetCheckedState() != ax::mojom::CheckedState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnEnabledChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_ENABLED,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_SENSITIVE,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+}
+
+void AXPlatformNodeAuraLinux::OnBusyStateChanged(bool is_busy) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_BUSY, is_busy);
+}
+
+void AXPlatformNodeAuraLinux::OnExpandedStateChanged(bool is_expanded) {
+  // When a list box is expanded, it becomes visible. This means that it might
+  // now have a different role (the role for hidden Views is kUnknown).  We
+  // need to recreate the AtkObject in this case because a change in roles
+  // might imply a change in ATK interfaces implemented.
+  EnsureAtkObjectIsValid();
+
+  DCHECK(HasState(ax::mojom::State::kCollapsed) ||
+         HasState(ax::mojom::State::kExpanded));
+
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_EXPANDED, is_expanded);
+}
+
+void AXPlatformNodeAuraLinux::OnShowingStateChanged(bool is_showing) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_SHOWING, is_showing);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupStart() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  // Exit early if kMenuPopupStart is sent multiple times for the same menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  bool menu_already_open = !active_menus.empty();
+  if (menu_already_open && active_menus.back() == atk_object)
+    return;
+
+  // We also want to inform the AT that menu the is now showing. Normally this
+  // event is not fired because the menu will be created with the
+  // ATK_STATE_SHOWING already set to TRUE.
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, TRUE);
+
+  // We need to compute this before modifying the active menu stack.
+  AtkObject* previous_active_frame = ComputeActiveTopLevelFrame();
+
+  active_menus.push_back(atk_object);
+
+  // We exit early if the newly activated menu has the same AtkWindow as the
+  // previous one.
+  if (previous_active_frame == parent_frame)
+    return;
+  if (previous_active_frame) {
+    g_signal_emit_by_name(previous_active_frame, "deactivate");
+    atk_object_notify_state_change(previous_active_frame, ATK_STATE_ACTIVE,
+                                   FALSE);
+  }
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupEnd() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, FALSE);
+
+  // kMenuPopupHide may be called multiple times for the same menu, so only
+  // remove it if our parent frame matches the most recently opened menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  DCHECK(!active_menus.empty())
+      << "Asymmetrical menupopupend events -- too many";
+
+  active_menus.pop_back();
+  AtkObject* new_active_item = ComputeActiveTopLevelFrame();
+  if (new_active_item != parent_frame) {
+    // Newly activated menu has the different AtkWindow as the previous one.
+    g_signal_emit_by_name(parent_frame, "deactivate");
+    atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+    if (new_active_item) {
+      g_signal_emit_by_name(new_active_item, "activate");
+      atk_object_notify_state_change(new_active_item, ATK_STATE_ACTIVE, TRUE);
+    }
+  }
+
+  // All menus are closed.
+  if (active_menus.empty())
+    OnAllMenusEnded();
+}
+
+void AXPlatformNodeAuraLinux::ResendFocusSignalsForCurrentlyFocusedNode() {
+  auto* frame = FromAtkObject(g_active_top_level_frame);
+  if (!frame)
+    return;
+
+  AtkObject* focused_node = frame->GetDelegate()->GetFocus();
+  if (!focused_node)
+    return;
+
+  g_signal_emit_by_name(focused_node, "focus-event", true);
+  atk_object_notify_state_change(focused_node, ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::SetAsCurrentlyFocusedNode() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_current_focused, obj);
+}
+
+// All menus have closed.
+void AXPlatformNodeAuraLinux::OnAllMenusEnded() {
+  if (!GetActiveMenus().empty() && g_active_top_level_frame &&
+      ComputeActiveTopLevelFrame() != g_active_top_level_frame) {
+    g_signal_emit_by_name(g_active_top_level_frame, "activate");
+    atk_object_notify_state_change(g_active_top_level_frame, ATK_STATE_ACTIVE,
+                                   TRUE);
+  }
+
+  GetActiveMenus().clear();
+  ResendFocusSignalsForCurrentlyFocusedNode();
+}
+
+void AXPlatformNodeAuraLinux::OnWindowActivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame == g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(parent_frame);
+
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+
+  // We also send a focus event for the currently focused element, so that
+  // the user knows where the focus is when the toplevel window regains focus.
+  if (g_current_focused &&
+      IsFrameAncestorOfAtkObject(parent_frame, g_current_focused)) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", true);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnWindowDeactivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame != g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(nullptr);
+
+  g_signal_emit_by_name(parent_frame, "deactivate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+}
+
+void AXPlatformNodeAuraLinux::OnWindowVisibilityChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (GetAtkRole() != ATK_ROLE_FRAME)
+    return;
+
+  bool minimized = delegate_->IsMinimized();
+  if (minimized == was_minimized_)
+    return;
+
+  was_minimized_ = minimized;
+  if (minimized)
+    g_signal_emit_by_name(atk_object, "minimize");
+  else
+    g_signal_emit_by_name(atk_object, "restore");
+  atk_object_notify_state_change(atk_object, ATK_STATE_ICONIFIED, minimized);
+}
+
+void AXPlatformNodeAuraLinux::OnScrolledToAnchor() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  // The text-caret-moved event is used to signal a scroll to anchor event.
+  if (ATK_IS_TEXT(atk_object)) {
+    g_signal_emit_by_name(atk_object, "text-caret-moved", 0);
+  }
+}
+
+void AXPlatformNodeAuraLinux::SetActiveViewsDialog() {
+  AtkObject* old_views_dialog = g_active_views_dialog;
+  AtkObject* new_views_dialog = nullptr;
+
+  AtkObject* parent = GetOrCreateAtkObject();
+  if (!parent)
+    return;
+
+  if (!GetDelegate()->IsWebContent()) {
+    while (parent) {
+      if (atk_object::GetRole(parent) == ATK_ROLE_DIALOG) {
+        new_views_dialog = parent;
+        break;
+      }
+      parent = atk_object::GetParent(parent);
+    }
+  }
+
+  if (old_views_dialog == new_views_dialog)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_active_views_dialog, new_views_dialog);
+  if (old_views_dialog)
+    atk_object_notify_state_change(old_views_dialog, ATK_STATE_ACTIVE, FALSE);
+  if (new_views_dialog)
+    atk_object_notify_state_change(new_views_dialog, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnFocused() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (atk_object::GetRole(atk_object) == ATK_ROLE_FRAME) {
+    OnWindowActivated();
+    return;
+  }
+
+  if (atk_object == g_current_focused)
+    return;
+
+  SetActiveViewsDialog();
+
+  if (g_current_focused) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", false);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, false);
+  }
+
+  SetWeakGPtrToAtkObject(&g_current_focused, atk_object);
+
+  g_signal_emit_by_name(g_current_focused, "focus-event", true);
+  atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                 ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::OnSelected() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  if (g_current_selected && !g_current_selected->GetBoolAttribute(
+                                ax::mojom::BoolAttribute::kSelected)) {
+    atk_object_notify_state_change(
+        ATK_OBJECT(g_current_selected->GetOrCreateAtkObject()),
+        ATK_STATE_SELECTED, false);
+  }
+
+  g_current_selected = this;
+  if (ATK_IS_OBJECT(atk_object)) {
+    atk_object_notify_state_change(ATK_OBJECT(atk_object), ATK_STATE_SELECTED,
+                                   true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnSelectedChildrenChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  g_signal_emit_by_name(obj, "selection-changed", true);
+}
+
+bool AXPlatformNodeAuraLinux::EmitsAtkTextEvents() const {
+  // Objects which do not implement AtkText cannot emit AtkText events.
+  if (!atk_object_ || !ATK_IS_TEXT(atk_object_))
+    return false;
+
+  // Objects which do implement AtkText, but are ignored or invisible should not
+  // emit AtkText events.
+  if (IsInvisibleOrIgnored())
+    return false;
+
+  // If this node is not a static text node, it supports the full AtkText
+  // interface.
+  if (GetAtkRole() != kStaticRole)
+    return true;
+
+  // If this node has children it is not a static text leaf node and supports
+  // the full AtkText interface.
+  if (GetChildCount())
+    return true;
+
+  return false;
+}
+
+void AXPlatformNodeAuraLinux::GetFullSelection(int32_t* anchor_node_id,
+                                               int* anchor_offset,
+                                               int32_t* focus_node_id,
+                                               int* focus_offset) {
+  DCHECK(anchor_node_id);
+  DCHECK(anchor_offset);
+  DCHECK(focus_node_id);
+  DCHECK(focus_offset);
+
+  if (IsAtomicTextField() &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelStart, anchor_offset) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd, focus_offset)) {
+    int32_t node_id = GetData().id != -1 ? GetData().id : GetUniqueId();
+    *anchor_node_id = *focus_node_id = node_id;
+    return;
+  }
+
+  AXSelection selection = GetDelegate()->GetUnignoredSelection();
+  *anchor_node_id = selection.anchor_object_id;
+  *anchor_offset = selection.anchor_offset;
+  *focus_node_id = selection.focus_object_id;
+  *focus_offset = selection.focus_offset;
+}
+
+AXPlatformNodeAuraLinux& AXPlatformNodeAuraLinux::FindEditableRootOrDocument() {
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return *this;
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kNonAtomicTextFieldRoot) &&
+      HasState(ax::mojom::State::kEditable))
+    return *this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindEditableRootOrDocument();
+  return *this;
+}
+
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FindCommonAncestor(
+    AXPlatformNodeAuraLinux* other) {
+  if (this == other || other->IsDescendantOf(this))
+    return this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindCommonAncestor(other);
+  return nullptr;
+}
+
+void AXPlatformNodeAuraLinux::UpdateSelectionInformation(int32_t anchor_node_id,
+                                                         int anchor_offset,
+                                                         int32_t focus_node_id,
+                                                         int focus_offset) {
+  had_nonzero_width_selection =
+      focus_node_id != anchor_node_id || focus_offset != anchor_offset;
+  current_caret_ = std::make_pair(focus_node_id, focus_offset);
+}
+
+void AXPlatformNodeAuraLinux::EmitSelectionChangedSignal(bool had_selection) {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitSelectionChangedSignal(had_selection);
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  // ATK does not consider a collapsed selection a selection, so
+  // when the collapsed selection changes (caret movement), we should
+  // avoid sending text-selection-changed events.
+  if (HasSelection() || had_selection)
+    g_signal_emit_by_name(atk_object, "text-selection-changed");
+}
+
+void AXPlatformNodeAuraLinux::EmitCaretChangedSignal() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitCaretChangedSignal();
+    return;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(selection.second));
+}
+
+void AXPlatformNodeAuraLinux::OnTextAttributesChanged() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->OnTextAttributesChanged();
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-attributes-changed");
+}
+
+void AXPlatformNodeAuraLinux::OnTextSelectionChanged() {
+  int32_t anchor_node_id, focus_node_id;
+  int anchor_offset, focus_offset;
+  GetFullSelection(&anchor_node_id, &anchor_offset, &focus_node_id,
+                   &focus_offset);
+
+  auto* anchor_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(anchor_node_id));
+  auto* focus_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(focus_node_id));
+  if (!anchor_node || !focus_node)
+    return;
+
+  AXPlatformNodeAuraLinux& editable_root = FindEditableRootOrDocument();
+  AXPlatformNodeAuraLinux* common_ancestor =
+      focus_node->FindCommonAncestor(anchor_node);
+  if (common_ancestor) {
+    common_ancestor->EmitSelectionChangedSignal(
+        editable_root.HadNonZeroWidthSelection());
+  }
+
+  // It's possible for the selection to change and for the caret to stay in
+  // place. This might happen if the selection is totally reset with a
+  // different anchor node, but the same focus node. We should avoid sending a
+  // caret changed signal in that case.
+  std::pair<int32_t, int> prev_caret = editable_root.GetCurrentCaret();
+  if (prev_caret.first != focus_node_id || prev_caret.second != focus_offset)
+    focus_node->EmitCaretChangedSignal();
+
+  editable_root.UpdateSelectionInformation(anchor_node_id, anchor_offset,
+                                           focus_node_id, focus_offset);
+}
+
+bool AXPlatformNodeAuraLinux::SupportsSelectionWithAtkSelection() {
+  return SupportsToggle(GetRole()) ||
+         GetRole() == ax::mojom::Role::kListBoxOption;
+}
+
+void AXPlatformNodeAuraLinux::OnDescriptionChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  std::string description;
+  GetStringAttribute(ax::mojom::StringAttribute::kDescription, &description);
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-description";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_STRING);
+  g_value_set_string(&property_values.new_value, description.c_str());
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-description",
+                        &property_values, nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnSortDirectionChanged() {
+  AXPlatformNodeBase* table = GetTable();
+  if (!table)
+    return;
+
+  AtkObject* atk_table = table->GetNativeViewAccessible();
+  DCHECK(ATK_IS_TABLE(atk_table));
+
+  if (GetRole() == ax::mojom::Role::kColumnHeader)
+    g_signal_emit_by_name(atk_table, "row-reordered");
+  else if (GetRole() == ax::mojom::Role::kRowHeader)
+    g_signal_emit_by_name(atk_table, "column-reordered");
+}
+
+void AXPlatformNodeAuraLinux::OnValueChanged() {
+  // For the AtkText interface to work on non-web content nodes, we need to
+  // update the nodes' hypertext and trigger text change signals when the value
+  // changes. Otherwise, for web and PDF content, this is handled by
+  // "BrowserAccessibilityAuraLinux".
+  if (!GetDelegate()->IsWebContent())
+    UpdateHypertext();
+
+  if (!GetData().IsRangeValueSupported())
+    return;
+
+  float float_val;
+  if (!GetFloatAttribute(ax::mojom::FloatAttribute::kValueForRange, &float_val))
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-value";
+
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_DOUBLE);
+  g_value_set_double(&property_values.new_value,
+                     static_cast<double>(float_val));
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-value", &property_values,
+                        nullptr);
+}
+
+void AXPlatformNodeAuraLinux::OnNameChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object) {
+    return;
+  }
+  std::string previous_accessible_name = accessible_name_;
+  // Calling atk_object_get_name will update the value of accessible_name_.
+  if (!g_strcmp0(atk_object::GetName(atk_object),
+                 previous_accessible_name.c_str()))
+    return;
+
+  g_object_notify(G_OBJECT(atk_object), "accessible-name");
+}
+
+void AXPlatformNodeAuraLinux::OnDocumentTitleChanged() {
+  if (!g_active_top_level_frame)
+    return;
+
+  // We always want to notify on the top frame.
+  AXPlatformNodeAuraLinux* window = FromAtkObject(g_active_top_level_frame);
+  if (window)
+    window->OnNameChanged();
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeCreated() {
+  // We might not have a parent, in that case we don't need to send the event.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::add", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeWillBeDeleted() {
+  // There is a chance there won't be a parent as we're in the deletion process.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::remove", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnParentChanged() {
+  if (!atk_object_)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-parent";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_OBJECT);
+  g_value_set_object(&property_values.new_value, GetParent());
+  g_signal_emit_by_name(G_OBJECT(atk_object_),
+                        "property-change::accessible-parent", &property_values,
+                        nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnReadonlyChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+#if defined(ATK_216)
+  // Runtime check in case we were compiled with a newer version of ATK.
+  if (!PlatformSupportsState(ATK_STATE_READ_ONLY))
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_READ_ONLY,
+      GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly);
+#endif
+}
+
+void AXPlatformNodeAuraLinux::OnInvalidStatusChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_INVALID_ENTRY,
+      GetData().GetInvalidState() != ax::mojom::InvalidState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAriaCurrentChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  ax::mojom::AriaCurrentState aria_current =
+      static_cast<ax::mojom::AriaCurrentState>(
+          GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState));
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_ACTIVE,
+      aria_current != ax::mojom::AriaCurrentState::kNone &&
+          aria_current != ax::mojom::AriaCurrentState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAlertShown() {
+  atk_object_notify_state_change(ATK_OBJECT(GetOrCreateAtkObject()),
+                                 ATK_STATE_SHOWING, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::RunPostponedEvents() {
+  if (window_activate_event_postponed_) {
+    OnWindowActivated();
+    window_activate_event_postponed_ = false;
+  }
+}
+
+void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(
+    ax::mojom::Event event_type) {
+  if (!GetOrCreateAtkObject())
+    return;
+  AXPlatformNodeBase::NotifyAccessibilityEvent(event_type);
+  switch (event_type) {
+    // kMenuStart/kMenuEnd: the menu system has started / stopped.
+    // kMenuPopupStart/kMenuPopupEnd: an individual menu/submenu has
+    // opened/closed.
+    case ax::mojom::Event::kMenuPopupStart:
+      OnMenuPopupStart();
+      break;
+    case ax::mojom::Event::kMenuPopupEnd:
+      OnMenuPopupEnd();
+      break;
+    case ax::mojom::Event::kCheckedStateChanged:
+      OnCheckedStateChanged();
+      break;
+    case ax::mojom::Event::kExpandedChanged:
+      OnExpandedStateChanged(HasState(ax::mojom::State::kExpanded));
+      break;
+    case ax::mojom::Event::kFocus:
+    case ax::mojom::Event::kFocusContext:
+      OnFocused();
+      break;
+    case ax::mojom::Event::kFocusAfterMenuClose:
+      // The saved focused object is not always getting cleared when a popup
+      // becomes active. As a result, when the popup is dismissed, OnFocused()
+      // will return early thinking focus has not changed. Rather than trying
+      // to catch every case, take kFocusAfterMenuClose as a clear indication
+      // that a focus change should be presented and reset the saved focus.
+      g_current_focused = nullptr;
+      OnFocused();
+      break;
+    case ax::mojom::Event::kSelection:
+      OnSelected();
+      // When changing tabs also fire a name changed event.
+      if (GetRole() == ax::mojom::Role::kTab)
+        OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kSelectedChildrenChanged:
+      OnSelectedChildrenChanged();
+      break;
+    case ax::mojom::Event::kStateChanged:
+      // We need to know what state changed and fire an event for that specific
+      // state. Because we don't know what state changed, we deliberately do
+      // nothing here.
+      break;
+    case ax::mojom::Event::kTextChanged:
+      OnNameChanged();
+      break;
+    case ax::mojom::Event::kTextSelectionChanged:
+      OnTextSelectionChanged();
+      break;
+    case ax::mojom::Event::kValueChanged:
+      OnValueChanged();
+      break;
+    case ax::mojom::Event::kWindowActivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowActivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->PostponeEventsFor(this);
+        window_activate_event_postponed_ = true;
+      }
+      break;
+    case ax::mojom::Event::kWindowDeactivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowDeactivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+        window_activate_event_postponed_ = false;
+      }
+      break;
+    case ax::mojom::Event::kWindowVisibilityChanged:
+      OnWindowVisibilityChanged();
+      break;
+    case ax::mojom::Event::kLoadComplete:
+    case ax::mojom::Event::kDocumentTitleChanged:
+      // Sometimes, e.g. upon navigating away from the page, the tree is
+      // rebuilt rather than modified. The kDocumentTitleChanged event occurs
+      // prior to the rebuild and so is added on the previous root node. When
+      // the tree is rebuilt and the old node removed, the events on the old
+      // node are removed and no new kDocumentTitleChanged will be emitted. To
+      // ensure we still fire the event, though, we also pay attention to
+      // kLoadComplete.
+      OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kAlert:
+      OnAlertShown();
+      break;
+    default:
+      break;
+  }
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndicesForId(int id) {
+  auto iterator = base::ranges::find(hypertext_.hyperlinks, id);
+  if (iterator == hypertext_.hyperlinks.end())
+    return absl::nullopt;
+  int hyperlink_index = std::distance(hypertext_.hyperlinks.begin(), iterator);
+
+  auto offset =
+      base::ranges::find(hypertext_.hyperlink_offset_to_index, hyperlink_index,
+                         &AXLegacyHypertext::OffsetToIndex::value_type::second);
+  if (offset == hypertext_.hyperlink_offset_to_index.end())
+    return absl::nullopt;
+
+  return std::make_pair(UTF16ToUnicodeOffsetInText(offset->first),
+                        UTF16ToUnicodeOffsetInText(offset->first + 1));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndices() {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return absl::nullopt;
+  return parent->GetEmbeddedObjectIndicesForId(GetUniqueId());
+}
+
+void AXPlatformNodeAuraLinux::UpdateHypertext() {
+  EnsureAtkObjectIsValid();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AXLegacyHypertext old_hypertext = hypertext_;
+  base::OffsetAdjuster::Adjustments old_adjustments = GetHypertextAdjustments();
+
+  UpdateComputedHypertext();
+  text_unicode_adjustments_ = absl::nullopt;
+  offset_to_text_attributes_.clear();
+
+  if ((!HasState(ax::mojom::State::kEditable) ||
+       GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly) &&
+      !IsInLiveRegion()) {
+    return;
+  }
+
+  if (!EmitsAtkTextEvents())
+    return;
+
+  size_t shared_prefix, old_len, new_len;
+  ComputeHypertextRemovedAndInserted(old_hypertext, &shared_prefix, &old_len,
+                                     &new_len);
+  if (old_len > 0) {
+    std::u16string removed_substring =
+        old_hypertext.hypertext.substr(shared_prefix, old_len);
+
+    size_t shared_unicode_prefix = shared_prefix;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_prefix);
+    size_t shared_unicode_suffix = shared_prefix + old_len;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_suffix);
+
+    g_signal_emit_by_name(
+        atk_object, "text-remove",
+        shared_unicode_prefix,                  // position of removal
+        shared_unicode_suffix - shared_prefix,  // length of removal
+        base::UTF16ToUTF8(removed_substring).c_str());
+  }
+
+  if (new_len > 0) {
+    std::u16string inserted_substring =
+        hypertext_.hypertext.substr(shared_prefix, new_len);
+    size_t shared_unicode_prefix = UTF16ToUnicodeOffsetInText(shared_prefix);
+    size_t shared_unicode_suffix =
+        UTF16ToUnicodeOffsetInText(shared_prefix + new_len);
+    g_signal_emit_by_name(
+        atk_object, "text-insert",
+        shared_unicode_prefix,                          // position of insertion
+        shared_unicode_suffix - shared_unicode_prefix,  // length of insertion
+        base::UTF16ToUTF8(inserted_substring).c_str());
+  }
+}
+
+const AXLegacyHypertext& AXPlatformNodeAuraLinux::GetAXHypertext() {
+  return hypertext_;
+}
+
+const base::OffsetAdjuster::Adjustments&
+AXPlatformNodeAuraLinux::GetHypertextAdjustments() {
+  if (text_unicode_adjustments_.has_value())
+    return *text_unicode_adjustments_;
+
+  text_unicode_adjustments_.emplace();
+
+  std::u16string text = GetHypertext();
+  size_t text_length = text.size();
+  for (size_t i = 0; i < text_length; i++) {
+    base_icu::UChar32 code_point;
+    size_t original_i = i;
+    base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &i, &code_point);
+
+    if ((i - original_i + 1) != 1) {
+      text_unicode_adjustments_->push_back(
+          base::OffsetAdjuster::Adjustment(original_i, i - original_i + 1, 1));
+    }
+  }
+
+  return *text_unicode_adjustments_;
+}
+
+size_t AXPlatformNodeAuraLinux::UTF16ToUnicodeOffsetInText(
+    size_t utf16_offset) {
+  size_t unicode_offset = utf16_offset;
+  base::OffsetAdjuster::AdjustOffset(GetHypertextAdjustments(),
+                                     &unicode_offset);
+  return unicode_offset;
+}
+
+size_t AXPlatformNodeAuraLinux::UnicodeToUTF16OffsetInText(int unicode_offset) {
+  if (unicode_offset == kStringLengthOffset)
+    return GetHypertext().size();
+
+  size_t utf16_offset = unicode_offset;
+  base::OffsetAdjuster::UnadjustOffset(GetHypertextAdjustments(),
+                                       &utf16_offset);
+  return utf16_offset;
+}
+
+int AXPlatformNodeAuraLinux::GetTextOffsetAtPoint(int x,
+                                                  int y,
+                                                  AtkCoordType atk_coord_type) {
+  if (!GetExtentsRelativeToAtkCoordinateType(atk_coord_type).Contains(x, y))
+    return -1;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return -1;
+
+  int count = atk_text::GetCharacterCount(ATK_TEXT(atk_object));
+  for (int i = 0; i < count; i++) {
+    int out_x, out_y, out_width, out_height;
+    atk_text::GetCharacterExtents(ATK_TEXT(atk_object), i, &out_x, &out_y,
+                                  &out_width, &out_height, atk_coord_type);
+    gfx::Rect rect(out_x, out_y, out_width, out_height);
+    if (rect.Contains(x, y))
+      return i;
+  }
+  return -1;
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentOriginInScreenCoordinates()
+    const {
+  AtkObject* parent = GetParent();
+  if (!parent)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* parent_node =
+      AXPlatformNode::FromNativeViewAccessible(parent);
+  if (!parent)
+    return gfx::Vector2d();
+
+  return parent_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentFrameOriginInScreenCoordinates()
+    const {
+  AtkObject* frame = FindAtkObjectParentFrame(atk_object_);
+  if (!frame)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* frame_node =
+      AXPlatformNode::FromNativeViewAccessible(frame);
+  if (!frame_node)
+    return gfx::Vector2d();
+
+  return frame_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Rect AXPlatformNodeAuraLinux::GetExtentsRelativeToAtkCoordinateType(
+    AtkCoordType coord_type) const {
+  gfx::Rect extents = delegate_->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                               AXClippingBehavior::kUnclipped);
+  switch (coord_type) {
+    case ATK_XY_SCREEN:
+      break;
+    case ATK_XY_WINDOW: {
+      gfx::Vector2d window_origin = -GetParentFrameOriginInScreenCoordinates();
+      extents.Offset(window_origin);
+      break;
+    }
+#if defined(ATK_230)
+    case ATK_XY_PARENT: {
+      gfx::Vector2d parent_origin = -GetParentOriginInScreenCoordinates();
+      extents.Offset(parent_origin);
+      break;
+    }
+#endif
+  }
+
+  return extents;
+}
+
+void AXPlatformNodeAuraLinux::GetExtents(gint* x,
+                                         gint* y,
+                                         gint* width,
+                                         gint* height,
+                                         AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+  if (width)
+    *width = extents.width();
+  if (height)
+    *height = extents.height();
+}
+
+void AXPlatformNodeAuraLinux::GetPosition(gint* x,
+                                          gint* y,
+                                          AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+}
+
+void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
+  gfx::Rect rect_size = gfx::ToEnclosingRect(GetData().relative_bounds.bounds);
+  if (width)
+    *width = rect_size.width();
+  if (height)
+    *height = rect_size.height();
+}
+
+gfx::NativeViewAccessible
+AXPlatformNodeAuraLinux::HitTestSync(gint x, gint y, AtkCoordType coord_type) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, coord_type);
+
+  AXPlatformNode* current_result = this;
+  while (true) {
+    gfx::NativeViewAccessible hit_child =
+        current_result->GetDelegate()->HitTestSync(scroll_to.x(),
+                                                   scroll_to.y());
+    if (!hit_child)
+      return nullptr;
+    AXPlatformNode* hit_child_node =
+        AXPlatformNode::FromNativeViewAccessible(hit_child);
+    if (!hit_child_node || !hit_child_node->IsDescendantOf(current_result))
+      break;
+
+    // If we get the same node, we're done.
+    if (hit_child_node == current_result)
+      break;
+
+    // Continue to check recursively. That's because HitTestSync may have
+    // returned the best result within a particular accessibility tree,
+    // but we might need to recurse further in a tree of a different type
+    // (for example, from Views to Web).
+    current_result = hit_child_node;
+  }
+  return current_result->GetNativeViewAccessible();
+}
+
+bool AXPlatformNodeAuraLinux::GrabFocus() {
+  AXActionData action_data;
+  action_data.action = ax::mojom::Action::kFocus;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::FocusFirstFocusableAncestorInWebContent() {
+  if (!GetDelegate()->IsWebContent())
+    return false;
+
+  // Don't cross document boundaries in order to avoid having this operation
+  // cross iframe boundaries or escape to non-document UI elements.
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return false;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  if (IsFocusable()) {
+    if (g_current_focused != atk_object)
+      GrabFocus();
+    return true;
+  }
+
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return false;
+
+  // If any of the siblings of this element are focusable, focusing the parent
+  // would be like moving the focus position backward, so we should fall back
+  // to setting the sequential focus navigation starting point.
+  for (auto child_iterator_ptr = parent->GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *parent->GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child || child == this)
+      continue;
+
+    if (child->IsFocusable())
+      return false;
+  }
+
+  return parent->FocusFirstFocusableAncestorInWebContent();
+}
+
+bool AXPlatformNodeAuraLinux::SetSequentialFocusNavigationStartingPoint() {
+  AXActionData action_data;
+  action_data.action =
+      ax::mojom::Action::kSetSequentialFocusNavigationStartingPoint;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPoint() {
+  // First we try to grab focus on this node if any ancestor in the same
+  // document is focusable. Otherwise we set the sequential navigation starting
+  // point.
+  if (!FocusFirstFocusableAncestorInWebContent())
+    return SetSequentialFocusNavigationStartingPoint();
+  else
+    return true;
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(int offset) {
+  int child_count = delegate_->GetChildCount();
+  if (IsAtomicTextField() || child_count == 0)
+    return GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+
+  // When this node has children, we walk through them to figure out what child
+  // node should get focus. We are essentially repeating the process used when
+  // building the hypertext here.
+  int current_offset = 0;
+  for (int i = 0; i < child_count; ++i) {
+    auto* child = FromAtkObject(delegate_->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (child->IsText()) {
+      current_offset += child->GetName().size();
+    } else {
+      // Add an offset for the embedded character.
+      current_offset += 1;
+    }
+
+    // If the offset is larger than our size, try to work with the last child,
+    // which is also the behavior of SetCaretOffset.
+    if (offset <= current_offset || i == child_count - 1)
+      return child->GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+  }
+
+  NOTREACHED();
+  return false;
+}
+
+const gchar* AXPlatformNodeAuraLinux::GetDefaultActionName() {
+  int action;
+  if (!GetIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb, &action))
+    return nullptr;
+
+  // If this object cannot receive focus and has a button role, use click as
+  // the default action. On the AuraLinux platform, the press action is a
+  // signal to users that they can trigger the action using the keyboard, while
+  // a click action means the user should trigger the action via a simulated
+  // click. If this object cannot receive focus, it's impossible to trigger it
+  // with a key press.
+  if (GetRole() == ax::mojom::Role::kButton &&
+      action == static_cast<int>(ax::mojom::DefaultActionVerb::kPress) &&
+      !IsFocusable()) {
+    action = static_cast<int>(ax::mojom::DefaultActionVerb::kClick);
+  }
+
+  std::string action_verb =
+      ui::ToString(static_cast<ax::mojom::DefaultActionVerb>(action));
+
+  ATK_AURALINUX_RETURN_STRING(action_verb);
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetAtkAttributes() {
+  AtkAttributeSet* attribute_list = nullptr;
+  ComputeAttributes(&attribute_list);
+  return attribute_list;
+}
+
+AtkStateType AXPlatformNodeAuraLinux::GetAtkStateTypeForCheckableNode() {
+  if (GetData().GetCheckedState() == ax::mojom::CheckedState::kMixed)
+    return ATK_STATE_INDETERMINATE;
+  if (IsPlatformCheckable())
+    return ATK_STATE_CHECKED;
+  return ATK_STATE_PRESSED;
+}
+
+// AtkDocumentHelpers
+
+const gchar* AXPlatformNodeAuraLinux::GetDocumentAttributeValue(
+    const gchar* attribute) const {
+  if (!g_ascii_strcasecmp(attribute, "DocType"))
+    return delegate_->GetTreeData().doctype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "MimeType"))
+    return delegate_->GetTreeData().mimetype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "Title"))
+    return delegate_->GetTreeData().title.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "URI"))
+    return delegate_->GetTreeData().url.c_str();
+
+  return nullptr;
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetDocumentAttributes() const {
+  AtkAttributeSet* attribute_set = nullptr;
+  const gchar* doc_attributes[] = {"DocType", "MimeType", "Title", "URI"};
+  const gchar* value = nullptr;
+
+  for (unsigned i = 0; i < G_N_ELEMENTS(doc_attributes); i++) {
+    value = GetDocumentAttributeValue(doc_attributes[i]);
+    if (value) {
+      attribute_set = PrependAtkAttributeToAtkAttributeSet(
+          doc_attributes[i], value, attribute_set);
+    }
+  }
+
+  return attribute_set;
+}
+
+//
+// AtkHyperlink helpers
+//
+
+AtkHyperlink* AXPlatformNodeAuraLinux::GetAtkHyperlink() {
+  if (atk_hyperlink_)
+    return atk_hyperlink_;
+
+  atk_hyperlink_ =
+      ATK_HYPERLINK(g_object_new(AX_PLATFORM_ATK_HYPERLINK_TYPE, 0));
+  ax_platform_atk_hyperlink_set_object(
+      AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), this);
+  return atk_hyperlink_;
+}
+
+//
+// Misc helpers
+//
+
+void AXPlatformNodeAuraLinux::GetFloatAttributeInGValue(
+    ax::mojom::FloatAttribute attr,
+    GValue* value) {
+  float float_val;
+  if (GetFloatAttribute(attr, &float_val)) {
+    memset(value, 0, sizeof(*value));
+    g_value_init(value, G_TYPE_FLOAT);
+    g_value_set_float(value, float_val);
+  }
+}
+
+void AXPlatformNodeAuraLinux::AddAttributeToList(const char* name,
+                                                 const char* value,
+                                                 AtkAttributeSet** attributes) {
+  *attributes = PrependAtkAttributeToAtkAttributeSet(name, value, *attributes);
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParent(
+    AtkObject* new_document_parent) {
+  DCHECK(GetAtkRole() == ATK_ROLE_FRAME);
+  SetWeakGPtrToAtkObject(&document_parent_, new_document_parent);
+}
+
+bool AXPlatformNodeAuraLinux::IsNameExposed() {
+  switch (GetRole()) {
+    case ax::mojom::Role::kListMarker:
+      return !GetChildCount();
+    default:
+      return true;
+  }
+}
+
+int AXPlatformNodeAuraLinux::GetCaretOffset() {
+  if (!HasVisibleCaretOrSelection()) {
+    absl::optional<FindInPageResultInfo> result =
+        GetSelectionOffsetsFromFindInPage();
+    AtkObject* atk_object = GetOrCreateAtkObject();
+    if (!atk_object)
+      return -1;
+    if (result.has_value() && result->node == atk_object)
+      return UTF16ToUnicodeOffsetInText(result->end_offset);
+    return -1;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return UTF16ToUnicodeOffsetInText(selection.second);
+}
+
+bool AXPlatformNodeAuraLinux::SetCaretOffset(int offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  int character_count = atk_text_get_character_count(ATK_TEXT(atk_object));
+  if (offset < 0 || offset > character_count)
+    offset = character_count;
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  if (offset == GetCaretOffset() && !HasSelection())
+    return true;
+
+  offset = UnicodeToUTF16OffsetInText(offset);
+  if (!SetHypertextSelection(offset, offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::SetTextSelectionForAtkText(int start_offset,
+                                                         int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return false;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return false;
+
+  // We must put these in the correct order so that we can do
+  // a comparison with the existing start and end below.
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  std::pair<int, int> old_offsets = GetSelectionOffsetsForAtk();
+  if (old_offsets.first == start_offset && old_offsets.second == end_offset)
+    return true;
+
+  if (!SetHypertextSelection(start_offset, end_offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::HasSelection() {
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return selection.first >= 0 && selection.second >= 0 &&
+         selection.first != selection.second;
+}
+
+void AXPlatformNodeAuraLinux::GetSelectionExtents(int* start_offset,
+                                                  int* end_offset) {
+  if (start_offset)
+    *start_offset = 0;
+  if (end_offset)
+    *end_offset = 0;
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  if (selection.first < 0 || selection.second < 0 ||
+      selection.first == selection.second)
+    return;
+
+  // We should ignore the direction of the selection when exposing start and
+  // end offsets. According to the ATK documentation the end offset is always
+  // the offset immediately past the end of the selection. This wouldn't make
+  // sense if end < start.
+  if (selection.second < selection.first)
+    std::swap(selection.first, selection.second);
+
+  selection.first = UTF16ToUnicodeOffsetInText(selection.first);
+  selection.second = UTF16ToUnicodeOffsetInText(selection.second);
+
+  if (start_offset)
+    *start_offset = selection.first;
+  if (end_offset)
+    *end_offset = selection.second;
+}
+
+// Since this method doesn't return a static gchar*, we expect the caller of
+// atk_text_get_selection to free the return value.
+gchar* AXPlatformNodeAuraLinux::GetSelectionWithText(int* start_offset,
+                                                     int* end_offset) {
+  int selection_start, selection_end;
+  GetSelectionExtents(&selection_start, &selection_end);
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    absl::optional<FindInPageResultInfo> find_in_page_result =
+        GetSelectionOffsetsFromFindInPage();
+    if (!find_in_page_result.has_value() ||
+        find_in_page_result->node != atk_object) {
+      *start_offset = 0;
+      *end_offset = 0;
+      return nullptr;
+    }
+
+    selection_start = find_in_page_result->start_offset;
+    selection_end = find_in_page_result->end_offset;
+  }
+
+  selection_start = UTF16ToUnicodeOffsetInText(selection_start);
+  selection_end = UTF16ToUnicodeOffsetInText(selection_end);
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    return nullptr;
+  }
+
+  if (start_offset)
+    *start_offset = selection_start;
+  if (end_offset)
+    *end_offset = selection_end;
+  return atk_text::GetText(ATK_TEXT(atk_object), selection_start,
+                           selection_end);
+}
+
+bool AXPlatformNodeAuraLinux::IsInLiveRegion() {
+  return HasStringAttribute(ax::mojom::StringAttribute::kContainerLiveStatus);
+}
+
+#if defined(ATK_230)
+void AXPlatformNodeAuraLinux::ScrollToPoint(AtkCoordType atk_coord_type,
+                                            int x,
+                                            int y) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, atk_coord_type);
+
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToPoint;
+  action_data.target_point = scroll_to;
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeRectIntoView(
+    gfx::Rect rect,
+    AtkScrollType atk_scroll_type) {
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToMakeVisible;
+  action_data.target_rect = rect;
+
+  action_data.scroll_behavior = ax::mojom::ScrollBehavior::kScrollIfVisible;
+  action_data.horizontal_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+  action_data.vertical_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+
+  switch (atk_scroll_type) {
+    case ATK_SCROLL_TOP_LEFT:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_BOTTOM_RIGHT:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_TOP_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      break;
+    case ATK_SCROLL_BOTTOM_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_LEFT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_RIGHT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      break;
+    case ATK_SCROLL_ANYWHERE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      break;
+  }
+
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeIntoView(
+    AtkScrollType atk_scroll_type) {
+  gfx::Rect rect = GetDelegate()->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                                AXClippingBehavior::kUnclipped);
+  rect -= rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+}
+#endif  // defined(ATK_230)
+
+#if defined(ATK_232)
+absl::optional<gfx::Rect>
+AXPlatformNodeAuraLinux::GetUnclippedHypertextRangeBoundsRect(int start_offset,
+                                                              int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  return GetDelegate()->GetHypertextRangeBoundsRect(
+      UnicodeToUTF16OffsetInText(start_offset),
+      UnicodeToUTF16OffsetInText(end_offset), AXCoordinateSystem::kScreenDIPs,
+      AXClippingBehavior::kUnclipped);
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringIntoView(
+    AtkScrollType atk_scroll_type,
+    int start_offset,
+    int end_offset) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  rect -= node_rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringToPoint(
+    int start_offset,
+    int end_offset,
+    AtkCoordType atk_coord_type,
+    int x,
+    int y) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  ScrollToPoint(atk_coord_type, x - (rect.x() - node_rect.x()),
+                y - (rect.y() - node_rect.y()));
+
+  return true;
+}
+#endif  // defined(ATK_232)
+
+void AXPlatformNodeAuraLinux::ComputeStylesIfNeeded() {
+  if (!offset_to_text_attributes_.empty())
+    return;
+
+  default_text_attributes_ = ComputeTextAttributes();
+  TextAttributeMap attributes_map =
+      GetDelegate()->ComputeTextAttributeMap(default_text_attributes_);
+  offset_to_text_attributes_.swap(attributes_map);
+}
+
+int AXPlatformNodeAuraLinux::FindStartOfStyle(
+    int start_offset,
+    ax::mojom::MoveDirection direction) {
+  int text_length = GetHypertext().length();
+  DCHECK_GE(start_offset, 0);
+  DCHECK_LE(start_offset, text_length);
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  switch (direction) {
+    case ax::mojom::MoveDirection::kNone:
+      NOTREACHED();
+      return start_offset;
+    case ax::mojom::MoveDirection::kBackward: {
+      auto iterator = offset_to_text_attributes_.upper_bound(start_offset);
+      --iterator;
+      return iterator->first;
+    }
+    case ax::mojom::MoveDirection::kForward: {
+      const auto iterator =
+          offset_to_text_attributes_.upper_bound(start_offset);
+      if (iterator == offset_to_text_attributes_.end())
+        return text_length;
+      return iterator->first;
+    }
+  }
+
+  NOTREACHED();
+  return start_offset;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetTextAttributes(
+    int offset,
+    int* start_offset,
+    int* end_offset) {
+  ComputeStylesIfNeeded();
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  int utf16_offset = UnicodeToUTF16OffsetInText(offset);
+  int style_start =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kBackward);
+  int style_end =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kForward);
+
+  auto iterator = offset_to_text_attributes_.find(style_start);
+  DCHECK(iterator != offset_to_text_attributes_.end());
+
+  SetIntPointerValueIfNotNull(start_offset,
+                              UTF16ToUnicodeOffsetInText(style_start));
+  SetIntPointerValueIfNotNull(end_offset,
+                              UTF16ToUnicodeOffsetInText(style_end));
+
+  if (iterator == offset_to_text_attributes_.end())
+    return default_text_attributes_;
+
+  return iterator->second;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetDefaultTextAttributes() {
+  ComputeStylesIfNeeded();
+  return default_text_attributes_;
+}
+
+void AXPlatformNodeAuraLinux::TerminateFindInPage() {
+  ForgetCurrentFindInPageResult();
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageResult(int start_offset,
+                                                       int end_offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  if (!EmitsAtkTextEvents()) {
+    ActivateFindInPageInParent(start_offset, end_offset);
+    return;
+  }
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  FindInPageResultInfo new_info = {atk_object, start_offset, end_offset};
+  if (iterator != active_results.end() && iterator->second == new_info)
+    return;
+
+  active_results[parent_doc] = new_info;
+  g_signal_emit_by_name(atk_object, "text-selection-changed");
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(end_offset));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetHypertextExtentsOfChild(
+    AXPlatformNodeAuraLinux* child_to_find) {
+  int current_offset = 0;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child)
+      continue;
+
+    // If this object is a text only object, it is included directly into this
+    // node's hypertext, otherwise it is represented as an embedded object
+    // character.
+    int size = child->IsText() ? child->GetName().size() : 1;
+    if (child == child_to_find)
+      return std::make_pair(current_offset, current_offset + size);
+    current_offset += size;
+  }
+
+  return absl::nullopt;
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageInParent(int start_offset,
+                                                         int end_offset) {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return;
+
+  absl::optional<std::pair<int, int>> extents_in_parent =
+      parent->GetHypertextExtentsOfChild(this);
+  if (!extents_in_parent.has_value())
+    return;
+
+  DCHECK(IsText());
+  parent->ActivateFindInPageResult(extents_in_parent->first + start_offset,
+                                   extents_in_parent->first + end_offset);
+}
+
+void AXPlatformNodeAuraLinux::ForgetCurrentFindInPageResult() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (parent_doc)
+    GetActiveFindInPageResults().erase(parent_doc);
+}
+
+absl::optional<FindInPageResultInfo>
+AXPlatformNodeAuraLinux::GetSelectionOffsetsFromFindInPage() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return absl::nullopt;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return absl::nullopt;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  if (iterator == active_results.end())
+    return absl::nullopt;
+
+  return iterator->second;
+}
+
+gfx::Point AXPlatformNodeAuraLinux::ConvertPointToScreenCoordinates(
+    const gfx::Point& point,
+    AtkCoordType atk_coord_type) {
+  switch (atk_coord_type) {
+    case ATK_XY_WINDOW:
+      return point + GetParentFrameOriginInScreenCoordinates();
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      return point + GetParentOriginInScreenCoordinates();
+#endif
+    case ATK_XY_SCREEN:
+    default:
+      return point;
+  }
+}
+
+std::pair<int, int> AXPlatformNodeAuraLinux::GetSelectionOffsetsForAtk() {
+  // In web content we always want to look at the selection from the tree
+  // instead of the selection that might be set via node attributes. This is
+  // because the tree selection is the absolute truth about what is visually
+  // selected, whereas node attributes might contain selection extents that are
+  // no longer part of the visual selection.
+  std::pair<int, int> selection;
+  if (GetDelegate()->IsWebContent()) {
+    AXSelection unignored_selection = GetDelegate()->GetUnignoredSelection();
+    GetSelectionOffsetsFromTree(&unignored_selection, &selection.first,
+                                &selection.second);
+  } else {
+    GetSelectionOffsets(&selection.first, &selection.second);
+  }
+  return selection;
+}
+
+}  // namespace ui
Index: chromium/create-123.0.6286.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc
===================================================================
--- chromium/create-123.0.6286.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc	(nonexistent)
+++ chromium/create-123.0.6286.1-dangling-gsl-patch/src-orig/ui/accessibility/platform/ax_platform_node_auralinux.cc	(revision 385)
@@ -0,0 +1,5096 @@
+// Copyright 2017 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ui/accessibility/platform/ax_platform_node_auralinux.h"
+#include "base/memory/raw_ptr.h"
+
+#include <dlfcn.h>
+#include <stdint.h>
+
+#include <algorithm>
+#include <memory>
+#include <set>
+#include <string>
+#include <utility>
+#include <vector>
+
+#include "base/compiler_specific.h"
+#include "base/debug/leak_annotations.h"
+#include "base/metrics/histogram_macros.h"
+#include "base/no_destructor.h"
+#include "base/ranges/algorithm.h"
+#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
+#include "base/strings/sys_string_conversions.h"
+#include "base/strings/utf_string_conversion_utils.h"
+#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "third_party/abseil-cpp/absl/types/optional.h"
+#include "ui/accessibility/ax_action_data.h"
+#include "ui/accessibility/ax_enum_util.h"
+#include "ui/accessibility/ax_enums.mojom.h"
+#include "ui/accessibility/ax_node_data.h"
+#include "ui/accessibility/ax_role_properties.h"
+#include "ui/accessibility/ax_selection.h"
+#include "ui/accessibility/platform/atk_util_auralinux.h"
+#include "ui/accessibility/platform/ax_platform.h"
+#include "ui/accessibility/platform/ax_platform_atk_hyperlink.h"
+#include "ui/accessibility/platform/ax_platform_node_delegate.h"
+#include "ui/accessibility/platform/ax_platform_text_boundary.h"
+#include "ui/accessibility/platform/child_iterator.h"
+#include "ui/gfx/geometry/rect_conversions.h"
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 10, 0)
+#define ATK_210
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 12, 0)
+#define ATK_212
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 16, 0)
+#define ATK_216
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 26, 0)
+#define ATK_226
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 30, 0)
+#define ATK_230
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 32, 0)
+#define ATK_232
+#endif
+
+#if defined(ATK_CHECK_VERSION) && ATK_CHECK_VERSION(2, 34, 0)
+#define ATK_234
+#endif
+
+namespace ui {
+
+namespace {
+
+// IMPORTANT!
+// These values are written to logs.  Do not renumber or delete
+// existing items; add new entries to the end of the list.
+enum class UmaAtkApi {
+  kGetName = 0,
+  kGetDescription = 1,
+  kGetNChildren = 2,
+  kRefChild = 3,
+  kGetIndexInParent = 4,
+  kGetParent = 5,
+  kRefRelationSet = 6,
+  kGetAttributes = 7,
+  kGetRole = 8,
+  kRefStateSet = 9,
+  // This must always be the last enum. It's okay for its value to
+  // increase, but none of the other enum values may change.
+  kMaxValue = kRefStateSet,
+};
+
+void RecordAccessibilityAtkApi(UmaAtkApi enum_value) {
+  UMA_HISTOGRAM_ENUMERATION("Accessibility.ATK-APIs", enum_value);
+}
+
+// When accepting input from clients calling the API, an ATK character offset
+// of -1 can often represent the length of the string.
+static const int kStringLengthOffset = -1;
+
+// We must forward declare this because it is used by the traditional GObject
+// type manipulation macros.
+namespace atk_object {
+GType GetType();
+}  // namespace atk_object
+
+//
+// ax_platform_node_auralinux AtkObject definition and implementation.
+//
+#define AX_PLATFORM_NODE_AURALINUX_TYPE (atk_object::GetType())
+#define AX_PLATFORM_NODE_AURALINUX(obj)                               \
+  (G_TYPE_CHECK_INSTANCE_CAST((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                              AXPlatformNodeAuraLinuxObject))
+#define AX_PLATFORM_NODE_AURALINUX_CLASS(klass)                      \
+  (G_TYPE_CHECK_CLASS_CAST((klass), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                           AXPlatformNodeAuraLinuxClass))
+#define IS_AX_PLATFORM_NODE_AURALINUX(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE((obj), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define IS_AX_PLATFORM_NODE_AURALINUX_CLASS(klass) \
+  (G_TYPE_CHECK_CLASS_TYPE((klass), AX_PLATFORM_NODE_AURALINUX_TYPE))
+#define AX_PLATFORM_NODE_AURALINUX_GET_CLASS(obj)                    \
+  (G_TYPE_INSTANCE_GET_CLASS((obj), AX_PLATFORM_NODE_AURALINUX_TYPE, \
+                             AXPlatformNodeAuraLinuxClass))
+
+typedef struct _AXPlatformNodeAuraLinuxObject AXPlatformNodeAuraLinuxObject;
+typedef struct _AXPlatformNodeAuraLinuxClass AXPlatformNodeAuraLinuxClass;
+
+struct _AXPlatformNodeAuraLinuxObject {
+  AtkObject parent;
+  raw_ptr<AXPlatformNodeAuraLinux> m_object;
+};
+
+struct _AXPlatformNodeAuraLinuxClass {
+  AtkObjectClass parent_class;
+};
+
+// The root-level Application object that's the parent of all top-level windows.
+AXPlatformNode* g_root_application = nullptr;
+
+// The last AtkObject with keyboard focus. Tracking this is required to emit the
+// ATK_STATE_FOCUSED change to false.
+AtkObject* g_current_focused = nullptr;
+
+// The last object which was selected. Tracking this is required because
+// widgets in the browser UI only emit notifications upon becoming selected,
+// but clients also expect notifications when items become unselected.
+AXPlatformNodeAuraLinux* g_current_selected = nullptr;
+
+// The AtkObject with role=ATK_ROLE_FRAME that represents the toplevel desktop
+// window with focus. If this window is not one of our windows, this value
+// should be null. This is a weak pointer as well, so its value will also be
+// null if if the AtkObject is destroyed.
+AtkObject* g_active_top_level_frame = nullptr;
+
+AtkObject* g_active_views_dialog = nullptr;
+
+#if defined(ATK_216)
+constexpr AtkRole kStaticRole = ATK_ROLE_STATIC;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_SUBSCRIPT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_SUPERSCRIPT;
+#else
+constexpr AtkRole kStaticRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSubscriptRole = ATK_ROLE_TEXT;
+constexpr AtkRole kSuperscriptRole = ATK_ROLE_TEXT;
+#endif
+
+#if defined(ATK_226)
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_FOOTNOTE;
+#else
+constexpr AtkRole kAtkFootnoteRole = ATK_ROLE_LIST_ITEM;
+#endif
+
+#if defined(ATK_234)
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_CONTENT_DELETION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_CONTENT_INSERTION;
+#else
+constexpr AtkRole kAtkRoleContentDeletion = ATK_ROLE_SECTION;
+constexpr AtkRole kAtkRoleContentInsertion = ATK_ROLE_SECTION;
+#endif
+
+using GetTypeFunc = GType (*)();
+using GetColumnHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowHeaderCellsFunc = GPtrArray* (*)(AtkTableCell* cell);
+using GetRowColumnSpanFunc = bool (*)(AtkTableCell* cell,
+                                      gint* row,
+                                      gint* column,
+                                      gint* row_span,
+                                      gint* col_span);
+
+static GetTypeFunc g_atk_table_cell_get_type;
+static GetColumnHeaderCellsFunc g_atk_table_cell_get_column_header_cells;
+static GetRowHeaderCellsFunc g_atk_table_cell_get_row_header_cells;
+static GetRowColumnSpanFunc g_atk_table_cell_get_row_column_span;
+
+// The ATK API often requires pointers to be used as out arguments, while
+// allowing for those pointers to be null if the caller is not interested in
+// the value. This function is a simpler helper to avoid continually checking
+// for null and to help prevent forgetting to check for null.
+void SetIntPointerValueIfNotNull(int* pointer, int value) {
+  if (pointer)
+    *pointer = value;
+}
+
+#if defined(ATK_230)
+bool SupportsAtkComponentScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_component_scroll_to_point");
+}
+#endif
+
+#if defined(ATK_232)
+bool SupportsAtkTextScrollingInterface() {
+  return dlsym(RTLD_DEFAULT, "atk_text_scroll_substring_to_point");
+}
+#endif
+
+AtkObject* FindAtkObjectParentFrame(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_FRAME)
+      return node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return nullptr;
+}
+
+AtkObject* FindAtkObjectToplevelParentDocument(AtkObject* atk_object) {
+  AXPlatformNodeAuraLinux* node =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  AtkObject* toplevel_document = nullptr;
+  while (node) {
+    if (node->GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+      toplevel_document = node->GetNativeViewAccessible();
+    node = AXPlatformNodeAuraLinux::FromAtkObject(node->GetParent());
+  }
+  return toplevel_document;
+}
+
+bool IsFrameAncestorOfAtkObject(AtkObject* frame, AtkObject* atk_object) {
+  AtkObject* current_frame = FindAtkObjectParentFrame(atk_object);
+  while (current_frame) {
+    if (current_frame == frame)
+      return true;
+    AXPlatformNodeAuraLinux* frame_node =
+        AXPlatformNodeAuraLinux::FromAtkObject(current_frame);
+    current_frame = FindAtkObjectParentFrame(frame_node->GetParent());
+  }
+  return false;
+}
+
+// Returns a stack of AtkObjects of activated popup menus. Since each popup
+// menu and submenu has its own native window, we want to properly manage the
+// activated state for their containing frames.
+std::vector<AtkObject*>& GetActiveMenus() {
+  static base::NoDestructor<std::vector<AtkObject*>> active_menus;
+  return *active_menus;
+}
+
+std::map<AtkObject*, FindInPageResultInfo>& GetActiveFindInPageResults() {
+  static base::NoDestructor<std::map<AtkObject*, FindInPageResultInfo>>
+      active_results;
+  return *active_results;
+}
+
+// The currently active frame is g_active_top_level_frame, unless there is an
+// active menu. If there is an active menu the parent frame of the
+// most-recently opened active menu should be the currently active frame.
+AtkObject* ComputeActiveTopLevelFrame() {
+  if (!GetActiveMenus().empty())
+    return FindAtkObjectParentFrame(GetActiveMenus().back());
+  return g_active_top_level_frame;
+}
+
+const char* GetUniqueAccessibilityGTypeName(
+    ImplementedAtkInterfaces interface_mask) {
+  // 37 characters is enough for "AXPlatformNodeAuraLinux%x" with any integer
+  // value.
+  static char name[37];
+  snprintf(name, sizeof(name), "AXPlatformNodeAuraLinux%x",
+           interface_mask.value());
+  return name;
+}
+
+void SetWeakGPtrToAtkObject(AtkObject** weak_pointer, AtkObject* new_value) {
+  DCHECK(weak_pointer);
+  if (*weak_pointer == new_value)
+    return;
+
+  if (*weak_pointer) {
+    g_object_remove_weak_pointer(G_OBJECT(*weak_pointer),
+                                 reinterpret_cast<void**>(weak_pointer));
+  }
+
+  *weak_pointer = new_value;
+
+  if (new_value) {
+    g_object_add_weak_pointer(G_OBJECT(new_value),
+                              reinterpret_cast<void**>(weak_pointer));
+  }
+}
+
+void SetActiveTopLevelFrame(AtkObject* new_top_level_frame) {
+  SetWeakGPtrToAtkObject(&g_active_top_level_frame, new_top_level_frame);
+}
+
+AXCoordinateSystem AtkCoordTypeToAXCoordinateSystem(
+    AtkCoordType coordinate_type) {
+  switch (coordinate_type) {
+    case ATK_XY_SCREEN:
+      return AXCoordinateSystem::kScreenDIPs;
+    case ATK_XY_WINDOW:
+      return AXCoordinateSystem::kRootFrame;
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      // AXCoordinateSystem does not support parent coordinates.
+      NOTIMPLEMENTED();
+      return AXCoordinateSystem::kFrame;
+#endif
+    default:
+      return AXCoordinateSystem::kScreenDIPs;
+  }
+}
+
+const char* BuildDescriptionFromHeaders(AXPlatformNodeDelegate* delegate,
+                                        const std::vector<int32_t>& ids) {
+  std::vector<std::string> names;
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = delegate->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        if (const gchar* name = atk_object_get_name(atk_header))
+          names.push_back(name);
+      }
+    }
+  }
+
+  std::string result = base::JoinString(names, " ");
+
+#if defined(LEAK_SANITIZER) && !BUILDFLAG(IS_NACL)
+  // http://crbug.com/982839
+  // atk_table_get_column_description and atk_table_get_row_description return
+  // const gchar*, which suggests the caller does not gain ownership of the
+  // returned string. The g_strdup below causes a new allocation, which does not
+  // fit that pattern and causes a leak in tests.
+  ScopedLeakSanitizerDisabler lsan_disabler;
+#endif
+
+  return g_strdup(result.c_str());
+}
+
+AtkAttributeSet* PrependAtkAttributeToAtkAttributeSet(
+    const char* name,
+    const char* value,
+    AtkAttributeSet* attribute_set) {
+  AtkAttribute* attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  attribute->name = g_strdup(name);
+  attribute->value = g_strdup(value);
+  return g_slist_prepend(attribute_set, attribute);
+}
+
+void PrependTextAttributeToSet(const std::string& attribute,
+                               const std::string& value,
+                               AtkAttributeSet** attributes) {
+  DCHECK(attributes);
+
+  AtkAttribute* new_attribute =
+      static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute)));
+  new_attribute->name = g_strdup(attribute.c_str());
+  new_attribute->value = g_strdup(value.c_str());
+  *attributes = g_slist_prepend(*attributes, new_attribute);
+}
+
+void PrependAtkTextAttributeToSet(const AtkTextAttribute attribute,
+                                  const std::string& value,
+                                  AtkAttributeSet** attributes) {
+  PrependTextAttributeToSet(atk_text_attribute_get_name(attribute), value,
+                            attributes);
+}
+
+std::string ToAtkTextAttributeColor(const std::string color) {
+  // The platform-independent color string is in the form "rgb(r, g, b)",
+  // but ATK expects a string like "r, g, b". We convert the string here
+  // by stripping away the unnecessary characters.
+  DCHECK(base::StartsWith(color, "rgb(", base::CompareCase::INSENSITIVE_ASCII));
+  DCHECK(base::EndsWith(color, ")", base::CompareCase::INSENSITIVE_ASCII));
+  return color.substr(4, color.length() - 5);
+}
+
+AtkAttributeSet* ToAtkAttributeSet(const TextAttributeList& attributes) {
+  AtkAttributeSet* copied_attributes = nullptr;
+  for (const auto& attribute : attributes) {
+    if (attribute.first == "background-color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_BG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "color") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FG_COLOR,
+                                   ToAtkTextAttributeColor(attribute.second),
+                                   &copied_attributes);
+    } else if (attribute.first == "font-family") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_FAMILY_NAME, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-size") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_SIZE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "font-weight" && attribute.second == "bold") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_WEIGHT, "700",
+                                   &copied_attributes);
+    } else if (attribute.first == "font-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STYLE, "italic",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-line-through-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_STRIKETHROUGH, "true",
+                                   &copied_attributes);
+    } else if (attribute.first == "text-underline-style") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "single",
+                                   &copied_attributes);
+    } else if (attribute.first == "invalid") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_INVALID, attribute.second,
+                                   &copied_attributes);
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_UNDERLINE, "error",
+                                   &copied_attributes);
+    } else if (attribute.first == "language") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_LANGUAGE, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "writing-mode") {
+      PrependAtkTextAttributeToSet(ATK_TEXT_ATTR_DIRECTION, attribute.second,
+                                   &copied_attributes);
+    } else if (attribute.first == "text-position") {
+      PrependTextAttributeToSet(attribute.first, attribute.second,
+                                &copied_attributes);
+    }
+  }
+
+  return g_slist_reverse(copied_attributes);
+}
+
+namespace atk_component {
+
+void GetExtents(AtkComponent* atk_component,
+                gint* x,
+                gint* y,
+                gint* width,
+                gint* height,
+                AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetExtents(x, y, width, height, coord_type);
+}
+
+void GetPosition(AtkComponent* atk_component,
+                 gint* x,
+                 gint* y,
+                 AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (x)
+    *x = 0;
+  if (y)
+    *y = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+void GetSize(AtkComponent* atk_component, gint* width, gint* height) {
+  g_return_if_fail(ATK_IS_COMPONENT(atk_component));
+
+  if (width)
+    *width = 0;
+  if (height)
+    *height = 0;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+AtkObject* RefAccesibleAtPoint(AtkComponent* atk_component,
+                               gint x,
+                               gint y,
+                               AtkCoordType coord_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), nullptr);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  AtkObject* result = obj->HitTestSync(x, y, coord_type);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+gboolean GrabFocus(AtkComponent* atk_component) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+  AtkObject* atk_object = ATK_OBJECT(atk_component);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  return obj->GrabFocus();
+}
+
+#if defined(ATK_230)
+gboolean ScrollTo(AtkComponent* atk_component, AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollNodeIntoView(scroll_type);
+  return TRUE;
+}
+
+gboolean ScrollToPoint(AtkComponent* atk_component,
+                       AtkCoordType atk_coord_type,
+                       gint x,
+                       gint y) {
+  g_return_val_if_fail(ATK_IS_COMPONENT(atk_component), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_component));
+  if (!obj)
+    return FALSE;
+
+  obj->ScrollToPoint(atk_coord_type, x, y);
+  return TRUE;
+}
+#endif
+
+void Init(AtkComponentIface* iface) {
+  iface->get_extents = GetExtents;
+  iface->get_position = GetPosition;
+  iface->get_size = GetSize;
+  iface->ref_accessible_at_point = RefAccesibleAtPoint;
+  iface->grab_focus = GrabFocus;
+#if defined(ATK_230)
+  if (SupportsAtkComponentScrollingInterface()) {
+    iface->scroll_to = ScrollTo;
+    iface->scroll_to_point = ScrollToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_component
+
+namespace atk_action {
+
+gboolean DoAction(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), FALSE);
+  g_return_val_if_fail(index >= 0, FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), FALSE);
+
+  AXActionData data;
+  data.action = actions[index];
+  return obj->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gint GetNActions(AtkAction* atk_action) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return static_cast<gint>(obj->GetDelegate()->GetSupportedActions().size());
+}
+
+const gchar* GetDescription(AtkAction*, gint) {
+  // Not implemented. Right now Orca does not provide this and
+  // Chromium is not providing a string for the action description.
+  return nullptr;
+}
+
+const gchar* GetName(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0.
+    return obj->GetDefaultActionName();
+  }
+  return ToString(actions[index]);
+}
+
+const gchar* GetKeybinding(AtkAction* atk_action, gint index) {
+  g_return_val_if_fail(ATK_IS_ACTION(atk_action), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_action);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  const std::vector<ax::mojom::Action> actions =
+      obj->GetDelegate()->GetSupportedActions();
+  g_return_val_if_fail(index < static_cast<gint>(actions.size()), nullptr);
+
+  if (index == 0 && obj->GetDelegate()->HasDefaultActionVerb()) {
+    // If there is a default action, it will always be at index 0. Only the
+    // default action has a key binding.
+    return obj->GetStringAttribute(ax::mojom::StringAttribute::kAccessKey)
+        .c_str();
+  }
+  return nullptr;
+}
+
+void Init(AtkActionIface* iface) {
+  iface->do_action = DoAction;
+  iface->get_n_actions = GetNActions;
+  iface->get_description = GetDescription;
+  iface->get_name = GetName;
+  iface->get_keybinding = GetKeybinding;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_action
+
+namespace atk_document {
+
+const gchar* GetDocumentAttributeValue(AtkDocument* atk_doc,
+                                       const gchar* attribute) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributeValue(attribute);
+}
+
+AtkAttributeSet* GetDocumentAttributes(AtkDocument* atk_doc) {
+  g_return_val_if_fail(ATK_IS_DOCUMENT(atk_doc), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_doc);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetDocumentAttributes();
+}
+
+void Init(AtkDocumentIface* iface) {
+  iface->get_document_attribute_value = GetDocumentAttributeValue;
+  iface->get_document_attributes = GetDocumentAttributes;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_document
+
+namespace atk_image {
+
+void GetImagePosition(AtkImage* atk_img,
+                      gint* x,
+                      gint* y,
+                      AtkCoordType coord_type) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetPosition(x, y, coord_type);
+}
+
+const gchar* GetImageDescription(AtkImage* atk_img) {
+  g_return_val_if_fail(ATK_IMAGE(atk_img), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+void GetImageSize(AtkImage* atk_img, gint* width, gint* height) {
+  g_return_if_fail(ATK_IMAGE(atk_img));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_img);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetSize(width, height);
+}
+
+void Init(AtkImageIface* iface) {
+  iface->get_image_position = GetImagePosition;
+  iface->get_image_description = GetImageDescription;
+  iface->get_image_size = GetImageSize;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_image
+
+namespace atk_value {
+
+void GetCurrentValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kValueForRange,
+                                 value);
+}
+
+void GetMinimumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMinValueForRange,
+                                 value);
+}
+
+void GetMaximumValue(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kMaxValueForRange,
+                                 value);
+}
+
+void GetMinimumIncrement(AtkValue* atk_value, GValue* value) {
+  g_return_if_fail(ATK_IS_VALUE(atk_value));
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return;
+
+  obj->GetFloatAttributeInGValue(ax::mojom::FloatAttribute::kStepValueForRange,
+                                 value);
+}
+
+gboolean SetCurrentValue(AtkValue* atk_value, const GValue* value) {
+  g_return_val_if_fail(ATK_IS_VALUE(atk_value), FALSE);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_value);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return FALSE;
+
+  std::string new_value;
+  switch (G_VALUE_TYPE(value)) {
+    case G_TYPE_FLOAT:
+      new_value = base::NumberToString(g_value_get_float(value));
+      break;
+    case G_TYPE_INT:
+      new_value = base::NumberToString(g_value_get_int(value));
+      break;
+    case G_TYPE_INT64:
+      new_value = base::NumberToString(g_value_get_int64(value));
+      break;
+    case G_TYPE_STRING:
+      new_value = g_value_get_string(value);
+      break;
+    default:
+      return FALSE;
+  }
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kSetValue;
+  data.value = new_value;
+  obj->GetDelegate()->AccessibilityPerformAction(data);
+  return TRUE;
+}
+
+void Init(AtkValueIface* iface) {
+  iface->get_current_value = GetCurrentValue;
+  iface->get_maximum_value = GetMaximumValue;
+  iface->get_minimum_value = GetMinimumValue;
+  iface->get_minimum_increment = GetMinimumIncrement;
+  iface->set_current_value = SetCurrentValue;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_value
+
+namespace atk_hyperlink {
+
+AtkHyperlink* GetHyperlink(AtkHyperlinkImpl* atk_hyperlink_impl) {
+  g_return_val_if_fail(ATK_HYPERLINK_IMPL(atk_hyperlink_impl), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_hyperlink_impl);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  AtkHyperlink* atk_hyperlink = obj->GetAtkHyperlink();
+  g_object_ref(atk_hyperlink);
+
+  return atk_hyperlink;
+}
+
+void Init(AtkHyperlinkImplIface* iface) {
+  iface->get_hyperlink = GetHyperlink;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hyperlink
+
+namespace atk_hypertext {
+
+AtkHyperlink* GetLink(AtkHypertext* hypertext, int index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return nullptr;
+
+  const AXLegacyHypertext& ax_hypertext = obj->GetAXHypertext();
+  if (index >= static_cast<int>(ax_hypertext.hyperlinks.size()) || index < 0)
+    return nullptr;
+
+  int32_t id = ax_hypertext.hyperlinks[index];
+  auto* link = static_cast<AXPlatformNodeAuraLinux*>(
+      AXPlatformNodeBase::GetFromUniqueId(id));
+  if (!link)
+    return nullptr;
+
+  return link->GetAtkHyperlink();
+}
+
+int GetNLinks(AtkHypertext* hypertext) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  return obj ? obj->GetAXHypertext().hyperlinks.size() : 0;
+}
+
+int GetLinkIndex(AtkHypertext* hypertext, int char_index) {
+  g_return_val_if_fail(ATK_HYPERTEXT(hypertext), 0);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(hypertext));
+  if (!obj)
+    return -1;
+
+  auto it = obj->GetAXHypertext().hyperlink_offset_to_index.find(char_index);
+  if (it == obj->GetAXHypertext().hyperlink_offset_to_index.end())
+    return -1;
+  return it->second;
+}
+
+void Init(AtkHypertextIface* iface) {
+  iface->get_link = GetLink;
+  iface->get_n_links = GetNLinks;
+  iface->get_link_index = GetLinkIndex;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_hypertext
+
+namespace atk_text {
+
+gchar* GetText(AtkText* atk_text, gint start_offset, gint end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  std::u16string text = obj->GetHypertext();
+
+  start_offset = obj->UnicodeToUTF16OffsetInText(start_offset);
+  if (start_offset < 0 || start_offset >= static_cast<int>(text.size()))
+    return nullptr;
+
+  if (end_offset < 0) {
+    end_offset = text.size();
+  } else {
+    end_offset = obj->UnicodeToUTF16OffsetInText(end_offset);
+    end_offset =
+        std::clamp(static_cast<int>(text.size()), start_offset, end_offset);
+  }
+
+  DCHECK_GE(start_offset, 0);
+  DCHECK_GE(end_offset, start_offset);
+
+  return g_strdup(
+      base::UTF16ToUTF8(text.substr(start_offset, end_offset - start_offset))
+          .c_str());
+}
+
+gint GetCharacterCount(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->UTF16ToUnicodeOffsetInText(obj->GetHypertext().length());
+}
+
+gunichar GetCharacterAtOffset(AtkText* atk_text, int offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  std::u16string text = obj->GetHypertext();
+  size_t text_length = text.length();
+
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+  offset = std::max(offset, 0);
+  size_t limited_offset = std::min(static_cast<size_t>(offset), text_length);
+
+  base_icu::UChar32 code_point;
+  base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &limited_offset,
+                             &code_point);
+  return code_point;
+}
+
+gint GetOffsetAtPoint(AtkText* text, gint x, gint y, AtkCoordType coords) {
+  g_return_val_if_fail(ATK_IS_TEXT(text), -1);
+
+  AtkObject* atk_object = ATK_OBJECT(text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  return obj->GetTextOffsetAtPoint(x, y, coords);
+}
+
+// This function returns a single character as a UTF-8 encoded C string because
+// the character may be encoded into more than one byte.
+char* GetCharacter(AtkText* atk_text,
+                   int offset,
+                   int* start_offset,
+                   int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= GetCharacterCount(atk_text))
+    return nullptr;
+
+  char* text = GetText(atk_text, offset, offset + 1);
+  if (!text)
+    return nullptr;
+
+  *start_offset = offset;
+  *end_offset = offset + 1;
+  return text;
+}
+
+char* GetTextWithBoundaryType(AtkText* atk_text,
+                              int offset,
+                              ax::mojom::TextBoundary boundary,
+                              int* start_offset_ptr,
+                              int* end_offset_ptr) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (offset < 0 || offset >= atk_text_get_character_count(atk_text))
+    return nullptr;
+
+  // The offset that we receive from the API is a Unicode character offset.
+  // Since we calculate boundaries in terms of UTF-16 code point offsets, we
+  // need to convert this input value.
+  offset = obj->UnicodeToUTF16OffsetInText(offset);
+
+  int start_offset = obj->FindTextBoundary(
+      boundary, offset, ax::mojom::MoveDirection::kBackward,
+      ax::mojom::TextAffinity::kDownstream);
+  int end_offset = obj->FindTextBoundary(boundary, offset,
+                                         ax::mojom::MoveDirection::kForward,
+                                         ax::mojom::TextAffinity::kDownstream);
+  if (start_offset < 0 || end_offset < 0)
+    return nullptr;
+
+  DCHECK_LE(start_offset, end_offset)
+      << "Start offset should be less than or equal the end offset.";
+
+  // The ATK API is also expecting Unicode character offsets as output
+  // values.
+  *start_offset_ptr = obj->UTF16ToUnicodeOffsetInText(start_offset);
+  *end_offset_ptr = obj->UTF16ToUnicodeOffsetInText(end_offset);
+
+  std::u16string text = obj->GetHypertext();
+  DCHECK_LE(end_offset, static_cast<int>(text.size()));
+
+  std::u16string substr = text.substr(start_offset, end_offset - start_offset);
+  return g_strdup(base::UTF16ToUTF8(substr).c_str());
+}
+
+char* GetTextAtOffset(AtkText* atk_text,
+                      int offset,
+                      AtkTextBoundary atk_boundary,
+                      int* start_offset,
+                      int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+  ax::mojom::TextBoundary boundary = FromAtkTextBoundary(atk_boundary);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+
+char* GetTextAfterOffset(AtkText* atk_text,
+                         int offset,
+                         AtkTextBoundary boundary,
+                         int* start_offset,
+                         int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset + 1, start_offset, end_offset);
+}
+
+char* GetTextBeforeOffset(AtkText* atk_text,
+                          int offset,
+                          AtkTextBoundary boundary,
+                          int* start_offset,
+                          int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  if (boundary != ATK_TEXT_BOUNDARY_CHAR) {
+    *start_offset = -1;
+    *end_offset = -1;
+    return nullptr;
+  }
+
+  // ATK does not offer support for the special negative index and we don't
+  // want to do arithmetic on that value below.
+  if (offset == kStringLengthOffset)
+    return nullptr;
+
+  return GetCharacter(atk_text, offset - 1, start_offset, end_offset);
+}
+
+gint GetCaretOffset(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return -1;
+  return obj->GetCaretOffset();
+}
+
+gboolean SetCaretOffset(AtkText* atk_text, gint offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+  if (!obj->SetCaretOffset(offset))
+    return FALSE;
+
+  // Orca expects atk_text_set_caret_offset to either focus the target element
+  // or set the sequential focus navigation starting point there.
+  int utf16_offset = obj->UnicodeToUTF16OffsetInText(offset);
+  obj->GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(
+      utf16_offset);
+
+  return TRUE;
+}
+
+int GetNSelections(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return 0;
+
+  if (obj->HasSelection())
+    return 1;
+
+  absl::optional<FindInPageResultInfo> result =
+      obj->GetSelectionOffsetsFromFindInPage();
+  if (result.has_value() && result->node == ATK_OBJECT(atk_text))
+    return 1;
+
+  return 0;
+}
+
+gchar* GetSelection(AtkText* atk_text,
+                    int selection_num,
+                    int* start_offset,
+                    int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return nullptr;
+  if (selection_num != 0)
+    return nullptr;
+
+  return obj->GetSelectionWithText(start_offset, end_offset);
+}
+
+gboolean RemoveSelection(AtkText* atk_text, int selection_num) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  // Simply collapse the selection to the position of the caret if a caret is
+  // visible, otherwise set the selection to 0.
+  int selection_end = obj->UTF16ToUnicodeOffsetInText(
+      obj->GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd));
+  return SetCaretOffset(atk_text, selection_end);
+}
+
+gboolean SetSelection(AtkText* atk_text,
+                      int selection_num,
+                      int start_offset,
+                      int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  if (selection_num != 0)
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->SetTextSelectionForAtkText(start_offset, end_offset);
+}
+
+gboolean AddSelection(AtkText* atk_text, int start_offset, int end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  // We only support one selection.
+  return SetSelection(atk_text, 0, start_offset, end_offset);
+}
+
+#if defined(ATK_210)
+char* GetStringAtOffset(AtkText* atk_text,
+                        int offset,
+                        AtkTextGranularity atk_granularity,
+                        int* start_offset,
+                        int* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  *start_offset = -1;
+  *end_offset = -1;
+
+  ax::mojom::TextBoundary boundary = FromAtkTextGranularity(atk_granularity);
+  return GetTextWithBoundaryType(atk_text, offset, boundary, start_offset,
+                                 end_offset);
+}
+#endif
+
+#if defined(ATK_230)
+gfx::Rect GetUnclippedParentHypertextRangeBoundsRect(
+    AXPlatformNodeDelegate* ax_platform_node_delegate,
+    const int start_offset,
+    const int end_offset) {
+  const AXPlatformNode* parent_platform_node =
+      AXPlatformNode::FromNativeViewAccessible(
+          ax_platform_node_delegate->GetParent());
+  if (!parent_platform_node)
+    return gfx::Rect();
+
+  const AXPlatformNodeDelegate* parent_ax_platform_node_delegate =
+      parent_platform_node->GetDelegate();
+  if (!parent_ax_platform_node_delegate)
+    return gfx::Rect();
+
+  return ax_platform_node_delegate->GetHypertextRangeBoundsRect(
+             start_offset, end_offset, AXCoordinateSystem::kRootFrame,
+             AXClippingBehavior::kUnclipped) -
+         parent_ax_platform_node_delegate
+             ->GetBoundsRect(AXCoordinateSystem::kRootFrame,
+                             AXClippingBehavior::kClipped)
+             .OffsetFromOrigin();
+}
+#endif
+
+void GetCharacterExtents(AtkText* atk_text,
+                         int offset,
+                         int* x,
+                         int* y,
+                         int* width,
+                         int* height,
+                         AtkCoordType coordinate_type) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(obj->GetDelegate(),
+                                                          offset, offset + 1);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(offset),
+            obj->UnicodeToUTF16OffsetInText(offset + 1),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  if (x)
+    *x = rect.x();
+  if (y)
+    *y = rect.y();
+  if (width)
+    *width = rect.width();
+  if (height)
+    *height = rect.height();
+}
+
+void GetRangeExtents(AtkText* atk_text,
+                     int start_offset,
+                     int end_offset,
+                     AtkCoordType coordinate_type,
+                     AtkTextRectangle* out_rectangle) {
+  g_return_if_fail(ATK_IS_TEXT(atk_text));
+
+  if (!out_rectangle)
+    return;
+
+  gfx::Rect rect;
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (obj) {
+    switch (coordinate_type) {
+#if defined(ATK_230)
+      case ATK_XY_PARENT:
+        rect = GetUnclippedParentHypertextRangeBoundsRect(
+            obj->GetDelegate(), start_offset, end_offset);
+        break;
+#endif
+      default:
+        rect = obj->GetDelegate()->GetHypertextRangeBoundsRect(
+            obj->UnicodeToUTF16OffsetInText(start_offset),
+            obj->UnicodeToUTF16OffsetInText(end_offset),
+            AtkCoordTypeToAXCoordinateSystem(coordinate_type),
+            AXClippingBehavior::kUnclipped);
+        break;
+    }
+  }
+
+  out_rectangle->x = rect.x();
+  out_rectangle->y = rect.y();
+  out_rectangle->width = rect.width();
+  out_rectangle->height = rect.height();
+}
+
+AtkAttributeSet* GetRunAttributes(AtkText* atk_text,
+                                  gint offset,
+                                  gint* start_offset,
+                                  gint* end_offset) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  SetIntPointerValueIfNotNull(start_offset, -1);
+  SetIntPointerValueIfNotNull(end_offset, -1);
+
+  if (offset < 0 || offset > GetCharacterCount(atk_text))
+    return nullptr;
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return ToAtkAttributeSet(
+      obj->GetTextAttributes(offset, start_offset, end_offset));
+}
+
+AtkAttributeSet* GetDefaultAttributes(AtkText* atk_text) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), nullptr);
+
+  AtkObject* atk_object = ATK_OBJECT(atk_text);
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+  return ToAtkAttributeSet(obj->GetDefaultTextAttributes());
+}
+
+#if defined(ATK_232)
+gboolean ScrollSubstringTo(AtkText* atk_text,
+                           gint start_offset,
+                           gint end_offset,
+                           AtkScrollType scroll_type) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringIntoView(scroll_type, start_offset, end_offset);
+}
+
+gboolean ScrollSubstringToPoint(AtkText* atk_text,
+                                gint start_offset,
+                                gint end_offset,
+                                AtkCoordType atk_coord_type,
+                                gint x,
+                                gint y) {
+  g_return_val_if_fail(ATK_IS_TEXT(atk_text), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(atk_text));
+  if (!obj)
+    return FALSE;
+
+  return obj->ScrollSubstringToPoint(start_offset, end_offset, atk_coord_type,
+                                     x, y);
+}
+#endif  // ATK_232
+
+void Init(AtkTextIface* iface) {
+  iface->get_text = GetText;
+  iface->get_character_count = GetCharacterCount;
+  iface->get_character_at_offset = GetCharacterAtOffset;
+  iface->get_offset_at_point = GetOffsetAtPoint;
+  iface->get_text_after_offset = GetTextAfterOffset;
+  iface->get_text_before_offset = GetTextBeforeOffset;
+  iface->get_text_at_offset = GetTextAtOffset;
+  iface->get_caret_offset = GetCaretOffset;
+  iface->set_caret_offset = SetCaretOffset;
+  iface->get_character_extents = GetCharacterExtents;
+  iface->get_range_extents = GetRangeExtents;
+  iface->get_n_selections = GetNSelections;
+  iface->get_selection = GetSelection;
+  iface->add_selection = AddSelection;
+  iface->remove_selection = RemoveSelection;
+  iface->set_selection = SetSelection;
+
+  iface->get_run_attributes = GetRunAttributes;
+  iface->get_default_attributes = GetDefaultAttributes;
+
+#if defined(ATK_210)
+  iface->get_string_at_offset = GetStringAtOffset;
+#endif
+
+#if defined(ATK_232)
+  if (SupportsAtkTextScrollingInterface()) {
+    iface->scroll_substring_to = ScrollSubstringTo;
+    iface->scroll_substring_to_point = ScrollSubstringToPoint;
+  }
+#endif
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_text
+
+namespace atk_window {
+void Init(AtkWindowIface* iface) {}
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+}  // namespace atk_window
+
+namespace atk_selection {
+
+gboolean AddSelection(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  if (!child)
+    return FALSE;
+
+  if (!child->SupportsSelectionWithAtkSelection())
+    return FALSE;
+
+  bool selected = child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+  if (selected)
+    return TRUE;
+
+  AXActionData data;
+  data.action = ax::mojom::Action::kDoDefault;
+  return child->GetDelegate()->AccessibilityPerformAction(data);
+}
+
+gboolean ClearSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (!selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+AtkObject* RefSelection(AtkSelection* selection, gint requested_child_index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return nullptr;
+
+  if (auto* selected_child = obj->GetSelectedItem(requested_child_index)) {
+    if (AtkObject* atk_object = selected_child->GetNativeViewAccessible()) {
+      g_object_ref(atk_object);
+      return atk_object;
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetSelectionCount(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return 0;
+
+  return obj->GetSelectionCount();
+}
+
+gboolean IsChildSelected(AtkSelection* selection, gint index) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return FALSE;
+
+  AXPlatformNodeAuraLinux* child =
+      AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(index));
+  return child && child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+}
+
+gboolean RemoveSelection(AtkSelection* selection,
+                         gint index_into_selected_children) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected && index_into_selected_children == 0) {
+      if (!child->SupportsSelectionWithAtkSelection())
+        return FALSE;
+
+      AXActionData data;
+      data.action = ax::mojom::Action::kDoDefault;
+      return child->GetDelegate()->AccessibilityPerformAction(data);
+    } else if (selected) {
+      index_into_selected_children--;
+    }
+  }
+
+  return FALSE;
+}
+
+gboolean SelectAllSelection(AtkSelection* selection) {
+  g_return_val_if_fail(ATK_IS_SELECTION(selection), FALSE);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(selection));
+  if (!obj)
+    return FALSE;
+
+  int child_count = obj->GetChildCount();
+  bool success = true;
+  for (int i = 0; i < child_count; ++i) {
+    AXPlatformNodeAuraLinux* child =
+        AXPlatformNodeAuraLinux::FromAtkObject(obj->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (!child->SupportsSelectionWithAtkSelection())
+      continue;
+
+    bool selected =
+        child->GetBoolAttribute(ax::mojom::BoolAttribute::kSelected);
+    if (selected)
+      continue;
+
+    AXActionData data;
+    data.action = ax::mojom::Action::kDoDefault;
+    success = success && child->GetDelegate()->AccessibilityPerformAction(data);
+  }
+
+  return success;
+}
+
+void Init(AtkSelectionIface* iface) {
+  iface->add_selection = AddSelection;
+  iface->clear_selection = ClearSelection;
+  iface->ref_selection = RefSelection;
+  iface->get_selection_count = GetSelectionCount;
+  iface->is_child_selected = IsChildSelected;
+  iface->remove_selection = RemoveSelection;
+  iface->select_all_selection = SelectAllSelection;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_selection
+
+namespace atk_table {
+
+AtkObject* RefAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      if (AtkObject* atk_cell = cell->GetNativeViewAccessible()) {
+        g_object_ref(atk_cell);
+        return atk_cell;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+gint GetIndexAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableCellIndex().has_value());
+      return cell->GetTableCellIndex().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetColumnAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableColumn().has_value());
+      return cell->GetTableColumn().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetRowAtIndex(AtkTable* table, gint index) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), -1);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(index)) {
+      DCHECK(cell->GetTableRow().has_value());
+      return cell->GetTableRow().value();
+    }
+  }
+
+  return -1;
+}
+
+gint GetNColumns(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableColumnCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetNRows(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    // If the object is not a table, we return 0.
+    return obj->GetTableRowCount().value_or(0);
+  }
+
+  return 0;
+}
+
+gint GetColumnExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableColumnSpan().has_value());
+      return cell->GetTableColumnSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+gint GetRowExtentAt(AtkTable* table, gint row, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (const AXPlatformNodeBase* cell = obj->GetTableCell(row, column)) {
+      DCHECK(cell->GetTableRowSpan().has_value());
+      return cell->GetTableRowSpan().value();
+    }
+  }
+
+  return 0;
+}
+
+AtkObject* GetColumnHeader(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one column header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the column
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetRowHeader(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  // AtkTable supports only one row header object. So return the first one
+  // we find. In the case of multiple headers, ATs can fall back on the row
+  // description.
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* header = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_header = header->GetNativeViewAccessible()) {
+        g_object_ref(atk_header);
+        return atk_header;
+      }
+    }
+  }
+
+  return nullptr;
+}
+
+AtkObject* GetCaption(AtkTable* table) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table))) {
+    if (auto* caption = obj->GetTableCaption())
+      return caption->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+const gchar* GetColumnDescription(AtkTable* table, gint column) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetColHeaderNodeIds(column);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+const gchar* GetRowDescription(AtkTable* table, gint row) {
+  g_return_val_if_fail(ATK_IS_TABLE(table), nullptr);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(table));
+  if (!obj)
+    return nullptr;
+
+  std::vector<int32_t> ids = obj->GetDelegate()->GetRowHeaderNodeIds(row);
+  return BuildDescriptionFromHeaders(obj->GetDelegate(), ids);
+}
+
+void Init(AtkTableIface* iface) {
+  iface->ref_at = RefAt;
+  iface->get_index_at = GetIndexAt;
+  iface->get_column_at_index = GetColumnAtIndex;
+  iface->get_row_at_index = GetRowAtIndex;
+  iface->get_n_columns = GetNColumns;
+  iface->get_n_rows = GetNRows;
+  iface->get_column_extent_at = GetColumnExtentAt;
+  iface->get_row_extent_at = GetRowExtentAt;
+  iface->get_column_header = GetColumnHeader;
+  iface->get_row_header = GetRowHeader;
+  iface->get_caption = GetCaption;
+  iface->get_column_description = GetColumnDescription;
+  iface->get_row_description = GetRowDescription;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table
+
+// The ATK table cell interface was added in ATK 2.12.
+#if defined(ATK_212)
+
+namespace atk_table_cell {
+
+gint GetColumnSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (const AXPlatformNodeBase* obj =
+          AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableColumnSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetColumnHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetColHeaderNodeIds() on a column header cell will include that
+  // column header, along with any other column headers in the column which
+  // may or may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> col_index = obj->GetTableColumn();
+  if (!col_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetColHeaderNodeIds(*col_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+gboolean GetCellPosition(AtkTableCell* cell, gint* row, gint* column) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      FALSE);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    absl::optional<int> row_index = obj->GetTableRow();
+    absl::optional<int> col_index = obj->GetTableColumn();
+    if (!row_index || !col_index)
+      return false;
+
+    *row = *row_index;
+    *column = *col_index;
+    return true;
+  }
+
+  return false;
+}
+
+gint GetRowSpan(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()), 0);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    // If the object is not a cell, we return 0.
+    return obj->GetTableRowSpan().value_or(0);
+  }
+
+  return 0;
+}
+
+GPtrArray* GetRowHeaderCells(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  GPtrArray* array = g_ptr_array_new_with_free_func(g_object_unref);
+
+  auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell));
+  if (!obj)
+    return array;
+
+  // AtkTableCell is implemented on cells, row headers, and column headers.
+  // Calling GetRowHeaderNodeIds() on a row header cell will include that
+  // row header, along with any other row headers in the row which may or
+  // may not describe the header cell in question. Therefore, just return
+  // headers for non-header cells.
+  if (obj->GetAtkRole() != ATK_ROLE_TABLE_CELL)
+    return array;
+
+  absl::optional<int> row_index = obj->GetTableRow();
+  if (!row_index)
+    return array;
+
+  const std::vector<int32_t> ids =
+      obj->GetDelegate()->GetRowHeaderNodeIds(*row_index);
+  for (const auto& node_id : ids) {
+    if (AXPlatformNode* node = obj->GetDelegate()->GetFromNodeID(node_id)) {
+      if (AtkObject* atk_node = node->GetNativeViewAccessible()) {
+        g_ptr_array_add(array, g_object_ref(atk_node));
+      }
+    }
+  }
+
+  return array;
+}
+
+AtkObject* GetTable(AtkTableCell* cell) {
+  DCHECK(g_atk_table_cell_get_type);
+  g_return_val_if_fail(
+      G_TYPE_CHECK_INSTANCE_TYPE((cell), AtkTableCellInterface::GetType()),
+      nullptr);
+
+  if (auto* obj = AXPlatformNodeAuraLinux::FromAtkObject(ATK_OBJECT(cell))) {
+    if (auto* table = obj->GetTable())
+      return table->GetNativeViewAccessible();
+  }
+
+  return nullptr;
+}
+
+using AtkTableCellIface = struct _AtkTableCellIface;
+
+void Init(AtkTableCellIface* iface) {
+  iface->get_column_span = GetColumnSpan;
+  iface->get_column_header_cells = GetColumnHeaderCells;
+  iface->get_position = GetCellPosition;
+  iface->get_row_span = GetRowSpan;
+  iface->get_row_header_cells = GetRowHeaderCells;
+  iface->get_table = GetTable;
+}
+
+const GInterfaceInfo Info = {reinterpret_cast<GInterfaceInitFunc>(Init),
+                             nullptr, nullptr};
+
+}  // namespace atk_table_cell
+
+#endif  // ATK_212
+
+namespace atk_object {
+
+gpointer kAXPlatformNodeAuraLinuxParentClass = nullptr;
+
+const gchar* GetName(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (!obj->IsNameExposed())
+    return nullptr;
+
+  ax::mojom::NameFrom name_from = obj->GetNameFrom();
+  if (obj->GetName().empty() &&
+      name_from != ax::mojom::NameFrom::kAttributeExplicitlyEmpty) {
+    return nullptr;
+  }
+
+  obj->accessible_name_ = obj->GetName();
+  return obj->accessible_name_.c_str();
+}
+
+const gchar* AtkGetName(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetName);
+  return GetName(atk_object);
+}
+
+const gchar* GetDescription(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetStringAttribute(ax::mojom::StringAttribute::kDescription)
+      .c_str();
+}
+
+const gchar* AtkGetDescription(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetDescription);
+  return GetDescription(atk_object);
+}
+
+gint GetNChildren(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), 0);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return 0;
+
+  return obj->GetChildCount();
+}
+
+gint AtkGetNChildren(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetNChildren);
+  return GetNChildren(atk_object);
+}
+
+AtkObject* RefChild(AtkObject* atk_object, gint index) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  if (index < 0 || static_cast<size_t>(index) >= obj->GetChildCount())
+    return nullptr;
+
+  AtkObject* result = obj->ChildAtIndex(index);
+  if (result)
+    g_object_ref(result);
+  return result;
+}
+
+AtkObject* AtkRefChild(AtkObject* atk_object, gint index) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefChild);
+  return RefChild(atk_object, index);
+}
+
+gint GetIndexInParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), -1);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return -1;
+
+  auto index_in_parent = obj->GetIndexInParent();
+  return index_in_parent.has_value()
+             ? static_cast<gint>(index_in_parent.value())
+             : -1;
+}
+
+gint AtkGetIndexInParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetIndexInParent);
+  return GetIndexInParent(atk_object);
+}
+
+AtkObject* GetParent(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetParent();
+}
+
+AtkObject* AtkGetParent(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetParent);
+  return GetParent(atk_object);
+}
+
+AtkRelationSet* RefRelationSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return atk_relation_set_new();
+  return obj->GetAtkRelations();
+}
+
+AtkRelationSet* AtkRefRelationSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefRelationSet);
+  // Enables AX mode. Most AT does not call AtkRefRelationSet, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return RefRelationSet(atk_object);
+}
+
+AtkAttributeSet* GetAttributes(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return nullptr;
+
+  return obj->GetAtkAttributes();
+}
+
+AtkAttributeSet* AtkGetAttributes(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetAttributes);
+  // Enables AX mode. Most AT does not call AtkGetAttributes, but Orca does,
+  // which is why it's a good signal to enable accessibility for Orca users
+  // without too many false positives.
+  AXPlatformNodeAuraLinux::EnableAXMode();
+  return GetAttributes(atk_object);
+}
+
+AtkRole GetRole(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), ATK_ROLE_INVALID);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj)
+    return ATK_ROLE_INVALID;
+  return obj->GetAtkRole();
+}
+
+AtkRole AtkGetRole(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kGetRole);
+  return GetRole(atk_object);
+}
+
+AtkStateSet* RefStateSet(AtkObject* atk_object) {
+  g_return_val_if_fail(ATK_IS_OBJECT(atk_object), nullptr);
+
+  AtkStateSet* atk_state_set =
+      ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+          ->ref_state_set(atk_object);
+
+  AXPlatformNodeAuraLinux* obj =
+      AXPlatformNodeAuraLinux::FromAtkObject(atk_object);
+  if (!obj) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFUNCT);
+  } else {
+    obj->GetAtkState(atk_state_set);
+  }
+  return atk_state_set;
+}
+
+AtkStateSet* AtkRefStateSet(AtkObject* atk_object) {
+  RecordAccessibilityAtkApi(UmaAtkApi::kRefStateSet);
+  return RefStateSet(atk_object);
+}
+
+void Initialize(AtkObject* atk_object, gpointer data) {
+  if (ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->initialize) {
+    ATK_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)
+        ->initialize(atk_object, data);
+  }
+
+  AX_PLATFORM_NODE_AURALINUX(atk_object)->m_object =
+      reinterpret_cast<AXPlatformNodeAuraLinux*>(data);
+}
+
+void Finalize(GObject* atk_object) {
+  G_OBJECT_CLASS(kAXPlatformNodeAuraLinuxParentClass)->finalize(atk_object);
+}
+
+void ClassInit(gpointer class_pointer, gpointer /* class_data */) {
+  GObjectClass* gobject_class = G_OBJECT_CLASS(class_pointer);
+  kAXPlatformNodeAuraLinuxParentClass = g_type_class_peek_parent(gobject_class);
+  gobject_class->finalize = Finalize;
+
+  AtkObjectClass* atk_object_class = ATK_OBJECT_CLASS(gobject_class);
+  atk_object_class->initialize = Initialize;
+  atk_object_class->get_name = AtkGetName;
+  atk_object_class->get_description = AtkGetDescription;
+  atk_object_class->get_parent = AtkGetParent;
+  atk_object_class->get_n_children = AtkGetNChildren;
+  atk_object_class->ref_child = AtkRefChild;
+  atk_object_class->get_role = AtkGetRole;
+  atk_object_class->ref_state_set = AtkRefStateSet;
+  atk_object_class->get_index_in_parent = AtkGetIndexInParent;
+  atk_object_class->ref_relation_set = AtkRefRelationSet;
+  atk_object_class->get_attributes = AtkGetAttributes;
+}
+
+GType GetType() {
+  AXPlatformNodeAuraLinux::EnsureGTypeInit();
+
+  static gsize type_id = 0;
+  if (g_once_init_enter(&type_id)) {
+    static const GTypeInfo type_info = {
+        sizeof(AXPlatformNodeAuraLinuxClass),  // class_size
+        nullptr,                               // base_init
+        nullptr,                               // base_finalize
+        atk_object::ClassInit,
+        nullptr,                                // class_finalize
+        nullptr,                                // class_data
+        sizeof(AXPlatformNodeAuraLinuxObject),  // instance_size
+        0,                                      // n_preallocs
+        nullptr,                                // instance_init
+        nullptr                                 // value_table
+    };
+
+    GType type = g_type_register_static(
+        ATK_TYPE_OBJECT, "AXPlatformNodeAuraLinux", &type_info, GTypeFlags(0));
+    g_once_init_leave(&type_id, type);
+  }
+
+  return type_id;
+}
+
+void Detach(AXPlatformNodeAuraLinuxObject* atk_object) {
+  if (!atk_object->m_object)
+    return;
+
+  atk_object->m_object = nullptr;
+}
+
+}  //  namespace atk_object
+
+}  // namespace
+
+// static
+NO_SANITIZE("cfi-icall")
+GType AtkTableCellInterface::GetType() {
+  return g_atk_table_cell_get_type();
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetColumnHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_column_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+GPtrArray* AtkTableCellInterface::GetRowHeaderCells(AtkTableCell* cell) {
+  return g_atk_table_cell_get_row_header_cells(cell);
+}
+
+// static
+NO_SANITIZE("cfi-icall")
+bool AtkTableCellInterface::GetRowColumnSpan(AtkTableCell* cell,
+                                             gint* row,
+                                             gint* column,
+                                             gint* row_span,
+                                             gint* col_span) {
+  return g_atk_table_cell_get_row_column_span(cell, row, column, row_span,
+                                              col_span);
+}
+
+// static
+bool AtkTableCellInterface::Exists() {
+  g_atk_table_cell_get_type = reinterpret_cast<GetTypeFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_type"));
+  g_atk_table_cell_get_column_header_cells =
+      reinterpret_cast<GetColumnHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_column_header_cells"));
+  g_atk_table_cell_get_row_header_cells =
+      reinterpret_cast<GetRowHeaderCellsFunc>(
+          dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_header_cells"));
+  g_atk_table_cell_get_row_column_span = reinterpret_cast<GetRowColumnSpanFunc>(
+      dlsym(RTLD_DEFAULT, "atk_table_cell_get_row_column_span"));
+  return *g_atk_table_cell_get_type;
+}
+
+void AXPlatformNodeAuraLinux::EnsureGTypeInit() {
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+  static bool first_time = true;
+  if (UNLIKELY(first_time)) {
+    g_type_init();
+    first_time = false;
+  }
+#endif
+}
+
+// static
+ImplementedAtkInterfaces AXPlatformNodeAuraLinux::GetGTypeInterfaceMask(
+    const AXNodeData& data) {
+  // The default implementation set includes the AtkComponent and AtkAction
+  // interfaces, which are provided by all the AtkObjects that we produce.
+  ImplementedAtkInterfaces interface_mask;
+
+  if (!IsImageOrVideo(data.role)) {
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kText);
+    if (!data.IsAtomicTextField())
+      interface_mask.Add(ImplementedAtkInterfaces::Value::kHypertext);
+  }
+
+  if (data.IsRangeValueSupported())
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kValue);
+
+  if (ui::IsPlatformDocument(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kDocument);
+
+  if (IsImage(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kImage);
+
+  // The AtkHyperlinkImpl interface allows getting a AtkHyperlink from an
+  // AtkObject. It is indeed implemented by actual web hyperlinks, but also by
+  // objects that will become embedded objects in ATK hypertext, so the name is
+  // a bit of a misnomer from the ATK API.
+  if (IsLink(data.role) || !ui::IsText(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kHyperlink);
+
+  if (data.role == ax::mojom::Role::kWindow)
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kWindow);
+
+  if (IsContainerWithSelectableChildren(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kSelection);
+
+  if (IsTableLike(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTable);
+
+  // Because the TableCell Interface is only supported in ATK version 2.12 and
+  // later, GetAccessibilityGType has a runtime check to verify we have a recent
+  // enough version. If we don't, GetAccessibilityGType will exclude
+  // AtkTableCell from the supported interfaces and none of its methods or
+  // properties will be exposed to assistive technologies.
+  if (IsCellOrTableHeader(data.role))
+    interface_mask.Add(ImplementedAtkInterfaces::Value::kTableCell);
+
+  return interface_mask;
+}
+
+GType AXPlatformNodeAuraLinux::GetAccessibilityGType() {
+  static const GTypeInfo type_info = {
+      sizeof(AXPlatformNodeAuraLinuxClass),
+      (GBaseInitFunc) nullptr,
+      (GBaseFinalizeFunc) nullptr,
+      (GClassInitFunc) nullptr,
+      (GClassFinalizeFunc) nullptr,
+      nullptr,                               /* class data */
+      sizeof(AXPlatformNodeAuraLinuxObject), /* instance size */
+      0,                                     /* nb preallocs */
+      (GInstanceInitFunc) nullptr,
+      nullptr /* value table */
+  };
+
+  const char* atk_type_name = GetUniqueAccessibilityGTypeName(interface_mask_);
+  GType type = g_type_from_name(atk_type_name);
+  if (type)
+    return type;
+
+  type = g_type_register_static(AX_PLATFORM_NODE_AURALINUX_TYPE, atk_type_name,
+                                &type_info, GTypeFlags(0));
+
+  // The AtkComponent and AtkAction interfaces are always supported.
+  g_type_add_interface_static(type, ATK_TYPE_COMPONENT, &atk_component::Info);
+  g_type_add_interface_static(type, ATK_TYPE_ACTION, &atk_action::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kDocument))
+    g_type_add_interface_static(type, ATK_TYPE_DOCUMENT, &atk_document::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kImage))
+    g_type_add_interface_static(type, ATK_TYPE_IMAGE, &atk_image::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kValue))
+    g_type_add_interface_static(type, ATK_TYPE_VALUE, &atk_value::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHyperlink)) {
+    g_type_add_interface_static(type, ATK_TYPE_HYPERLINK_IMPL,
+                                &atk_hyperlink::Info);
+  }
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kHypertext))
+    g_type_add_interface_static(type, ATK_TYPE_HYPERTEXT, &atk_hypertext::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kText))
+    g_type_add_interface_static(type, ATK_TYPE_TEXT, &atk_text::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kWindow))
+    g_type_add_interface_static(type, ATK_TYPE_WINDOW, &atk_window::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kSelection))
+    g_type_add_interface_static(type, ATK_TYPE_SELECTION, &atk_selection::Info);
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTable))
+    g_type_add_interface_static(type, ATK_TYPE_TABLE, &atk_table::Info);
+
+  if (interface_mask_.Implements(ImplementedAtkInterfaces::Value::kTableCell)) {
+    // Run-time check to ensure AtkTableCell is supported (requires ATK 2.12).
+    if (AtkTableCellInterface::Exists()) {
+      g_type_add_interface_static(type, AtkTableCellInterface::GetType(),
+                                  &atk_table_cell::Info);
+    }
+  }
+
+  return type;
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParentOnFrameIfNecessary() {
+  if (GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return;
+
+  if (!GetDelegate()->IsWebContent())
+    return;
+
+  AtkObject* parent_atk_object = GetParent();
+  AXPlatformNodeAuraLinux* parent =
+      AXPlatformNodeAuraLinux::FromAtkObject(parent_atk_object);
+  if (!parent)
+    return;
+
+  if (parent->GetDelegate()->IsWebContent())
+    return;
+
+  AXPlatformNodeAuraLinux* frame = AXPlatformNodeAuraLinux::FromAtkObject(
+      FindAtkObjectParentFrame(parent_atk_object));
+  if (!frame)
+    return;
+
+  frame->SetDocumentParent(parent_atk_object);
+}
+
+AtkObject* AXPlatformNodeAuraLinux::FindPrimaryWebContentDocument() {
+  // It could get multiple web contents since additional web content is added,
+  // when the DevTools window is opened.
+  std::vector<AtkObject*> web_content_candidates;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    AtkObject* child = child_iterator_ptr->GetNativeViewAccessible();
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(child);
+    if (!child_node)
+      continue;
+    if (!child_node->GetDelegate()->IsWebContent())
+      continue;
+    if (child_node->GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+      continue;
+    web_content_candidates.push_back(child);
+  }
+
+  if (web_content_candidates.empty())
+    return nullptr;
+
+  // If it finds just one web content, return it.
+  if (web_content_candidates.size() == 1)
+    return web_content_candidates[0];
+
+  for (auto* object : web_content_candidates) {
+    auto* child_node = AXPlatformNodeAuraLinux::FromAtkObject(object);
+    // If it is a primary web contents, return it.
+    if (child_node->GetDelegate()->IsPrimaryWebContentsForWindow()) {
+      return object;
+    }
+  }
+  return nullptr;
+}
+
+bool AXPlatformNodeAuraLinux::IsWebDocumentForRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+  AXPlatformNodeAuraLinux* parent = FromAtkObject(GetParent());
+  if (!parent || !GetDelegate()->IsWebContent() ||
+      GetAtkRole() != ATK_ROLE_DOCUMENT_WEB)
+    return false;
+  return parent->FindPrimaryWebContentDocument() == atk_object;
+}
+
+AtkObject* AXPlatformNodeAuraLinux::CreateAtkObject() {
+  if (GetRole() != ax::mojom::Role::kApplication &&
+      !GetDelegate()->IsToplevelBrowserWindow() &&
+      !AXPlatform::GetInstance().GetMode().has_mode(AXMode::kNativeAPIs)) {
+    return nullptr;
+  }
+  if (GetDelegate()->IsChildOfLeaf())
+    return nullptr;
+  EnsureGTypeInit();
+  interface_mask_ = GetGTypeInterfaceMask(GetData());
+  GType type = GetAccessibilityGType();
+  AtkObject* atk_object = static_cast<AtkObject*>(g_object_new(type, nullptr));
+
+  atk_object_initialize(atk_object, this);
+
+  SetDocumentParentOnFrameIfNecessary();
+
+  return ATK_OBJECT(atk_object);
+}
+
+void AXPlatformNodeAuraLinux::DestroyAtkObjects() {
+  if (atk_hyperlink_) {
+    ax_platform_atk_hyperlink_set_object(
+        AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), nullptr);
+    g_object_unref(atk_hyperlink_);
+    atk_hyperlink_ = nullptr;
+  }
+
+  if (atk_object_) {
+    // We explicitly clear g_current_focused just in case there is another
+    // reference to atk_object_ somewhere.
+    if (atk_object_ == g_current_focused)
+      SetWeakGPtrToAtkObject(&g_current_focused, nullptr);
+    atk_object::Detach(AX_PLATFORM_NODE_AURALINUX(atk_object_));
+
+    g_object_unref(atk_object_);
+    atk_object_ = nullptr;
+  }
+}
+
+// static
+AXPlatformNode* AXPlatformNode::Create(AXPlatformNodeDelegate* delegate) {
+  AXPlatformNodeAuraLinux* node = new AXPlatformNodeAuraLinux();
+  node->Init(delegate);
+  return node;
+}
+
+// static
+AXPlatformNode* AXPlatformNode::FromNativeViewAccessible(
+    gfx::NativeViewAccessible accessible) {
+  return AXPlatformNodeAuraLinux::FromAtkObject(accessible);
+}
+
+//
+// AXPlatformNodeAuraLinux implementation.
+//
+
+// static
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FromAtkObject(
+    const AtkObject* atk_object) {
+  if (!atk_object)
+    return nullptr;
+
+  if (IS_AX_PLATFORM_NODE_AURALINUX(atk_object)) {
+    AXPlatformNodeAuraLinuxObject* platform_object =
+        AX_PLATFORM_NODE_AURALINUX(atk_object);
+    return platform_object->m_object;
+  }
+
+  return nullptr;
+}
+
+// static
+void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) {
+  g_root_application = application;
+}
+
+// static
+AXPlatformNode* AXPlatformNodeAuraLinux::application() {
+  return g_root_application;
+}
+
+// static
+void AXPlatformNodeAuraLinux::StaticInitialize() {
+  AtkUtilAuraLinux::GetInstance()->InitializeAsync();
+}
+
+// static
+void AXPlatformNodeAuraLinux::EnableAXMode() {
+  AXPlatformNode::NotifyAddAXModeFlags(kAXModeComplete);
+}
+
+AtkRole AXPlatformNodeAuraLinux::GetAtkRole() const {
+  switch (GetRole()) {
+    case ax::mojom::Role::kAlert:
+      return ATK_ROLE_NOTIFICATION;
+    case ax::mojom::Role::kAlertDialog:
+      return ATK_ROLE_ALERT;
+    case ax::mojom::Role::kComment:
+    case ax::mojom::Role::kSuggestion:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kApplication:
+      // Only use ATK_ROLE_APPLICATION for elements with no parent, since it
+      // is only for top level app windows and not ARIA applications.
+      if (!GetParent()) {
+        return ATK_ROLE_APPLICATION;
+      } else {
+        return ATK_ROLE_EMBEDDED;
+      }
+    case ax::mojom::Role::kArticle:
+      return ATK_ROLE_ARTICLE;
+    case ax::mojom::Role::kAudio:
+      return ATK_ROLE_AUDIO;
+    case ax::mojom::Role::kBanner:
+    case ax::mojom::Role::kHeader:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kBlockquote:
+      return ATK_ROLE_BLOCK_QUOTE;
+    case ax::mojom::Role::kCaret:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kCanvas:
+      return ATK_ROLE_CANVAS;
+    case ax::mojom::Role::kCaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kCheckBox:
+      return ATK_ROLE_CHECK_BOX;
+    case ax::mojom::Role::kSwitch:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kColorWell:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kColumn:
+      return ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kColumnHeader:
+      return ATK_ROLE_COLUMN_HEADER;
+    case ax::mojom::Role::kComboBoxGrouping:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxMenuButton:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComboBoxSelect:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kComplementary:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kContentDeletion:
+      return kAtkRoleContentDeletion;
+    case ax::mojom::Role::kContentInsertion:
+      return kAtkRoleContentInsertion;
+    case ax::mojom::Role::kContentInfo:
+    case ax::mojom::Role::kFooter:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDate:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDateTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kDefinition:
+    case ax::mojom::Role::kDescriptionListDetail:
+      return ATK_ROLE_DESCRIPTION_VALUE;
+    case ax::mojom::Role::kDescriptionList:
+      return ATK_ROLE_DESCRIPTION_LIST;
+    case ax::mojom::Role::kDescriptionListTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kDetails:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kDialog:
+      return ATK_ROLE_DIALOG;
+    case ax::mojom::Role::kDirectory:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kDisclosureTriangle:
+    case ax::mojom::Role::kDisclosureTriangleGrouped:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kDocCover:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kDocBackLink:
+    case ax::mojom::Role::kDocBiblioRef:
+    case ax::mojom::Role::kDocGlossRef:
+    case ax::mojom::Role::kDocNoteRef:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kDocBiblioEntry:
+    case ax::mojom::Role::kDocEndnote:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kDocNotice:
+    case ax::mojom::Role::kDocTip:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kDocFootnote:
+      return kAtkFootnoteRole;
+    case ax::mojom::Role::kDocPageBreak:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kDocPageFooter:
+      return ATK_ROLE_FOOTER;
+    case ax::mojom::Role::kDocPageHeader:
+      return ATK_ROLE_HEADER;
+    case ax::mojom::Role::kDocAcknowledgments:
+    case ax::mojom::Role::kDocAfterword:
+    case ax::mojom::Role::kDocAppendix:
+    case ax::mojom::Role::kDocBibliography:
+    case ax::mojom::Role::kDocChapter:
+    case ax::mojom::Role::kDocConclusion:
+    case ax::mojom::Role::kDocCredits:
+    case ax::mojom::Role::kDocEndnotes:
+    case ax::mojom::Role::kDocEpilogue:
+    case ax::mojom::Role::kDocErrata:
+    case ax::mojom::Role::kDocForeword:
+    case ax::mojom::Role::kDocGlossary:
+    case ax::mojom::Role::kDocIndex:
+    case ax::mojom::Role::kDocIntroduction:
+    case ax::mojom::Role::kDocPageList:
+    case ax::mojom::Role::kDocPart:
+    case ax::mojom::Role::kDocPreface:
+    case ax::mojom::Role::kDocPrologue:
+    case ax::mojom::Role::kDocToc:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kDocAbstract:
+    case ax::mojom::Role::kDocColophon:
+    case ax::mojom::Role::kDocCredit:
+    case ax::mojom::Role::kDocDedication:
+    case ax::mojom::Role::kDocEpigraph:
+    case ax::mojom::Role::kDocExample:
+    case ax::mojom::Role::kDocPullquote:
+    case ax::mojom::Role::kDocQna:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kDocSubtitle:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kEmbeddedObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kForm:
+      // TODO(accessibility) Forms which lack an accessible name are no longer
+      // exposed as forms. http://crbug.com/874384. Forms which have accessible
+      // names should be exposed as ATK_ROLE_LANDMARK according to Core AAM.
+      return ATK_ROLE_FORM;
+    case ax::mojom::Role::kFigure:
+    case ax::mojom::Role::kFeed:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGenericContainer:
+    case ax::mojom::Role::kFooterAsNonLandmark:
+    case ax::mojom::Role::kHeaderAsNonLandmark:
+    case ax::mojom::Role::kRuby:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kGraphicsDocument:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kGraphicsObject:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kGraphicsSymbol:
+      return ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kHeading:
+      return ATK_ROLE_HEADING;
+    case ax::mojom::Role::kIframe:
+    case ax::mojom::Role::kIframePresentational:
+      return ATK_ROLE_INTERNAL_FRAME;
+    case ax::mojom::Role::kImage:
+      return IsImageWithMap() ? ATK_ROLE_IMAGE_MAP : ATK_ROLE_IMAGE;
+    case ax::mojom::Role::kInlineTextBox:
+      return kStaticRole;
+    case ax::mojom::Role::kInputTime:
+      return ATK_ROLE_DATE_EDITOR;
+    case ax::mojom::Role::kLabelText:
+      return ATK_ROLE_LABEL;
+    case ax::mojom::Role::kLegend:
+      return ATK_ROLE_LABEL;
+    // Layout table objects are treated the same as Role::kGenericContainer.
+    case ax::mojom::Role::kLayoutTable:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableCell:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLayoutTableRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kLineBreak:
+      // TODO(Accessibility) Having a separate accessible object for line breaks
+      // is inconsistent with other implementations. http://crbug.com/873144#c1.
+      return kStaticRole;
+    case ax::mojom::Role::kLink:
+      return ATK_ROLE_LINK;
+    case ax::mojom::Role::kList:
+      return ATK_ROLE_LIST;
+    case ax::mojom::Role::kListBox:
+      return ATK_ROLE_LIST_BOX;
+    // TODO(Accessibility) Use ATK_ROLE_MENU_ITEM inside a combo box, see how
+    // ax_platform_node_win.cc code does this.
+    case ax::mojom::Role::kListBoxOption:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListGrid:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kListItem:
+      return ATK_ROLE_LIST_ITEM;
+    case ax::mojom::Role::kListMarker:
+      // Regular list markers only expose their alternative text, but do not
+      // expose their descendants; and the descendants should be ignored. This
+      // is because the alternative text depends on the counter style and can
+      // be different from the actual (visual) marker text, and hence,
+      // inconsistent with the descendants. We treat a list marker as non-text
+      // only if it still has non-ignored descendants, which happens only when:
+      // - The list marker itself is ignored but the descendants are not
+      // - Or the list marker contains images
+      if (!GetChildCount())
+        return kStaticRole;
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kLog:
+      return ATK_ROLE_LOG;
+    case ax::mojom::Role::kMain:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kMark:
+      return kStaticRole;
+    case ax::mojom::Role::kMath:
+    case ax::mojom::Role::kMathMLMath:
+      return ATK_ROLE_MATH;
+    // https://w3c.github.io/mathml-aam/#mathml-element-mappings
+    case ax::mojom::Role::kMathMLFraction:
+      return ATK_ROLE_MATH_FRACTION;
+    case ax::mojom::Role::kMathMLIdentifier:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLMultiscripts:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNoneScript:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLNumber:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLPrescriptDelimiter:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLOperator:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLRow:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSquareRoot:
+      return ATK_ROLE_MATH_ROOT;
+    case ax::mojom::Role::kMathMLStringLiteral:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLSub:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSubSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLSup:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kMathMLTableCell:
+      return ATK_ROLE_TABLE_CELL;
+    case ax::mojom::Role::kMathMLTableRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kMathMLText:
+      return ATK_ROLE_STATIC;
+    case ax::mojom::Role::kMathMLUnder:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMathMLUnderOver:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kMarquee:
+      return ATK_ROLE_MARQUEE;
+    case ax::mojom::Role::kMenu:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuBar:
+      return ATK_ROLE_MENU_BAR;
+    case ax::mojom::Role::kMenuItem:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemCheckBox:
+      return ATK_ROLE_CHECK_MENU_ITEM;
+    case ax::mojom::Role::kMenuItemRadio:
+      return ATK_ROLE_RADIO_MENU_ITEM;
+    case ax::mojom::Role::kMenuListPopup:
+      return ATK_ROLE_MENU;
+    case ax::mojom::Role::kMenuListOption:
+      return ATK_ROLE_MENU_ITEM;
+    case ax::mojom::Role::kMeter:
+      return ATK_ROLE_LEVEL_BAR;
+    case ax::mojom::Role::kNavigation:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kNote:
+      return ATK_ROLE_COMMENT;
+    case ax::mojom::Role::kPane:
+    case ax::mojom::Role::kScrollView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kParagraph:
+      return ATK_ROLE_PARAGRAPH;
+    case ax::mojom::Role::kPdfActionableHighlight:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPdfRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kPluginObject:
+      return ATK_ROLE_EMBEDDED;
+    case ax::mojom::Role::kPopUpButton:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kPortal:
+      return ATK_ROLE_PUSH_BUTTON;
+    case ax::mojom::Role::kProgressIndicator:
+      return ATK_ROLE_PROGRESS_BAR;
+    case ax::mojom::Role::kRadioButton:
+      return ATK_ROLE_RADIO_BUTTON;
+    case ax::mojom::Role::kRadioGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRegion:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kRootWebArea:
+      return ATK_ROLE_DOCUMENT_WEB;
+    case ax::mojom::Role::kRow:
+      return ATK_ROLE_TABLE_ROW;
+    case ax::mojom::Role::kRowGroup:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kRowHeader:
+      return ATK_ROLE_ROW_HEADER;
+    case ax::mojom::Role::kRubyAnnotation:
+      // Generally exposed as description on <ruby> (Role::kRuby) element, not
+      // as its own object in the tree.
+      // However, it's possible to make a kRubyAnnotation element show up in the
+      // AX tree, for example by adding tabindex="0" to the source <rp> or <rt>
+      // element or making the source element the target of an aria-owns.
+      // Therefore, browser side needs to gracefully handle it if it actually
+      // shows up in the tree.
+      return kStaticRole;
+    case ax::mojom::Role::kSection:
+      return ATK_ROLE_SECTION;
+    case ax::mojom::Role::kScrollBar:
+      return ATK_ROLE_SCROLL_BAR;
+    case ax::mojom::Role::kSearch:
+      return ATK_ROLE_LANDMARK;
+    case ax::mojom::Role::kSlider:
+      return ATK_ROLE_SLIDER;
+    case ax::mojom::Role::kSpinButton:
+      return ATK_ROLE_SPIN_BUTTON;
+    case ax::mojom::Role::kSplitter:
+      return ATK_ROLE_SEPARATOR;
+    case ax::mojom::Role::kStaticText:
+      return kStaticRole;
+    case ax::mojom::Role::kStatus:
+      return ATK_ROLE_STATUSBAR;
+    case ax::mojom::Role::kSubscript:
+      return kSubscriptRole;
+    case ax::mojom::Role::kSuperscript:
+      return kSuperscriptRole;
+    case ax::mojom::Role::kSvgRoot:
+      return ATK_ROLE_DOCUMENT_FRAME;
+    case ax::mojom::Role::kTab:
+      return ATK_ROLE_PAGE_TAB;
+    case ax::mojom::Role::kTable:
+      return ATK_ROLE_TABLE;
+    case ax::mojom::Role::kTableHeaderContainer:
+      // TODO(accessibility) This mapping is correct, but it doesn't seem to be
+      // used. We don't necessarily want to always expose these containers, but
+      // we must do so if they are focusable. http://crbug.com/874043
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kTabList:
+      return ATK_ROLE_PAGE_TAB_LIST;
+    case ax::mojom::Role::kTabPanel:
+      return ATK_ROLE_SCROLL_PANE;
+    case ax::mojom::Role::kTerm:
+      return ATK_ROLE_DESCRIPTION_TERM;
+    case ax::mojom::Role::kTitleBar:
+      return ATK_ROLE_TITLE_BAR;
+    case ax::mojom::Role::kTextField:
+    case ax::mojom::Role::kSearchBox:
+      if (HasState(ax::mojom::State::kProtected))
+        return ATK_ROLE_PASSWORD_TEXT;
+      return ATK_ROLE_ENTRY;
+    case ax::mojom::Role::kTextFieldWithComboBox:
+      return ATK_ROLE_COMBO_BOX;
+    case ax::mojom::Role::kAbbr:
+    case ax::mojom::Role::kCode:
+    case ax::mojom::Role::kEmphasis:
+    case ax::mojom::Role::kStrong:
+    case ax::mojom::Role::kTime:
+      return kStaticRole;
+    case ax::mojom::Role::kTimer:
+      return ATK_ROLE_TIMER;
+    case ax::mojom::Role::kToggleButton:
+      return ATK_ROLE_TOGGLE_BUTTON;
+    case ax::mojom::Role::kToolbar:
+      return ATK_ROLE_TOOL_BAR;
+    case ax::mojom::Role::kTooltip:
+      return ATK_ROLE_TOOL_TIP;
+    case ax::mojom::Role::kTree:
+      return ATK_ROLE_TREE;
+    case ax::mojom::Role::kTreeItem:
+      return ATK_ROLE_TREE_ITEM;
+    case ax::mojom::Role::kTreeGrid:
+      return ATK_ROLE_TREE_TABLE;
+    case ax::mojom::Role::kVideo:
+      return ATK_ROLE_VIDEO;
+    case ax::mojom::Role::kWindow:
+      // In ATK elements with ATK_ROLE_FRAME are windows with titles and
+      // buttons, while those with ATK_ROLE_WINDOW are windows without those
+      // elements.
+      return ATK_ROLE_FRAME;
+    case ax::mojom::Role::kClient:
+    case ax::mojom::Role::kDesktop:
+    case ax::mojom::Role::kWebView:
+      return ATK_ROLE_PANEL;
+    case ax::mojom::Role::kFigcaption:
+      return ATK_ROLE_CAPTION;
+    case ax::mojom::Role::kUnknown:
+      // When we are not in web content, assume that a node with an unknown
+      // role is a view (which often have the unknown role).
+      return !GetDelegate()->IsWebContent() ? ATK_ROLE_PANEL : ATK_ROLE_UNKNOWN;
+    case ax::mojom::Role::kImeCandidate:
+    case ax::mojom::Role::kKeyboard:
+    case ax::mojom::Role::kNone:
+      return ATK_ROLE_REDUNDANT_OBJECT;
+    case ax::mojom::Role::kPreDeprecated:
+      NOTREACHED_NORETURN();
+  }
+}
+
+// If we were compiled with a newer version of ATK than the runtime version,
+// it's possible that the state we want to expose and/or emit an event for
+// is not present. This will generate a runtime error.
+bool PlatformSupportsState(AtkStateType atk_state_type) {
+  static absl::optional<int> max_state_type = absl::nullopt;
+  if (!max_state_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_state_type_get_type()));
+    max_state_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  return atk_state_type < max_state_type.value();
+}
+
+void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) {
+  bool menu_active = !GetActiveMenus().empty();
+  if (!menu_active && atk_object_ == g_active_top_level_frame)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  if (menu_active &&
+      FindAtkObjectParentFrame(GetActiveMenus().back()) == atk_object_)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  if (atk_object_ && atk_object_ == g_active_views_dialog)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+
+  bool is_minimized = delegate_->IsMinimized();
+  if (is_minimized && GetRole() == ax::mojom::Role::kWindow)
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ICONIFIED);
+
+  if (HasState(ax::mojom::State::kCollapsed))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+  if (HasState(ax::mojom::State::kDefault))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT);
+  if ((HasState(ax::mojom::State::kEditable) ||
+       HasState(ax::mojom::State::kRichlyEditable)) &&
+      GetData().GetRestriction() != ax::mojom::Restriction::kReadOnly) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE);
+  }
+  if (HasState(ax::mojom::State::kExpanded)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDABLE);
+    atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED);
+  }
+  if (IsFocused())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED);
+  if (IsFocusable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE);
+  if (HasState(ax::mojom::State::kHorizontal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HORIZONTAL);
+  if (!IsInvisibleOrIgnored()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISIBLE);
+    if (!delegate_->IsOffscreen() && !is_minimized)
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SHOWING);
+  }
+  if (HasState(ax::mojom::State::kMultiselectable))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MULTISELECTABLE);
+  if (HasState(ax::mojom::State::kRequired))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_REQUIRED);
+  if (HasState(ax::mojom::State::kVertical))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VERTICAL);
+  if (HasState(ax::mojom::State::kVisited))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_VISITED);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kInvalidState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kInvalidState) !=
+          static_cast<int32_t>(ax::mojom::InvalidState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INVALID_ENTRY);
+  }
+  if (HasIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState) !=
+          static_cast<int32_t>(ax::mojom::AriaCurrentState::kFalse)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_ACTIVE);
+  }
+#if defined(ATK_216)
+  // Runtime checks in case we were compiled with a newer version of ATK.
+  if (IsPlatformCheckable() && PlatformSupportsState(ATK_STATE_CHECKABLE))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKABLE);
+  if (HasIntAttribute(ax::mojom::IntAttribute::kHasPopup) &&
+      PlatformSupportsState(ATK_STATE_HAS_POPUP))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_HAS_POPUP);
+#endif
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kBusy))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_BUSY);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kModal))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_MODAL);
+  if (GetData().IsSelectable())
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE);
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kSelected))
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED);
+
+  if (IsTextField()) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE_TEXT);
+    if (HasState(ax::mojom::State::kMultiline))
+      atk_state_set_add_state(atk_state_set, ATK_STATE_MULTI_LINE);
+    else
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SINGLE_LINE);
+  }
+
+  // Special case for indeterminate progressbar.
+  if (GetRole() == ax::mojom::Role::kProgressIndicator &&
+      !HasFloatAttribute(ax::mojom::FloatAttribute::kValueForRange)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_INDETERMINATE);
+  }
+
+  if (!GetStringAttribute(ax::mojom::StringAttribute::kAutoComplete).empty() ||
+      HasState(ax::mojom::State::kAutofillAvailable)) {
+    atk_state_set_add_state(atk_state_set, ATK_STATE_SUPPORTS_AUTOCOMPLETION);
+  }
+
+  // Checked state
+  const auto checked_state = GetData().GetCheckedState();
+  if (checked_state == ax::mojom::CheckedState::kTrue ||
+      checked_state == ax::mojom::CheckedState::kMixed) {
+    atk_state_set_add_state(atk_state_set, GetAtkStateTypeForCheckableNode());
+  }
+
+  if (GetData().GetRestriction() != ax::mojom::Restriction::kDisabled) {
+    if (GetDelegate()->IsReadOnlySupported() &&
+        GetDelegate()->IsReadOnlyOrDisabled()) {
+#if defined(ATK_216)
+      // Runtime check in case we were compiled with a newer version of ATK.
+      if (PlatformSupportsState(ATK_STATE_READ_ONLY))
+        atk_state_set_add_state(atk_state_set, ATK_STATE_READ_ONLY);
+#endif
+    } else {
+      atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED);
+      atk_state_set_add_state(atk_state_set, ATK_STATE_SENSITIVE);
+    }
+  }
+}
+
+// Some relations only exist in a high enough ATK version.
+// If a relation has a version requirement, it will be documented in
+// the link below.
+// https://docs.gtk.org/atk/enum.RelationType.html
+struct AtkIntRelation {
+  ax::mojom::IntAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntRelation kIntRelations[] = {
+    {ax::mojom::IntAttribute::kMemberOfId, ATK_RELATION_MEMBER_OF,
+     absl::nullopt},
+    {ax::mojom::IntAttribute::kPopupForId, ATK_RELATION_POPUP_FOR,
+     absl::nullopt},
+};
+
+struct AtkIntListRelation {
+  ax::mojom::IntListAttribute attribute;
+  AtkRelationType relation;
+  absl::optional<AtkRelationType> reverse_relation;
+};
+
+static AtkIntListRelation kIntListRelations[] = {
+    {ax::mojom::IntListAttribute::kControlsIds, ATK_RELATION_CONTROLLER_FOR,
+     ATK_RELATION_CONTROLLED_BY},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kDetailsIds, ATK_RELATION_DETAILS,
+     ATK_RELATION_DETAILS_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kDescribedbyIds, ATK_RELATION_DESCRIBED_BY,
+     ATK_RELATION_DESCRIPTION_FOR},
+#if defined(ATK_226)
+    {ax::mojom::IntListAttribute::kErrormessageIds, ATK_RELATION_ERROR_MESSAGE,
+     ATK_RELATION_ERROR_FOR},
+#endif
+    {ax::mojom::IntListAttribute::kFlowtoIds, ATK_RELATION_FLOWS_TO,
+     ATK_RELATION_FLOWS_FROM},
+    {ax::mojom::IntListAttribute::kLabelledbyIds, ATK_RELATION_LABELLED_BY,
+     ATK_RELATION_LABEL_FOR},
+};
+
+void AXPlatformNodeAuraLinux::AddRelationToSet(AtkRelationSet* relation_set,
+                                               AtkRelationType relation,
+                                               AXPlatformNode* target) {
+  DCHECK(target);
+  DCHECK(GetDelegate()->IsValidRelationTarget(target));
+
+  // If we were compiled with a newer version of ATK than the runtime version,
+  // it's possible that we might try to add a relation that doesn't exist in
+  // the runtime version of the AtkRelationType enum. This will cause a runtime
+  // error, so return early here if we are about to do that.
+  static absl::optional<int> max_relation_type = absl::nullopt;
+  if (!max_relation_type.has_value()) {
+    GEnumClass* enum_class =
+        G_ENUM_CLASS(g_type_class_ref(atk_relation_type_get_type()));
+    max_relation_type = enum_class->maximum;
+    g_type_class_unref(enum_class);
+  }
+  if (relation >= max_relation_type.value())
+    return;
+
+  atk_relation_set_add_relation_by_type(relation_set, relation,
+                                        target->GetNativeViewAccessible());
+}
+
+AtkRelationSet* AXPlatformNodeAuraLinux::GetAtkRelations() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  AtkRelationSet* relation_set = atk_relation_set_new();
+
+  if (IsWebDocumentForRelations()) {
+    AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+    if (parent_frame) {
+      atk_relation_set_add_relation_by_type(
+          relation_set, ATK_RELATION_EMBEDDED_BY, parent_frame);
+    }
+  }
+
+  if (auto* document_parent = FromAtkObject(document_parent_)) {
+    AtkObject* document = document_parent->FindPrimaryWebContentDocument();
+    if (document) {
+      atk_relation_set_add_relation_by_type(relation_set, ATK_RELATION_EMBEDS,
+                                            document);
+    }
+  }
+
+  // For each possible relation defined by an IntAttribute, we test that
+  // attribute and then look for reverse relations.
+  for (auto relation : kIntRelations) {
+    if (AXPlatformNode* target =
+            GetDelegate()->GetTargetNodeForRelation(relation.attribute))
+      AddRelationToSet(relation_set, relation.relation, target);
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  // Now we do the same for each possible relation defined by an
+  // IntListAttribute. In this case we need to handle each target in the list.
+  for (const auto& relation : kIntListRelations) {
+    std::vector<AXPlatformNode*> targets =
+        GetDelegate()->GetTargetNodesForRelation(relation.attribute);
+    for (AXPlatformNode* target : targets) {
+      AddRelationToSet(relation_set, relation.relation, target);
+    }
+
+    if (!relation.reverse_relation.has_value())
+      continue;
+
+    std::vector<AXPlatformNode*> reverse_target_ids =
+        GetDelegate()->GetSourceNodesForReverseRelations(relation.attribute);
+    for (AXPlatformNode* target : reverse_target_ids) {
+      AddRelationToSet(relation_set, relation.reverse_relation.value(), target);
+    }
+  }
+
+  return relation_set;
+}
+
+AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() = default;
+
+AXPlatformNodeAuraLinux::~AXPlatformNodeAuraLinux() {
+  if (g_current_selected == this)
+    g_current_selected = nullptr;
+
+  DestroyAtkObjects();
+
+  if (window_activate_event_postponed_)
+    AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+
+  SetWeakGPtrToAtkObject(&document_parent_, nullptr);
+}
+
+void AXPlatformNodeAuraLinux::Destroy() {
+  DestroyAtkObjects();
+  AXPlatformNodeBase::Destroy();
+}
+
+void AXPlatformNodeAuraLinux::Init(AXPlatformNodeDelegate* delegate) {
+  // Initialize ATK.
+  AXPlatformNodeBase::Init(delegate);
+
+  // Only create the AtkObject if we know enough information.
+  if (GetRole() != ax::mojom::Role::kUnknown)
+    GetOrCreateAtkObject();
+}
+
+bool AXPlatformNodeAuraLinux::IsPlatformCheckable() const {
+  if (GetRole() == ax::mojom::Role::kToggleButton)
+    return false;
+
+  return AXPlatformNodeBase::IsPlatformCheckable();
+}
+
+absl::optional<size_t> AXPlatformNodeAuraLinux::GetIndexInParent() {
+  AXPlatformNode* parent =
+      AXPlatformNode::FromNativeViewAccessible(GetParent());
+  // Even though the node doesn't have its parent, GetParent() could return the
+  // application. Since the detached view has the kUnknown role and the
+  // restriction is kDisabled, it early returns before finding the index.
+  if (parent == AXPlatformNodeAuraLinux::application() &&
+      GetRole() == ax::mojom::Role::kUnknown &&
+      GetData().GetRestriction() == ax::mojom::Restriction::kDisabled) {
+    return absl::nullopt;
+  }
+
+  return AXPlatformNodeBase::GetIndexInParent();
+}
+
+void AXPlatformNodeAuraLinux::EnsureAtkObjectIsValid() {
+  if (atk_object_) {
+    // If the object's role changes and that causes its
+    // interface mask to change, we need to create a new
+    // AtkObject for it.
+    ImplementedAtkInterfaces interface_mask = GetGTypeInterfaceMask(GetData());
+    if (interface_mask != interface_mask_)
+      DestroyAtkObjects();
+  }
+
+  if (!atk_object_) {
+    GetOrCreateAtkObject();
+  }
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetNativeViewAccessible() {
+  return GetOrCreateAtkObject();
+}
+
+gfx::NativeViewAccessible AXPlatformNodeAuraLinux::GetOrCreateAtkObject() {
+  if (!atk_object_) {
+    atk_object_ = CreateAtkObject();
+  }
+  return atk_object_;
+}
+
+void AXPlatformNodeAuraLinux::OnCheckedStateChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(obj), GetAtkStateTypeForCheckableNode(),
+      GetData().GetCheckedState() != ax::mojom::CheckedState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnEnabledChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_ENABLED,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_SENSITIVE,
+      GetData().GetRestriction() != ax::mojom::Restriction::kDisabled);
+}
+
+void AXPlatformNodeAuraLinux::OnBusyStateChanged(bool is_busy) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_BUSY, is_busy);
+}
+
+void AXPlatformNodeAuraLinux::OnExpandedStateChanged(bool is_expanded) {
+  // When a list box is expanded, it becomes visible. This means that it might
+  // now have a different role (the role for hidden Views is kUnknown).  We
+  // need to recreate the AtkObject in this case because a change in roles
+  // might imply a change in ATK interfaces implemented.
+  EnsureAtkObjectIsValid();
+
+  DCHECK(HasState(ax::mojom::State::kCollapsed) ||
+         HasState(ax::mojom::State::kExpanded));
+
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_EXPANDED, is_expanded);
+}
+
+void AXPlatformNodeAuraLinux::OnShowingStateChanged(bool is_showing) {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  atk_object_notify_state_change(obj, ATK_STATE_SHOWING, is_showing);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupStart() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  // Exit early if kMenuPopupStart is sent multiple times for the same menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  bool menu_already_open = !active_menus.empty();
+  if (menu_already_open && active_menus.back() == atk_object)
+    return;
+
+  // We also want to inform the AT that menu the is now showing. Normally this
+  // event is not fired because the menu will be created with the
+  // ATK_STATE_SHOWING already set to TRUE.
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, TRUE);
+
+  // We need to compute this before modifying the active menu stack.
+  AtkObject* previous_active_frame = ComputeActiveTopLevelFrame();
+
+  active_menus.push_back(atk_object);
+
+  // We exit early if the newly activated menu has the same AtkWindow as the
+  // previous one.
+  if (previous_active_frame == parent_frame)
+    return;
+  if (previous_active_frame) {
+    g_signal_emit_by_name(previous_active_frame, "deactivate");
+    atk_object_notify_state_change(previous_active_frame, ATK_STATE_ACTIVE,
+                                   FALSE);
+  }
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnMenuPopupEnd() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  AtkObject* parent_frame = FindAtkObjectParentFrame(atk_object);
+  if (!parent_frame)
+    return;
+
+  atk_object_notify_state_change(atk_object, ATK_STATE_SHOWING, FALSE);
+
+  // kMenuPopupHide may be called multiple times for the same menu, so only
+  // remove it if our parent frame matches the most recently opened menu.
+  std::vector<AtkObject*>& active_menus = GetActiveMenus();
+  DCHECK(!active_menus.empty())
+      << "Asymmetrical menupopupend events -- too many";
+
+  active_menus.pop_back();
+  AtkObject* new_active_item = ComputeActiveTopLevelFrame();
+  if (new_active_item != parent_frame) {
+    // Newly activated menu has the different AtkWindow as the previous one.
+    g_signal_emit_by_name(parent_frame, "deactivate");
+    atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+    if (new_active_item) {
+      g_signal_emit_by_name(new_active_item, "activate");
+      atk_object_notify_state_change(new_active_item, ATK_STATE_ACTIVE, TRUE);
+    }
+  }
+
+  // All menus are closed.
+  if (active_menus.empty())
+    OnAllMenusEnded();
+}
+
+void AXPlatformNodeAuraLinux::ResendFocusSignalsForCurrentlyFocusedNode() {
+  auto* frame = FromAtkObject(g_active_top_level_frame);
+  if (!frame)
+    return;
+
+  AtkObject* focused_node = frame->GetDelegate()->GetFocus();
+  if (!focused_node)
+    return;
+
+  g_signal_emit_by_name(focused_node, "focus-event", true);
+  atk_object_notify_state_change(focused_node, ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::SetAsCurrentlyFocusedNode() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_current_focused, obj);
+}
+
+// All menus have closed.
+void AXPlatformNodeAuraLinux::OnAllMenusEnded() {
+  if (!GetActiveMenus().empty() && g_active_top_level_frame &&
+      ComputeActiveTopLevelFrame() != g_active_top_level_frame) {
+    g_signal_emit_by_name(g_active_top_level_frame, "activate");
+    atk_object_notify_state_change(g_active_top_level_frame, ATK_STATE_ACTIVE,
+                                   TRUE);
+  }
+
+  GetActiveMenus().clear();
+  ResendFocusSignalsForCurrentlyFocusedNode();
+}
+
+void AXPlatformNodeAuraLinux::OnWindowActivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame == g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(parent_frame);
+
+  g_signal_emit_by_name(parent_frame, "activate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, TRUE);
+
+  // We also send a focus event for the currently focused element, so that
+  // the user knows where the focus is when the toplevel window regains focus.
+  if (g_current_focused &&
+      IsFrameAncestorOfAtkObject(parent_frame, g_current_focused)) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", true);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnWindowDeactivated() {
+  AtkObject* parent_frame = FindAtkObjectParentFrame(GetOrCreateAtkObject());
+  if (!parent_frame || parent_frame != g_active_top_level_frame)
+    return;
+
+  SetActiveTopLevelFrame(nullptr);
+
+  g_signal_emit_by_name(parent_frame, "deactivate");
+  atk_object_notify_state_change(parent_frame, ATK_STATE_ACTIVE, FALSE);
+}
+
+void AXPlatformNodeAuraLinux::OnWindowVisibilityChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (GetAtkRole() != ATK_ROLE_FRAME)
+    return;
+
+  bool minimized = delegate_->IsMinimized();
+  if (minimized == was_minimized_)
+    return;
+
+  was_minimized_ = minimized;
+  if (minimized)
+    g_signal_emit_by_name(atk_object, "minimize");
+  else
+    g_signal_emit_by_name(atk_object, "restore");
+  atk_object_notify_state_change(atk_object, ATK_STATE_ICONIFIED, minimized);
+}
+
+void AXPlatformNodeAuraLinux::OnScrolledToAnchor() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  // The text-caret-moved event is used to signal a scroll to anchor event.
+  if (ATK_IS_TEXT(atk_object)) {
+    g_signal_emit_by_name(atk_object, "text-caret-moved", 0);
+  }
+}
+
+void AXPlatformNodeAuraLinux::SetActiveViewsDialog() {
+  AtkObject* old_views_dialog = g_active_views_dialog;
+  AtkObject* new_views_dialog = nullptr;
+
+  AtkObject* parent = GetOrCreateAtkObject();
+  if (!parent)
+    return;
+
+  if (!GetDelegate()->IsWebContent()) {
+    while (parent) {
+      if (atk_object::GetRole(parent) == ATK_ROLE_DIALOG) {
+        new_views_dialog = parent;
+        break;
+      }
+      parent = atk_object::GetParent(parent);
+    }
+  }
+
+  if (old_views_dialog == new_views_dialog)
+    return;
+
+  SetWeakGPtrToAtkObject(&g_active_views_dialog, new_views_dialog);
+  if (old_views_dialog)
+    atk_object_notify_state_change(old_views_dialog, ATK_STATE_ACTIVE, FALSE);
+  if (new_views_dialog)
+    atk_object_notify_state_change(new_views_dialog, ATK_STATE_ACTIVE, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::OnFocused() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  if (atk_object::GetRole(atk_object) == ATK_ROLE_FRAME) {
+    OnWindowActivated();
+    return;
+  }
+
+  if (atk_object == g_current_focused)
+    return;
+
+  SetActiveViewsDialog();
+
+  if (g_current_focused) {
+    g_signal_emit_by_name(g_current_focused, "focus-event", false);
+    atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                   ATK_STATE_FOCUSED, false);
+  }
+
+  SetWeakGPtrToAtkObject(&g_current_focused, atk_object);
+
+  g_signal_emit_by_name(g_current_focused, "focus-event", true);
+  atk_object_notify_state_change(ATK_OBJECT(g_current_focused),
+                                 ATK_STATE_FOCUSED, true);
+}
+
+void AXPlatformNodeAuraLinux::OnSelected() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  if (g_current_selected && !g_current_selected->GetBoolAttribute(
+                                ax::mojom::BoolAttribute::kSelected)) {
+    atk_object_notify_state_change(
+        ATK_OBJECT(g_current_selected->GetOrCreateAtkObject()),
+        ATK_STATE_SELECTED, false);
+  }
+
+  g_current_selected = this;
+  if (ATK_IS_OBJECT(atk_object)) {
+    atk_object_notify_state_change(ATK_OBJECT(atk_object), ATK_STATE_SELECTED,
+                                   true);
+  }
+}
+
+void AXPlatformNodeAuraLinux::OnSelectedChildrenChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+  g_signal_emit_by_name(obj, "selection-changed", true);
+}
+
+bool AXPlatformNodeAuraLinux::EmitsAtkTextEvents() const {
+  // Objects which do not implement AtkText cannot emit AtkText events.
+  if (!atk_object_ || !ATK_IS_TEXT(atk_object_))
+    return false;
+
+  // Objects which do implement AtkText, but are ignored or invisible should not
+  // emit AtkText events.
+  if (IsInvisibleOrIgnored())
+    return false;
+
+  // If this node is not a static text node, it supports the full AtkText
+  // interface.
+  if (GetAtkRole() != kStaticRole)
+    return true;
+
+  // If this node has children it is not a static text leaf node and supports
+  // the full AtkText interface.
+  if (GetChildCount())
+    return true;
+
+  return false;
+}
+
+void AXPlatformNodeAuraLinux::GetFullSelection(int32_t* anchor_node_id,
+                                               int* anchor_offset,
+                                               int32_t* focus_node_id,
+                                               int* focus_offset) {
+  DCHECK(anchor_node_id);
+  DCHECK(anchor_offset);
+  DCHECK(focus_node_id);
+  DCHECK(focus_offset);
+
+  if (IsAtomicTextField() &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelStart, anchor_offset) &&
+      GetIntAttribute(ax::mojom::IntAttribute::kTextSelEnd, focus_offset)) {
+    int32_t node_id = GetData().id != -1 ? GetData().id : GetUniqueId();
+    *anchor_node_id = *focus_node_id = node_id;
+    return;
+  }
+
+  AXSelection selection = GetDelegate()->GetUnignoredSelection();
+  *anchor_node_id = selection.anchor_object_id;
+  *anchor_offset = selection.anchor_offset;
+  *focus_node_id = selection.focus_object_id;
+  *focus_offset = selection.focus_offset;
+}
+
+AXPlatformNodeAuraLinux& AXPlatformNodeAuraLinux::FindEditableRootOrDocument() {
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return *this;
+  if (GetBoolAttribute(ax::mojom::BoolAttribute::kNonAtomicTextFieldRoot) &&
+      HasState(ax::mojom::State::kEditable))
+    return *this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindEditableRootOrDocument();
+  return *this;
+}
+
+AXPlatformNodeAuraLinux* AXPlatformNodeAuraLinux::FindCommonAncestor(
+    AXPlatformNodeAuraLinux* other) {
+  if (this == other || other->IsDescendantOf(this))
+    return this;
+  if (auto* parent = FromAtkObject(GetParent()))
+    return parent->FindCommonAncestor(other);
+  return nullptr;
+}
+
+void AXPlatformNodeAuraLinux::UpdateSelectionInformation(int32_t anchor_node_id,
+                                                         int anchor_offset,
+                                                         int32_t focus_node_id,
+                                                         int focus_offset) {
+  had_nonzero_width_selection =
+      focus_node_id != anchor_node_id || focus_offset != anchor_offset;
+  current_caret_ = std::make_pair(focus_node_id, focus_offset);
+}
+
+void AXPlatformNodeAuraLinux::EmitSelectionChangedSignal(bool had_selection) {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitSelectionChangedSignal(had_selection);
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  // ATK does not consider a collapsed selection a selection, so
+  // when the collapsed selection changes (caret movement), we should
+  // avoid sending text-selection-changed events.
+  if (HasSelection() || had_selection)
+    g_signal_emit_by_name(atk_object, "text-selection-changed");
+}
+
+void AXPlatformNodeAuraLinux::EmitCaretChangedSignal() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->EmitCaretChangedSignal();
+    return;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(selection.second));
+}
+
+void AXPlatformNodeAuraLinux::OnTextAttributesChanged() {
+  if (!EmitsAtkTextEvents()) {
+    if (auto* parent = FromAtkObject(GetParent()))
+      parent->OnTextAttributesChanged();
+    return;
+  }
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+  g_signal_emit_by_name(atk_object, "text-attributes-changed");
+}
+
+void AXPlatformNodeAuraLinux::OnTextSelectionChanged() {
+  int32_t anchor_node_id, focus_node_id;
+  int anchor_offset, focus_offset;
+  GetFullSelection(&anchor_node_id, &anchor_offset, &focus_node_id,
+                   &focus_offset);
+
+  auto* anchor_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(anchor_node_id));
+  auto* focus_node = static_cast<AXPlatformNodeAuraLinux*>(
+      GetDelegate()->GetFromNodeID(focus_node_id));
+  if (!anchor_node || !focus_node)
+    return;
+
+  AXPlatformNodeAuraLinux& editable_root = FindEditableRootOrDocument();
+  AXPlatformNodeAuraLinux* common_ancestor =
+      focus_node->FindCommonAncestor(anchor_node);
+  if (common_ancestor) {
+    common_ancestor->EmitSelectionChangedSignal(
+        editable_root.HadNonZeroWidthSelection());
+  }
+
+  // It's possible for the selection to change and for the caret to stay in
+  // place. This might happen if the selection is totally reset with a
+  // different anchor node, but the same focus node. We should avoid sending a
+  // caret changed signal in that case.
+  std::pair<int32_t, int> prev_caret = editable_root.GetCurrentCaret();
+  if (prev_caret.first != focus_node_id || prev_caret.second != focus_offset)
+    focus_node->EmitCaretChangedSignal();
+
+  editable_root.UpdateSelectionInformation(anchor_node_id, anchor_offset,
+                                           focus_node_id, focus_offset);
+}
+
+bool AXPlatformNodeAuraLinux::SupportsSelectionWithAtkSelection() {
+  return SupportsToggle(GetRole()) ||
+         GetRole() == ax::mojom::Role::kListBoxOption;
+}
+
+void AXPlatformNodeAuraLinux::OnDescriptionChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  std::string description;
+  GetStringAttribute(ax::mojom::StringAttribute::kDescription, &description);
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-description";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_STRING);
+  g_value_set_string(&property_values.new_value, description.c_str());
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-description",
+                        &property_values, nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnSortDirectionChanged() {
+  AXPlatformNodeBase* table = GetTable();
+  if (!table)
+    return;
+
+  AtkObject* atk_table = table->GetNativeViewAccessible();
+  DCHECK(ATK_IS_TABLE(atk_table));
+
+  if (GetRole() == ax::mojom::Role::kColumnHeader)
+    g_signal_emit_by_name(atk_table, "row-reordered");
+  else if (GetRole() == ax::mojom::Role::kRowHeader)
+    g_signal_emit_by_name(atk_table, "column-reordered");
+}
+
+void AXPlatformNodeAuraLinux::OnValueChanged() {
+  // For the AtkText interface to work on non-web content nodes, we need to
+  // update the nodes' hypertext and trigger text change signals when the value
+  // changes. Otherwise, for web and PDF content, this is handled by
+  // "BrowserAccessibilityAuraLinux".
+  if (!GetDelegate()->IsWebContent())
+    UpdateHypertext();
+
+  if (!GetData().IsRangeValueSupported())
+    return;
+
+  float float_val;
+  if (!GetFloatAttribute(ax::mojom::FloatAttribute::kValueForRange, &float_val))
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-value";
+
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_DOUBLE);
+  g_value_set_double(&property_values.new_value,
+                     static_cast<double>(float_val));
+  g_signal_emit_by_name(G_OBJECT(atk_object),
+                        "property-change::accessible-value", &property_values,
+                        nullptr);
+}
+
+void AXPlatformNodeAuraLinux::OnNameChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object) {
+    return;
+  }
+  std::string previous_accessible_name = accessible_name_;
+  // Calling atk_object_get_name will update the value of accessible_name_.
+  if (!g_strcmp0(atk_object::GetName(atk_object),
+                 previous_accessible_name.c_str()))
+    return;
+
+  g_object_notify(G_OBJECT(atk_object), "accessible-name");
+}
+
+void AXPlatformNodeAuraLinux::OnDocumentTitleChanged() {
+  if (!g_active_top_level_frame)
+    return;
+
+  // We always want to notify on the top frame.
+  AXPlatformNodeAuraLinux* window = FromAtkObject(g_active_top_level_frame);
+  if (window)
+    window->OnNameChanged();
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeCreated() {
+  // We might not have a parent, in that case we don't need to send the event.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::add", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnSubtreeWillBeDeleted() {
+  // There is a chance there won't be a parent as we're in the deletion process.
+  // We also don't want to notify if this is an ignored node
+  if (!GetParent() || GetData().IsIgnored())
+    return;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  auto index_in_parent = GetIndexInParent();
+  gint index_gint = index_in_parent.has_value()
+                        ? static_cast<gint>(index_in_parent.value())
+                        : -1;
+  g_signal_emit_by_name(GetParent(), "children-changed::remove", index_gint,
+                        atk_object);
+}
+
+void AXPlatformNodeAuraLinux::OnParentChanged() {
+  if (!atk_object_)
+    return;
+
+  AtkPropertyValues property_values;
+  property_values.property_name = "accessible-parent";
+  property_values.new_value = G_VALUE_INIT;
+  g_value_init(&property_values.new_value, G_TYPE_OBJECT);
+  g_value_set_object(&property_values.new_value, GetParent());
+  g_signal_emit_by_name(G_OBJECT(atk_object_),
+                        "property-change::accessible-parent", &property_values,
+                        nullptr);
+  g_value_unset(&property_values.new_value);
+}
+
+void AXPlatformNodeAuraLinux::OnReadonlyChanged() {
+  AtkObject* obj = GetOrCreateAtkObject();
+  if (!obj)
+    return;
+
+#if defined(ATK_216)
+  // Runtime check in case we were compiled with a newer version of ATK.
+  if (!PlatformSupportsState(ATK_STATE_READ_ONLY))
+    return;
+
+  atk_object_notify_state_change(
+      obj, ATK_STATE_READ_ONLY,
+      GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly);
+#endif
+}
+
+void AXPlatformNodeAuraLinux::OnInvalidStatusChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_INVALID_ENTRY,
+      GetData().GetInvalidState() != ax::mojom::InvalidState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAriaCurrentChanged() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  ax::mojom::AriaCurrentState aria_current =
+      static_cast<ax::mojom::AriaCurrentState>(
+          GetIntAttribute(ax::mojom::IntAttribute::kAriaCurrentState));
+  atk_object_notify_state_change(
+      ATK_OBJECT(atk_object), ATK_STATE_ACTIVE,
+      aria_current != ax::mojom::AriaCurrentState::kNone &&
+          aria_current != ax::mojom::AriaCurrentState::kFalse);
+}
+
+void AXPlatformNodeAuraLinux::OnAlertShown() {
+  atk_object_notify_state_change(ATK_OBJECT(GetOrCreateAtkObject()),
+                                 ATK_STATE_SHOWING, TRUE);
+}
+
+void AXPlatformNodeAuraLinux::RunPostponedEvents() {
+  if (window_activate_event_postponed_) {
+    OnWindowActivated();
+    window_activate_event_postponed_ = false;
+  }
+}
+
+void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(
+    ax::mojom::Event event_type) {
+  if (!GetOrCreateAtkObject())
+    return;
+  AXPlatformNodeBase::NotifyAccessibilityEvent(event_type);
+  switch (event_type) {
+    // kMenuStart/kMenuEnd: the menu system has started / stopped.
+    // kMenuPopupStart/kMenuPopupEnd: an individual menu/submenu has
+    // opened/closed.
+    case ax::mojom::Event::kMenuPopupStart:
+      OnMenuPopupStart();
+      break;
+    case ax::mojom::Event::kMenuPopupEnd:
+      OnMenuPopupEnd();
+      break;
+    case ax::mojom::Event::kCheckedStateChanged:
+      OnCheckedStateChanged();
+      break;
+    case ax::mojom::Event::kExpandedChanged:
+      OnExpandedStateChanged(HasState(ax::mojom::State::kExpanded));
+      break;
+    case ax::mojom::Event::kFocus:
+    case ax::mojom::Event::kFocusContext:
+      OnFocused();
+      break;
+    case ax::mojom::Event::kFocusAfterMenuClose:
+      // The saved focused object is not always getting cleared when a popup
+      // becomes active. As a result, when the popup is dismissed, OnFocused()
+      // will return early thinking focus has not changed. Rather than trying
+      // to catch every case, take kFocusAfterMenuClose as a clear indication
+      // that a focus change should be presented and reset the saved focus.
+      g_current_focused = nullptr;
+      OnFocused();
+      break;
+    case ax::mojom::Event::kSelection:
+      OnSelected();
+      // When changing tabs also fire a name changed event.
+      if (GetRole() == ax::mojom::Role::kTab)
+        OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kSelectedChildrenChanged:
+      OnSelectedChildrenChanged();
+      break;
+    case ax::mojom::Event::kStateChanged:
+      // We need to know what state changed and fire an event for that specific
+      // state. Because we don't know what state changed, we deliberately do
+      // nothing here.
+      break;
+    case ax::mojom::Event::kTextChanged:
+      OnNameChanged();
+      break;
+    case ax::mojom::Event::kTextSelectionChanged:
+      OnTextSelectionChanged();
+      break;
+    case ax::mojom::Event::kValueChanged:
+      OnValueChanged();
+      break;
+    case ax::mojom::Event::kWindowActivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowActivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->PostponeEventsFor(this);
+        window_activate_event_postponed_ = true;
+      }
+      break;
+    case ax::mojom::Event::kWindowDeactivated:
+      if (AtkUtilAuraLinux::GetInstance()->IsAtSpiReady()) {
+        OnWindowDeactivated();
+      } else {
+        AtkUtilAuraLinux::GetInstance()->CancelPostponedEventsFor(this);
+        window_activate_event_postponed_ = false;
+      }
+      break;
+    case ax::mojom::Event::kWindowVisibilityChanged:
+      OnWindowVisibilityChanged();
+      break;
+    case ax::mojom::Event::kLoadComplete:
+    case ax::mojom::Event::kDocumentTitleChanged:
+      // Sometimes, e.g. upon navigating away from the page, the tree is
+      // rebuilt rather than modified. The kDocumentTitleChanged event occurs
+      // prior to the rebuild and so is added on the previous root node. When
+      // the tree is rebuilt and the old node removed, the events on the old
+      // node are removed and no new kDocumentTitleChanged will be emitted. To
+      // ensure we still fire the event, though, we also pay attention to
+      // kLoadComplete.
+      OnDocumentTitleChanged();
+      break;
+    case ax::mojom::Event::kAlert:
+      OnAlertShown();
+      break;
+    default:
+      break;
+  }
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndicesForId(int id) {
+  auto iterator = base::ranges::find(hypertext_.hyperlinks, id);
+  if (iterator == hypertext_.hyperlinks.end())
+    return absl::nullopt;
+  int hyperlink_index = std::distance(hypertext_.hyperlinks.begin(), iterator);
+
+  auto offset =
+      base::ranges::find(hypertext_.hyperlink_offset_to_index, hyperlink_index,
+                         &AXLegacyHypertext::OffsetToIndex::value_type::second);
+  if (offset == hypertext_.hyperlink_offset_to_index.end())
+    return absl::nullopt;
+
+  return std::make_pair(UTF16ToUnicodeOffsetInText(offset->first),
+                        UTF16ToUnicodeOffsetInText(offset->first + 1));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetEmbeddedObjectIndices() {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return absl::nullopt;
+  return parent->GetEmbeddedObjectIndicesForId(GetUniqueId());
+}
+
+void AXPlatformNodeAuraLinux::UpdateHypertext() {
+  EnsureAtkObjectIsValid();
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AXLegacyHypertext old_hypertext = hypertext_;
+  base::OffsetAdjuster::Adjustments old_adjustments = GetHypertextAdjustments();
+
+  UpdateComputedHypertext();
+  text_unicode_adjustments_ = absl::nullopt;
+  offset_to_text_attributes_.clear();
+
+  if ((!HasState(ax::mojom::State::kEditable) ||
+       GetData().GetRestriction() == ax::mojom::Restriction::kReadOnly) &&
+      !IsInLiveRegion()) {
+    return;
+  }
+
+  if (!EmitsAtkTextEvents())
+    return;
+
+  size_t shared_prefix, old_len, new_len;
+  ComputeHypertextRemovedAndInserted(old_hypertext, &shared_prefix, &old_len,
+                                     &new_len);
+  if (old_len > 0) {
+    std::u16string removed_substring =
+        old_hypertext.hypertext.substr(shared_prefix, old_len);
+
+    size_t shared_unicode_prefix = shared_prefix;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_prefix);
+    size_t shared_unicode_suffix = shared_prefix + old_len;
+    base::OffsetAdjuster::AdjustOffset(old_adjustments, &shared_unicode_suffix);
+
+    g_signal_emit_by_name(
+        atk_object, "text-remove",
+        shared_unicode_prefix,                  // position of removal
+        shared_unicode_suffix - shared_prefix,  // length of removal
+        base::UTF16ToUTF8(removed_substring).c_str());
+  }
+
+  if (new_len > 0) {
+    std::u16string inserted_substring =
+        hypertext_.hypertext.substr(shared_prefix, new_len);
+    size_t shared_unicode_prefix = UTF16ToUnicodeOffsetInText(shared_prefix);
+    size_t shared_unicode_suffix =
+        UTF16ToUnicodeOffsetInText(shared_prefix + new_len);
+    g_signal_emit_by_name(
+        atk_object, "text-insert",
+        shared_unicode_prefix,                          // position of insertion
+        shared_unicode_suffix - shared_unicode_prefix,  // length of insertion
+        base::UTF16ToUTF8(inserted_substring).c_str());
+  }
+}
+
+const AXLegacyHypertext& AXPlatformNodeAuraLinux::GetAXHypertext() {
+  return hypertext_;
+}
+
+const base::OffsetAdjuster::Adjustments&
+AXPlatformNodeAuraLinux::GetHypertextAdjustments() {
+  if (text_unicode_adjustments_.has_value())
+    return *text_unicode_adjustments_;
+
+  text_unicode_adjustments_.emplace();
+
+  std::u16string text = GetHypertext();
+  size_t text_length = text.size();
+  for (size_t i = 0; i < text_length; i++) {
+    base_icu::UChar32 code_point;
+    size_t original_i = i;
+    base::ReadUnicodeCharacter(text.c_str(), text_length + 1, &i, &code_point);
+
+    if ((i - original_i + 1) != 1) {
+      text_unicode_adjustments_->push_back(
+          base::OffsetAdjuster::Adjustment(original_i, i - original_i + 1, 1));
+    }
+  }
+
+  return *text_unicode_adjustments_;
+}
+
+size_t AXPlatformNodeAuraLinux::UTF16ToUnicodeOffsetInText(
+    size_t utf16_offset) {
+  size_t unicode_offset = utf16_offset;
+  base::OffsetAdjuster::AdjustOffset(GetHypertextAdjustments(),
+                                     &unicode_offset);
+  return unicode_offset;
+}
+
+size_t AXPlatformNodeAuraLinux::UnicodeToUTF16OffsetInText(int unicode_offset) {
+  if (unicode_offset == kStringLengthOffset)
+    return GetHypertext().size();
+
+  size_t utf16_offset = unicode_offset;
+  base::OffsetAdjuster::UnadjustOffset(GetHypertextAdjustments(),
+                                       &utf16_offset);
+  return utf16_offset;
+}
+
+int AXPlatformNodeAuraLinux::GetTextOffsetAtPoint(int x,
+                                                  int y,
+                                                  AtkCoordType atk_coord_type) {
+  if (!GetExtentsRelativeToAtkCoordinateType(atk_coord_type).Contains(x, y))
+    return -1;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return -1;
+
+  int count = atk_text::GetCharacterCount(ATK_TEXT(atk_object));
+  for (int i = 0; i < count; i++) {
+    int out_x, out_y, out_width, out_height;
+    atk_text::GetCharacterExtents(ATK_TEXT(atk_object), i, &out_x, &out_y,
+                                  &out_width, &out_height, atk_coord_type);
+    gfx::Rect rect(out_x, out_y, out_width, out_height);
+    if (rect.Contains(x, y))
+      return i;
+  }
+  return -1;
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentOriginInScreenCoordinates()
+    const {
+  AtkObject* parent = GetParent();
+  if (!parent)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* parent_node =
+      AXPlatformNode::FromNativeViewAccessible(parent);
+  if (!parent)
+    return gfx::Vector2d();
+
+  return parent_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Vector2d AXPlatformNodeAuraLinux::GetParentFrameOriginInScreenCoordinates()
+    const {
+  AtkObject* frame = FindAtkObjectParentFrame(atk_object_);
+  if (!frame)
+    return gfx::Vector2d();
+
+  const AXPlatformNode* frame_node =
+      AXPlatformNode::FromNativeViewAccessible(frame);
+  if (!frame_node)
+    return gfx::Vector2d();
+
+  return frame_node->GetDelegate()
+      ->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                      AXClippingBehavior::kUnclipped)
+      .OffsetFromOrigin();
+}
+
+gfx::Rect AXPlatformNodeAuraLinux::GetExtentsRelativeToAtkCoordinateType(
+    AtkCoordType coord_type) const {
+  gfx::Rect extents = delegate_->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                               AXClippingBehavior::kUnclipped);
+  switch (coord_type) {
+    case ATK_XY_SCREEN:
+      break;
+    case ATK_XY_WINDOW: {
+      gfx::Vector2d window_origin = -GetParentFrameOriginInScreenCoordinates();
+      extents.Offset(window_origin);
+      break;
+    }
+#if defined(ATK_230)
+    case ATK_XY_PARENT: {
+      gfx::Vector2d parent_origin = -GetParentOriginInScreenCoordinates();
+      extents.Offset(parent_origin);
+      break;
+    }
+#endif
+  }
+
+  return extents;
+}
+
+void AXPlatformNodeAuraLinux::GetExtents(gint* x,
+                                         gint* y,
+                                         gint* width,
+                                         gint* height,
+                                         AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+  if (width)
+    *width = extents.width();
+  if (height)
+    *height = extents.height();
+}
+
+void AXPlatformNodeAuraLinux::GetPosition(gint* x,
+                                          gint* y,
+                                          AtkCoordType coord_type) {
+  gfx::Rect extents = GetExtentsRelativeToAtkCoordinateType(coord_type);
+  if (x)
+    *x = extents.x();
+  if (y)
+    *y = extents.y();
+}
+
+void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) {
+  gfx::Rect rect_size = gfx::ToEnclosingRect(GetData().relative_bounds.bounds);
+  if (width)
+    *width = rect_size.width();
+  if (height)
+    *height = rect_size.height();
+}
+
+gfx::NativeViewAccessible
+AXPlatformNodeAuraLinux::HitTestSync(gint x, gint y, AtkCoordType coord_type) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, coord_type);
+
+  AXPlatformNode* current_result = this;
+  while (true) {
+    gfx::NativeViewAccessible hit_child =
+        current_result->GetDelegate()->HitTestSync(scroll_to.x(),
+                                                   scroll_to.y());
+    if (!hit_child)
+      return nullptr;
+    AXPlatformNode* hit_child_node =
+        AXPlatformNode::FromNativeViewAccessible(hit_child);
+    if (!hit_child_node || !hit_child_node->IsDescendantOf(current_result))
+      break;
+
+    // If we get the same node, we're done.
+    if (hit_child_node == current_result)
+      break;
+
+    // Continue to check recursively. That's because HitTestSync may have
+    // returned the best result within a particular accessibility tree,
+    // but we might need to recurse further in a tree of a different type
+    // (for example, from Views to Web).
+    current_result = hit_child_node;
+  }
+  return current_result->GetNativeViewAccessible();
+}
+
+bool AXPlatformNodeAuraLinux::GrabFocus() {
+  AXActionData action_data;
+  action_data.action = ax::mojom::Action::kFocus;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::FocusFirstFocusableAncestorInWebContent() {
+  if (!GetDelegate()->IsWebContent())
+    return false;
+
+  // Don't cross document boundaries in order to avoid having this operation
+  // cross iframe boundaries or escape to non-document UI elements.
+  if (GetAtkRole() == ATK_ROLE_DOCUMENT_WEB)
+    return false;
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  if (IsFocusable()) {
+    if (g_current_focused != atk_object)
+      GrabFocus();
+    return true;
+  }
+
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return false;
+
+  // If any of the siblings of this element are focusable, focusing the parent
+  // would be like moving the focus position backward, so we should fall back
+  // to setting the sequential focus navigation starting point.
+  for (auto child_iterator_ptr = parent->GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *parent->GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child || child == this)
+      continue;
+
+    if (child->IsFocusable())
+      return false;
+  }
+
+  return parent->FocusFirstFocusableAncestorInWebContent();
+}
+
+bool AXPlatformNodeAuraLinux::SetSequentialFocusNavigationStartingPoint() {
+  AXActionData action_data;
+  action_data.action =
+      ax::mojom::Action::kSetSequentialFocusNavigationStartingPoint;
+  return delegate_->AccessibilityPerformAction(action_data);
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPoint() {
+  // First we try to grab focus on this node if any ancestor in the same
+  // document is focusable. Otherwise we set the sequential navigation starting
+  // point.
+  if (!FocusFirstFocusableAncestorInWebContent())
+    return SetSequentialFocusNavigationStartingPoint();
+  else
+    return true;
+}
+
+bool AXPlatformNodeAuraLinux::
+    GrabFocusOrSetSequentialFocusNavigationStartingPointAtOffset(int offset) {
+  int child_count = delegate_->GetChildCount();
+  if (IsAtomicTextField() || child_count == 0)
+    return GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+
+  // When this node has children, we walk through them to figure out what child
+  // node should get focus. We are essentially repeating the process used when
+  // building the hypertext here.
+  int current_offset = 0;
+  for (int i = 0; i < child_count; ++i) {
+    auto* child = FromAtkObject(delegate_->ChildAtIndex(i));
+    if (!child)
+      continue;
+
+    if (child->IsText()) {
+      current_offset += child->GetName().size();
+    } else {
+      // Add an offset for the embedded character.
+      current_offset += 1;
+    }
+
+    // If the offset is larger than our size, try to work with the last child,
+    // which is also the behavior of SetCaretOffset.
+    if (offset <= current_offset || i == child_count - 1)
+      return child->GrabFocusOrSetSequentialFocusNavigationStartingPoint();
+  }
+
+  NOTREACHED();
+  return false;
+}
+
+const gchar* AXPlatformNodeAuraLinux::GetDefaultActionName() {
+  int action;
+  if (!GetIntAttribute(ax::mojom::IntAttribute::kDefaultActionVerb, &action))
+    return nullptr;
+
+  // If this object cannot receive focus and has a button role, use click as
+  // the default action. On the AuraLinux platform, the press action is a
+  // signal to users that they can trigger the action using the keyboard, while
+  // a click action means the user should trigger the action via a simulated
+  // click. If this object cannot receive focus, it's impossible to trigger it
+  // with a key press.
+  if (GetRole() == ax::mojom::Role::kButton &&
+      action == static_cast<int>(ax::mojom::DefaultActionVerb::kPress) &&
+      !IsFocusable()) {
+    action = static_cast<int>(ax::mojom::DefaultActionVerb::kClick);
+  }
+
+  std::string action_verb =
+      ui::ToString(static_cast<ax::mojom::DefaultActionVerb>(action));
+
+  ATK_AURALINUX_RETURN_STRING(action_verb);
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetAtkAttributes() {
+  AtkAttributeSet* attribute_list = nullptr;
+  ComputeAttributes(&attribute_list);
+  return attribute_list;
+}
+
+AtkStateType AXPlatformNodeAuraLinux::GetAtkStateTypeForCheckableNode() {
+  if (GetData().GetCheckedState() == ax::mojom::CheckedState::kMixed)
+    return ATK_STATE_INDETERMINATE;
+  if (IsPlatformCheckable())
+    return ATK_STATE_CHECKED;
+  return ATK_STATE_PRESSED;
+}
+
+// AtkDocumentHelpers
+
+const gchar* AXPlatformNodeAuraLinux::GetDocumentAttributeValue(
+    const gchar* attribute) const {
+  if (!g_ascii_strcasecmp(attribute, "DocType"))
+    return delegate_->GetTreeData().doctype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "MimeType"))
+    return delegate_->GetTreeData().mimetype.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "Title"))
+    return delegate_->GetTreeData().title.c_str();
+  else if (!g_ascii_strcasecmp(attribute, "URI"))
+    return delegate_->GetTreeData().url.c_str();
+
+  return nullptr;
+}
+
+AtkAttributeSet* AXPlatformNodeAuraLinux::GetDocumentAttributes() const {
+  AtkAttributeSet* attribute_set = nullptr;
+  const gchar* doc_attributes[] = {"DocType", "MimeType", "Title", "URI"};
+  const gchar* value = nullptr;
+
+  for (unsigned i = 0; i < G_N_ELEMENTS(doc_attributes); i++) {
+    value = GetDocumentAttributeValue(doc_attributes[i]);
+    if (value) {
+      attribute_set = PrependAtkAttributeToAtkAttributeSet(
+          doc_attributes[i], value, attribute_set);
+    }
+  }
+
+  return attribute_set;
+}
+
+//
+// AtkHyperlink helpers
+//
+
+AtkHyperlink* AXPlatformNodeAuraLinux::GetAtkHyperlink() {
+  if (atk_hyperlink_)
+    return atk_hyperlink_;
+
+  atk_hyperlink_ =
+      ATK_HYPERLINK(g_object_new(AX_PLATFORM_ATK_HYPERLINK_TYPE, 0));
+  ax_platform_atk_hyperlink_set_object(
+      AX_PLATFORM_ATK_HYPERLINK(atk_hyperlink_), this);
+  return atk_hyperlink_;
+}
+
+//
+// Misc helpers
+//
+
+void AXPlatformNodeAuraLinux::GetFloatAttributeInGValue(
+    ax::mojom::FloatAttribute attr,
+    GValue* value) {
+  float float_val;
+  if (GetFloatAttribute(attr, &float_val)) {
+    memset(value, 0, sizeof(*value));
+    g_value_init(value, G_TYPE_FLOAT);
+    g_value_set_float(value, float_val);
+  }
+}
+
+void AXPlatformNodeAuraLinux::AddAttributeToList(const char* name,
+                                                 const char* value,
+                                                 AtkAttributeSet** attributes) {
+  *attributes = PrependAtkAttributeToAtkAttributeSet(name, value, *attributes);
+}
+
+void AXPlatformNodeAuraLinux::SetDocumentParent(
+    AtkObject* new_document_parent) {
+  DCHECK(GetAtkRole() == ATK_ROLE_FRAME);
+  SetWeakGPtrToAtkObject(&document_parent_, new_document_parent);
+}
+
+bool AXPlatformNodeAuraLinux::IsNameExposed() {
+  switch (GetRole()) {
+    case ax::mojom::Role::kListMarker:
+      return !GetChildCount();
+    default:
+      return true;
+  }
+}
+
+int AXPlatformNodeAuraLinux::GetCaretOffset() {
+  if (!HasVisibleCaretOrSelection()) {
+    absl::optional<FindInPageResultInfo> result =
+        GetSelectionOffsetsFromFindInPage();
+    AtkObject* atk_object = GetOrCreateAtkObject();
+    if (!atk_object)
+      return -1;
+    if (result.has_value() && result->node == atk_object)
+      return UTF16ToUnicodeOffsetInText(result->end_offset);
+    return -1;
+  }
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return UTF16ToUnicodeOffsetInText(selection.second);
+}
+
+bool AXPlatformNodeAuraLinux::SetCaretOffset(int offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return false;
+
+  int character_count = atk_text_get_character_count(ATK_TEXT(atk_object));
+  if (offset < 0 || offset > character_count)
+    offset = character_count;
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  if (offset == GetCaretOffset() && !HasSelection())
+    return true;
+
+  offset = UnicodeToUTF16OffsetInText(offset);
+  if (!SetHypertextSelection(offset, offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::SetTextSelectionForAtkText(int start_offset,
+                                                         int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return false;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return false;
+
+  // We must put these in the correct order so that we can do
+  // a comparison with the existing start and end below.
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  // Even if we don't change anything, we still want to act like we
+  // were successful.
+  std::pair<int, int> old_offsets = GetSelectionOffsetsForAtk();
+  if (old_offsets.first == start_offset && old_offsets.second == end_offset)
+    return true;
+
+  if (!SetHypertextSelection(start_offset, end_offset))
+    return false;
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::HasSelection() {
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  return selection.first >= 0 && selection.second >= 0 &&
+         selection.first != selection.second;
+}
+
+void AXPlatformNodeAuraLinux::GetSelectionExtents(int* start_offset,
+                                                  int* end_offset) {
+  if (start_offset)
+    *start_offset = 0;
+  if (end_offset)
+    *end_offset = 0;
+
+  std::pair<int, int> selection = GetSelectionOffsetsForAtk();
+  if (selection.first < 0 || selection.second < 0 ||
+      selection.first == selection.second)
+    return;
+
+  // We should ignore the direction of the selection when exposing start and
+  // end offsets. According to the ATK documentation the end offset is always
+  // the offset immediately past the end of the selection. This wouldn't make
+  // sense if end < start.
+  if (selection.second < selection.first)
+    std::swap(selection.first, selection.second);
+
+  selection.first = UTF16ToUnicodeOffsetInText(selection.first);
+  selection.second = UTF16ToUnicodeOffsetInText(selection.second);
+
+  if (start_offset)
+    *start_offset = selection.first;
+  if (end_offset)
+    *end_offset = selection.second;
+}
+
+// Since this method doesn't return a static gchar*, we expect the caller of
+// atk_text_get_selection to free the return value.
+gchar* AXPlatformNodeAuraLinux::GetSelectionWithText(int* start_offset,
+                                                     int* end_offset) {
+  int selection_start, selection_end;
+  GetSelectionExtents(&selection_start, &selection_end);
+
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return nullptr;
+
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    absl::optional<FindInPageResultInfo> find_in_page_result =
+        GetSelectionOffsetsFromFindInPage();
+    if (!find_in_page_result.has_value() ||
+        find_in_page_result->node != atk_object) {
+      *start_offset = 0;
+      *end_offset = 0;
+      return nullptr;
+    }
+
+    selection_start = find_in_page_result->start_offset;
+    selection_end = find_in_page_result->end_offset;
+  }
+
+  selection_start = UTF16ToUnicodeOffsetInText(selection_start);
+  selection_end = UTF16ToUnicodeOffsetInText(selection_end);
+  if (selection_start < 0 || selection_end < 0 ||
+      selection_start == selection_end) {
+    return nullptr;
+  }
+
+  if (start_offset)
+    *start_offset = selection_start;
+  if (end_offset)
+    *end_offset = selection_end;
+  return atk_text::GetText(ATK_TEXT(atk_object), selection_start,
+                           selection_end);
+}
+
+bool AXPlatformNodeAuraLinux::IsInLiveRegion() {
+  return HasStringAttribute(ax::mojom::StringAttribute::kContainerLiveStatus);
+}
+
+#if defined(ATK_230)
+void AXPlatformNodeAuraLinux::ScrollToPoint(AtkCoordType atk_coord_type,
+                                            int x,
+                                            int y) {
+  gfx::Point scroll_to(x, y);
+  scroll_to = ConvertPointToScreenCoordinates(scroll_to, atk_coord_type);
+
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToPoint;
+  action_data.target_point = scroll_to;
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeRectIntoView(
+    gfx::Rect rect,
+    AtkScrollType atk_scroll_type) {
+  AXActionData action_data;
+  action_data.target_node_id = GetData().id;
+  action_data.action = ax::mojom::Action::kScrollToMakeVisible;
+  action_data.target_rect = rect;
+
+  action_data.scroll_behavior = ax::mojom::ScrollBehavior::kScrollIfVisible;
+  action_data.horizontal_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+  action_data.vertical_scroll_alignment = ax::mojom::ScrollAlignment::kNone;
+
+  switch (atk_scroll_type) {
+    case ATK_SCROLL_TOP_LEFT:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_BOTTOM_RIGHT:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_TOP_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentTop;
+      break;
+    case ATK_SCROLL_BOTTOM_EDGE:
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentBottom;
+      break;
+    case ATK_SCROLL_LEFT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentLeft;
+      break;
+    case ATK_SCROLL_RIGHT_EDGE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentRight;
+      break;
+    case ATK_SCROLL_ANYWHERE:
+      action_data.horizontal_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      action_data.vertical_scroll_alignment =
+          ax::mojom::ScrollAlignment::kScrollAlignmentClosestEdge;
+      break;
+  }
+
+  GetDelegate()->AccessibilityPerformAction(action_data);
+}
+
+void AXPlatformNodeAuraLinux::ScrollNodeIntoView(
+    AtkScrollType atk_scroll_type) {
+  gfx::Rect rect = GetDelegate()->GetBoundsRect(AXCoordinateSystem::kScreenDIPs,
+                                                AXClippingBehavior::kUnclipped);
+  rect -= rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+}
+#endif  // defined(ATK_230)
+
+#if defined(ATK_232)
+absl::optional<gfx::Rect>
+AXPlatformNodeAuraLinux::GetUnclippedHypertextRangeBoundsRect(int start_offset,
+                                                              int end_offset) {
+  start_offset = UnicodeToUTF16OffsetInText(start_offset);
+  end_offset = UnicodeToUTF16OffsetInText(end_offset);
+
+  std::u16string text = GetHypertext();
+  if (start_offset < 0 || start_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+  if (end_offset < 0 || end_offset > static_cast<int>(text.length()))
+    return absl::nullopt;
+
+  if (end_offset < start_offset)
+    std::swap(start_offset, end_offset);
+
+  return GetDelegate()->GetHypertextRangeBoundsRect(
+      UnicodeToUTF16OffsetInText(start_offset),
+      UnicodeToUTF16OffsetInText(end_offset), AXCoordinateSystem::kScreenDIPs,
+      AXClippingBehavior::kUnclipped);
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringIntoView(
+    AtkScrollType atk_scroll_type,
+    int start_offset,
+    int end_offset) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  rect -= node_rect.OffsetFromOrigin();
+  ScrollNodeRectIntoView(rect, atk_scroll_type);
+
+  return true;
+}
+
+bool AXPlatformNodeAuraLinux::ScrollSubstringToPoint(
+    int start_offset,
+    int end_offset,
+    AtkCoordType atk_coord_type,
+    int x,
+    int y) {
+  absl::optional<gfx::Rect> optional_rect =
+      GetUnclippedHypertextRangeBoundsRect(start_offset, end_offset);
+  if (!optional_rect.has_value())
+    return false;
+
+  gfx::Rect rect = *optional_rect;
+  gfx::Rect node_rect = GetDelegate()->GetBoundsRect(
+      AXCoordinateSystem::kScreenDIPs, AXClippingBehavior::kUnclipped);
+  ScrollToPoint(atk_coord_type, x - (rect.x() - node_rect.x()),
+                y - (rect.y() - node_rect.y()));
+
+  return true;
+}
+#endif  // defined(ATK_232)
+
+void AXPlatformNodeAuraLinux::ComputeStylesIfNeeded() {
+  if (!offset_to_text_attributes_.empty())
+    return;
+
+  default_text_attributes_ = ComputeTextAttributes();
+  TextAttributeMap attributes_map =
+      GetDelegate()->ComputeTextAttributeMap(default_text_attributes_);
+  offset_to_text_attributes_.swap(attributes_map);
+}
+
+int AXPlatformNodeAuraLinux::FindStartOfStyle(
+    int start_offset,
+    ax::mojom::MoveDirection direction) {
+  int text_length = GetHypertext().length();
+  DCHECK_GE(start_offset, 0);
+  DCHECK_LE(start_offset, text_length);
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  switch (direction) {
+    case ax::mojom::MoveDirection::kNone:
+      NOTREACHED();
+      return start_offset;
+    case ax::mojom::MoveDirection::kBackward: {
+      auto iterator = offset_to_text_attributes_.upper_bound(start_offset);
+      --iterator;
+      return iterator->first;
+    }
+    case ax::mojom::MoveDirection::kForward: {
+      const auto iterator =
+          offset_to_text_attributes_.upper_bound(start_offset);
+      if (iterator == offset_to_text_attributes_.end())
+        return text_length;
+      return iterator->first;
+    }
+  }
+
+  NOTREACHED();
+  return start_offset;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetTextAttributes(
+    int offset,
+    int* start_offset,
+    int* end_offset) {
+  ComputeStylesIfNeeded();
+  DCHECK(!offset_to_text_attributes_.empty());
+
+  int utf16_offset = UnicodeToUTF16OffsetInText(offset);
+  int style_start =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kBackward);
+  int style_end =
+      FindStartOfStyle(utf16_offset, ax::mojom::MoveDirection::kForward);
+
+  auto iterator = offset_to_text_attributes_.find(style_start);
+  DCHECK(iterator != offset_to_text_attributes_.end());
+
+  SetIntPointerValueIfNotNull(start_offset,
+                              UTF16ToUnicodeOffsetInText(style_start));
+  SetIntPointerValueIfNotNull(end_offset,
+                              UTF16ToUnicodeOffsetInText(style_end));
+
+  if (iterator == offset_to_text_attributes_.end())
+    return default_text_attributes_;
+
+  return iterator->second;
+}
+
+const TextAttributeList& AXPlatformNodeAuraLinux::GetDefaultTextAttributes() {
+  ComputeStylesIfNeeded();
+  return default_text_attributes_;
+}
+
+void AXPlatformNodeAuraLinux::TerminateFindInPage() {
+  ForgetCurrentFindInPageResult();
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageResult(int start_offset,
+                                                       int end_offset) {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  DCHECK(ATK_IS_TEXT(atk_object));
+
+  if (!EmitsAtkTextEvents()) {
+    ActivateFindInPageInParent(start_offset, end_offset);
+    return;
+  }
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  FindInPageResultInfo new_info = {atk_object, start_offset, end_offset};
+  if (iterator != active_results.end() && iterator->second == new_info)
+    return;
+
+  active_results[parent_doc] = new_info;
+  g_signal_emit_by_name(atk_object, "text-selection-changed");
+  g_signal_emit_by_name(atk_object, "text-caret-moved",
+                        UTF16ToUnicodeOffsetInText(end_offset));
+}
+
+absl::optional<std::pair<int, int>>
+AXPlatformNodeAuraLinux::GetHypertextExtentsOfChild(
+    AXPlatformNodeAuraLinux* child_to_find) {
+  int current_offset = 0;
+  for (auto child_iterator_ptr = GetDelegate()->ChildrenBegin();
+       *child_iterator_ptr != *GetDelegate()->ChildrenEnd();
+       ++(*child_iterator_ptr)) {
+    auto* child = FromAtkObject(child_iterator_ptr->GetNativeViewAccessible());
+    if (!child)
+      continue;
+
+    // If this object is a text only object, it is included directly into this
+    // node's hypertext, otherwise it is represented as an embedded object
+    // character.
+    int size = child->IsText() ? child->GetName().size() : 1;
+    if (child == child_to_find)
+      return std::make_pair(current_offset, current_offset + size);
+    current_offset += size;
+  }
+
+  return absl::nullopt;
+}
+
+void AXPlatformNodeAuraLinux::ActivateFindInPageInParent(int start_offset,
+                                                         int end_offset) {
+  auto* parent = FromAtkObject(GetParent());
+  if (!parent)
+    return;
+
+  absl::optional<std::pair<int, int>> extents_in_parent =
+      parent->GetHypertextExtentsOfChild(this);
+  if (!extents_in_parent.has_value())
+    return;
+
+  DCHECK(IsText());
+  parent->ActivateFindInPageResult(extents_in_parent->first + start_offset,
+                                   extents_in_parent->first + end_offset);
+}
+
+void AXPlatformNodeAuraLinux::ForgetCurrentFindInPageResult() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (parent_doc)
+    GetActiveFindInPageResults().erase(parent_doc);
+}
+
+absl::optional<FindInPageResultInfo>
+AXPlatformNodeAuraLinux::GetSelectionOffsetsFromFindInPage() {
+  AtkObject* atk_object = GetOrCreateAtkObject();
+  if (!atk_object)
+    return absl::nullopt;
+
+  AtkObject* parent_doc = FindAtkObjectToplevelParentDocument(atk_object);
+  if (!parent_doc)
+    return absl::nullopt;
+
+  std::map<AtkObject*, FindInPageResultInfo>& active_results =
+      GetActiveFindInPageResults();
+  auto iterator = active_results.find(parent_doc);
+  if (iterator == active_results.end())
+    return absl::nullopt;
+
+  return iterator->second;
+}
+
+gfx::Point AXPlatformNodeAuraLinux::ConvertPointToScreenCoordinates(
+    const gfx::Point& point,
+    AtkCoordType atk_coord_type) {
+  switch (atk_coord_type) {
+    case ATK_XY_WINDOW:
+      return point + GetParentFrameOriginInScreenCoordinates();
+#if defined(ATK_230)
+    case ATK_XY_PARENT:
+      return point + GetParentOriginInScreenCoordinates();
+#endif
+    case ATK_XY_SCREEN:
+    default:
+      return point;
+  }
+}
+
+std::pair<int, int> AXPlatformNodeAuraLinux::GetSelectionOffsetsForAtk() {
+  // In web content we always want to look at the selection from the tree
+  // instead of the selection that might be set via node attributes. This is
+  // because the tree selection is the absolute truth about what is visually
+  // selected, whereas node attributes might contain selection extents that are
+  // no longer part of the visual selection.
+  std::pair<int, int> selection;
+  if (GetDelegate()->IsWebContent()) {
+    AXSelection unignored_selection = GetDelegate()->GetUnignoredSelection();
+    GetSelectionOffsetsFromTree(&unignored_selection, &selection.first,
+                                &selection.second);
+  } else {
+    GetSelectionOffsets(&selection.first, &selection.second);
+  }
+  return selection;
+}
+
+}  // namespace ui
Index: chromium/create-123.0.6286.1-gfx-linux-5.10-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-gfx-linux-5.10-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-gfx-linux-5.10-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-gfx-linux-5.10.patch

Property changes on: chromium/create-123.0.6286.1-gfx-linux-5.10-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h
===================================================================
--- chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h	(nonexistent)
+++ chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src/ui/gfx/linux/dmabuf_uapi.h	(revision 385)
@@ -0,0 +1,48 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+#define UI_GFX_LINUX_DMABUF_UAPI_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/dma-buf.h>
+#else
+#include <linux/types.h>
+
+struct dma_buf_sync {
+  __u64 flags;
+};
+
+constexpr __u64 DMA_BUF_SYNC_READ = 1 << 0;
+constexpr __u64 DMA_BUF_SYNC_WRITE = 2 << 0;
+constexpr __u64 DMA_BUF_SYNC_RW = DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE;
+
+constexpr __u64 DMA_BUF_SYNC_START = 0 << 2;
+constexpr __u64 DMA_BUF_SYNC_END = 1 << 2;
+
+constexpr char DMA_BUF_BASE = 'b';
+constexpr unsigned long DMA_BUF_IOCTL_SYNC =
+    _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 10, 0)
+struct dma_buf_export_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+struct dma_buf_import_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+constexpr unsigned long DMA_BUF_IOCTL_EXPORT_SYNC_FILE =
+    _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+    _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+#endif
+
+#endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
Index: chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h
===================================================================
--- chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h	(nonexistent)
+++ chromium/create-123.0.6286.1-gfx-linux-5.10-patch/src-orig/ui/gfx/linux/dmabuf_uapi.h	(revision 385)
@@ -0,0 +1,48 @@
+// Copyright 2023 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GFX_LINUX_DMABUF_UAPI_H_
+#define UI_GFX_LINUX_DMABUF_UAPI_H_
+
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/dma-buf.h>
+#else
+#include <linux/types.h>
+
+struct dma_buf_sync {
+  __u64 flags;
+};
+
+constexpr __u64 DMA_BUF_SYNC_READ = 1 << 0;
+constexpr __u64 DMA_BUF_SYNC_WRITE = 2 << 0;
+constexpr __u64 DMA_BUF_SYNC_RW = DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE;
+
+constexpr __u64 DMA_BUF_SYNC_START = 0 << 2;
+constexpr __u64 DMA_BUF_SYNC_END = 1 << 2;
+
+constexpr char DMA_BUF_BASE = 'b';
+constexpr unsigned long DMA_BUF_IOCTL_SYNC =
+    _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync);
+#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
+struct dma_buf_export_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+struct dma_buf_import_sync_file {
+  __u32 flags;
+  __s32 fd;
+};
+
+constexpr unsigned long DMA_BUF_IOCTL_EXPORT_SYNC_FILE =
+    _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file);
+constexpr unsigned long DMA_BUF_IOCTL_IMPORT_SYNC_FILE =
+    _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file);
+#endif
+
+#endif  // UI_GFX_LINUX_DMABUF_UAPI_H_
Index: chromium/create-123.0.6286.1-host-pkg-config-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-host-pkg-config-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-host-pkg-config-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-host-pkg-config.patch

Property changes on: chromium/create-123.0.6286.1-host-pkg-config-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni
===================================================================
--- chromium/create-123.0.6286.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni	(nonexistent)
+++ chromium/create-123.0.6286.1-host-pkg-config-patch/src/build/config/linux/pkg_config.gni	(revision 385)
@@ -0,0 +1,129 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sysroot.gni")
+
+# Defines a config specifying the result of running pkg-config for the given
+# packages. Put the package names you want to query in the "packages" variable
+# inside the template invocation.
+#
+# You can also add defines via the "defines" variable. This can be useful to
+# add this to the config to pass defines that the library expects to get by
+# users of its headers.
+#
+# Example:
+#   pkg_config("mything") {
+#     packages = [ "mything1", "mything2" ]
+#     defines = [ "ENABLE_AWESOME" ]
+#   }
+#
+# You can also use "extra args" to filter out results (see pkg-config.py):
+#   extra_args = [ "-v, "foo" ]
+# To ignore libs and ldflags (only cflags/defines will be set, which is useful
+# when doing manual dynamic linking), set:
+#   ignore_libs = true
+
+declare_args() {
+  # A pkg-config wrapper to call instead of trying to find and call the right
+  # pkg-config directly. Wrappers like this are common in cross-compilation
+  # environments.
+  # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
+  # the sysroot mechanism to find the right .pc files.
+  pkg_config = ""
+
+  # A optional pkg-config wrapper to use for tools built on the host.
+  host_pkg_config = ""
+
+  # CrOS systemroots place pkgconfig files at <systemroot>/usr/share/pkgconfig
+  # and one of <systemroot>/usr/lib/pkgconfig or <systemroot>/usr/lib64/pkgconfig
+  # depending on whether the systemroot is for a 32 or 64 bit architecture.
+  #
+  # When build under GYP, CrOS board builds specify the 'system_libdir' variable
+  # as part of the GYP_DEFINES provided by the CrOS emerge build or simple
+  # chrome build scheme. This variable permits controlling this for GN builds
+  # in similar fashion by setting the `system_libdir` variable in the build's
+  # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture.
+  system_libdir = "lib"
+}
+
+pkg_config_script = "//build/config/linux/pkg-config.py"
+
+# Define the args we pass to the pkg-config script for other build files that
+# need to invoke it manually.
+pkg_config_args = []
+
+common_pkg_config_args = []
+if (sysroot != "") {
+  # Pass the sysroot if we're using one (it requires the CPU arch also).
+  common_pkg_config_args += [
+    "-s",
+    rebase_path(sysroot),
+    "-a",
+    current_cpu,
+  ]
+}
+
+if (pkg_config != "") {
+  pkg_config_args += [
+    "-p",
+    pkg_config,
+  ]
+}
+
+# Only use the custom libdir when building with the target sysroot.
+if (target_sysroot != "" && sysroot == target_sysroot) {
+  pkg_config_args += [
+    "--system_libdir",
+    system_libdir,
+  ]
+}
+
+if (host_pkg_config != "") {
+  host_pkg_config_args = [
+    "-p",
+    host_pkg_config,
+  ]
+} else {
+  host_pkg_config_args = pkg_config_args
+}
+
+template("pkg_config") {
+  assert(defined(invoker.packages),
+         "Variable |packages| must be defined to be a list in pkg_config.")
+  config(target_name) {
+    if (host_toolchain == current_toolchain || current_cpu == "x64") {
+      args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+    } else {
+      args = common_pkg_config_args + pkg_config_args + invoker.packages
+    }
+    if (defined(invoker.extra_args)) {
+      args += invoker.extra_args
+    }
+
+    pkgresult = exec_script(pkg_config_script, args, "json")
+    cflags = pkgresult[1]
+
+    foreach(include, pkgresult[0]) {
+      # We want the system include paths to use -isystem instead of -I to
+      # suppress warnings in those headers.
+      if (use_sysroot) {
+        include_relativized = rebase_path(include, root_build_dir)
+        cflags += [ "-isystem$include_relativized" ]
+      } else {
+        cflags += [ "-isystem$include" ]
+      }
+    }
+
+    if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
+      libs = pkgresult[2]
+      lib_dirs = pkgresult[3]
+    }
+
+    forward_variables_from(invoker,
+                           [
+                             "defines",
+                             "visibility",
+                           ])
+  }
+}
Index: chromium/create-123.0.6286.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni
===================================================================
--- chromium/create-123.0.6286.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni	(nonexistent)
+++ chromium/create-123.0.6286.1-host-pkg-config-patch/src-orig/build/config/linux/pkg_config.gni	(revision 385)
@@ -0,0 +1,129 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/sysroot.gni")
+
+# Defines a config specifying the result of running pkg-config for the given
+# packages. Put the package names you want to query in the "packages" variable
+# inside the template invocation.
+#
+# You can also add defines via the "defines" variable. This can be useful to
+# add this to the config to pass defines that the library expects to get by
+# users of its headers.
+#
+# Example:
+#   pkg_config("mything") {
+#     packages = [ "mything1", "mything2" ]
+#     defines = [ "ENABLE_AWESOME" ]
+#   }
+#
+# You can also use "extra args" to filter out results (see pkg-config.py):
+#   extra_args = [ "-v, "foo" ]
+# To ignore libs and ldflags (only cflags/defines will be set, which is useful
+# when doing manual dynamic linking), set:
+#   ignore_libs = true
+
+declare_args() {
+  # A pkg-config wrapper to call instead of trying to find and call the right
+  # pkg-config directly. Wrappers like this are common in cross-compilation
+  # environments.
+  # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on
+  # the sysroot mechanism to find the right .pc files.
+  pkg_config = ""
+
+  # A optional pkg-config wrapper to use for tools built on the host.
+  host_pkg_config = ""
+
+  # CrOS systemroots place pkgconfig files at <systemroot>/usr/share/pkgconfig
+  # and one of <systemroot>/usr/lib/pkgconfig or <systemroot>/usr/lib64/pkgconfig
+  # depending on whether the systemroot is for a 32 or 64 bit architecture.
+  #
+  # When build under GYP, CrOS board builds specify the 'system_libdir' variable
+  # as part of the GYP_DEFINES provided by the CrOS emerge build or simple
+  # chrome build scheme. This variable permits controlling this for GN builds
+  # in similar fashion by setting the `system_libdir` variable in the build's
+  # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture.
+  system_libdir = "lib"
+}
+
+pkg_config_script = "//build/config/linux/pkg-config.py"
+
+# Define the args we pass to the pkg-config script for other build files that
+# need to invoke it manually.
+pkg_config_args = []
+
+common_pkg_config_args = []
+if (sysroot != "") {
+  # Pass the sysroot if we're using one (it requires the CPU arch also).
+  common_pkg_config_args += [
+    "-s",
+    rebase_path(sysroot),
+    "-a",
+    current_cpu,
+  ]
+}
+
+if (pkg_config != "") {
+  pkg_config_args += [
+    "-p",
+    pkg_config,
+  ]
+}
+
+# Only use the custom libdir when building with the target sysroot.
+if (target_sysroot != "" && sysroot == target_sysroot) {
+  pkg_config_args += [
+    "--system_libdir",
+    system_libdir,
+  ]
+}
+
+if (host_pkg_config != "") {
+  host_pkg_config_args = [
+    "-p",
+    host_pkg_config,
+  ]
+} else {
+  host_pkg_config_args = pkg_config_args
+}
+
+template("pkg_config") {
+  assert(defined(invoker.packages),
+         "Variable |packages| must be defined to be a list in pkg_config.")
+  config(target_name) {
+    if (host_toolchain == current_toolchain) {
+      args = common_pkg_config_args + host_pkg_config_args + invoker.packages
+    } else {
+      args = common_pkg_config_args + pkg_config_args + invoker.packages
+    }
+    if (defined(invoker.extra_args)) {
+      args += invoker.extra_args
+    }
+
+    pkgresult = exec_script(pkg_config_script, args, "json")
+    cflags = pkgresult[1]
+
+    foreach(include, pkgresult[0]) {
+      # We want the system include paths to use -isystem instead of -I to
+      # suppress warnings in those headers.
+      if (use_sysroot) {
+        include_relativized = rebase_path(include, root_build_dir)
+        cflags += [ "-isystem$include_relativized" ]
+      } else {
+        cflags += [ "-isystem$include" ]
+      }
+    }
+
+    if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
+      libs = pkgresult[2]
+      lib_dirs = pkgresult[3]
+    }
+
+    forward_variables_from(invoker,
+                           [
+                             "defines",
+                             "visibility",
+                           ])
+  }
+}
Index: chromium/create-123.0.6286.1-inc-drop-host-crash-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-inc-drop-host-crash-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-inc-drop-host-crash-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-inc-drop-host-crash.patch

Property changes on: chromium/create-123.0.6286.1-inc-drop-host-crash-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h
===================================================================
--- chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h	(nonexistent)
+++ chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src/ui/views/animation/ink_drop_host.h	(revision 385)
@@ -0,0 +1,302 @@
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+#define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+
+#include <memory>
+
+#include "base/memory/raw_ptr.h"
+#include "third_party/abseil-cpp/absl/types/variant.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/color/color_id.h"
+#include "ui/color/color_provider.h"
+#include "ui/gfx/color_palette.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/views/animation/ink_drop_event_handler.h"
+#include "ui/views/metadata/view_factory.h"
+#include "ui/views/view.h"
+
+namespace ui {
+class Layer;
+class LocatedEvent;
+}  // namespace ui
+
+namespace views {
+
+class InkDrop;
+class InkDropHighlight;
+class InkDropImpl;
+class InkDropMask;
+class InkDropRipple;
+enum class InkDropState;
+
+namespace test {
+class InkDropHostTestApi;
+}  // namespace test
+
+// TODO(crbug.com/931964): Rename this type and move this header. Also consider
+// if InkDropHost should be what implements the InkDrop interface and have that
+// be the public interface.
+// The current division of labor is roughly as follows:
+// * InkDropHost manages an InkDrop and is responsible for a lot of its
+//   configuration and creating the parts of the InkDrop.
+// * InkDrop manages the parts of the ink-drop effect once it's up and running.
+// * InkDropRipple is a ripple effect that usually triggers as a result of
+//   clicking or activating the button / similar which hosts this.
+// * InkDropHighlight manages the hover/focus highlight layer.
+// TODO(pbos): See if this can be the only externally visible surface for an
+// ink-drop effect, and rename this InkDrop, or consolidate with InkDrop.
+class VIEWS_EXPORT InkDropHost {
+ public:
+  // Used in SetMode() to specify whether the ink drop effect is enabled
+  // or not for the view. In case of having an ink drop, it also specifies
+  // whether the default event handler for the ink drop should be installed or
+  // the subclass will handle ink drop events itself.
+  enum class InkDropMode {
+    OFF,
+    ON,
+    ON_NO_GESTURE_HANDLER,
+    ON_NO_ANIMATE,
+  };
+
+  explicit InkDropHost(View* host);
+  InkDropHost(const InkDropHost&) = delete;
+  InkDropHost& operator=(const InkDropHost&) = delete;
+  virtual ~InkDropHost();
+
+  // Returns a configured InkDrop. To override default behavior call
+  // SetCreateInkDropCallback().
+  std::unique_ptr<InkDrop> CreateInkDrop();
+
+  // Replace CreateInkDrop() behavior.
+  void SetCreateInkDropCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDrop>()> callback);
+
+  // Creates and returns the visual effect used for press. Used by InkDropImpl
+  // instances.
+  std::unique_ptr<InkDropRipple> CreateInkDropRipple() const;
+
+  // Replaces CreateInkDropRipple() behavior.
+  void SetCreateRippleCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropRipple>()> callback);
+
+  // Returns the point of the |last_ripple_triggering_event_| if it was a
+  // LocatedEvent, otherwise the center point of the local bounds is returned.
+  // This is nominally used by the InkDropRipple.
+  gfx::Point GetInkDropCenterBasedOnLastEvent() const;
+
+  // Creates and returns the visual effect used for hover and focus. Used by
+  // InkDropImpl instances. To override behavior call
+  // SetCreateHighlightCallback().
+  std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const;
+
+  // Replaces CreateInkDropHighlight() behavior.
+  void SetCreateHighlightCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()> callback);
+
+  // Callback replacement of CreateInkDropMask().
+  // TODO(pbos): Investigate removing this. It currently is only used by
+  // PieMenuView.
+  void SetCreateMaskCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropMask>()> callback);
+
+  // Toggles ink drop attention state on/off. If set on, a pulsing highlight
+  // is shown, prompting users to interact with `host_view_`.
+  // Called by components that want to call into user's attention, e.g. IPH.
+  void ToggleAttentionState(bool attention_on);
+
+  // Returns the base color for the ink drop.
+  SkColor GetBaseColor() const;
+
+  // Sets the base color of the ink drop. If `SetBaseColor` is called, the
+  // effect of previous calls to `SetBaseColorId` and `SetBaseColorCallback` is
+  // overwritten and vice versa.
+  // TODO(crbug.com/1341361): Replace SetBaseColor with SetBaseColorId.
+  void SetBaseColor(SkColor color);
+  void SetBaseColorId(ui::ColorId color_id);
+  // Callback version of `GetBaseColor`. If possible, prefer using
+  // `SetBaseColor` or `SetBaseColorId`.
+  void SetBaseColorCallback(base::RepeatingCallback<SkColor()> callback);
+
+  // Toggle to enable/disable an InkDrop on this View.  Descendants can override
+  // CreateInkDropHighlight() and CreateInkDropRipple() to change the look/feel
+  // of the InkDrop.
+  //
+  // TODO(bruthig): Add an easier mechanism than overriding functions to allow
+  // subclasses/clients to specify the flavor of ink drop.
+  void SetMode(InkDropMode ink_drop_mode);
+  InkDropMode GetMode() const;
+
+  // Set whether the ink drop layers should be placed into the region above or
+  // below the view layer. The default is kBelow;
+  void SetLayerRegion(LayerRegion region);
+  LayerRegion GetLayerRegion() const;
+
+  void SetVisibleOpacity(float visible_opacity);
+  float GetVisibleOpacity() const;
+
+  void SetHighlightOpacity(absl::optional<float> opacity);
+
+  void SetSmallCornerRadius(int small_radius);
+  int GetSmallCornerRadius() const;
+
+  void SetLargeCornerRadius(int large_radius);
+  int GetLargeCornerRadius() const;
+
+  // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the
+  // last_ripple_triggering_event().
+  //
+  // *** NOTE ***: |event| has been plumbed through on a best effort basis for
+  // the purposes of centering ink drop ripples on located Events.  Thus nullptr
+  // has been used by clients who do not have an Event instance available to
+  // them.
+  void AnimateToState(InkDropState state, const ui::LocatedEvent* event);
+
+  // Returns true if an ink drop instance has been created.
+  bool HasInkDrop() const;
+
+  // Provides public access to |ink_drop_| so that factory methods can configure
+  // the inkdrop. Implements lazy initialization of |ink_drop_| so as to avoid
+  // virtual method calls during construction since subclasses should be able to
+  // call SetMode() during construction.
+  InkDrop* GetInkDrop();
+
+  // Returns whether the ink drop should be considered "highlighted" (in or
+  // animating into "highlight visible" steady state).
+  bool GetHighlighted() const;
+
+  base::CallbackListSubscription AddHighlightedChangedCallback(
+      base::RepeatingClosure callback);
+
+  // Should be called by InkDrop implementations when their highlight state
+  // changes, to trigger the corresponding property change notification here.
+  void OnInkDropHighlightedChanged();
+
+  // Methods called by InkDrop for attaching its layer.
+  // TODO(pbos): Investigate using direct calls on View::AddLayerToRegion.
+  void AddInkDropLayer(ui::Layer* ink_drop_layer);
+  void RemoveInkDropLayer(ui::Layer* ink_drop_layer);
+
+  // Size used by default for the SquareInkDropRipple.
+  static constexpr gfx::Size kDefaultSquareInkDropSize = gfx::Size(24, 24);
+
+  // Returns a large scaled size used by SquareInkDropRipple and Highlight.
+  static gfx::Size GetLargeSize(gfx::Size small_size);
+
+  // Creates a SquareInkDropRipple centered on |center_point|.
+  std::unique_ptr<InkDropRipple> CreateSquareRipple(
+      const gfx::Point& center_point,
+      const gfx::Size& size = kDefaultSquareInkDropSize) const;
+
+  View* host_view() { return host_view_; }
+  const View* host_view() const { return host_view_; }
+
+ private:
+  friend class test::InkDropHostTestApi;
+
+  class ViewLayerTransformObserver : public ViewObserver {
+   public:
+    ViewLayerTransformObserver(InkDropHost* ink_drop_host, View* host);
+    ~ViewLayerTransformObserver() override;
+
+    void OnViewLayerTransformed(View* observed_view) override;
+
+   private:
+    base::ScopedObservation<View, ViewObserver> observation_{this};
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  class InkDropHostEventHandlerDelegate : public InkDropEventHandler::Delegate {
+   public:
+    explicit InkDropHostEventHandlerDelegate(InkDropHost* host);
+
+    // InkDropEventHandler::Delegate:
+    InkDrop* GetInkDrop() override;
+    bool HasInkDrop() const override;
+
+    bool SupportsGestureEvents() const override;
+
+   private:
+    // The host.
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  const InkDropEventHandler* GetEventHandler() const;
+  InkDropEventHandler* GetEventHandler();
+
+  // This generates a mask for the InkDrop.
+  std::unique_ptr<views::InkDropMask> CreateInkDropMask() const;
+
+  // Adds a clip rect on the root layer of the ink drop impl. This is a more
+  // performant alternative to using circles or rectangle mask layers. Returns
+  // true if a clip was added.
+  bool AddInkDropClip(ui::Layer* ink_drop_layer);
+
+  // Initializes and sets a mask on `ink_drop_layer`. This will not run if
+  // AddInkDropClip() succeeds in the default implementation of
+  // AddInkDropLayer().
+  void InstallInkDropMask(ui::Layer* ink_drop_layer);
+
+  const raw_ptr<View> host_view_;
+
+  // Defines what type of |ink_drop_| to create.
+  InkDropMode ink_drop_mode_ = views::InkDropHost::InkDropMode::OFF;
+
+  // Into which region should the ink drop layers be placed.
+  LayerRegion layer_region_ = LayerRegion::kBelow;
+
+  // Used to observe View and inform the InkDrop of host-transform changes.
+  ViewLayerTransformObserver host_view_transform_observer_;
+
+  // Declared before |ink_drop_|, because InkDropImpl may call
+  // RemoveInkDropLayer on partly destructed InkDropHost. In
+  // that case |ink_drop_mask_| must be still valid.
+  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+
+  // Should not be accessed directly. Use GetInkDrop() instead.
+  std::unique_ptr<InkDrop> ink_drop_;
+
+  // Intentionally declared after |ink_drop_| so that it doesn't access a
+  // destroyed |ink_drop_| during destruction.
+  InkDropHostEventHandlerDelegate ink_drop_event_handler_delegate_;
+  InkDropEventHandler ink_drop_event_handler_;
+
+  float ink_drop_visible_opacity_ = 0.175f;
+
+  // The color of the ripple and hover.
+  absl::variant<SkColor, ui::ColorId, base::RepeatingCallback<SkColor()>>
+      ink_drop_base_color_ = gfx::kPlaceholderColor;
+
+  // TODO(pbos): Audit call sites to make sure highlight opacity is either
+  // always set or using the default value. Then make this a non-optional float.
+  absl::optional<float> ink_drop_highlight_opacity_;
+
+  // Radii used for the SquareInkDropRipple.
+  int ink_drop_small_corner_radius_ = 2;
+  int ink_drop_large_corner_radius_ = 4;
+
+  base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
+      create_ink_drop_ripple_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()>
+      create_ink_drop_highlight_callback_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDropMask>()>
+      create_ink_drop_mask_callback_;
+
+  base::RepeatingClosureList highlighted_changed_callbacks_;
+
+  // Attention is a state we apply on Buttons' ink drop when we want to draw
+  // users' attention to this button and prompt users' interaction.
+  // It consists of two visual effects: a default light blue color and a pulsing
+  // effect. Current use case is IPH. Go to chrome://internals/user-education
+  // and press e.g. IPH_TabSearch to see the effects.
+  bool in_attention_state_ = false;
+};
+
+}  // namespace views
+
+#endif  // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
Index: chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h
===================================================================
--- chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h	(nonexistent)
+++ chromium/create-123.0.6286.1-inc-drop-host-crash-patch/src-orig/ui/views/animation/ink_drop_host.h	(revision 385)
@@ -0,0 +1,299 @@
+// Copyright 2016 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+#define UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
+
+#include <memory>
+
+#include "base/memory/raw_ptr.h"
+#include "third_party/abseil-cpp/absl/types/variant.h"
+#include "third_party/skia/include/core/SkColor.h"
+#include "ui/color/color_id.h"
+#include "ui/color/color_provider.h"
+#include "ui/gfx/color_palette.h"
+#include "ui/gfx/geometry/point.h"
+#include "ui/gfx/geometry/size.h"
+#include "ui/views/animation/ink_drop_event_handler.h"
+#include "ui/views/metadata/view_factory.h"
+#include "ui/views/view.h"
+
+namespace ui {
+class Layer;
+class LocatedEvent;
+}  // namespace ui
+
+namespace views {
+
+class InkDrop;
+class InkDropHighlight;
+class InkDropImpl;
+class InkDropMask;
+class InkDropRipple;
+enum class InkDropState;
+
+namespace test {
+class InkDropHostTestApi;
+}  // namespace test
+
+// TODO(crbug.com/931964): Rename this type and move this header. Also consider
+// if InkDropHost should be what implements the InkDrop interface and have that
+// be the public interface.
+// The current division of labor is roughly as follows:
+// * InkDropHost manages an InkDrop and is responsible for a lot of its
+//   configuration and creating the parts of the InkDrop.
+// * InkDrop manages the parts of the ink-drop effect once it's up and running.
+// * InkDropRipple is a ripple effect that usually triggers as a result of
+//   clicking or activating the button / similar which hosts this.
+// * InkDropHighlight manages the hover/focus highlight layer.
+// TODO(pbos): See if this can be the only externally visible surface for an
+// ink-drop effect, and rename this InkDrop, or consolidate with InkDrop.
+class VIEWS_EXPORT InkDropHost {
+ public:
+  // Used in SetMode() to specify whether the ink drop effect is enabled
+  // or not for the view. In case of having an ink drop, it also specifies
+  // whether the default event handler for the ink drop should be installed or
+  // the subclass will handle ink drop events itself.
+  enum class InkDropMode {
+    OFF,
+    ON,
+    ON_NO_GESTURE_HANDLER,
+    ON_NO_ANIMATE,
+  };
+
+  explicit InkDropHost(View* host);
+  InkDropHost(const InkDropHost&) = delete;
+  InkDropHost& operator=(const InkDropHost&) = delete;
+  virtual ~InkDropHost();
+
+  // Returns a configured InkDrop. To override default behavior call
+  // SetCreateInkDropCallback().
+  std::unique_ptr<InkDrop> CreateInkDrop();
+
+  // Replace CreateInkDrop() behavior.
+  void SetCreateInkDropCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDrop>()> callback);
+
+  // Creates and returns the visual effect used for press. Used by InkDropImpl
+  // instances.
+  std::unique_ptr<InkDropRipple> CreateInkDropRipple() const;
+
+  // Replaces CreateInkDropRipple() behavior.
+  void SetCreateRippleCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropRipple>()> callback);
+
+  // Returns the point of the |last_ripple_triggering_event_| if it was a
+  // LocatedEvent, otherwise the center point of the local bounds is returned.
+  // This is nominally used by the InkDropRipple.
+  gfx::Point GetInkDropCenterBasedOnLastEvent() const;
+
+  // Creates and returns the visual effect used for hover and focus. Used by
+  // InkDropImpl instances. To override behavior call
+  // SetCreateHighlightCallback().
+  std::unique_ptr<InkDropHighlight> CreateInkDropHighlight() const;
+
+  // Replaces CreateInkDropHighlight() behavior.
+  void SetCreateHighlightCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()> callback);
+
+  // Callback replacement of CreateInkDropMask().
+  // TODO(pbos): Investigate removing this. It currently is only used by
+  // PieMenuView.
+  void SetCreateMaskCallback(
+      base::RepeatingCallback<std::unique_ptr<InkDropMask>()> callback);
+
+  // Toggles ink drop attention state on/off. If set on, a pulsing highlight
+  // is shown, prompting users to interact with `host_view_`.
+  // Called by components that want to call into user's attention, e.g. IPH.
+  void ToggleAttentionState(bool attention_on);
+
+  // Returns the base color for the ink drop.
+  SkColor GetBaseColor() const;
+
+  // Sets the base color of the ink drop. If `SetBaseColor` is called, the
+  // effect of previous calls to `SetBaseColorId` and `SetBaseColorCallback` is
+  // overwritten and vice versa.
+  // TODO(crbug.com/1341361): Replace SetBaseColor with SetBaseColorId.
+  void SetBaseColor(SkColor color);
+  void SetBaseColorId(ui::ColorId color_id);
+  // Callback version of `GetBaseColor`. If possible, prefer using
+  // `SetBaseColor` or `SetBaseColorId`.
+  void SetBaseColorCallback(base::RepeatingCallback<SkColor()> callback);
+
+  // Toggle to enable/disable an InkDrop on this View.  Descendants can override
+  // CreateInkDropHighlight() and CreateInkDropRipple() to change the look/feel
+  // of the InkDrop.
+  //
+  // TODO(bruthig): Add an easier mechanism than overriding functions to allow
+  // subclasses/clients to specify the flavor of ink drop.
+  void SetMode(InkDropMode ink_drop_mode);
+  InkDropMode GetMode() const;
+
+  // Set whether the ink drop layers should be placed into the region above or
+  // below the view layer. The default is kBelow;
+  void SetLayerRegion(LayerRegion region);
+  LayerRegion GetLayerRegion() const;
+
+  void SetVisibleOpacity(float visible_opacity);
+  float GetVisibleOpacity() const;
+
+  void SetHighlightOpacity(absl::optional<float> opacity);
+
+  void SetSmallCornerRadius(int small_radius);
+  int GetSmallCornerRadius() const;
+
+  void SetLargeCornerRadius(int large_radius);
+  int GetLargeCornerRadius() const;
+
+  // Animates |ink_drop_| to the desired |ink_drop_state|. Caches |event| as the
+  // last_ripple_triggering_event().
+  //
+  // *** NOTE ***: |event| has been plumbed through on a best effort basis for
+  // the purposes of centering ink drop ripples on located Events.  Thus nullptr
+  // has been used by clients who do not have an Event instance available to
+  // them.
+  void AnimateToState(InkDropState state, const ui::LocatedEvent* event);
+
+  // Returns true if an ink drop instance has been created.
+  bool HasInkDrop() const;
+
+  // Provides public access to |ink_drop_| so that factory methods can configure
+  // the inkdrop. Implements lazy initialization of |ink_drop_| so as to avoid
+  // virtual method calls during construction since subclasses should be able to
+  // call SetMode() during construction.
+  InkDrop* GetInkDrop();
+
+  // Returns whether the ink drop should be considered "highlighted" (in or
+  // animating into "highlight visible" steady state).
+  bool GetHighlighted() const;
+
+  base::CallbackListSubscription AddHighlightedChangedCallback(
+      base::RepeatingClosure callback);
+
+  // Should be called by InkDrop implementations when their highlight state
+  // changes, to trigger the corresponding property change notification here.
+  void OnInkDropHighlightedChanged();
+
+  // Methods called by InkDrop for attaching its layer.
+  // TODO(pbos): Investigate using direct calls on View::AddLayerToRegion.
+  void AddInkDropLayer(ui::Layer* ink_drop_layer);
+  void RemoveInkDropLayer(ui::Layer* ink_drop_layer);
+
+  // Size used by default for the SquareInkDropRipple.
+  static constexpr gfx::Size kDefaultSquareInkDropSize = gfx::Size(24, 24);
+
+  // Returns a large scaled size used by SquareInkDropRipple and Highlight.
+  static gfx::Size GetLargeSize(gfx::Size small_size);
+
+  // Creates a SquareInkDropRipple centered on |center_point|.
+  std::unique_ptr<InkDropRipple> CreateSquareRipple(
+      const gfx::Point& center_point,
+      const gfx::Size& size = kDefaultSquareInkDropSize) const;
+
+  View* host_view() { return host_view_; }
+  const View* host_view() const { return host_view_; }
+
+ private:
+  friend class test::InkDropHostTestApi;
+
+  class ViewLayerTransformObserver : public ViewObserver {
+   public:
+    ViewLayerTransformObserver(InkDropHost* ink_drop_host, View* host);
+    ~ViewLayerTransformObserver() override;
+
+    void OnViewLayerTransformed(View* observed_view) override;
+
+   private:
+    base::ScopedObservation<View, ViewObserver> observation_{this};
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  class InkDropHostEventHandlerDelegate : public InkDropEventHandler::Delegate {
+   public:
+    explicit InkDropHostEventHandlerDelegate(InkDropHost* host);
+
+    // InkDropEventHandler::Delegate:
+    InkDrop* GetInkDrop() override;
+    bool HasInkDrop() const override;
+
+    bool SupportsGestureEvents() const override;
+
+   private:
+    // The host.
+    const raw_ptr<InkDropHost> ink_drop_host_;
+  };
+
+  const InkDropEventHandler* GetEventHandler() const;
+  InkDropEventHandler* GetEventHandler();
+
+  // This generates a mask for the InkDrop.
+  std::unique_ptr<views::InkDropMask> CreateInkDropMask() const;
+
+  // Adds a clip rect on the root layer of the ink drop impl. This is a more
+  // performant alternative to using circles or rectangle mask layers. Returns
+  // true if a clip was added.
+  bool AddInkDropClip(ui::Layer* ink_drop_layer);
+
+  // Initializes and sets a mask on `ink_drop_layer`. This will not run if
+  // AddInkDropClip() succeeds in the default implementation of
+  // AddInkDropLayer().
+  void InstallInkDropMask(ui::Layer* ink_drop_layer);
+
+  const raw_ptr<View> host_view_;
+
+  // Defines what type of |ink_drop_| to create.
+  InkDropMode ink_drop_mode_ = views::InkDropHost::InkDropMode::OFF;
+
+  // Into which region should the ink drop layers be placed.
+  LayerRegion layer_region_ = LayerRegion::kBelow;
+
+  // Used to observe View and inform the InkDrop of host-transform changes.
+  ViewLayerTransformObserver host_view_transform_observer_;
+
+  // Should not be accessed directly. Use GetInkDrop() instead.
+  std::unique_ptr<InkDrop> ink_drop_;
+
+  // Intentionally declared after |ink_drop_| so that it doesn't access a
+  // destroyed |ink_drop_| during destruction.
+  InkDropHostEventHandlerDelegate ink_drop_event_handler_delegate_;
+  InkDropEventHandler ink_drop_event_handler_;
+
+  float ink_drop_visible_opacity_ = 0.175f;
+
+  // The color of the ripple and hover.
+  absl::variant<SkColor, ui::ColorId, base::RepeatingCallback<SkColor()>>
+      ink_drop_base_color_ = gfx::kPlaceholderColor;
+
+  // TODO(pbos): Audit call sites to make sure highlight opacity is either
+  // always set or using the default value. Then make this a non-optional float.
+  absl::optional<float> ink_drop_highlight_opacity_;
+
+  // Radii used for the SquareInkDropRipple.
+  int ink_drop_small_corner_radius_ = 2;
+  int ink_drop_large_corner_radius_ = 4;
+
+  std::unique_ptr<views::InkDropMask> ink_drop_mask_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDrop>()> create_ink_drop_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropRipple>()>
+      create_ink_drop_ripple_callback_;
+  base::RepeatingCallback<std::unique_ptr<InkDropHighlight>()>
+      create_ink_drop_highlight_callback_;
+
+  base::RepeatingCallback<std::unique_ptr<InkDropMask>()>
+      create_ink_drop_mask_callback_;
+
+  base::RepeatingClosureList highlighted_changed_callbacks_;
+
+  // Attention is a state we apply on Buttons' ink drop when we want to draw
+  // users' attention to this button and prompt users' interaction.
+  // It consists of two visual effects: a default light blue color and a pulsing
+  // effect. Current use case is IPH. Go to chrome://internals/user-education
+  // and press e.g. IPH_TabSearch to see the effects.
+  bool in_attention_state_ = false;
+};
+
+}  // namespace views
+
+#endif  // UI_VIEWS_ANIMATION_INK_DROP_HOST_H_
Index: chromium/create-123.0.6286.1-oauth2-default-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-oauth2-default-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-oauth2-default-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-oauth2-default.patch

Property changes on: chromium/create-123.0.6286.1-oauth2-default-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-oauth2-default-patch/src/google_apis/google_api_keys.cc
===================================================================
--- chromium/create-123.0.6286.1-oauth2-default-patch/src/google_apis/google_api_keys.cc	(nonexistent)
+++ chromium/create-123.0.6286.1-oauth2-default-patch/src/google_apis/google_api_keys.cc	(revision 385)
@@ -0,0 +1,451 @@
+// Copyright 2012 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "google_apis/google_api_keys.h"
+
+// If you add more includes to this list, you also need to add them to
+// google_api_keys_unittest.cc and google_api_keys_mac_unittest.mm.
+
+#include <stddef.h>
+
+#include <memory>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/strings/stringize_macros.h"
+#include "build/branding_buildflags.h"
+#include "build/chromeos_buildflags.h"
+#include "google_apis/buildflags.h"
+#include "google_apis/gaia/gaia_config.h"
+#include "google_apis/gaia/gaia_switches.h"
+
+#if BUILDFLAG(IS_APPLE)
+#include "google_apis/google_api_keys_mac.h"
+#endif
+
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+#include "google_apis/internal/google_chrome_api_keys.h"
+#include "google_apis/internal/metrics_signing_key.h"
+#endif
+
+// Used to indicate an unset key/id/secret.  This works better with
+// various unit tests than leaving the token empty.
+#define DUMMY_API_TOKEN "dummytoken"
+
+#if !defined(GOOGLE_API_KEY)
+#define GOOGLE_API_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_METRICS_SIGNING_KEY)
+#define GOOGLE_METRICS_SIGNING_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_MAIN)
+#define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_MAIN)
+#define GOOGLE_CLIENT_SECRET_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING)
+#define GOOGLE_CLIENT_ID_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING)
+#define GOOGLE_CLIENT_SECRET_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING_HOST)
+#define GOOGLE_CLIENT_ID_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING_HOST)
+#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if BUILDFLAG(IS_ANDROID)
+#if !defined(GOOGLE_API_KEY_ANDROID_NON_STABLE)
+#define GOOGLE_API_KEY_ANDROID_NON_STABLE DUMMY_API_TOKEN
+#endif
+#endif
+
+#if !defined(GOOGLE_API_KEY_REMOTING)
+#define GOOGLE_API_KEY_REMOTING DUMMY_API_TOKEN
+#endif
+
+// API key for the Speech On-Device API (SODA).
+#if !defined(GOOGLE_API_KEY_SODA)
+#define GOOGLE_API_KEY_SODA DUMMY_API_TOKEN
+#endif
+
+#if !BUILDFLAG(IS_ANDROID)
+// API key for the HaTS API.
+#if !defined(GOOGLE_API_KEY_HATS)
+#define GOOGLE_API_KEY_HATS DUMMY_API_TOKEN
+#endif
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// API key for the Nearby Sharing Service.
+#if !defined(GOOGLE_API_KEY_SHARING)
+#define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN
+#endif
+
+// API key for the ReadAloud API.
+#if !defined(GOOGLE_API_KEY_READ_ALOUD)
+#define GOOGLE_API_KEY_READ_ALOUD DUMMY_API_TOKEN
+#endif
+
+// API key for the Fresnel API.
+#if !defined(GOOGLE_API_KEY_FRESNEL)
+#define GOOGLE_API_KEY_FRESNEL DUMMY_API_TOKEN
+#endif
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// These are used as shortcuts for developers and users providing
+// OAuth credentials via preprocessor defines or environment
+// variables.  If set, they will be used to replace any of the client
+// IDs and secrets above that have not been set (and only those; they
+// will not override already-set values).
+#if !defined(GOOGLE_DEFAULT_CLIENT_ID)
+#define GOOGLE_DEFAULT_CLIENT_ID ""
+#endif
+#if !defined(GOOGLE_DEFAULT_CLIENT_SECRET)
+#define GOOGLE_DEFAULT_CLIENT_SECRET ""
+#endif
+
+namespace google_apis {
+
+const char kAPIKeysDevelopersHowToURL[] =
+    "https://www.chromium.org/developers/how-tos/api-keys";
+
+// This is used as a lazy instance to determine keys once and cache them.
+class APIKeyCache {
+ public:
+  APIKeyCache() {
+    std::unique_ptr<base::Environment> environment(base::Environment::Create());
+    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+    GaiaConfig* gaia_config = GaiaConfig::GetInstance();
+
+    api_key_ = CalculateKeyValue(
+        GOOGLE_API_KEY, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+// A special non-stable key is at the moment defined only for Android Chrome.
+#if BUILDFLAG(IS_ANDROID)
+    api_key_non_stable_ = CalculateKeyValue(
+        GOOGLE_API_KEY_ANDROID_NON_STABLE,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_ANDROID_NON_STABLE), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+#else
+    api_key_non_stable_ = api_key_;
+#endif
+
+    api_key_remoting_ = CalculateKeyValue(
+        GOOGLE_API_KEY_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_REMOTING), nullptr, std::string(),
+        environment.get(), command_line, gaia_config);
+
+    api_key_soda_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SODA, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SODA),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#if !BUILDFLAG(IS_ANDROID)
+    api_key_hats_ = CalculateKeyValue(
+        GOOGLE_API_KEY_HATS, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_HATS),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+    api_key_sharing_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_read_aloud_ = CalculateKeyValue(
+        GOOGLE_API_KEY_READ_ALOUD,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_READ_ALOUD), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_fresnel_ = CalculateKeyValue(
+        GOOGLE_API_KEY_FRESNEL, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_FRESNEL),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+    metrics_key_ = CalculateKeyValue(
+        GOOGLE_METRICS_SIGNING_KEY,
+        STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    std::string default_client_id = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_ID,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), ::switches::kOAuth2ClientID,
+        std::string(), environment.get(), command_line, gaia_config);
+    std::string default_client_secret = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_SECRET,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), ::switches::kOAuth2ClientSecret,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    // We currently only allow overriding the baked-in values for the
+    // default OAuth2 client ID and secret using a command-line
+    // argument and gaia config, since that is useful to enable testing against
+    // staging servers, and since that was what was possible and
+    // likely practiced by the QA team before this implementation was
+    // written.
+    client_ids_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_MAIN, STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_MAIN),
+        ::switches::kOAuth2ClientID, default_client_id, environment.get(),
+        command_line, gaia_config);
+    client_secrets_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_MAIN,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_MAIN),
+        ::switches::kOAuth2ClientSecret, default_client_secret,
+        environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING_HOST), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING_HOST), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+  }
+
+  std::string api_key() const { return api_key_; }
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+  void set_api_key(const std::string& api_key) { api_key_ = api_key; }
+#endif
+  std::string api_key_non_stable() const { return api_key_non_stable_; }
+  std::string api_key_remoting() const { return api_key_remoting_; }
+  std::string api_key_soda() const { return api_key_soda_; }
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats() const { return api_key_hats_; }
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing() const { return api_key_sharing_; }
+  std::string api_key_read_aloud() const { return api_key_read_aloud_; }
+  std::string api_key_fresnel() const { return api_key_fresnel_; }
+#endif
+
+  std::string metrics_key() const { return metrics_key_; }
+
+  std::string GetClientID(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_ids_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientID(OAuth2Client client, const std::string& client_id) {
+    client_ids_[client] = client_id;
+  }
+#endif
+
+  std::string GetClientSecret(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_secrets_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientSecret(OAuth2Client client, const std::string& client_secret) {
+    client_secrets_[client] = client_secret;
+  }
+#endif
+
+ private:
+  // Gets a value for a key.  In priority order, this will be the value
+  // provided via:
+  // 1. Command-line switch
+  // 2. Config file
+  // 3. Environment variable
+  // 4. Baked into the build
+  // |command_line_switch| may be NULL. Official Google Chrome builds will not
+  // use the value provided by an environment variable.
+  static std::string CalculateKeyValue(const char* baked_in_value,
+                                       const char* environment_variable_name,
+                                       const char* command_line_switch,
+                                       const std::string& default_if_unset,
+                                       base::Environment* environment,
+                                       base::CommandLine* command_line,
+                                       GaiaConfig* gaia_config) {
+    std::string key_value = baked_in_value;
+    std::string temp;
+#if BUILDFLAG(IS_APPLE)
+    // macOS and iOS can also override the API key with a value from the
+    // Info.plist.
+    temp = ::google_apis::GetAPIKeyFromInfoPlist(environment_variable_name);
+    if (!temp.empty()) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from Info.plist.";
+    }
+#endif
+
+#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
+    // Don't allow using the environment to override API keys for official
+    // Google Chrome builds. There have been reports of mangled environments
+    // affecting users (crbug.com/710575).
+    if (environment->GetVar(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from environment variable.";
+    }
+#endif
+
+    if (gaia_config &&
+        gaia_config->GetAPIKeyIfExists(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from gaia config.";
+    }
+
+    if (command_line_switch && command_line->HasSwitch(command_line_switch)) {
+      key_value = command_line->GetSwitchValueASCII(command_line_switch);
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from command-line switch.";
+    }
+
+    if (key_value == DUMMY_API_TOKEN) {
+// TODO(crbug.com/1294915): Rewrite this condition using
+// BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY).
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_FUCHSIA)
+      // No key should be unset in an official build except the
+      // GOOGLE_DEFAULT_* keys.  The default keys don't trigger this
+      // check as their "unset" value is not DUMMY_API_TOKEN.
+      CHECK(false);
+#endif
+      if (default_if_unset.size() > 0) {
+        VLOG(1) << "Using default value \"" << default_if_unset
+                << "\" for API key " << environment_variable_name;
+        key_value = default_if_unset;
+      }
+    }
+
+    // This should remain a debug-only log.
+    DVLOG(1) << "API key " << environment_variable_name << "=" << key_value;
+
+    return key_value;
+  }
+
+  std::string api_key_;
+  std::string api_key_non_stable_;
+  std::string api_key_remoting_;
+  std::string api_key_soda_;
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats_;
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing_;
+  std::string api_key_read_aloud_;
+  std::string api_key_fresnel_;
+#endif
+  std::string metrics_key_;
+  std::string client_ids_[CLIENT_NUM_ITEMS];
+  std::string client_secrets_[CLIENT_NUM_ITEMS];
+};
+
+static base::LazyInstance<APIKeyCache>::DestructorAtExit g_api_key_cache =
+    LAZY_INSTANCE_INITIALIZER;
+
+bool HasAPIKeyConfigured() {
+  return GetAPIKey() != DUMMY_API_TOKEN;
+}
+
+std::string GetAPIKey() {
+  return g_api_key_cache.Get().api_key();
+}
+
+std::string GetNonStableAPIKey() {
+  return g_api_key_cache.Get().api_key_non_stable();
+}
+
+std::string GetRemotingAPIKey() {
+  return g_api_key_cache.Get().api_key_remoting();
+}
+
+std::string GetSodaAPIKey() {
+  return g_api_key_cache.Get().api_key_soda();
+}
+
+#if !BUILDFLAG(IS_ANDROID)
+std::string GetHatsAPIKey() {
+  return g_api_key_cache.Get().api_key_hats();
+}
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+std::string GetSharingAPIKey() {
+  return g_api_key_cache.Get().api_key_sharing();
+}
+
+std::string GetReadAloudAPIKey() {
+  return g_api_key_cache.Get().api_key_read_aloud();
+}
+
+std::string GetFresnelAPIKey() {
+  return g_api_key_cache.Get().api_key_fresnel();
+}
+#endif
+
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+void SetAPIKey(const std::string& api_key) {
+  g_api_key_cache.Get().set_api_key(api_key);
+}
+#endif
+
+std::string GetMetricsKey() {
+  return g_api_key_cache.Get().metrics_key();
+}
+
+bool HasOAuthClientConfigured() {
+  for (size_t client_id = 0; client_id < CLIENT_NUM_ITEMS; ++client_id) {
+    OAuth2Client client = static_cast<OAuth2Client>(client_id);
+    if (GetOAuth2ClientID(client) == DUMMY_API_TOKEN ||
+        GetOAuth2ClientSecret(client) == DUMMY_API_TOKEN) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+std::string GetOAuth2ClientID(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientID(client);
+}
+
+std::string GetOAuth2ClientSecret(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientSecret(client);
+}
+
+#if BUILDFLAG(IS_IOS)
+void SetOAuth2ClientID(OAuth2Client client, const std::string& client_id) {
+  g_api_key_cache.Get().SetClientID(client, client_id);
+}
+
+void SetOAuth2ClientSecret(OAuth2Client client,
+                           const std::string& client_secret) {
+  g_api_key_cache.Get().SetClientSecret(client, client_secret);
+}
+#endif
+
+bool IsGoogleChromeAPIKeyUsed() {
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+  return true;
+#else
+  return false;
+#endif
+}
+
+}  // namespace google_apis
Index: chromium/create-123.0.6286.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc
===================================================================
--- chromium/create-123.0.6286.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc	(nonexistent)
+++ chromium/create-123.0.6286.1-oauth2-default-patch/src-orig/google_apis/google_api_keys.cc	(revision 385)
@@ -0,0 +1,451 @@
+// Copyright 2012 The Chromium Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "google_apis/google_api_keys.h"
+
+// If you add more includes to this list, you also need to add them to
+// google_api_keys_unittest.cc and google_api_keys_mac_unittest.mm.
+
+#include <stddef.h>
+
+#include <memory>
+#include <string>
+
+#include "base/command_line.h"
+#include "base/environment.h"
+#include "base/lazy_instance.h"
+#include "base/logging.h"
+#include "base/strings/stringize_macros.h"
+#include "build/branding_buildflags.h"
+#include "build/chromeos_buildflags.h"
+#include "google_apis/buildflags.h"
+#include "google_apis/gaia/gaia_config.h"
+#include "google_apis/gaia/gaia_switches.h"
+
+#if BUILDFLAG(IS_APPLE)
+#include "google_apis/google_api_keys_mac.h"
+#endif
+
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+#include "google_apis/internal/google_chrome_api_keys.h"
+#include "google_apis/internal/metrics_signing_key.h"
+#endif
+
+// Used to indicate an unset key/id/secret.  This works better with
+// various unit tests than leaving the token empty.
+#define DUMMY_API_TOKEN "dummytoken"
+
+#if !defined(GOOGLE_API_KEY)
+#define GOOGLE_API_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_METRICS_SIGNING_KEY)
+#define GOOGLE_METRICS_SIGNING_KEY DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_MAIN)
+#define GOOGLE_CLIENT_ID_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_MAIN)
+#define GOOGLE_CLIENT_SECRET_MAIN DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING)
+#define GOOGLE_CLIENT_ID_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING)
+#define GOOGLE_CLIENT_SECRET_REMOTING DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_ID_REMOTING_HOST)
+#define GOOGLE_CLIENT_ID_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if !defined(GOOGLE_CLIENT_SECRET_REMOTING_HOST)
+#define GOOGLE_CLIENT_SECRET_REMOTING_HOST DUMMY_API_TOKEN
+#endif
+
+#if BUILDFLAG(IS_ANDROID)
+#if !defined(GOOGLE_API_KEY_ANDROID_NON_STABLE)
+#define GOOGLE_API_KEY_ANDROID_NON_STABLE DUMMY_API_TOKEN
+#endif
+#endif
+
+#if !defined(GOOGLE_API_KEY_REMOTING)
+#define GOOGLE_API_KEY_REMOTING DUMMY_API_TOKEN
+#endif
+
+// API key for the Speech On-Device API (SODA).
+#if !defined(GOOGLE_API_KEY_SODA)
+#define GOOGLE_API_KEY_SODA DUMMY_API_TOKEN
+#endif
+
+#if !BUILDFLAG(IS_ANDROID)
+// API key for the HaTS API.
+#if !defined(GOOGLE_API_KEY_HATS)
+#define GOOGLE_API_KEY_HATS DUMMY_API_TOKEN
+#endif
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+// API key for the Nearby Sharing Service.
+#if !defined(GOOGLE_API_KEY_SHARING)
+#define GOOGLE_API_KEY_SHARING DUMMY_API_TOKEN
+#endif
+
+// API key for the ReadAloud API.
+#if !defined(GOOGLE_API_KEY_READ_ALOUD)
+#define GOOGLE_API_KEY_READ_ALOUD DUMMY_API_TOKEN
+#endif
+
+// API key for the Fresnel API.
+#if !defined(GOOGLE_API_KEY_FRESNEL)
+#define GOOGLE_API_KEY_FRESNEL DUMMY_API_TOKEN
+#endif
+#endif  // BUILDFLAG(IS_CHROMEOS_ASH)
+
+// These are used as shortcuts for developers and users providing
+// OAuth credentials via preprocessor defines or environment
+// variables.  If set, they will be used to replace any of the client
+// IDs and secrets above that have not been set (and only those; they
+// will not override already-set values).
+#if !defined(GOOGLE_DEFAULT_CLIENT_ID)
+#define GOOGLE_DEFAULT_CLIENT_ID ""
+#endif
+#if !defined(GOOGLE_DEFAULT_CLIENT_SECRET)
+#define GOOGLE_DEFAULT_CLIENT_SECRET ""
+#endif
+
+namespace google_apis {
+
+const char kAPIKeysDevelopersHowToURL[] =
+    "https://www.chromium.org/developers/how-tos/api-keys";
+
+// This is used as a lazy instance to determine keys once and cache them.
+class APIKeyCache {
+ public:
+  APIKeyCache() {
+    std::unique_ptr<base::Environment> environment(base::Environment::Create());
+    base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+    GaiaConfig* gaia_config = GaiaConfig::GetInstance();
+
+    api_key_ = CalculateKeyValue(
+        GOOGLE_API_KEY, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+// A special non-stable key is at the moment defined only for Android Chrome.
+#if BUILDFLAG(IS_ANDROID)
+    api_key_non_stable_ = CalculateKeyValue(
+        GOOGLE_API_KEY_ANDROID_NON_STABLE,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_ANDROID_NON_STABLE), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+#else
+    api_key_non_stable_ = api_key_;
+#endif
+
+    api_key_remoting_ = CalculateKeyValue(
+        GOOGLE_API_KEY_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_REMOTING), nullptr, std::string(),
+        environment.get(), command_line, gaia_config);
+
+    api_key_soda_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SODA, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SODA),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#if !BUILDFLAG(IS_ANDROID)
+    api_key_hats_ = CalculateKeyValue(
+        GOOGLE_API_KEY_HATS, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_HATS),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+    api_key_sharing_ = CalculateKeyValue(
+        GOOGLE_API_KEY_SHARING, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_SHARING),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_read_aloud_ = CalculateKeyValue(
+        GOOGLE_API_KEY_READ_ALOUD,
+        STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_READ_ALOUD), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    api_key_fresnel_ = CalculateKeyValue(
+        GOOGLE_API_KEY_FRESNEL, STRINGIZE_NO_EXPANSION(GOOGLE_API_KEY_FRESNEL),
+        nullptr, std::string(), environment.get(), command_line, gaia_config);
+#endif
+
+    metrics_key_ = CalculateKeyValue(
+        GOOGLE_METRICS_SIGNING_KEY,
+        STRINGIZE_NO_EXPANSION(GOOGLE_METRICS_SIGNING_KEY), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    std::string default_client_id = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_ID,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_ID), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+    std::string default_client_secret = CalculateKeyValue(
+        GOOGLE_DEFAULT_CLIENT_SECRET,
+        STRINGIZE_NO_EXPANSION(GOOGLE_DEFAULT_CLIENT_SECRET), nullptr,
+        std::string(), environment.get(), command_line, gaia_config);
+
+    // We currently only allow overriding the baked-in values for the
+    // default OAuth2 client ID and secret using a command-line
+    // argument and gaia config, since that is useful to enable testing against
+    // staging servers, and since that was what was possible and
+    // likely practiced by the QA team before this implementation was
+    // written.
+    client_ids_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_MAIN, STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_MAIN),
+        ::switches::kOAuth2ClientID, default_client_id, environment.get(),
+        command_line, gaia_config);
+    client_secrets_[CLIENT_MAIN] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_MAIN,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_MAIN),
+        ::switches::kOAuth2ClientSecret, default_client_secret,
+        environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+
+    client_ids_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_ID_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_ID_REMOTING_HOST), nullptr,
+        default_client_id, environment.get(), command_line, gaia_config);
+    client_secrets_[CLIENT_REMOTING_HOST] = CalculateKeyValue(
+        GOOGLE_CLIENT_SECRET_REMOTING_HOST,
+        STRINGIZE_NO_EXPANSION(GOOGLE_CLIENT_SECRET_REMOTING_HOST), nullptr,
+        default_client_secret, environment.get(), command_line, gaia_config);
+  }
+
+  std::string api_key() const { return api_key_; }
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+  void set_api_key(const std::string& api_key) { api_key_ = api_key; }
+#endif
+  std::string api_key_non_stable() const { return api_key_non_stable_; }
+  std::string api_key_remoting() const { return api_key_remoting_; }
+  std::string api_key_soda() const { return api_key_soda_; }
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats() const { return api_key_hats_; }
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing() const { return api_key_sharing_; }
+  std::string api_key_read_aloud() const { return api_key_read_aloud_; }
+  std::string api_key_fresnel() const { return api_key_fresnel_; }
+#endif
+
+  std::string metrics_key() const { return metrics_key_; }
+
+  std::string GetClientID(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_ids_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientID(OAuth2Client client, const std::string& client_id) {
+    client_ids_[client] = client_id;
+  }
+#endif
+
+  std::string GetClientSecret(OAuth2Client client) const {
+    DCHECK_LT(client, CLIENT_NUM_ITEMS);
+    return client_secrets_[client];
+  }
+
+#if BUILDFLAG(IS_IOS)
+  void SetClientSecret(OAuth2Client client, const std::string& client_secret) {
+    client_secrets_[client] = client_secret;
+  }
+#endif
+
+ private:
+  // Gets a value for a key.  In priority order, this will be the value
+  // provided via:
+  // 1. Command-line switch
+  // 2. Config file
+  // 3. Environment variable
+  // 4. Baked into the build
+  // |command_line_switch| may be NULL. Official Google Chrome builds will not
+  // use the value provided by an environment variable.
+  static std::string CalculateKeyValue(const char* baked_in_value,
+                                       const char* environment_variable_name,
+                                       const char* command_line_switch,
+                                       const std::string& default_if_unset,
+                                       base::Environment* environment,
+                                       base::CommandLine* command_line,
+                                       GaiaConfig* gaia_config) {
+    std::string key_value = baked_in_value;
+    std::string temp;
+#if BUILDFLAG(IS_APPLE)
+    // macOS and iOS can also override the API key with a value from the
+    // Info.plist.
+    temp = ::google_apis::GetAPIKeyFromInfoPlist(environment_variable_name);
+    if (!temp.empty()) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from Info.plist.";
+    }
+#endif
+
+#if !BUILDFLAG(GOOGLE_CHROME_BRANDING)
+    // Don't allow using the environment to override API keys for official
+    // Google Chrome builds. There have been reports of mangled environments
+    // affecting users (crbug.com/710575).
+    if (environment->GetVar(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from environment variable.";
+    }
+#endif
+
+    if (gaia_config &&
+        gaia_config->GetAPIKeyIfExists(environment_variable_name, &temp)) {
+      key_value = temp;
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from gaia config.";
+    }
+
+    if (command_line_switch && command_line->HasSwitch(command_line_switch)) {
+      key_value = command_line->GetSwitchValueASCII(command_line_switch);
+      VLOG(1) << "Overriding API key " << environment_variable_name
+              << " with value " << key_value << " from command-line switch.";
+    }
+
+    if (key_value == DUMMY_API_TOKEN) {
+// TODO(crbug.com/1294915): Rewrite this condition using
+// BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY).
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_FUCHSIA)
+      // No key should be unset in an official build except the
+      // GOOGLE_DEFAULT_* keys.  The default keys don't trigger this
+      // check as their "unset" value is not DUMMY_API_TOKEN.
+      CHECK(false);
+#endif
+      if (default_if_unset.size() > 0) {
+        VLOG(1) << "Using default value \"" << default_if_unset
+                << "\" for API key " << environment_variable_name;
+        key_value = default_if_unset;
+      }
+    }
+
+    // This should remain a debug-only log.
+    DVLOG(1) << "API key " << environment_variable_name << "=" << key_value;
+
+    return key_value;
+  }
+
+  std::string api_key_;
+  std::string api_key_non_stable_;
+  std::string api_key_remoting_;
+  std::string api_key_soda_;
+#if !BUILDFLAG(IS_ANDROID)
+  std::string api_key_hats_;
+#endif
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+  std::string api_key_sharing_;
+  std::string api_key_read_aloud_;
+  std::string api_key_fresnel_;
+#endif
+  std::string metrics_key_;
+  std::string client_ids_[CLIENT_NUM_ITEMS];
+  std::string client_secrets_[CLIENT_NUM_ITEMS];
+};
+
+static base::LazyInstance<APIKeyCache>::DestructorAtExit g_api_key_cache =
+    LAZY_INSTANCE_INITIALIZER;
+
+bool HasAPIKeyConfigured() {
+  return GetAPIKey() != DUMMY_API_TOKEN;
+}
+
+std::string GetAPIKey() {
+  return g_api_key_cache.Get().api_key();
+}
+
+std::string GetNonStableAPIKey() {
+  return g_api_key_cache.Get().api_key_non_stable();
+}
+
+std::string GetRemotingAPIKey() {
+  return g_api_key_cache.Get().api_key_remoting();
+}
+
+std::string GetSodaAPIKey() {
+  return g_api_key_cache.Get().api_key_soda();
+}
+
+#if !BUILDFLAG(IS_ANDROID)
+std::string GetHatsAPIKey() {
+  return g_api_key_cache.Get().api_key_hats();
+}
+#endif
+
+#if BUILDFLAG(IS_CHROMEOS_ASH)
+std::string GetSharingAPIKey() {
+  return g_api_key_cache.Get().api_key_sharing();
+}
+
+std::string GetReadAloudAPIKey() {
+  return g_api_key_cache.Get().api_key_read_aloud();
+}
+
+std::string GetFresnelAPIKey() {
+  return g_api_key_cache.Get().api_key_fresnel();
+}
+#endif
+
+#if BUILDFLAG(SUPPORT_EXTERNAL_GOOGLE_API_KEY)
+void SetAPIKey(const std::string& api_key) {
+  g_api_key_cache.Get().set_api_key(api_key);
+}
+#endif
+
+std::string GetMetricsKey() {
+  return g_api_key_cache.Get().metrics_key();
+}
+
+bool HasOAuthClientConfigured() {
+  for (size_t client_id = 0; client_id < CLIENT_NUM_ITEMS; ++client_id) {
+    OAuth2Client client = static_cast<OAuth2Client>(client_id);
+    if (GetOAuth2ClientID(client) == DUMMY_API_TOKEN ||
+        GetOAuth2ClientSecret(client) == DUMMY_API_TOKEN) {
+      return false;
+    }
+  }
+
+  return true;
+}
+
+std::string GetOAuth2ClientID(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientID(client);
+}
+
+std::string GetOAuth2ClientSecret(OAuth2Client client) {
+  return g_api_key_cache.Get().GetClientSecret(client);
+}
+
+#if BUILDFLAG(IS_IOS)
+void SetOAuth2ClientID(OAuth2Client client, const std::string& client_id) {
+  g_api_key_cache.Get().SetClientID(client, client_id);
+}
+
+void SetOAuth2ClientSecret(OAuth2Client client,
+                           const std::string& client_secret) {
+  g_api_key_cache.Get().SetClientSecret(client, client_secret);
+}
+#endif
+
+bool IsGoogleChromeAPIKeyUsed() {
+#if defined(USE_OFFICIAL_GOOGLE_API_KEYS)
+  return true;
+#else
+  return false;
+#endif
+}
+
+}  // namespace google_apis
Index: chromium/create-123.0.6286.1-target-aarch64-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-target-aarch64-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-target-aarch64-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-target-aarch64.patch

Property changes on: chromium/create-123.0.6286.1-target-aarch64-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-aarch64-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3032 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=@AARCH64_TARGET@" ]
+        ldflags += [ "--target=@AARCH64_TARGET@" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-aarch64-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3032 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-target-arm-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-target-arm-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-target-arm-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-target-arm.patch

Property changes on: chromium/create-123.0.6286.1-target-arm-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-target-arm-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-arm-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-arm-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3032 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=@ARM_TARGET@" ]
+        ldflags += [ "--target=@ARM_TARGET@" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-arm-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3032 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-target-x86_64-patch/create.patch.sh
===================================================================
--- chromium/create-123.0.6286.1-target-x86_64-patch/create.patch.sh	(nonexistent)
+++ chromium/create-123.0.6286.1-target-x86_64-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+diff -u -Nr src-orig src > ../patches/chromium-123.0.6286.1-target-x86_64.patch

Property changes on: chromium/create-123.0.6286.1-target-x86_64-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: chromium/create-123.0.6286.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-x86_64-patch/src/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3033 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "--target=@X64_TARGET@",
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64", "--target=@X64_TARGET@" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/create-123.0.6286.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn
===================================================================
--- chromium/create-123.0.6286.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn	(nonexistent)
+++ chromium/create-123.0.6286.1-target-x86_64-patch/src-orig/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,3032 @@
+# Copyright 2013 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/buildflag_header.gni")
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/chromeos/ui_mode.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/pch.gni")
+import("//build/config/rust.gni")
+import("//build/config/ui.gni")
+import("//build/config/unwind.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/cros/cros_config.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/rbe.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (is_mac) {
+  import("//build/config/apple/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+lld_path = ""
+if (!is_clang) {
+  declare_args() {
+    # This allows overriding the location of lld.
+    lld_path = rebase_path("$clang_base_path/bin", root_build_dir)
+  }
+} else {
+  # clang looks for lld next to it, no need for -B.
+  lld_path = ""
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Optimize for coverage guided fuzzing (balance between speed and number of
+  # branches)
+  optimize_for_fuzzing = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "atom"
+
+  # Emit debug information for profiling wile building with clang.
+  # Only enable this for ChromeOS official builds for AFDO.
+  clang_emit_debug_info_for_profiling = is_chromeos_device && is_official_build
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win || is_linux || is_mac ||
+       (is_ios && use_lld)) && is_official_build
+
+  # Whether to enable thin lto incremental builds.
+  # See: https://clang.llvm.org/docs/ThinLTO.html#incremental
+  # The cache can lead to non-determinism: https://crbug.com/1486045
+  thin_lto_enable_cache = true
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # Flag discussion: https://crbug.com/977230
+  #
+  # TODO(crbug.com/1131993): This regresses binary size by ~1MB on Android and
+  # needs to be evaluated before enabling it there as well.
+  init_stack_vars = !(is_android && is_official_build)
+
+  # Zero init has favorable performance/size tradeoffs for Chrome OS
+  # but was not evaluated for other platforms.
+  init_stack_vars_zero = is_chromeos
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary, which allows our data collection pipelines to
+  # more easily identify code that we assume to be hot/cold that doesn't turn
+  # out to be such in the field.
+  use_text_section_splitting = is_chromeos
+
+  # Enable DWARF v5.
+  use_dwarf5 = false
+
+  # Override this to put full paths to PDBs in Windows PE files. This helps
+  # windbg and Windows Performance Analyzer with finding the PDBs in some local-
+  # build scenarios. This is never needed for bots or official builds. Because
+  # this puts the output directory in the DLLs/EXEs it breaks build determinism.
+  # Bugs have been reported to the windbg/WPA teams and this workaround will be
+  # removed when they are fixed.
+  use_full_pdb_paths = false
+
+  # Enable -H, which prints the include tree during compilation.
+  # For use by tools/clang/scripts/analyze_includes.py
+  show_includes = false
+
+  # Enable Profi algorithm. Profi can infer block and edge counts.
+  # https://clang.llvm.org/docs/UsersManual.html#using-sampling-profilers
+  # TODO(crbug.com/1375958i:) Possibly enable this for Android too.
+  use_profi = is_chromeos
+
+  # If true, linker crashes will be rerun with `--reproduce` which causes
+  # a reproducer file to be saved.
+  save_reproducers_on_lld_crash = false
+
+  # Enable ShadowCallStack for compiled binaries. SCS stores a pointer to a
+  # shadow call stack in register x18. Hence, x18 must not be used by the OS
+  # or libraries. We assume that to be the case for high end Android
+  # configurations. For more details see
+  # https://clang.llvm.org/docs/ShadowCallStack.html
+  enable_shadow_call_stack = false
+
+  # Use DWARF simple template names, with the following exceptions:
+  #
+  # * Windows is not supported as it doesn't use DWARF.
+  # * Apple platforms (e.g. MacOS, iPhone, iPad) aren't supported because xcode
+  #   lldb doesn't have the needed changes yet.
+  # TODO(crbug.com/1379070): Remove if the upstream default ever changes.
+  #
+  # This greatly reduces the size of debug builds, at the cost of
+  # debugging information which is required by some specialized
+  # debugging tools.
+  simple_template_names = is_clang && !is_nacl && !is_win && !is_apple
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && current_os != "zos" &&
+            !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_android) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    }
+  }
+}
+
+declare_args() {
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort =
+      chrome_pgo_phase == 2 ||
+      (is_chromeos &&
+       (clang_use_default_sample_profile || clang_sample_profile_path != ""))
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+assert(!(llvm_force_head_revision && use_remoteexec),
+       "can't use rbe with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    "//",
+    root_gen_dir,
+  ]
+}
+
+# Compiler instrumentation can introduce dependencies in DSOs to symbols in
+# the executable they are loaded into, so they are unresolved at link-time.
+config("no_unresolved_symbols") {
+  if (!using_sanitizer &&
+      (is_linux || is_chromeos || is_android || is_fuchsia)) {
+    ldflags = [
+      "-Wl,-z,defs",
+      "-Wl,--as-needed",
+    ]
+  }
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  rustflags = []
+  ldflags = []
+  defines = []
+  configs = []
+  rustflags = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  } else if (current_os == "zos") {
+    configs += [ "//build/config/zos:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":rustc_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # Here we enable -fno-delete-null-pointer-checks, which makes various nullptr
+  # operations (e.g. dereferencing) into defined behavior. This avoids deletion
+  # of some security-critical code: see https://crbug.com/1139129.
+  # Nacl does not support the flag. And, we still want UBSAN to catch undefined
+  # behavior related to nullptrs, so do not add this flag if UBSAN is enabled.
+  # GCC seems to have some bugs compiling constexpr code when this is defined,
+  # so only enable it if using_clang. See: https://gcc.gnu.org/PR97913
+  # TODO(mpdenton): remove is_clang once GCC bug is fixed.
+  if (!is_nacl && !is_ubsan && is_clang) {
+    cflags += [ "-fno-delete-null-pointer-checks" ]
+  }
+
+  # Don't emit the GCC version ident directives, they just end up in the
+  # .comment section or debug info taking up binary size, and makes comparing
+  # .o files built with different compiler versions harder.
+  if (!is_win || is_clang) {
+    cflags += [ "-fno-ident" ]
+  }
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common compiler and linker configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection. ShadowCallStack and Stack protector address the same
+    # problems. Therefore, we only enable one or the other. Clang advertises SCS as
+    # a stronger alternative to StackProtector, so we give SCS precedence over SP.
+    if (enable_shadow_call_stack) {
+      # On Aarch64, SCS requires the x18 register to be unused because it will hold
+      # a pointer to the shadow stack. For Android we know that Clang doesn't use
+      # x18 by default. On other OSs adding "-ffixed-x18" might be required.
+      assert(is_android)
+
+      scs_parameters = [
+        "-fsanitize=shadow-call-stack",
+        "-fno-stack-protector",
+      ]
+      cflags += scs_parameters
+      ldflags += scs_parameters
+    } else {
+      if (is_apple) {
+        # The strong variant of the stack protector significantly increases
+        # binary size, so only enable it in debug mode.
+        if (is_debug) {
+          cflags += [ "-fstack-protector-strong" ]
+        } else {
+          cflags += [ "-fstack-protector" ]
+        }
+      } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+        # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+        # See also https://crbug.com/533294
+        # The x86 toolchain currently has problems with stack-protector.
+        if (is_android && current_cpu == "x86") {
+          cflags += [ "-fno-stack-protector" ]
+        } else if (current_os != "aix") {
+          # Not available on aix.
+          cflags += [ "-fstack-protector" ]
+        }
+      }
+    }
+
+    if (use_lld) {
+      ldflags += [ "-fuse-ld=lld" ]
+      if (lld_path != "") {
+        ldflags += [ "-B$lld_path" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix" &&
+        current_os != "zos") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  }
+
+  if (is_clang && is_debug) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Apple Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix" && current_os != "zos") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        rustflags += [ "-Cforce-unwind-tables=no" ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+        rustflags += [ "-Cforce-unwind-tables=yes" ]
+      }
+    }
+  }
+
+  # Apple compiler flags setup.
+  # ---------------------------------
+  if (is_apple) {
+    # On Intel, clang emits both Apple's "compact unwind" information and
+    # DWARF eh_frame unwind information by default, for compatibility reasons.
+    # This flag limits emission of eh_frame information to functions
+    # whose unwind information can't be expressed in the compact unwind format
+    # (which in practice means almost everything gets only compact unwind
+    # entries). This reduces object file size a bit and makes linking a bit
+    # faster.
+    # On arm64, this is already the default behavior.
+    if (current_cpu == "x64") {
+      asmflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+      cflags += [ "-femit-dwarf-unwind=no-compact-unwind" ]
+    }
+
+    # dsymutil is not available in the system, on bots, for rustc to call. Our
+    # linker_driver.py script runs dsymutil itself, which is set to be the
+    # linker for Rust targets as well.
+    rustflags += [ "-Csplit-debuginfo=unpacked" ]
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+    rustflags += [ "-Crelocation-model=pic" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+        "-Wl,--threads",
+        "-Wl,--thread-count=4",
+      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf && (!is_apple || use_lld)) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && current_os != "zos") {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+    if (save_reproducers_on_lld_crash && use_lld) {
+      ldflags += [
+        "-fcrash-diagnostics=all",
+        "-fcrash-diagnostics-dir=" + clang_diagnostic_dir,
+      ]
+    }
+
+    # TODO(hans): Remove this once Clang generates better optimized debug info
+    # by default. https://crbug.com/765793
+    cflags += [
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+    if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+      if (is_win) {
+        ldflags += [ "-mllvm:-instcombine-lower-dbg-declare=0" ]
+      } else {
+        ldflags += [ "-Wl,-mllvm,-instcombine-lower-dbg-declare=0" ]
+      }
+    }
+
+    # TODO(crbug.com/1488374): This causes binary size growth and potentially
+    # other problems.
+    # TODO(crbug.com/1491036): This isn't supported by Cronet's mainline llvm version.
+    if (default_toolchain != "//build/toolchain/cros:target" &&
+        !llvm_android_mainline) {
+      cflags += [
+        "-mllvm",
+        "-split-threshold-for-reg-with-hint=0",
+      ]
+      if (use_thin_lto && is_a_target_toolchain) {
+        if (is_win) {
+          ldflags += [ "-mllvm:-split-threshold-for-reg-with-hint=0" ]
+        } else {
+          ldflags += [ "-Wl,-mllvm,-split-threshold-for-reg-with-hint=0" ]
+        }
+      }
+    }
+
+    # TODO(crbug.com/1235145): Investigate why/if this should be needed.
+    if (is_win) {
+      cflags += [ "/clang:-ffp-contract=off" ]
+    } else {
+      cflags += [ "-ffp-contract=off" ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (is_nacl && !is_nacl_saigo) {
+      # This is for the pnacl_newlib toolchain. It's only used to build
+      # a few independent ppapi test files that don't pull in any other
+      # dependencies.
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+      if (is_clang) {
+        cflags_cc += [ "-fno-trigraphs" ]
+      }
+    } else if (is_clang) {
+      if (defined(use_cxx17) && use_cxx17) {
+        cflags_cc += [ "-std=${standard_prefix}++17" ]
+      } else {
+        cflags_cc += [ "-std=${standard_prefix}++20" ]
+      }
+    } else {
+      # The gcc bots are currently using GCC 9, which is not new enough to
+      # support "c++20"/"gnu++20".
+      cflags_cc += [ "-std=${standard_prefix}++2a" ]
+    }
+  } else if (is_win) {
+    cflags_c += [ "/std:c11" ]
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "/std:c++17" ]
+    } else {
+      cflags_cc += [ "/std:c++20" ]
+    }
+  } else if (!is_nacl) {
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either
+    # gnu11/gnu++11 or c11/c++11; we technically don't need this toolchain any
+    # more, but there are still a few buildbots using it, so until those are
+    # turned off we need the !is_nacl clause and the (is_nacl && is_clang)
+    # clause, above.
+    cflags_c += [ "-std=c11" ]
+
+    if (defined(use_cxx17) && use_cxx17) {
+      cflags_cc += [ "-std=c++17" ]
+    } else {
+      cflags_cc += [ "-std=c++20" ]
+    }
+  }
+
+  if (is_clang && current_os != "zos") {
+    # C++17 removes trigraph support, but clang still warns that it ignores
+    # them when seeing them.  Don't.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_relative_vtables_abi) {
+    cflags_cc += [ "-fexperimental-relative-c++-abi-vtables" ]
+    ldflags += [ "-fexperimental-relative-c++-abi-vtables" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_cache) {
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 40GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=40g:cache_size_files=100000"
+      cache_dir = rebase_path("$root_out_dir/thinlto-cache", root_build_dir)
+      if (is_win) {
+        ldflags += [
+          "/lldltocache:$cache_dir",
+          "/lldltocachepolicy:$cache_policy",
+        ]
+      } else {
+        if (is_apple) {
+          ldflags += [ "-Wl,-cache_path_lto,$cache_dir" ]
+        } else {
+          ldflags += [ "-Wl,--thinlto-cache-dir=$cache_dir" ]
+        }
+        ldflags += [ "-Wl,--thinlto-cache-policy=$cache_policy" ]
+      }
+    }
+
+    # An import limit of 30 has better performance (per speedometer) and lower
+    # binary size than the default setting of 100.
+    # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+    # should be able to better manage binary size increases on its own.
+    import_instr_limit = 30
+
+    if (is_win) {
+      ldflags += [
+        "/opt:lldltojobs=all",
+        "-mllvm:-import-instr-limit=$import_instr_limit",
+        "-mllvm:-disable-auto-upgrade-debug-info",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # In ThinLTO builds, we run at most one link process at a time,
+      # and let it use all cores.
+      # TODO(thakis): Check if '=0' (that is, number of cores, instead
+      # of "all" which means number of hardware threads) is faster.
+      ldflags += [ "-Wl,--thinlto-jobs=all" ]
+
+      if (is_chromeos) {
+        # ARM was originally set lower than x86 to keep the size
+        # bloat of ThinLTO to <10%, but that's potentially no longer true.
+        # FIXME(inglorion): maybe tune these?
+        # TODO(b/271459198): Revert limit on amd64 to 30 when fixed.
+        import_instr_limit = 20
+      } else if (is_android) {
+        # TODO(crbug.com/1308318): Investigate if we can get the > 6% perf win
+        # of import_instr_limit 30 with a binary size hit smaller than ~2 MiB.
+        import_instr_limit = 5
+      }
+
+      ldflags += [ "-Wl,-mllvm,-import-instr-limit=$import_instr_limit" ]
+
+      if (is_apple) {
+        ldflags += [ "-Wcrl,object_path_lto" ]
+      }
+
+      # We only use one version of LLVM within a build so there's no need to
+      # upgrade debug info, which can be expensive since it runs the verifier.
+      ldflags += [ "-Wl,-mllvm,-disable-auto-upgrade-debug-info" ]
+    }
+
+    # TODO(https://crbug.com/1211155): investigate why this isn't effective on
+    # arm32.
+    if (!is_android || current_cpu == "arm64") {
+      cflags += [ "-fwhole-program-vtables" ]
+
+      if (toolchain_supports_rust_thin_lto) {
+        # whole-program-vtables implies -fsplit-lto-unit, and Rust needs to match
+        # behaviour. Rust needs to know the linker will be doing LTO in this case
+        # or it rejects the Zsplit-lto-unit flag.
+        rustflags += [
+          "-Zsplit-lto-unit",
+          "-Clinker-plugin-lto=yes",
+        ]
+      } else {
+        # Don't include bitcode if it won't be used.
+        rustflags += [ "-Cembed-bitcode=no" ]
+      }
+
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      cflags += [ "-ftime-trace" ]
+      if (use_lld && is_mac) {
+        ldflags += [ "-Wl,--time-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # TODO(crbug.com/1374347): Cleanup undefined symbol errors caught by
+  # --no-undefined-version.
+  if (use_lld && !is_win && !is_mac && !is_ios) {
+    ldflags += [ "-Wl,--undefined-version" ]
+  }
+
+  if (use_lld && is_apple) {
+    ldflags += [ "-Wl,--strict-auto-link" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  if (is_clang && !is_nacl && show_includes) {
+    if (is_win) {
+      # TODO(crbug.com/1223741): Goma mixes the -H and /showIncludes output.
+      assert(!use_goma, "show_includes on Windows is not reliable with goma")
+      cflags += [
+        "/clang:-H",
+        "/clang:-fshow-skipped-includes",
+      ]
+    } else {
+      cflags += [
+        "-H",
+        "-fshow-skipped-includes",
+      ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Use DWARF simple template names.
+  if (simple_template_names) {
+    cflags_cc += [ "-gsimple-template-names" ]
+  }
+
+  # MLGO specific flags. These flags enable an ML-based inliner trained on
+  # Chrome on Android (arm32) with ThinLTO enabled, optimizing for size.
+  # The "release" ML model is embedded into clang as part of its build.
+  # Currently, the ML inliner is only enabled when targeting Android due to:
+  # a) Android is where size matters the most.
+  # b) MLGO presently has the limitation of only being able to embed one model
+  #    at a time; It is unclear if the embedded model is beneficial for
+  #    non-Android targets.
+  # MLGO is only officially supported on linux.
+  if (use_ml_inliner && is_a_target_toolchain) {
+    assert(
+        is_android && host_os == "linux",
+        "MLGO is currently only supported for targeting Android on a linux host")
+    if (use_thin_lto) {
+      ldflags += [ "-Wl,-mllvm,-enable-ml-inliner=release" ]
+    }
+  }
+
+  if (clang_embed_bitcode) {
+    assert(!use_thin_lto,
+           "clang_embed_bitcode is only supported in non-ThinLTO builds")
+    cflags += [
+      "-Xclang",
+      "-fembed-bitcode=all",
+    ]
+  }
+
+  if (lld_emit_indexes_and_imports) {
+    assert(use_thin_lto,
+           "lld_emit_indexes_and_imports is only supported with ThinLTO builds")
+    ldflags += [
+      "-Wl,--save-temps=import",
+      "-Wl,--thinlto-emit-index-files",
+    ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+
+  if (is_chromeos_device && !is_nacl) {
+    # On ChromeOS devices, we want to ensure we're using Chrome's allocator
+    # symbols for all C++ new/delete operator overloads. PartitionAlloc
+    # and other local allocators should always take precedence over system or
+    # preloaded allocators. These are the mangled symbol names.
+    # See b/280115910 for details.
+    ldflags += [
+      "-Wl,--export-dynamic-symbol=_ZdaPv,-u,_ZdaPv",
+      "-Wl,--export-dynamic-symbol=_ZdaPvRKSt9nothrow_t,-u,_ZdaPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPv,-u,_ZdlPv",
+      "-Wl,--export-dynamic-symbol=_ZdlPvm,-u,_ZdlPvm",
+      "-Wl,--export-dynamic-symbol=_ZdlPvRKSt9nothrow_t,-u,_ZdlPvRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znam,-u,_Znam",
+      "-Wl,--export-dynamic-symbol=_ZnamRKSt9nothrow_t,-u,_ZnamRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_Znwm,-u,_Znwm",
+      "-Wl,--export-dynamic-symbol=_ZnwmRKSt9nothrow_t,-u,_ZnwmRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvmSt11align_val_t,-u,_ZdaPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_t,-u,_ZdaPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdaPvSt11align_val_tRKSt9nothrow_t,-u,_ZdaPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvmSt11align_val_t,-u,_ZdlPvmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_t,-u,_ZdlPvSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZdlPvSt11align_val_tRKSt9nothrow_t,-u,_ZdlPvSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_t,-u,_ZnamSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnamSt11align_val_tRKSt9nothrow_t,-u,_ZnamSt11align_val_tRKSt9nothrow_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_t,-u,_ZnwmSt11align_val_t",
+      "-Wl,--export-dynamic-symbol=_ZnwmSt11align_val_tRKSt9nothrow_t,-u,_ZnwmSt11align_val_tRKSt9nothrow_t",
+    ]
+  }
+
+  # Rust compiler flags setup.
+  # ---------------------------
+  rustflags += [
+    # Overflow checks are optional in Rust, but even if switched
+    # off they do not cause undefined behavior (the overflowing
+    # behavior is defined). Because containers are bounds-checked
+    # in safe Rust, they also can't provoke buffer overflows.
+    # As such these checks may be less important in Rust than C++.
+    # But in (simplistic) testing they have negligible performance
+    # overhead, and this helps to provide consistent behavior
+    # between different configurations, so we'll keep them on until
+    # we discover a reason to turn them off.
+    "-Coverflow-checks=on",
+
+    # By default Rust passes `-nodefaultlibs` to the linker, however this
+    # conflicts with our `--unwind=none` flag for Android dylibs, as the latter
+    # is then unused and produces a warning/error. So this removes the
+    # `-nodefaultlibs` from the linker invocation from Rust, which would be used
+    # to compile dylibs on Android, such as for constructing unit test APKs.
+    "-Cdefault-linker-libraries",
+
+    # To make Rust .d files compatible with ninja
+    "-Zdep-info-omit-d-target",
+
+    # If a macro panics during compilation, show which macro and where it is
+    # defined.
+    "-Zmacro-backtrace",
+
+    # For deterministic builds, keep the local machine's current working
+    # directory from appearing in build outputs.
+    "-Zremap-cwd-prefix=.",
+  ]
+
+  if (!is_win || force_rustc_color_output) {
+    # Colorize error output. The analogous flag is passed for clang. This must
+    # be platform-gated since rustc will unconditionally output ANSI escape
+    # sequences, ignoring the platform, when stderr is not a terminal.
+    rustflags += [ "--color=always" ]
+  }
+  if (rust_abi_target != "") {
+    rustflags += [ "--target=$rust_abi_target" ]
+  }
+  if (!use_thin_lto || !toolchain_supports_rust_thin_lto) {
+    # Don't include bitcode if it won't be used.
+    rustflags += [ "-Cembed-bitcode=no" ]
+  }
+  if (is_official_build) {
+    rustflags += [ "-Ccodegen-units=1" ]
+  }
+  if (!rust_prebuilt_stdlib) {
+    # When building against the Chromium Rust stdlib (which we compile) always
+    # abort instead of unwinding when panic occurs. In official builds, panics
+    # abort immediately (this is configured in the stdlib) to keep binary size
+    # down. So we unconditionally match behaviour in unofficial too.
+    rustflags += [
+      "-Cpanic=abort",
+      "-Zpanic_abort_tests",
+    ]
+  }
+
+  # Normally, this would be defined in the `runtime_library` config but NaCl
+  # saigo libc++ does not use the custom hermetic libc++. Unfortunately, there
+  # isn't really a better config to add this define for the define to
+  # consistently apply in both Chromium and non-Chromium code *and* non-NaCl
+  # and NaCl code.
+  #
+  # TODO(https://crbug.com/702997): Move this back to the `runtime_library`
+  # config when NaCl is removed.
+  if (use_safe_libcxx) {
+    # TODO(https://crbug.com/1465186): Switch saigo to hardened mode once
+    # it's rolled in.
+    if (is_nacl_saigo) {
+      defines += [ "_LIBCPP_ENABLE_ASSERTIONS=1" ]
+    } else {
+      defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE" ]
+    }
+  } else {
+    defines += [ "_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE" ]
+  }
+}
+
+# The BUILDCONFIG file sets this config on targets by default, which means when
+# building with ThinLTO, no optimization is performed in the link step.
+config("thinlto_optimize_default") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    lto_opt_level = 0
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# Use this to enable optimization in the ThinLTO link step for select targets
+# when thin_lto_enable_optimizations is set by doing:
+#
+#   configs -= [ "//build/config/compiler:thinlto_optimize_default" ]
+#   configs += [ "//build/config/compiler:thinlto_optimize_max" ]
+#
+# Since it makes linking significantly slower and more resource intensive, only
+# use it on important targets such as the main browser executable or dll.
+config("thinlto_optimize_max") {
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      ldflags = [ "/opt:lldlto=" + lto_opt_level ]
+    } else {
+      ldflags = [ "-Wl,--lto-O" + lto_opt_level ]
+    }
+
+    if (toolchain_supports_rust_thin_lto) {
+      # We always point Rust to a linker that performs LTO, so we don't want Rust
+      # to preemptively do so during compilation too or they conflict. But we do
+      # want Rust to generate LTO metadata in order for the linker to do its job.
+      rustflags = [ "-Clinker-plugin-lto=yes" ]
+    } else {
+      # Don't include bitcode if it won't be used.
+      rustflags = [ "-Cembed-bitcode=no" ]
+    }
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  configs = []
+  if (is_chromeos) {
+    configs += [ "//build/config/chromeos:compiler_cpu_abi" ]
+  }
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+        "-msse3",
+      ]
+
+      # Minimum SIMD support for devices running lacros.
+      # See https://crbug.com/1475858
+      if (is_chromeos_lacros) {
+        cflags += [
+          "-mssse3",
+          "-msse4",
+          "-msse4.1",
+          "-msse4.2",
+        ]
+      }
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-mfpmath=sse",
+          "-msse3",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia &&
+          !(is_chromeos_lacros && is_chromeos_device)) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "riscv64") {
+      if (is_clang && !is_android) {
+        cflags += [ "--target=riscv64-linux-gnu" ]
+        ldflags += [ "--target=riscv64-linux-gnu" ]
+      }
+      cflags += [ "-mabi=lp64d" ]
+    } else if (current_cpu == "loong64") {
+      if (is_clang) {
+        cflags += [ "--target=loongarch64-linux-gnu" ]
+        ldflags += [ "--target=loongarch64-linux-gnu" ]
+      }
+      cflags += [
+        "-mabi=lp64d",
+        "-mcmodel=medium",
+      ]
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && !is_win && is_clang) {
+    # Disable outlining everywhere on arm64 except Win. For more information see
+    # crbug.com/931297 for Android and crbug.com/1410297 for iOS.
+    # TODO(crbug.com/1411363): Enable this on Windows if possible.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  asmflags = cflags
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+  swiftflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    if (is_nacl) {
+      # TODO(https://crbug.com/1231236): Use -ffile-compilation-dir= here.
+      cflags += [
+        "-Xclang",
+        "-fdebug-compilation-dir",
+        "-Xclang",
+        ".",
+      ]
+    } else {
+      # -ffile-compilation-dir is an alias for both -fdebug-compilation-dir=
+      # and -fcoverage-compilation-dir=.
+      cflags += [ "-ffile-compilation-dir=." ]
+      swiftflags += [ "-file-compilation-dir=." ]
+    }
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags += [ "-no-canonical-prefixes" ]
+
+    # Same for links: Let the compiler driver invoke the linker
+    # with a relative path and pass relative paths to built-in
+    # libraries. Not needed on Windows because we call the linker
+    # directly there, not through the compiler driver.
+    # We don't link on goma, so this change is just for cleaner
+    # internal linker invocations, for people who work on the build.
+    if (!is_win) {
+      ldflags += [ "-no-canonical-prefixes" ]
+    }
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("rustc_revision") {
+  if (rustc_revision != "") {
+    # Similar to the above config, this is here so that all files get recompiled
+    # after a rustc roll. Nothing should ever read this cfg. This will not be
+    # set if a custom toolchain is used.
+    rustflags = [
+      "--cfg",
+      "cr_rustc_revision=\"$rustc_revision\"",
+    ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # Rust and C++ both provide intrinsics for LLVM to call for math operations. We
+  # want to use the C++ intrinsics, not the ones in the Rust compiler_builtins
+  # library. The Rust symbols are marked as weak, so that they can be replaced by
+  # the C++ symbols. This config ensures the C++ symbols exist and are strong in
+  # order to cause that replacement to occur by explicitly linking in clang's
+  # compiler-rt library.
+  if (is_clang && toolchain_has_rust) {
+    configs += [ "//build/config/clang:compiler_builtins" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+
+    if (use_custom_libunwind) {
+      # Instead of using an unwind lib from the toolchain,
+      # buildtools/third_party/libunwind will be built and used directly.
+      ldflags = [ "--unwindlib=none" ]
+    }
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:runtime_library" ]
+    }
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# treat_warnings_as_errors ----------------------------------------------------
+#
+# Adding this config causes the compiler to treat warnings as fatal errors.
+# This is used as a subconfig of both chromium_code and no_chromium_code, and
+# is broken out separately so nocompile tests can force-enable this setting
+# independently of the default warning flags.
+config("treat_warnings_as_errors") {
+  if (is_win) {
+    cflags = [ "/WX" ]
+  } else {
+    cflags = [ "-Werror" ]
+
+    # The compiler driver can sometimes (rarely) emit warnings before calling
+    # the actual linker.  Make sure these warnings are treated as errors as
+    # well.
+    ldflags = [ "-Werror" ]
+  }
+
+  # Turn rustc warnings into the "deny" lint level, which produce compiler
+  # errors. The equivalent of -Werror for clang/gcc.
+  #
+  # Note we apply the actual lint flags in config("compiler"). All warnings
+  # are suppressed in third-party crates.
+  rustflags = [ "-Dwarnings" ]
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+  configs = []
+
+  if (is_win) {
+    if (fatal_linker_warnings) {
+      arflags = [ "/WX" ]
+      ldflags = [ "/WX" ]
+    }
+    defines = [
+      # Without this, Windows headers warn that functions like wcsnicmp
+      # should be spelled _wcsnicmp. But all other platforms keep spelling
+      # it wcsnicmp, making this warning unhelpful. We don't want it.
+      "_CRT_NONSTDC_NO_WARNINGS",
+
+      # TODO(thakis): winsock wants us to use getaddrinfo instead of
+      # gethostbyname. Fires mostly in non-Chromium code. We probably
+      # want to remove this define eventually.
+      "_WINSOCK_DEPRECATED_NO_WARNINGS",
+    ]
+    if (!is_clang) {
+      # TODO(thakis): Remove this once
+      # https://swiftshader-review.googlesource.com/c/SwiftShader/+/57968 has
+      # rolled into angle.
+      cflags += [ "/wd4244" ]
+    }
+  } else {
+    if ((is_apple || is_android) && !is_nacl) {
+      # Warns if a method is used whose availability is newer than the
+      # deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # An ABI compat warning we don't care about, https://crbug.com/1102157
+        # TODO(thakis): Push this to the (few) targets that need it,
+        # instead of having a global flag.
+        "-Wno-psabi",
+      ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      "-Wloop-analysis",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    if (!is_nacl || is_nacl_saigo) {
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (is_fuchsia) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1474434): fix and reenable
+          "-Wno-missing-field-initializers",
+        ]
+      }
+
+      cflags += [
+        "-Wenum-compare-conditional",
+
+        # Ignore warnings about MSVC optimization pragmas.
+        # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+        "-Wno-ignored-pragma-optimize",
+
+        # TODO(crbug.com/1343975) Evaluate and possibly enable.
+        "-Wno-deprecated-builtins",
+
+        # TODO(crbug.com/1352183) Evaluate and possibly enable.
+        "-Wno-bitfield-constant-conversion",
+
+        # TODO(crbug.com/1412713) Evaluate and possibly enable.
+        "-Wno-deprecated-this-capture",
+
+        # TODO(https://crbug.com/1491833): Fix and re-enable.
+        "-Wno-invalid-offsetof",
+
+        # TODO(crbug.com/1494809): Evaluate and possibly enable.
+        "-Wno-vla-extension",
+
+        # TODO(https://crbug.com/1490607): Fix and re-enable.
+        "-Wno-thread-safety-reference-return",
+      ]
+
+      if (!is_nacl) {
+        cflags_cc += [
+          # TODO(https://crbug.com/1513724): Fix and re-enable.
+          "-Wno-c++11-narrowing-const-reference",
+        ]
+      }
+    }
+
+    # Some builders, such as Cronet, use a different version of Clang than
+    # Chromium. This can cause minor errors when compiling Chromium changes. We
+    # want to avoid these errors.
+    if (llvm_android_mainline) {
+      cflags += [
+        "-Wno-error=unknown-warning-option",
+        "-Wno-error=unused-command-line-argument",
+      ]
+    }
+  }
+
+  # Rust warnings
+
+  # Require `unsafe` blocks even in `unsafe` fns. This is intended to become
+  # an error by default eventually; see
+  # https://github.com/rust-lang/rust/issues/71668
+  rustflags = [ "-Dunsafe_op_in_unsafe_fn" ]
+}
+
+# prevent_unsafe_narrowing ----------------------------------------------------
+#
+# Warnings that prevent narrowing or comparisons of integer types that are
+# likely to cause out-of-bound read/writes or Undefined Behaviour. In
+# particular, size_t is used for memory sizes, allocation, indexing, and
+# offsets. Using other integer types along with size_t produces risk of
+# memory-safety bugs and thus security exploits.
+#
+# In order to prevent these bugs, allocation sizes were historically limited to
+# sizes that can be represented within 31 bits of information, allowing `int` to
+# be safely misused instead of `size_t` (https://crbug.com/169327). In order to
+# support increasing the allocation limit we require strictly adherence to
+# using the correct types, avoiding lossy conversions, and preventing overflow.
+# To do so, enable this config and fix errors by converting types to be
+# `size_t`, which is both large enough and unsigned, when dealing with memory
+# sizes, allocations, indices, or offsets.In cases where type conversion is not
+# possible or is superfluous, use base::strict_cast<> or base::checked_cast<>
+# to convert to size_t as needed.
+# See also: https://docs.google.com/document/d/1CTbQ-5cQjnjU8aCOtLiA7G6P0i5C6HpSDNlSNq6nl5E
+#
+# To enable in a GN target, use:
+#   configs += [ "//build/config/compiler:prevent_unsafe_narrowing" ]
+
+config("prevent_unsafe_narrowing") {
+  if (is_clang) {
+    cflags = [
+      "-Wshorten-64-to-32",
+      "-Wimplicit-int-conversion",
+      "-Wsign-compare",
+      "-Wsign-conversion",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Avoid bugs of the form `if (size_t i = size; i >= 0; --i)` while
+        # fixing types to be sign-correct.
+        "-Wtautological-unsigned-zero-compare",
+      ]
+    }
+  }
+}
+
+# unsafe_buffer_warning -------------------------------------------------------
+
+# Paths of third-party headers that violate Wunsafe-buffer-usage, but which we
+# have been unable to fix yet. We use this list to be able to make progress and
+# enable the warning on code that we do control/own.
+#
+# WARNING: This will disable all warnings in the files. ONLY USE THIS for
+# third-party code which we do not control/own. Fix the warnings instead in
+# our own code.
+if (is_clang) {
+  unsafe_buffer_warning_header_allowlist =
+      [ "third_party/googletest/src/googletest/include/gtest" ]
+}
+
+# Enables warnings on pointer arithmetic/indexing or calls to functions
+# annotated with `UNSAFE_BUFFER_USAGE`.
+config("unsafe_buffer_warning") {
+  if (is_clang) {
+    cflags = [ "-Wunsafe-buffer-usage" ]
+    foreach(h, unsafe_buffer_warning_header_allowlist) {
+      if (is_win) {
+        cflags += [ "/clang:--system-header-prefix=$h" ]
+      } else {
+        cflags += [ "--system-header-prefix=$h" ]
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/W4" ]  # Warning level 4.
+
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64" &&
+        current_cpu != "riscv64" && current_cpu != "loong64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      fortify_level = "2"
+
+      # ChromeOS's toolchain supports a high-quality _FORTIFY_SOURCE=3
+      # implementation with a few custom glibc patches. Use that if it's
+      # available.
+      if (is_chromeos_device && !lacros_use_chromium_toolchain) {
+        fortify_level = "3"
+      }
+      defines += [ "_FORTIFY_SOURCE=" + fortify_level ]
+    }
+
+    if (is_apple) {
+      cflags_objc = [ "-Wimplicit-retain-self" ]
+      cflags_objcc = [ "-Wimplicit-retain-self" ]
+    }
+
+    if (is_mac) {
+      cflags_objc += [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc += [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use [[fallthrough]].
+      "-Wimplicit-fallthrough",
+
+      # Warn on unnecessary extra semicolons outside of function definitions.
+      "-Wextra-semi",
+
+      # Warn on unreachable code, including unreachable breaks and returns.
+      # See https://crbug.com/346399#c148 for suppression strategies.
+      "-Wunreachable-code-aggressive",
+    ]
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+  }
+
+  configs = [
+    ":default_warnings",
+    ":noshadowing",
+  ]
+  if (treat_warnings_as_errors) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    if (is_clang) {
+      cflags += [ "/W3" ]  # Warning level 3.
+    }
+    cflags += [
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+    ]
+  } else {
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+
+      # Similarly, we're not going to fix all the C++11 narrowing issues in
+      # third-party libraries.
+      "-Wno-c++11-narrowing",
+    ]
+    if (!is_nacl) {
+      cflags += [
+        # Disabled for similar reasons as -Wunused-variable.
+        "-Wno-unused-but-set-variable",
+
+        # TODO(https://crbug.com/1202159): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  # Suppress all warnings in third party, as Cargo does:
+  # https://doc.rust-lang.org/rustc/lints/levels.html#capping-lints
+  rustflags = [ "--cap-lints=allow" ]
+
+  configs = [ ":default_warnings" ]
+
+  # GCC may emit unsuppressible warnings so only apply this config when
+  # building with clang. crbug.com/589724
+  if (treat_warnings_as_errors && is_clang) {
+    configs += [ ":treat_warnings_as_errors" ]
+  }
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && (!is_nacl || is_nacl_saigo)) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  # TODO(crbug.com/1052397): Revisit after target_os flip is completed.
+  if (is_linux || is_chromeos_lacros || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # The macOS and iOS default linker ld64 does not support reading thin
+  # archives.
+  # TODO(crbug.com/1221615): Enable on is_apple if use_lld once that no longer
+  # confuses lldb.
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# Generate a warning for code that might emit a static initializer.
+# See: //docs/static_initializers.md
+# See: https://groups.google.com/a/chromium.org/d/topic/chromium-dev/B9Q5KTD7iCo/discussion
+config("wglobal_constructors") {
+  if (is_clang) {
+    cflags = [ "-Wglobal-constructors" ]
+  }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blocklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos_ash && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+
+  if (is_clang) {
+    # See below.
+    common_optimize_on_cflags += [ "/clang:-fno-math-errno" ]
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix" && current_os != "zos") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+    if ((!is_nacl || is_nacl_saigo) && is_clang) {
+      # We don't care about unique section names, this makes object files a bit
+      # smaller.
+      common_optimize_on_cflags += [ "-fno-unique-section-names" ]
+    }
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+
+  # We cannot rely on errno being set after math functions,
+  # especially since glibc does not set it. Thus, use -fno-math-errno
+  # so that the compiler knows it can inline math functions.
+  # Note that this is different from -ffast-math (even though -ffast-math
+  # implies -fno-math-errno), which also allows a number of unsafe
+  # optimizations.
+  common_optimize_on_cflags += [ "-fno-math-errno" ]
+}
+
+config("default_stack_frames") {
+  if (!is_win) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+      rustflags = [ "-Copt-level=s" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+
+      # https://doc.rust-lang.org/rustc/profile-guided-optimization.html#usage
+      # suggests not using an explicit `-Copt-level` at all, and the default is
+      # to optimize for performance like `/O2` for clang.
+      rustflags = []
+    }
+  } else if (optimize_for_size) {
+    # Favor size over speed.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+
+      if (use_ml_inliner && is_a_target_toolchain) {
+        cflags += [
+          "-mllvm",
+          "-enable-ml-inliner=release",
+        ]
+      }
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    # Like with `-Oz` on Clang, `-Copt-level=z` will also turn off loop
+    # vectorization.
+    rustflags = [ "-Copt-level=z" ]
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+
+    # Similar to clang, we optimize with `-Copt-level=s` to keep loop
+    # vectorization while otherwise optimizing for size.
+    rustflags = [ "-Copt-level=s" ]
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+
+    # The `-O3` for clang turns on extra optimizations compared to the standard
+    # `-O2`. But for rust, `-Copt-level=3` is the default and is thus reliable
+    # to use.
+    rustflags = [ "-Copt-level=3" ]
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+    rustflags = [ "-Copt-level=3" ]
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  rustflags = [ "-Copt-level=1" ]
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || is_chromeos || is_castos,
+           "The current platform has no default profile")
+    if (is_android || is_castos) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "atom" ||
+              chromeos_afdo_platform == "bigcore" ||
+              chromeos_afdo_platform == "arm" ||
+              chromeos_afdo_platform == "arm-exp",
+          "Only 'atom', 'bigcore', 'arm' and 'arm-exp' are valid ChromeOS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses, so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      if (use_profi) {
+        cflags += [ "-fsample-profile-use-profi" ]
+      }
+
+      # crbug.com/1459429: ARM builds see failures due to -Wbackend-plugin.
+      # These seem to be false positives - the complaints are about functions
+      # marked with `__nodebug__` not having associated debuginfo. In the case
+      # where this was observed, the `__nodebug__` function was also marked
+      # `__always_inline__` and had no branches, so AFDO info is likely useless
+      # there.
+      cflags += [ "-Wno-backend-plugin" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's minimal downside to always using this. However, post-mortem
+  # debugging of Chromium crash dumps and ETW tracing can be complicated by this
+  # switch so an option to omit it is important.
+  if (!use_full_pdb_paths) {
+    ldflags = [ "/pdbaltpath:%_PDB%" ]
+  }
+}
+
+# Full symbols.
+config("symbols") {
+  rustflags = []
+  if (is_win) {
+    if (is_clang) {
+      cflags = [
+        # Debug information in the .obj files.
+        "/Z7",
+
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    }
+
+    # On aix -gdwarf causes linker failures due to thread_local variables.
+    if (!is_nacl && current_os != "aix") {
+      if (use_dwarf5) {
+        cflags += [ "-gdwarf-5" ]
+        rustflags += [ "-Zdwarf-version=5" ]
+      } else {
+        # Recent clang versions default to DWARF5 on Linux, and Android is about
+        # to switch. TODO: Adopt that in controlled way. For now, keep DWARF4.
+        # Apple platforms still default to 4 in clang, so they don't need the
+        # cflags.
+        if (!is_apple) {
+          cflags += [ "-gdwarf-4" ]
+        }
+
+        # On Apple, rustc defaults to DWARF2 so it needs to be told how to
+        # match clang.
+        rustflags += [ "-Zdwarf-version=4" ]
+      }
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g2 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if ((!is_nacl || is_nacl_saigo) && current_os != "zos") {
+      cflags += [ "-g2" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # gcc generates dwarf-aranges by default on -g1 and -g2. On clang it has
+      # to be manually enabled.
+      #
+      # It is skipped in tsan and asan because enabling it causes some
+      # formatting changes in the output which would require fixing bunches
+      # of expectation regexps.
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    if (is_apple) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission) {
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    # Split debug info with all thinlto builds except nacl and apple.
+    # thinlto requires -gsplit-dwarf in ldflags.
+    if (use_debug_fission && use_thin_lto && !is_nacl && !is_apple) {
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    _enable_gdb_index =
+        symbol_level == 2 && !is_apple && !is_nacl && current_cpu != "x86" &&
+        current_os != "zos" && (use_gold || use_lld) &&
+        # Disable on non-fission 32-bit Android because it pushes
+        # libcomponents_unittests over the 4gb size limit.
+        !(is_android && !use_debug_fission && current_cpu != "x64" &&
+          current_cpu != "arm64")
+    if (_enable_gdb_index) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+
+  configs = []
+
+  # Compress debug on 32-bit ARM to stay under 4GB for ChromeOS
+  # https://b/243982712.
+  if (symbol_level == 2 && is_chromeos_device && !use_debug_fission &&
+      !is_nacl && current_cpu == "arm") {
+    configs += [ "//build/config:compress_debug_sections" ]
+  }
+
+  if (is_clang && (!is_nacl || is_nacl_saigo) && current_os != "zos") {
+    if (is_apple) {
+      # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+      # Make sure we don't use constructor homing on mac.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=limited",
+      ]
+    } else {
+      # Use constructor homing for debug info. This option reduces debug info
+      # by emitting class type info only when constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-fuse-ctor-homing",
+      ]
+    }
+  }
+  rustflags += [ "-g" ]
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  rustflags = []
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+
+    if (is_clang) {
+      cflags += [
+        # Disable putting the compiler command line into the debug info to
+        # prevent some types of non-determinism.
+        "-gno-codeview-command-line",
+      ]
+    }
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && !use_dwarf5) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    } else if (!use_dwarf5 && !is_nacl && current_os != "aix") {
+      # On aix -gdwarf causes linker failures due to thread_local variables.
+      # Recent clang versions default to DWARF5 on Linux, and Android is about
+      # to switch. TODO: Adopt that in controlled way.
+      cflags += [ "-gdwarf-4" ]
+      rustflags += [ "-Zdwarf-version=4" ]
+    }
+
+    if (use_dwarf5 && !is_nacl) {
+      cflags += [ "-gdwarf-5" ]
+      rustflags += [ "-Zdwarf-version=5" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Moreover pnacl does not support newer flags such as -fdebug-prefix-map
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output.
+    # Keeping -g1 for saigo as it's the only toolchain whose artifacts that are
+    # part of chromium release (other nacl toolchains are used only for tests).
+    if (!is_nacl || is_nacl_saigo) {
+      cflags += [ "-g1" ]
+    }
+
+    if (!is_nacl && is_clang && !is_tsan && !is_asan) {
+      # See comment for -gdwarf-aranges in config("symbols").
+      cflags += [ "-gdwarf-aranges" ]
+    }
+
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds, but clang, unlike gcc,
+      # doesn't emit DW_AT_linkage_name in -g1 builds.
+      # -fdebug-info-for-profiling enables that (and a bunch of other things we
+      # don't need), so that we get qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    asmflags = cflags
+  }
+  rustflags += [ "-Cdebuginfo=1" ]
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On macOS and iOS, this enables support for ARC (automatic reference
+  # counting). See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  #
+  # -fobjc-arc enables ARC overall.
+  #
+  # ARC does not add exception handlers to pure Objective-C code, but does add
+  # them to Objective-C++ code with the rationale that C++ pervasively adds them
+  # in for exception safety. However, exceptions are banned in Chromium code for
+  # C++ and exceptions in Objective-C code are intended to be fatal, so
+  # -fno-objc-arc-exceptions is specified to disable these unwanted exception
+  # handlers.
+  config("enable_arc") {
+    common_flags = [
+      "-fobjc-arc",
+      "-fno-objc-arc-exceptions",
+    ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_android) {
+  # Use orderfile for linking Chrome on Android.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    # Don't try to use an orderfile with call graph sorting, except on Android,
+    # where we care about memory used by code, so we still want to mandate
+    # ordering.
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      ldflags = [
+        "-Wl,--symbol-ordering-file",
+        "-Wl,$_rebased_orderfile",
+        "-Wl,--no-warn-symbol-ordering",
+      ]
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    if (init_stack_vars_zero) {
+      cflags += [ "-ftrivial-auto-var-init=zero" ]
+    } else {
+      cflags += [ "-ftrivial-auto-var-init=pattern" ]
+    }
+  }
+}
+
+buildflag_header("compiler_buildflags") {
+  header = "compiler_buildflags.h"
+
+  flags = [
+    "CLANG_PGO=$chrome_pgo_phase",
+    "SYMBOL_LEVEL=$symbol_level",
+  ]
+}
+
+config("cet_shadow_stack") {
+  if (enable_cet_shadow_stack && is_win) {
+    assert(target_cpu == "x64")
+    ldflags = [ "/CETCOMPAT" ]
+  }
+}
Index: chromium/patches/README
===================================================================
--- chromium/patches/README	(nonexistent)
+++ chromium/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: chromium/patches
===================================================================
--- chromium/patches	(nonexistent)
+++ chromium/patches	(revision 385)

Property changes on: chromium/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: chromium
===================================================================
--- chromium	(nonexistent)
+++ chromium	(revision 385)

Property changes on: chromium
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: dino/Makefile
===================================================================
--- dino/Makefile	(nonexistent)
+++ dino/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/dino
+
+versions    = 0.4.2
+pkgname     = dino
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: dino
===================================================================
--- dino	(nonexistent)
+++ dino	(revision 385)

Property changes on: dino
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: freerdp/Makefile
===================================================================
--- freerdp/Makefile	(nonexistent)
+++ freerdp/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/freerdp
+
+versions    = 3.1.0
+pkgname     = freerdp
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: freerdp
===================================================================
--- freerdp	(nonexistent)
+++ freerdp	(revision 385)

Property changes on: freerdp
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gegl/Makefile
===================================================================
--- gegl/Makefile	(nonexistent)
+++ gegl/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/gegl
+
+versions    = 0.4.46
+pkgname     = gegl
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/gegl-0.4.46-runtime-dot.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-0.4.46-runtime-dot-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: gegl/create-0.4.46-runtime-dot-patch/create.patch.sh
===================================================================
--- gegl/create-0.4.46-runtime-dot-patch/create.patch.sh	(nonexistent)
+++ gegl/create-0.4.46-runtime-dot-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=0.4.46
+
+tar --files-from=file.list -xJvf ../gegl-$VERSION.tar.xz
+mv gegl-$VERSION gegl-$VERSION-orig
+
+cp -rf ./gegl-$VERSION-new ./gegl-$VERSION
+
+diff --unified -Nr  gegl-$VERSION-orig  gegl-$VERSION > gegl-$VERSION-runtime-dot.patch
+
+mv gegl-$VERSION-runtime-dot.patch ../patches
+
+rm -rf ./gegl-$VERSION
+rm -rf ./gegl-$VERSION-orig

Property changes on: gegl/create-0.4.46-runtime-dot-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: gegl/create-0.4.46-runtime-dot-patch/file.list
===================================================================
--- gegl/create-0.4.46-runtime-dot-patch/file.list	(nonexistent)
+++ gegl/create-0.4.46-runtime-dot-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+gegl-0.4.46/operations/common/introspect.c
Index: gegl/create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c
===================================================================
--- gegl/create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c	(nonexistent)
+++ gegl/create-0.4.46-runtime-dot-patch/gegl-0.4.46-new/operations/common/introspect.c	(revision 385)
@@ -0,0 +1,206 @@
+/* This file is an image processing operation for GEGL
+ *
+ * GEGL is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * GEGL is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
+ *
+ * Copyright 2006 Øyvind Kolås <pippin@gimp.org>
+ */
+
+#include "config.h"
+#include <stdlib.h>
+#include <glib/gi18n-lib.h>
+#include <unistd.h>
+
+
+#ifdef GEGL_PROPERTIES
+
+property_object(node, _("Node"), GEGL_TYPE_NODE)
+
+#else
+
+#define GEGL_OP_SOURCE
+#define GEGL_OP_NAME     introspect
+#define GEGL_OP_C_SOURCE introspect.c
+
+#include "gegl-op.h"
+gchar *gegl_to_dot                       (GeglNode       *node);
+#include <stdio.h>
+
+static void
+gegl_introspect_load_cache (GeglProperties *op_introspect)
+{
+  gchar      *dot_string   = NULL;
+  gchar      *png_filename = NULL;
+  gchar      *dot_filename = NULL;
+  gchar      *dot_cmd      = NULL;
+  gchar      *dot;
+  gint        fd;
+
+  dot = g_find_program_in_path ("dot");
+
+  if (op_introspect->user_data || op_introspect->node == NULL)
+    return;
+
+  /* Construct temp filenames */
+  dot_filename = g_build_filename (g_get_tmp_dir (), "gegl-introspect-XXXXXX.dot", NULL);
+  png_filename = g_build_filename (g_get_tmp_dir (), "gegl-introspect-XXXXXX.png", NULL);
+
+  /* Construct the .dot source */
+  fd = g_mkstemp (dot_filename);
+  dot_string = gegl_to_dot (GEGL_NODE (op_introspect->node));
+  write (fd, dot_string, strlen (dot_string));
+  close (fd);
+
+  /* The only point of using g_mkstemp() here is creating a new file and making
+   * sure we don't override a file which existed before.
+   * Also png_filename will be modified in-place to the actual path name
+   * generated as being unique.
+   */
+  fd = g_mkstemp (png_filename);
+  close (fd);
+
+  /* Process the .dot to a .png */
+  dot_cmd = g_strdup_printf ("%s -o %s -Tpng %s", dot, png_filename, dot_filename);
+  if (system (dot_cmd) != 0)
+    {
+      g_warning ("Error executing GraphViz dot program");
+    }
+  else
+    {
+      GeglBuffer *new_buffer   = NULL;
+      GeglNode   *png_load     = NULL;
+      GeglNode   *buffer_sink  = NULL;
+
+      /* Create a graph that loads the png into a GeglBuffer and process
+       * it
+       */
+      png_load = gegl_node_new_child (NULL,
+                                      "operation", "gegl:png-load",
+                                      "path",      png_filename,
+                                      NULL);
+      buffer_sink = gegl_node_new_child (NULL,
+                                         "operation", "gegl:buffer-sink",
+                                         "buffer",    &new_buffer,
+                                         NULL);
+      gegl_node_link_many (png_load, buffer_sink, NULL);
+      gegl_node_process (buffer_sink);
+
+      op_introspect->user_data= new_buffer;
+
+      g_object_unref (buffer_sink);
+      g_object_unref (png_load);
+    }
+
+  /* Do not keep the files around. */
+  unlink (dot_filename);
+  unlink (png_filename);
+
+  /* Cleanup */
+  g_free (dot);
+  g_free (dot_string);
+  g_free (dot_cmd);
+  g_free (dot_filename);
+  g_free (png_filename);
+}
+
+static void
+gegl_introspect_dispose (GObject *object)
+{
+  GeglProperties *o = GEGL_PROPERTIES (object);
+
+  g_clear_object (&o->user_data);
+
+  G_OBJECT_CLASS (gegl_op_parent_class)->dispose (object);
+}
+
+static GeglRectangle
+gegl_introspect_get_bounding_box (GeglOperation *operation)
+{
+  GeglRectangle   result = {0,0,0,0};
+  GeglProperties *o = GEGL_PROPERTIES (operation);
+
+  gegl_introspect_load_cache (o);
+
+  if (o->user_data)
+    {
+      gint width, height;
+
+      g_object_get (o->user_data,
+                    "width",  &width,
+                    "height", &height,
+                    NULL);
+
+      result.width  = width;
+      result.height = height;
+    }
+
+  return result;
+}
+
+static gboolean
+gegl_introspect_process (GeglOperation        *operation,
+                         GeglOperationContext *context,
+                         const gchar          *output_pad,
+                         const GeglRectangle  *result,
+                         gint                  level)
+{
+  GeglProperties *o = GEGL_PROPERTIES (operation);
+
+  gegl_introspect_load_cache (o);
+
+  if (!o->user_data)
+    return FALSE;
+
+  /* gegl_operation_context_take_object() takes the reference we have,
+   * so we must increase it since we want to keep the object
+   */
+  g_object_ref (o->user_data);
+
+  gegl_operation_context_take_object (context, output_pad, G_OBJECT (o->user_data));
+
+  return  TRUE;
+}
+
+static gboolean
+gegl_introspect_is_available (void)
+{
+  gchar    *dot;
+  gboolean  found = TRUE;
+
+  /* always return TRUE to avoid a runtime check on dot */
+  return found;
+}
+
+static void
+gegl_op_class_init (GeglOpClass *klass)
+{
+  GObjectClass             *object_class;
+  GeglOperationClass       *operation_class;
+
+  object_class    = G_OBJECT_CLASS (klass);
+  operation_class = GEGL_OPERATION_CLASS (klass);
+
+  object_class->dispose             = gegl_introspect_dispose;
+
+  operation_class->process          = gegl_introspect_process;
+  operation_class->get_bounding_box = gegl_introspect_get_bounding_box;
+  operation_class->is_available     = gegl_introspect_is_available;
+
+  gegl_operation_class_set_keys (operation_class,
+    "name"       , "gegl:introspect",
+    "categories" , "render",
+    "description", _("GEGL graph visualizer."),
+    NULL);
+}
+
+#endif
Index: gegl/patches/README
===================================================================
--- gegl/patches/README	(nonexistent)
+++ gegl/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: gegl/patches
===================================================================
--- gegl/patches	(nonexistent)
+++ gegl/patches	(revision 385)

Property changes on: gegl/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gegl
===================================================================
--- gegl	(nonexistent)
+++ gegl	(revision 385)

Property changes on: gegl
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: geoclue/Makefile
===================================================================
--- geoclue/Makefile	(nonexistent)
+++ geoclue/Makefile	(revision 385)
@@ -0,0 +1,57 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/geoclue
+
+versions    = 2.7.0
+pkgname     = geoclue
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+patches     = $(CURDIR)/patches/geoclue-2.7.0-disable-introspection.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-2.7.0-disable-introspection-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: geoclue/create-2.7.0-disable-introspection-patch/create.patch.sh
===================================================================
--- geoclue/create-2.7.0-disable-introspection-patch/create.patch.sh	(nonexistent)
+++ geoclue/create-2.7.0-disable-introspection-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.7.0
+
+tar --files-from=file.list -xJvf ../geoclue-$VERSION.tar.xz
+mv geoclue-$VERSION geoclue-$VERSION-orig
+
+cp -rf ./geoclue-$VERSION-new ./geoclue-$VERSION
+
+diff --unified -Nr  geoclue-$VERSION-orig  geoclue-$VERSION > geoclue-$VERSION-disable-introspection.patch
+
+mv geoclue-$VERSION-disable-introspection.patch ../patches
+
+rm -rf ./geoclue-$VERSION
+rm -rf ./geoclue-$VERSION-orig

Property changes on: geoclue/create-2.7.0-disable-introspection-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: geoclue/create-2.7.0-disable-introspection-patch/file.list
===================================================================
--- geoclue/create-2.7.0-disable-introspection-patch/file.list	(nonexistent)
+++ geoclue/create-2.7.0-disable-introspection-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+geoclue-2.7.0/libgeoclue/meson.build
Index: geoclue/create-2.7.0-disable-introspection-patch/geoclue-2.7.0-new/libgeoclue/meson.build
===================================================================
--- geoclue/create-2.7.0-disable-introspection-patch/geoclue-2.7.0-new/libgeoclue/meson.build	(nonexistent)
+++ geoclue/create-2.7.0-disable-introspection-patch/geoclue-2.7.0-new/libgeoclue/meson.build	(revision 385)
@@ -0,0 +1,88 @@
+# Client interface
+gclue_client = gnome.gdbus_codegen(
+    'gclue-client',
+    '../interface/org.freedesktop.GeoClue2.Client.xml',
+    interface_prefix: 'org.freedesktop.GeoClue2.',
+    namespace: 'GClue',
+    install_header: true,
+    install_dir: include_subdir,
+    autocleanup: 'all')
+
+# Location interface
+gclue_location = gnome.gdbus_codegen(
+    'gclue-location',
+    '../interface/org.freedesktop.GeoClue2.Location.xml',
+    interface_prefix: 'org.freedesktop.GeoClue2.',
+    namespace: 'GClue',
+    install_header: true,
+    install_dir: include_subdir,
+    autocleanup: 'all')
+
+# Manager interface
+gclue_manager = gnome.gdbus_codegen(
+    'gclue-manager',
+    '../interface/org.freedesktop.GeoClue2.Manager.xml',
+    interface_prefix: 'org.freedesktop.GeoClue2.',
+    namespace: 'GClue',
+    install_header: true,
+    install_dir: include_subdir,
+    autocleanup: 'all')
+
+# Location portal interface
+location_portal = gnome.gdbus_codegen('xdp-location',
+				'../interface/org.freedesktop.portal.Location.xml',
+				interface_prefix: 'org.freedesktop.portal.',
+				namespace: 'Xdp',
+				install_header: false,
+				autocleanup: 'all')
+
+libgeoclue_sources = files('gclue-helpers.c', 'gclue-simple.c')
+libgeoclue_sources += gclue_client[0]
+libgeoclue_sources += gclue_location[0]
+libgeoclue_sources += gclue_manager[0]
+libgeoclue_sources += libgeoclue_public_api_gen_sources[1]
+libgeoclue_priv_sources = location_portal
+
+libgeoclue_headers = files('geoclue.h', 'gclue-helpers.h', 'gclue-simple.h')
+
+install_headers(libgeoclue_headers, subdir: header_dir)
+
+libgeoclue_headers += gclue_client[1]
+libgeoclue_headers += gclue_location[1]
+libgeoclue_headers += gclue_manager[1]
+
+c_args = [ '-DG_LOG_DOMAIN="Geoclue"' ]
+include_dirs = [ libgeoclue_public_api_inc, include_directories('.', '..') ]
+link_whole = [ libgeoclue_public_api ]
+libgeoclue = library('geoclue-2',
+                     [ libgeoclue_sources, libgeoclue_priv_sources ],
+                     libgeoclue_headers,
+                     include_directories: include_dirs,
+                     dependencies: base_deps,
+                     link_whole: link_whole,
+                     soversion: '0',
+                     version: '0.0.0',
+                     install: true)
+
+libgeoclue_dep = declare_dependency(link_with: libgeoclue,
+                                    include_directories: include_dirs,
+                                    dependencies: base_deps,
+                                    sources: [ libgeoclue_sources,
+                                               libgeoclue_priv_sources,
+                                               libgeoclue_headers ])
+
+pkg_requirements = ['glib-2.0', 'gio-2.0', 'gio-unix-2.0']
+gir_sources = [ libgeoclue_sources,
+                libgeoclue_headers,
+                libgeoclue_public_api_gen_sources[1] ]
+
+description = 'A convenience library to interact with Geoclue service'
+pkgconf = import('pkgconfig')
+pkgconf.generate(version: gclue_version,
+                 name: 'Geoclue Client Library',
+                 description: description,
+                 filebase: 'libgeoclue-' + gclue_api_version,
+                 libraries: libgeoclue,
+                 subdirs: [ header_dir ],
+                 requires: pkg_requirements)
+
Index: geoclue/patches/README
===================================================================
--- geoclue/patches/README	(nonexistent)
+++ geoclue/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: geoclue/patches
===================================================================
--- geoclue/patches	(nonexistent)
+++ geoclue/patches	(revision 385)

Property changes on: geoclue/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: geoclue
===================================================================
--- geoclue	(nonexistent)
+++ geoclue	(revision 385)

Property changes on: geoclue
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gimp3/Makefile
===================================================================
--- gimp3/Makefile	(nonexistent)
+++ gimp3/Makefile	(revision 385)
@@ -0,0 +1,57 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/gimp3
+
+versions    = 2.99.16
+pkgname     = gimp
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+patches     = $(CURDIR)/patches/gimp-2.99.16-cross-compile.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-2.99.16-cross-compile-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: gimp3/create-2.99.16-cross-compile-patch/create.patch.sh
===================================================================
--- gimp3/create-2.99.16-cross-compile-patch/create.patch.sh	(nonexistent)
+++ gimp3/create-2.99.16-cross-compile-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.99.16
+
+tar --files-from=file.list -xJvf ../gimp-$VERSION.tar.xz
+mv gimp-$VERSION gimp-$VERSION-orig
+
+cp -rf ./gimp-$VERSION-new ./gimp-$VERSION
+
+diff --unified -Nr  gimp-$VERSION-orig  gimp-$VERSION > gimp-$VERSION-cross-compile.patch
+
+mv gimp-$VERSION-cross-compile.patch ../patches
+
+rm -rf ./gimp-$VERSION
+rm -rf ./gimp-$VERSION-orig

Property changes on: gimp3/create-2.99.16-cross-compile-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: gimp3/create-2.99.16-cross-compile-patch/file.list
===================================================================
--- gimp3/create-2.99.16-cross-compile-patch/file.list	(nonexistent)
+++ gimp3/create-2.99.16-cross-compile-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+gimp-2.99.16/meson.build
Index: gimp3/create-2.99.16-cross-compile-patch/gimp-2.99.16-new/meson.build
===================================================================
--- gimp3/create-2.99.16-cross-compile-patch/gimp-2.99.16-new/meson.build	(nonexistent)
+++ gimp3/create-2.99.16-cross-compile-patch/gimp-2.99.16-new/meson.build	(revision 385)
@@ -0,0 +1,1908 @@
+project('gimp',
+  'c', 'cpp',
+  version: '2.99.16',
+  meson_version: '>=0.59.0',
+  default_options: [
+    'cpp_std=gnu++14',
+    'buildtype=debugoptimized',
+  ],
+)
+
+project_url = 'https://gitlab.gnome.org/GNOME/gimp'
+project_url_issues = project_url + '/issues/new'
+
+conf = configuration_data()
+
+warnings = []
+
+################################################################################
+# Project info
+
+prettyname = 'GIMP'
+full_name  = 'GNU Image Manipulation Program'
+
+# General version
+gimp_version = meson.project_version()
+
+package_string= prettyname + ' ' + gimp_version
+
+gimp_app_version_arr = gimp_version.split('.')
+gimp_app_version_major = gimp_app_version_arr[0].to_int()
+gimp_app_version_minor = gimp_app_version_arr[1].to_int()
+gimp_app_version_micro = gimp_app_version_arr[2].to_int()
+
+# Override for Release-candidates
+gimp_app_version = '@0@.@1@'.format(
+  gimp_app_version_major,
+  gimp_app_version_minor
+)
+
+
+# API & pkg-config version
+api_version_major = gimp_app_version_major
+api_version_minor = gimp_app_version_minor
+
+if api_version_minor == 99
+  api_version_major += 1
+  api_version_minor = 0
+endif
+
+gimp_api_version = '@0@.@1@'.format(api_version_major, api_version_minor)
+gimp_api_name = 'gimp-' + gimp_api_version
+
+
+# Libtool versioning
+gimp_interface_age = 16
+
+gimp_binary_age = 100 * gimp_app_version_minor + gimp_app_version_micro
+lt_current      = 100 * gimp_app_version_minor + gimp_app_version_micro - gimp_interface_age
+lt_revision     = gimp_interface_age
+lt_age          = gimp_binary_age - gimp_interface_age
+
+# libtool's -version-info transforms "current:revision:age" into "(current - age).age.revision".
+# Let's compute this ourselves.
+so_version = '@0@.@1@.@2@'.format(lt_current - lt_age, lt_age, lt_revision)
+
+
+gimp_command  = 'gimp-' + gimp_app_version
+
+gettext_package= 'gimp@0@@1@'.format(api_version_major, api_version_minor)
+conf.set_quoted('GETTEXT_PACKAGE', gettext_package)
+
+conf.set_quoted('GIMP_VERSION', gimp_version)
+
+# GIMP_UNSTABLE tells if we are on an unstable or stable development branch.
+stable = (gimp_app_version_minor % 2 == 0)
+conf.set('GIMP_UNSTABLE', stable ? false : 1)
+
+# GIMP_RELEASE tells if this is a release or in-between release (git) code.
+release = (gimp_app_version_micro % 2 == 0)
+conf.set('GIMP_RELEASE', release ? 1 : false)
+
+versionconfig = configuration_data()
+versionconfig.set('GIMP_FULL_NAME',     full_name)
+versionconfig.set('GIMP_MAJOR_VERSION', gimp_app_version_major)
+versionconfig.set('GIMP_MINOR_VERSION', gimp_app_version_minor)
+versionconfig.set('GIMP_MICRO_VERSION', gimp_app_version_micro)
+versionconfig.set('GIMP_VERSION',       gimp_version)
+versionconfig.set('GIMP_API_VERSION',   gimp_api_version)
+
+
+################################################################################
+# Get configuration and Meson modules
+
+pkgconfig = import('pkgconfig')
+i18n      = import('i18n')
+gnome     = import('gnome')
+pythonmod = import('python')
+simd      = import('unstable-simd')
+fs        = import('fs')
+
+cc        = meson.get_compiler('c')
+cxx       = meson.get_compiler('cpp')
+prefix    = get_option('prefix')
+buildtype = get_option('buildtype')
+exec_ver  = '-' + gimp_app_version
+
+compiler_args = []
+linker_args = []
+
+################################################################################
+# Host system detection
+
+host_cpu_family = host_machine.cpu_family()
+message('Host machine cpu family: ' + host_cpu_family)
+
+host_cpu_family = host_machine.cpu_family()
+if   host_cpu_family == 'x86'
+  have_x86 = true
+  conf.set10('ARCH_X86',    true)
+elif host_cpu_family == 'x86_64'
+  have_x86 = true
+  conf.set10('ARCH_X86',    true)
+  conf.set10('ARCH_X86_64', true)
+elif host_cpu_family == 'ppc'
+  have_ppc = true
+  conf.set10('ARCH_PPC',    true)
+elif host_cpu_family == 'ppc64'
+  have_ppc = true
+  conf.set10('ARCH_PPC',    true)
+  conf.set10('ARCH_PPC64',  true)
+endif
+
+
+host_os = host_machine.system().to_lower()
+message('Host os: ' + host_os)
+
+platform_linux = (
+  host_os.contains('linux')
+)
+
+platform_windows = (
+  host_os.contains('mingw') or
+  host_os.contains('cygwin') or
+  host_os.contains('windows')
+)
+
+platform_osx = (
+  host_os.contains('machten') or
+  host_os.contains('rhapsody') or
+  host_os.contains('darwin')
+)
+
+if platform_osx
+  conf.set('PLATFORM_OSX', 1)
+endif
+
+if platform_windows
+  windows = import('windows')
+  # AC_CHECK_PROG(ms_librarian, lib.exe, yes, no)
+  # AM_CONDITIONAL(MS_LIB_AVAILABLE, test "x$ms_librarian" = xyes)
+  # compiler_args += '-Wl,--large-address-aware'
+endif
+
+# on OSX ObjC and C sources are mixed so adding objc to the linkflags
+
+osx_ldflags = []
+if platform_osx
+  add_languages('objc')
+  osx_ldflags += ['-Wl,-framework,Foundation', '-Wl,-framework,AppKit', '-ObjC']
+  add_project_link_arguments(osx_ldflags, language : ['objc', 'c'])
+endif
+
+if cc.get_id() == 'gcc' and cc.version() == '7.2.0'
+  gcc_warning = '''
+    GCC 7.2.0 has a serious bug affecting GEGL/GIMP. We advise
+    against using this version of the compiler (previous and
+    further versions are fine).
+    See https://bugzilla.gnome.org/show_bug.cgi?id=787222
+  '''
+  warning(gcc_warning)
+  warnings += gcc_warning
+endif
+
+
+
+################################################################################
+# Compiler CPU extensions for optimizations
+#
+# -- Don't enable these flags project-wide, only files needing them
+# should be built with a given extension, which we do with meson simd
+# module. Otherwise GIMP would end up crashing when run on CPUs which
+# don't support all the flags supported by the compiler.
+# See merge request !262 for more details.
+
+# Note that Meson has a SIMD module which can also do this for us, but it uses
+# its own #defines and we want to stay compatible with the autotools build
+conf.set('USE_MMX', cc.has_argument('-mmmx'))
+conf.set('USE_SSE', cc.has_argument('-msse'))
+conf.set10('COMPILE_SSE2_INTRINISICS', cc.has_argument('-msse2'))
+conf.set10('COMPILE_SSE4_1_INTRINISICS', cc.has_argument('-msse4.1'))
+
+if host_cpu_family == 'ppc'
+  altivec_args = cc.get_supported_arguments([
+    '-faltivec',
+    '-maltivec',
+    '-mabi=altivec',
+  ])
+
+  if altivec_args != []
+    if host_os.contains('darwin')
+      conf.set('USE_ALTIVEC', true)
+      conf.set('HAVE_ALTIVEC_SYSCTL', true)
+    elif cc.compiles('''
+      int main() { asm ("vand %v0, %v0, %v0"); return 0; }
+      ''')
+      conf.set('USE_ALTIVEC', true)
+    endif
+  endif
+endif
+
+
+################################################################################
+# CFlags
+
+
+if get_option('profiling') and cc.get_id() == 'gcc'
+  compiler_args += '-pg'
+  linker_args   += '-pg'
+endif
+
+if get_option('ansi')
+  compiler_args += [ '-ansi', '-pedantic']
+endif
+
+warning_cflags_common = [
+  '-fdiagnostics-show-option',
+  '-fno-common',
+
+  '-Wformat',
+  '-Wformat-security',
+  '-Winit-self',
+  '-Wlogical-op',
+  '-Wmissing-declarations',
+  '-Wmissing-format-attribute',
+  '-Wpointer-arith',
+  '-Wreturn-type',
+  '-Wtype-limits',
+]
+warning_cflags_c = [
+  '-Wabsolute-value',
+  '-Wdeclaration-after-statement',
+  '-Wenum-conversion',
+  '-Wliteral-conversion',
+  '-Wno-strict-prototypes',
+  '-Wold-style-definition',
+  '-Wparentheses-equality',
+  '-W#pragma-messages',
+  '-Wsometimes-uninitialized',
+  '-Wtautological-unsigned-enum-zero-compare',
+  '-Wunneeded-internal-declaration',
+  '-Wunused-function',
+  '-Wunused-value',
+
+  '-Werror=implicit-function-declaration',
+]
+warning_cflags_cpp = [
+]
+
+compiler_args += cc.get_supported_arguments(warning_cflags_common)
+add_project_arguments(cc .get_supported_arguments(warning_cflags_c),   language: 'c')
+add_project_arguments(cxx.get_supported_arguments(warning_cflags_cpp), language: 'cpp')
+
+
+# Ensure MSVC-compatible struct packing convention is used when
+# compiling for Win32 with gcc.
+if platform_windows and cc.get_id() == 'gcc'
+  msvc_compat_args = cc.first_supported_argument([
+    '-fnative-struct',
+    '-mms-bitfields',
+  ])
+  if msvc_compat_args == []
+    error('''
+      GCC does not support '-fnative-struct' nor '-mms-bitfields'.
+      Build will be incompatible with GTK DLLs.
+    ''')
+  endif
+  compiler_args += msvc_compat_args
+endif
+
+
+conf.set('HAVE__NL_MEASUREMENT_MEASUREMENT',
+  cc.compiles('''
+    #include<langinfo.h>
+    int main() {
+      char c = *((unsigned char *)  nl_langinfo(_NL_MEASUREMENT_MEASUREMENT));
+    }
+  ''')
+)
+
+conf.set('HAVE__NL_IDENTIFICATION_LANGUAGE',
+  cc.compiles('''
+    #include<langinfo.h>
+    int main() {
+      char c = *((unsigned char *) nl_langinfo(_NL_IDENTIFICATION_LANGUAGE));
+    }
+  ''')
+)
+
+
+################################################################################
+# Dependencies
+no_dep = dependency('', required: false)
+
+################################################################################
+# Mandatory Dependencies
+
+if get_option('relocatable-bundle') == 'yes'
+  relocatable_bundle = true
+elif get_option('relocatable-bundle') == 'no'
+  relocatable_bundle = false
+else # == 'platform-default'
+  # By default, assume building for Windows or macOS everything to be on
+  # the same prefix and can be relocated.
+  # On other platforms, build-time paths are meaningful.
+  if platform_windows or platform_osx
+      relocatable_bundle = true
+  else
+      relocatable_bundle = false
+  endif
+endif
+conf.set('ENABLE_RELOCATABLE_RESOURCES', relocatable_bundle)
+
+
+math              = cc.find_library('m')
+# libdl is only required on Linux. On Windows and some (all?) BSD, it
+# doesn't exist, but the API exists in libc by default (see #8604). On
+# macOS, it apparently exists but linking it explicitly is actually
+# unneeded as well.
+dl                = cc.find_library('dl', required: platform_linux)
+rpc               = platform_windows ? cc.find_library('rpcrt4') : no_dep
+dbghelp           = platform_windows ? cc.find_library('dbghelp') : no_dep
+winsock           = platform_windows ? cc.find_library('ws2_32') : no_dep
+mscms             = platform_windows ? cc.find_library('mscms') : no_dep
+atk_minver        = '2.4.0'
+atk               = dependency('atk',                version: '>='+atk_minver)
+babl_minver       = '0.1.98'
+babl              = dependency('babl-0.1',           version: '>='+babl_minver, required: false)
+if not babl.found()
+  # babl changed its pkg-config name from 'babl' to 'babl-0.1' in version
+  # 0.1.100 (0.1.99 dev cycle more exactly). 'babl-0.1' is checked in priority
+  # because it would be a newer version.
+  babl            = dependency('babl',               version: '>='+babl_minver)
+endif
+cairo_minver      = '1.14.0'
+cairo             = dependency('cairo',              version: '>='+cairo_minver)
+
+# fontconfig_name   = platform_windows ? 'fontconfig_win32' : 'fontconfig'
+fontconfig_name   = 'fontconfig'
+fontconfig_minver = '2.12.4'
+fontconfig        = dependency(fontconfig_name,      version: '>='+fontconfig_minver)
+freetype2_minver  = '2.1.7'
+freetype2         = dependency('freetype2',          version: '>='+freetype2_minver)
+gdk_pixbuf_minver = '2.30.8'
+gdk_pixbuf        = dependency('gdk-pixbuf-2.0',     version: '>='+gdk_pixbuf_minver)
+gegl_minver       = '0.4.46'
+gegl              = dependency('gegl-0.4',           version: '>='+gegl_minver)
+exiv2_minver      = '0.27.4'
+exiv2             = dependency('exiv2',              version: '>='+exiv2_minver)
+gexiv2_minver     = '0.14.0'
+gexiv2            = dependency('gexiv2',             version: '>='+gexiv2_minver)
+
+gio               = dependency('gio-2.0')
+gio_specific_name = platform_windows ? 'gio-windows-2.0' : 'gio-unix-2.0'
+gio_specific      = dependency(gio_specific_name)
+
+glib_minver       = '2.70.0'
+glib              = dependency('glib-2.0',           version: '>='+glib_minver)
+gi                = dependency('gobject-introspection-1.0')
+
+conf.set('G_DISABLE_DEPRECATED', glib.version().version_compare('>=2.57'))
+
+gobject           = dependency('gobject-2.0',        version: '>='+glib_minver)
+gmodule           = dependency('gmodule-no-export-2.0')
+
+gtk3_minver       = '3.24.0'
+gtk3              = dependency('gtk+-3.0',           version: '>='+gtk3_minver)
+harfbuzz_minver   = '1.0.5'
+harfbuzz          = dependency('harfbuzz',           version: '>='+harfbuzz_minver)
+json_glib         = dependency('json-glib-1.0',      version: '>=1.2.6')
+lcms_minver       = '2.8'
+lcms              = dependency('lcms2',              version: '>='+lcms_minver)
+libmypaint_minver = '1.3.0'
+libmypaint        = dependency('libmypaint',         version: '>='+libmypaint_minver)
+mypaint_brushes   = dependency('mypaint-brushes-1.0',version: '>='+libmypaint_minver)
+if not libmypaint.version().version_compare('>=1.4.0')
+  libmypaint_warning='''
+
+        libmypaint lower than version 1.4.0 is known to crash when
+        parsing MyPaint 2 brushes. Please update.
+    '''
+    warning(libmypaint_warning)
+    warnings += libmypaint_warning
+endif
+
+
+if relocatable_bundle
+  mypaint_brushes_dir = '${gimp_installation_dir}'\
+                        /'share'/'mypaint-data'/'1.0'/'brushes'
+else
+  mypaint_brushes_dir = mypaint_brushes.get_variable(pkgconfig: 'brushesdir')
+endif
+
+conf.set_quoted('MYPAINT_BRUSHES_DIR', mypaint_brushes_dir)
+
+pangocairo_minver = '1.44.0'
+pangocairo        = dependency('pangocairo',         version: '>='+pangocairo_minver)
+pangoft2          = dependency('pangoft2',           version: '>=1.29.4')
+rsvg_minver       = '2.40.6'
+rsvg              = dependency('librsvg-2.0',        version: '>='+rsvg_minver)
+
+conf.set('PANGO_DISABLE_DEPRECATED',pangocairo.version().version_compare('<1.43'))
+
+
+################################################################################
+# Check for GLib Networking
+
+glib_networking_works_run=false
+glib_networking_works = true
+
+if not glib_networking_works
+  error('Test for glib-networking failed. This is required.')
+endif
+
+################################################################################
+# Check if Pango is built with a recent fontconfig
+
+pango_check = cc.links(
+  '''#include <fontconfig/fontconfig.h>
+  int main() {
+    FcObjectSet *os; os = FcObjectSetBuild (FC_FAMILY, FC_WIDTH);
+  }''',
+  dependencies: fontconfig,
+)
+
+if not pango_check
+  pango_warning = '\n  *** '.join([
+  'You have a fontconfig >= fontconfig_required_version installed on your',
+  'system, but your Pango library is using an older version. This old version',
+  'is probably in /usr/X11R6. Look at the above output, and note that the',
+  'result for FONTCONFIG_CFLAGS is not in the result for PANGOCAIRO_CFLAGS,',
+  'and that there is likely an extra -I line, other than the ones for GLIB,',
+  'Freetype, and Pango itself. That\'s where your old fontconfig files are.',
+  'Rebuild pango, and make sure that it uses the newer fontconfig.',
+  'The easiest way be sure of this is to simply get rid of the old',
+  'fontconfig. When you rebuild pango, make sure the result for',
+  'FONTCONFIG_CFLAGS is the same as the result here.',
+  ])
+  warning(pango_warning)
+  warnings += pango_warning
+endif
+
+################################################################################
+# Optional Dependencies
+
+libsocket         = cc.find_library('socket', required: false)
+conf.set('HAVE_LIBSOCKET', libsocket.found())
+
+################################################################################
+# Check for extension support
+
+appstream_glib_minver = '0.7.7'
+appstream_glib = dependency('appstream-glib', version: '>='+appstream_glib_minver)
+
+libarchive = dependency('libarchive')
+
+
+################################################################################
+# Check for debug console (Win32)
+
+if platform_windows
+  conf.set('ENABLE_WIN32_DEBUG_CONSOLE', get_option('win32-debug-console'))
+endif
+
+################################################################################
+# Check for 32-bit DLLs (Win32 64-bit)
+
+if platform_windows and host_cpu_family == 'x86_64'
+  conf.set_quoted('WIN32_32BIT_DLL_FOLDER', get_option('win32-32bits-dll-folder'))
+endif
+
+################################################################################
+# Check for detailed backtraces support
+
+## Check for libbacktrace
+
+if get_option('libbacktrace')
+  libbacktrace = cc.find_library('backtrace', required: false)
+
+  if libbacktrace.found()
+    libbacktrace_links = cc.links('''
+        #include <stddef.h>
+        #include <backtrace.h>
+        #include <backtrace-supported.h>
+
+        #if ! BACKTRACE_SUPPORTED
+        #   error ! BACKTRACE_SUPPORTED
+        #endif
+
+        int main() {
+          (void) backtrace_create_state (NULL, 0, NULL, NULL);
+          return 0;
+        }
+      ''',
+      dependencies: libbacktrace,
+    )
+
+    if not libbacktrace_links
+      warning(
+        'libbacktrace was found, but the test compilation failed.\n' +
+        'You can find more info in meson-logs/meson-logs.txt.'
+      )
+      libbacktrace = no_dep
+    endif
+
+  endif
+else
+  libbacktrace = no_dep
+endif
+conf.set('HAVE_LIBBACKTRACE', libbacktrace.found())
+
+## Check for libunwind
+libunwind = ( get_option('libunwind')
+  ? dependency('libunwind', version: '>=1.1.0', required: false)
+  : no_dep
+)
+conf.set('HAVE_LIBUNWIND', libunwind.found())
+
+
+## Check for Dr. Mingw
+drmingw = no_dep
+if platform_windows
+  exchndl = cc.find_library('exchndl', required: false)
+  exchndl_fn = cc.has_function('ExcHndlSetLogFileNameW', dependencies: exchndl)
+  if exchndl.found() and exchndl_fn
+    drmingw = declare_dependency(dependencies: exchndl)
+  endif
+endif
+conf.set('HAVE_EXCHNDL', drmingw.found())
+
+
+detailed_backtraces = (
+  libbacktrace.found() or
+  libunwind.found() or
+  drmingw.found()
+)
+
+################################################################################
+# Check for x11 support
+
+x11_target = gtk3.get_variable(pkgconfig: 'targets').contains('x11')
+
+x11   = x11_target ? dependency('x11')    : no_dep
+xmu   = x11_target ? dependency('xmu')    : no_dep
+xext  = x11_target ? dependency('xext')   : no_dep
+xfixes= x11_target ? dependency('xfixes') : no_dep
+x11_deps = [ x11, xmu, xext, xfixes ]
+conf.set('HAVE_XFIXES', xfixes.found())
+
+if x11_target
+  foreach header : [ 'X11/Xmu/WinUtil.h', 'X11/extensions/shape.h', ]
+    if not cc.has_header(header, dependencies: [ xext, xmu ])
+      error('x11 install does not provide required header ' + header)
+    endif
+  endforeach
+
+  foreach function : [ 'XmuClientWindow', 'XShapeGetRectangles', ]
+    if not cc.has_function(function, dependencies: [ xext, xmu ])
+      error('x11 install does not provide required function ' + function)
+    endif
+  endforeach
+endif
+conf.set('HAVE_X11_EXTENSIONS_SHAPE_H',
+  x11_target and cc.has_header('X11/extensions/shape.h'))
+conf.set('HAVE_X11_XMU_WINUTIL_H',
+  x11_target and cc.has_header('X11/Xmu/WinUtil.h'))
+
+
+have_print = get_option('print')
+
+# Features requiring x11
+
+have_doc_shooter= x11_target
+
+################################################################################
+# Plugins (optional dependencies)
+
+# The list of MIME types that are supported by plug-ins
+MIMEtypes = [
+  'image/bmp',
+  'image/g3fax',
+  'image/gif',
+  'image/svg+xml',
+  'image/x-compressed-xcf',
+  'image/x-fits',
+  'image/x-gimp-gbr',
+  'image/x-gimp-gih',
+  'image/x-gimp-pat',
+  'image/x-pcx',
+  'image/x-portable-anymap',
+  'image/x-portable-bitmap',
+  'image/x-portable-graymap',
+  'image/x-portable-pixmap',
+  'image/x-psd',
+  'image/x-sgi',
+  'image/x-sun-raster',
+  'image/x-tga',
+  'image/x-xbitmap',
+  'image/x-xcf',
+  'image/x-xwindowdump',
+]
+
+
+
+libtiff_minver = '4.0.0'
+libtiff = dependency('libtiff-4', version: '>=' + libtiff_minver)
+MIMEtypes += 'image/tiff'
+
+
+libjpeg = dependency('libjpeg')
+MIMEtypes += 'image/jpeg'
+
+
+zlib = dependency('zlib')
+MIMEtypes += 'image/x-psp'
+
+bz2 = cc.find_library('bz2')
+
+liblzma_minver = '5.0.0'
+liblzma = dependency('liblzma', version: '>='+liblzma_minver)
+
+
+ghostscript = cc.find_library('gs', required: get_option('ghostscript'))
+if ghostscript.found()
+  MIMEtypes += 'application/postscript'
+else
+  ghostscript = disabler()
+endif
+
+libpng_minver = '1.6.25'
+libpng = dependency('libpng', version: '>='+libpng_minver)
+MIMEtypes += [ 'image/png', 'image/x-icon']
+
+libmng = dependency('libmng', required: get_option('mng'))
+
+if not libmng.found()
+  libmng = cc.find_library('mng', required: get_option('mng'),)
+
+  mng_test_prefix = ''
+  if platform_windows
+    mng_test_prefix = '#define MNG_USE_DLL\n#include <libmng.h>'
+  endif
+  if libmng.found() and not cc.has_function('mng_create', dependencies: libmng,
+                                            prefix: mng_test_prefix)
+    libmng = no_dep
+  endif
+endif
+
+libaa = cc.find_library('aa', required: get_option('aa'))
+
+libxpm = dependency('xpm', required: get_option('xpm'))
+if libxpm.found()
+  MIMEtypes += 'image/x-xpixmap'
+endif
+
+have_qoi = cc.has_header('qoi.h')
+if have_qoi
+  MIMEtypes += 'image/qoi'
+endif
+
+have_ilbm = cc.has_header('libilbm/ilbm.h')
+if have_ilbm
+  MIMEtypes += 'image/x-ilbm'
+endif
+
+openexr_minver = '1.6.1'
+openexr = dependency('OpenEXR', version: '>='+openexr_minver,
+  required: get_option('openexr')
+)
+if openexr.found()
+  MIMEtypes += 'image/x-exr'
+endif
+
+webp_minver = '0.6.0'
+webp_libs = [
+  dependency('libwebp',     version: '>='+webp_minver, required: get_option('webp')),
+  dependency('libwebpmux',  version: '>='+webp_minver, required: get_option('webp')),
+  dependency('libwebpdemux',version: '>='+webp_minver, required: get_option('webp')),
+]
+webp_found = true
+foreach lib : webp_libs
+  webp_found = webp_found and  lib.found()
+endforeach
+
+if webp_found
+  MIMEtypes += [
+    'image/x-webp',
+    'image/webp'
+  ]
+endif
+
+libheif_minver = '1.3.2'
+libheif = dependency('libheif', version: '>='+libheif_minver,
+  required: get_option('heif')
+)
+conf.set('HAVE_LIBHEIF_1_4_0', libheif.version().version_compare('>=1.4.0'))
+conf.set('HAVE_LIBHEIF_1_6_0', libheif.version().version_compare('>=1.6.0'))
+
+can_import_heic = false
+can_export_heic = false
+can_import_avif = false
+can_export_avif = false
+
+have_heif = libheif.found()
+libheif_warning=''
+if have_heif
+  have_heif = true
+
+  if meson.can_run_host_binaries()
+    can_import_heic = cc.run('''
+    #include <libheif/heif.h>
+    int main() {
+      int success;
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_init (NULL);
+      #endif
+      success = heif_have_decoder_for_format (heif_compression_HEVC);
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_deinit ();
+      #endif
+
+      if (success)
+        return 0;
+      else
+        return 1;
+    }
+    ''',
+    dependencies: [ libheif ],
+    name: 'import HEIC').returncode() == 0
+
+    can_export_heic = cc.run('''
+    #include <libheif/heif.h>
+    int main() {
+      int success;
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_init (NULL);
+      #endif
+      success = heif_have_encoder_for_format (heif_compression_HEVC);
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_deinit ();
+      #endif
+
+      if (success)
+        return 0;
+      else
+        return 1;
+    }
+    ''',
+    dependencies: [ libheif ],
+    name: 'export HEIC').returncode() == 0
+
+    can_import_avif = cc.run('''
+    #include <libheif/heif.h>
+    int main() {
+      int success;
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_init (NULL);
+      #endif
+      success = heif_have_decoder_for_format (heif_compression_AV1);
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_deinit ();
+      #endif
+
+      if (success)
+        return 0;
+      else
+        return 1;
+    }
+    ''',
+    dependencies: [ libheif ],
+    name: 'import AVIF').returncode() == 0
+
+    can_export_avif = cc.run('''
+    #include <libheif/heif.h>
+    int main() {
+      int success;
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_init (NULL);
+      #endif
+      success = heif_have_encoder_for_format (heif_compression_AV1);
+      #if LIBHEIF_HAVE_VERSION(1,13,0)
+      heif_deinit ();
+      #endif
+
+      if (success)
+        return 0;
+      else
+        return 1;
+    }
+    ''',
+    dependencies: [ libheif ],
+    name: 'export AVIF').returncode() == 0
+  else
+    # When cross-compiling and we can't run our test binaries.
+    can_import_heic = true
+    can_export_heic = true
+    can_import_avif = true
+    can_export_avif = true
+  endif
+
+  if not can_import_heic and not can_import_avif
+    have_heif = false
+  endif
+
+  if have_heif
+    # Listing support for both HEIC and AVIF if we build with HEIF support,
+    # because codecs can be added at any time later and we won't be able to edit
+    # the desktop file once it's installed. See discussion in #9080.
+    MIMEtypes += [
+      'image/heif',
+      'image/heic',
+      'image/avif'
+    ]
+  endif
+
+  if have_heif and (libheif.version().version_compare('==1.5.0') or libheif.version().version_compare('==1.5.1'))
+    libheif_warning='''
+
+          libheif version 1.5.0 and 1.5.1 are known to crash when
+          exporting (bug #4185). Please update.
+      '''
+      warning(libheif_warning)
+      warnings += libheif_warning
+  endif
+endif
+
+have_vala = add_languages('vala', required: get_option('vala'), native: false)
+if have_vala
+  babl = declare_dependency(
+    dependencies: [
+      babl,
+      meson.get_compiler('vala').find_library('babl-0.1'),
+    ]
+  )
+
+  # TODO: remove this once we release 3.0
+  valac = meson.get_compiler('vala')
+  if valac.version().version_compare('>= 0.31.1')
+    add_project_arguments('--disable-since-check', language: 'vala')
+  endif
+endif
+
+# We disable WebkitGTK as default for now and discourage its use because
+# it is just a horror to build, is not available on Windows anymore
+# (AFAIK), and features brought are not worth the pain. We still leave
+# the code because mitch wants us to be able to look at it later, maybe
+# reinstate it through some shape or another. Yet for now, it is to be
+# considered non-existing feature for packager point of view. It is only
+# there in the hope developers get it back in shape.
+webkit_minver = '2.20.3'
+if get_option('webkit-unmaintained')
+  webkit = dependency('webkit2gtk-4.0', version: '>=' + webkit_minver)
+endif
+conf.set('HAVE_WEBKIT', get_option('webkit-unmaintained'))
+
+poppler_minver = '0.69.0'
+poppler_data_minver = '0.4.9'
+poppler = [
+  dependency('poppler-glib', version: '>='+poppler_minver),
+  dependency('poppler-data', version: '>='+poppler_data_minver),
+]
+
+cairopdf_minver = '1.12.2'
+cairopdf = dependency('cairo-pdf', version: '>='+cairopdf_minver,
+  required: get_option('cairo-pdf')
+)
+
+# PDF import support is a granted feature.
+MIMEtypes += 'application/pdf'
+
+wmf_minver = '0.2.8'
+wmf = dependency('libwmf', version: '>='+wmf_minver,
+  required: get_option('wmf')
+)
+if wmf.found()
+  MIMEtypes += 'image/x-wmf'
+endif
+
+openjpeg_minver = '2.1.0'
+openjpeg = dependency('libopenjp2', version: '>='+openjpeg_minver,
+  required: get_option('jpeg2000')
+)
+if openjpeg.found()
+  MIMEtypes += [ 'image/jp2', 'image/jpeg2000', 'image/jpx', ]
+endif
+
+jpegxl_minver  = '0.7.0'
+libjxl         = dependency('libjxl',
+                            version: '>='+jpegxl_minver,
+                            required: get_option('jpeg-xl')
+)
+libjxl_threads = dependency('libjxl_threads',
+                            version: '>='+jpegxl_minver,
+                            required: get_option('jpeg-xl')
+)
+if libjxl.found() and libjxl_threads.found()
+  MIMEtypes += 'image/jxl'
+endif
+
+xmc = dependency('xcursor', required: get_option('xcursor'))
+if xmc.found()
+  MIMEtypes += 'image/x-xcursor'
+endif
+
+
+alsa = dependency('alsa', version: '>=1.0.0', required: get_option('alsa'))
+conf.set('HAVE_ALSA', alsa.found())
+
+# Linux Input
+
+if get_option('linux-input').disabled()
+  have_linuxinput = false
+else
+  have_linuxinput = cc.has_header('linux/input.h',
+                                  required: get_option('linux-input'))
+endif
+
+if have_linuxinput
+  gudev = dependency('gudev-1.0', version: '>=167', required: get_option('gudev'))
+else
+  gudev = no_dep
+endif
+conf.set('HAVE_LIBGUDEV', gudev.found())
+
+
+# DirectX DirectInput
+directx = no_dep
+directx_sdk_path = get_option('directx-sdk-dir')
+if directx_sdk_path != '' and platform_windows
+  if directx_sdk_path.contains(' ') or directx_sdk_path.contains('\\')
+    error('\n'.join([
+      'The DirectX SDK path should be given :',
+      '* without spaces (use MSys mounts)',
+      '* with plain (forward) slashes only,'
+    ]))
+  endif
+
+  directx = declare_dependency(
+    dependencies: cc.find_library('dxguid',
+                                  dirs: directx_sdk_path / 'Lib' / 'x86'),
+    include_directories: directx_sdk_path / 'Include',
+  )
+endif
+conf.set('HAVE_DX_DINPUT', directx.found())
+
+cfitsio_dep = dependency('cfitsio', required: false)
+if cfitsio_dep.found()
+  MIMEtypes += 'image/fits'
+endif
+
+
+################################################################################
+# Email sending
+email_message = false
+
+sendmail_choice = get_option('with-sendmail')
+if not [ '', 'false', 'no', ].contains(sendmail_choice)
+  if [ 'true', 'yes' ].contains(sendmail_choice)
+    sendmail_path = 'sendmail'
+  else
+    sendmail_path = sendmail_choice
+  endif
+
+  sendmail = find_program(sendmail_path, required: false)
+  if sendmail.found()
+    sendmail_path = sendmail.path()
+  else
+    mail_warning = 'Sendmail specified but not found. It should be installed at runtime!'
+    warning(mail_warning)
+    warnings += mail_warning
+  endif
+
+  email_message = '@0@ (@1@)'.format(true, sendmail_path)
+  conf.set_quoted('SENDMAIL', sendmail_path)
+else
+  xdg_email_path = 'xdg-email'
+  xdg_email = find_program(xdg_email_path, required: false)
+  if xdg_email.found()
+    xdg_email_path = xdg_email.full_path()
+  else
+    mail_warning = 'Xdg-email not found, but required at runtime for email sending.'
+    warning(mail_warning)
+    warnings += mail_warning
+  endif
+
+  email_message = '@0@ (@1@)'.format(true, xdg_email_path)
+endif
+
+
+################################################################################
+# ISO codes
+
+isocodes = dependency('iso-codes', required: false)
+if isocodes.found()
+  isocodes_prefix = isocodes.get_variable(pkgconfig: 'prefix')
+  isocodes_location = isocodes_prefix / get_option('datadir') / 'xml' / 'iso-codes'
+  isocodes_localedir= isocodes_prefix / get_option('datadir') / 'locale'
+endif
+conf.set('HAVE_ISO_CODES', isocodes.found())
+
+
+################################################################################
+# Program tools
+
+perl = find_program('perl5', 'perl', 'perl5.005', 'perl5.004', 'perl')
+
+## Python
+
+# By default, we want packagers to install Python plug-ins to get the
+# optimum experience. -Dpython=true will check for a Python 3
+# interpreter and PyGObject, and warns without.
+# It is up to the packager to ensure they are available at run time.
+# This can be useful in particular when cross-compiling since anyway
+# the interpreter is not useful at build time.
+
+python3_minver = '>=3.6'
+
+python = pythonmod.find_installation('python3')
+message('Found Python @0@'.format(python.language_version()))
+
+have_python = get_option('python').enabled()
+
+python_found = true
+MIMEtypes += 'image/openraster'
+
+## Javascript
+
+gjs = find_program('gjs', required: get_option('javascript'))
+have_javascript = get_option('javascript').enabled() or (gjs.found() and get_option('javascript').auto())
+if not gjs.found() and have_javascript
+  gjs = find_program('gjs', required: false)
+  if not gjs.found()
+    js_warning = '''
+    GJS was not found.
+    JavaScript plug-ins will be installed anyway but you should make sure that
+    the JavaScript interpreter GJS is available at installation, otherwise
+    installed plug-ins won't be usable.
+    '''
+    warning(js_warning)
+    warnings += js_warning
+  endif
+endif
+
+## Lua
+
+lua = find_program('luajit', required: get_option('lua'))
+have_lua = get_option('lua').enabled() or (lua.found() and get_option('lua').auto())
+if not lua.found() and have_lua
+  lua_warning = '''
+  Luajit was not found.
+  Lua plug-ins will be installed anyway but you should make sure that
+  luajit and LGI are available at installation, otherwise
+  installed plug-ins won't be usable.
+  '''
+  warning(lua_warning)
+  warnings += lua_warning
+endif
+
+
+# Check for XML tools
+xmllint             = find_program('xmllint', required: false)
+xsltproc            = find_program('xsltproc')
+desktop_validate    = find_program('desktop-file-validate', required: false)
+
+appstreamcli = find_program('appstreamcli', version: '>=0.15.3', required: get_option('appdata-test'))
+
+# Check for doc generation tools
+
+gi_docgen = find_program('gi-docgen', required: get_option('gi-docgen'))
+
+if get_option('g-ir-doc')
+  gir_doc_tool = find_program('g-ir-doc-tool', required: true)
+  yelp_build   = find_program('yelp-build', required: true)
+endif
+
+# Check for vector icons
+have_vector_icons = get_option('vector-icons')
+if have_vector_icons
+  # shared-mime-info is needed to correctly detect SVG files
+  # (except on Windows, apparently).
+  if platform_windows
+    vec_warning = '''
+      You enabled vector icons on Win32. Make sure to run:
+      $ gdk-pixbuf-query-loaders.exe --update-cache
+      on the target machine (this command generates loaders.cache)
+      so that GdkPixbuf knows where to find the SVG loader.
+    '''
+    warning(vec_warning)
+    warnings += vec_warning
+  else
+    shared_mime_info = dependency('shared-mime-info')
+  endif
+else
+  # The trick when disabling vector icons is that librsvg is still
+  # needed at compile time (on build machine) to generate PNG, even
+  # though it won't be needed at runtime for icon display.
+  #
+  # The tool gtk-encode-symbolic-svg also requires a SVG GdkPixbuf
+  # loader, which usually uses librsvg as well anyway.
+  vec_warning = '''
+    Vector icons are disabled. Be aware that librsvg is still
+    needed to create the PNG icons on the build machine, yet it
+    won't be needed for runtime icon display of distributed themes.
+  '''
+  warning(vec_warning)
+  warnings += vec_warning
+endif
+
+native_glib_minver = '2.2.0'
+native_glib = dependency('glib-2.0',    version: '>='+native_glib_minver, native: true)
+native_rsvg = dependency('librsvg-2.0', version: '>='+rsvg_minver, native: true)
+
+# Running tests headless
+xvfb_run = find_program('xvfb-run', required: get_option('headless-tests'))
+dbus_run_session = find_program('dbus-run-session', required: get_option('headless-tests'))
+if xvfb_run.found() and dbus_run_session.found()
+  conf.set('HAVE_XVFB_RUN', true)
+  add_test_setup('headless',
+    exe_wrapper: find_program('build' / 'meson' / 'run_test_env.sh'),
+    is_default: true,
+  )
+endif
+
+# Set bug report URL
+
+# Allowing third-party packagers to set their own bugtracker URL, in
+# order to filter first packaging bugs from core bugs.
+bug_report_url = get_option('bug-report-url')
+
+if bug_report_url == ''
+  message('''
+    NOTE: if you plan on packaging GIMP for distribution, it is recommended
+    to override the bug report URL with option:
+      -Dbug-report-url=https://example.com/
+    so that you can filter packaging bugs from core bugs before reporting upstream.
+  ''')
+
+  bug_report_url = project_url_issues
+endif
+conf.set_quoted('PACKAGE_BUGREPORT', project_url_issues)
+conf.set_quoted('BUG_REPORT_URL', bug_report_url)
+
+# Build identifiers #
+
+conf.set_quoted('GIMP_BUILD_ID', get_option('build-id'))
+conf.set_quoted('GIMP_BUILD_PLATFORM', host_os)
+if platform_linux
+  conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'linux')
+elif platform_windows
+  conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'windows')
+elif platform_osx
+  conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'macos')
+else
+  conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'other')
+endif
+
+if get_option('check-update') == 'yes'
+  check_update = true
+elif get_option('check-update') == 'no'
+  check_update = false
+else # == 'platform-default'
+  if platform_windows or platform_osx
+    check_update = true
+  else
+    # Other packages usually have their own update system (software
+    # repositories on Linux and other *BSDs for instance) so we
+    # shouldn't notify about new versions, at least not as a default.
+    check_update = false
+  endif
+endif
+conf.set('CHECK_UPDATE', check_update)
+
+# Default ICC directory #
+
+# This is necessary because some Unix systems may have a different
+# standard path for color profiles. And in particular, sandbox builds
+# might mount the host system at a different root. This is for
+# instance the case of flatpak which mount the host root at /run/host/.
+
+# if not (platform_osx or platform_windows)
+
+icc_directory = get_option('icc-directory')
+if icc_directory == ''
+  icc_directory = '/usr/share/color/icc'
+endif
+conf.set_quoted('COLOR_PROFILE_DIRECTORY', icc_directory)
+
+# endif
+
+if get_option('enable-default-bin').auto()
+  enable_default_bin = stable
+elif get_option('enable-default-bin').enabled()
+  enable_default_bin = true
+else
+  enable_default_bin = false
+endif
+
+enable_console_bin = get_option('enable-console-bin')
+
+if enable_default_bin and meson.version().version_compare('<0.61.0')
+  error('"enable-default-bin" build option requires meson 0.61 or later. Please disable the option or update meson.')
+endif
+
+# Possibly change default gimpdir from $XDG_CONFIG_HOME/GIMP/gimp_user_version
+gimpdir = get_option('gimpdir')
+if gimpdir == ''
+  # Default value
+  gimpdir = meson.project_name().to_upper()
+endif
+
+project_subdir = meson.project_name() / gimp_app_version
+gimpdatadir    = get_option('datadir')    / project_subdir
+gimpplugindir  = get_option('libdir')     / project_subdir
+gimpsysconfdir = get_option('sysconfdir') / project_subdir
+gimpmanpagedir = gimpdir
+localedir      = get_option('datadir') / 'locale'
+
+
+
+# Check for internal tools
+extract_vector_icon = find_program('tools'/'extract-vector-icon.sh')
+generate_changelog  = find_program('tools'/'generate_changelog.sh')
+generate_news       = find_program('tools'/'generate-news')
+gimppath2svg        = find_program('tools'/'gimppath2svg.py')
+module_dependencies = find_program('tools'/'module-dependencies.py')
+meson_install_subdir= find_program('tools'/'meson_install_subdir.py')
+
+gimp_mkenums = find_program('tools' / 'gimp-mkenums')
+mkenums_wrap = find_program(meson.current_source_dir() / 'tools' / 'meson-mkenums.sh')
+
+libgimp_mkenums_dtails = \
+    '    { 0, NULL, NULL }\n'                                                      + \
+    '  };\n'                                                                       + \
+    '\n'                                                                           + \
+    '  static GType type = 0;\n'                                                   + \
+    '\n'                                                                           + \
+    '  if (G_UNLIKELY (! type))\n'                                                 + \
+    '    {\n'                                                                      + \
+    '      type = g_@type@_register_static ("@EnumName@", values);\n'              + \
+    '      gimp_type_set_translation_domain (type, GETTEXT_PACKAGE "-libgimp");\n' + \
+    '      gimp_type_set_translation_context (type, "@enumnick@");\n'              + \
+    '      gimp_@type@_set_value_descriptions (type, descs);\n'                    + \
+    '    }\n'                                                                      + \
+    '\n'                                                                           + \
+    '  return type;\n'                                                             + \
+    '}\n'
+
+conf.set('ENABLE_NLS',   true)
+conf.set('HAVE_GETTEXT', true)
+
+# localedir = get_option('prefix') / get_option('localedir')
+
+
+################################################################################
+# Miscellaneous configuration
+
+#     #
+##   ## #  ####   ####
+# # # # # #      #    #
+#  #  # #  ####  #
+#     # #      # #
+#     # # #    # #    #
+#     # #  ####   ####
+
+
+
+# Enable support for multiprocessing
+conf.set10('ENABLE_MP', get_option('enable-multiproc'))
+
+# Enable support for OpenMP
+openmp = dependency('openmp', required : false)
+if openmp.found()
+  have_openmp = true
+else
+  have_openmp = false
+endif
+conf.set('HAVE_OPENMP', have_openmp)
+
+# Check for available functions
+foreach fn : [
+    { 'm': 'HAVE_ALLOCA',                   'v': 'alloca', },
+    { 'm': 'HAVE_DCGETTEXT',                'v': 'dcgettext', },
+    { 'm': 'HAVE_DIFFTIME',                 'v': 'difftime', },
+    { 'm': 'HAVE_FSYNC',                    'v': 'fsync', },
+    { 'm': 'HAVE_GETADDRINFO',              'v': 'getaddrinfo', },
+    { 'm': 'HAVE_GETNAMEINFO',              'v': 'getnameinfo', },
+    { 'm': 'HAVE_GETTEXT',                  'v': 'gettext', },
+    { 'm': 'HAVE_MMAP',                     'v': 'mmap', },
+    { 'm': 'HAVE_RINT',                     'v': 'rint', },
+    { 'm': 'HAVE_THR_SELF',                 'v': 'thr_self', },
+    { 'm': 'HAVE_VFORK',                    'v': 'vfork', },
+  ]
+  conf.set(fn['m'],
+    cc.has_function(fn['v']) ? 1 : false
+  )
+endforeach
+
+conf.set('HAVE_BIND_TEXTDOMAIN_CODESET',
+  cc.has_header_symbol('libintl.h', 'bind_textdomain_codeset') ? 1 : false
+)
+conf.set('HAVE_VPRINTF',
+  cc.has_header_symbol('libintl.h', 'vprintf') ? 1 : false
+)
+
+
+# Check for available headers
+foreach header : [
+    { 'm': 'HAVE_ALLOCA_H',       'v': 'alloca.h' },
+    { 'm': 'HAVE_DLFCN_H',        'v': 'dlfcn.h' },
+    { 'm': 'HAVE_FCNTL_H',        'v': 'fcntl.h' },
+    { 'm': 'HAVE_IEEEFP_H',       'v': 'ieeefp.h' },
+    { 'm': 'HAVE_INTTYPES_H',     'v': 'inttypes.h' },
+    { 'm': 'HAVE_LOCALE_H',       'v': 'locale.h' },
+    { 'm': 'HAVE_MATH_H',         'v': 'math.h' },
+    { 'm': 'HAVE_MEMORY_H',       'v': 'memory.h' },
+    { 'm': 'HAVE_STDINT_H',       'v': 'stdint.h' },
+    { 'm': 'HAVE_STDLIB_H',       'v': 'stdlib.h' },
+    { 'm': 'HAVE_STRING_H',       'v': 'string.h' },
+    { 'm': 'HAVE_STRINGS_H',      'v': 'strings.h' },
+    { 'm': 'HAVE_SYS_PARAM_H',    'v': 'sys/param.h' },
+    { 'm': 'HAVE_SYS_PRCTL_H',    'v': 'sys/prctl.h' },
+    { 'm': 'HAVE_SYS_SELECT_H',   'v': 'sys/select.h' },
+    { 'm': 'HAVE_SYS_STAT_H',     'v': 'sys/stat.h' },
+    { 'm': 'HAVE_SYS_THR_H',      'v': 'sys/thr.h' },
+    { 'm': 'HAVE_SYS_TIME_H',     'v': 'sys/time.h' },
+    { 'm': 'HAVE_SYS_TIMES_H',    'v': 'sys/times.h' },
+    { 'm': 'HAVE_SYS_TYPES_H',    'v': 'sys/types.h' },
+    { 'm': 'HAVE_SYS_WAIT_H',     'v': 'sys/wait.h' },
+    { 'm': 'HAVE_UNISTD_H',       'v': 'unistd.h' },
+    { 'm': 'HAVE_MMAN_H',         'v': 'sys/mman.h' },
+    { 'm': 'HAVE_IPC_H',          'v': 'sys/ipc.h' },
+    { 'm': 'HAVE_SHM_H',          'v': 'sys/shm.h' },
+  ]
+  conf.set(header['m'], cc.has_header(header['v']) ? 1 : false)
+endforeach
+
+# In musl, backtrace() is in the libexecinfo library.
+# In glibc, it is internal (there we only need the header).
+# So we look for both cases, so that we are able to link to libexecinfo
+# if it exists. Cf. !455.
+opt_execinfo = cc.find_library('execinfo', has_headers: ['execinfo.h'], required: false)
+conf.set('HAVE_EXECINFO_H', opt_execinfo.found() or cc.has_header('execinfo.h') ? 1 : false)
+
+
+################################################################################
+# Check for shared memory handling
+
+shmem_choice = get_option('shmem-type')
+if shmem_choice == 'auto'
+  shmem_choice = 'sysv'
+
+  # MacOS X has broken SysV shm
+  if platform_osx
+    shmem_choice = 'posix'
+  endif
+  if platform_windows
+    shmem_choice = 'win32'
+  endif
+endif
+
+conf.set('USE_SYSV_SHM', true)
+
+conf.set('NO_FD_SET',
+  not platform_windows
+  and not cc.compiles('''
+    #include <sys/types.h>
+    int main() { fd_set readMask, writeMask; return 0; }
+  ''')
+)
+
+# GCC attributes
+conf.set('HAVE_FUNC_ATTRIBUTE_DESTRUCTOR',
+  cc.compiles('''__attribute__ ((destructor)) void destructor_fn(void) { }''')
+)
+
+
+
+
+################################################################################
+# Set/regroup common CFlags for subdirs
+
+######
+#     # ###### ###### # #    # ######  ####
+#     # #      #      # ##   # #      #
+#     # #####  #####  # # #  # #####   ####
+#     # #      #      # #  # # #           #
+#     # #      #      # #   ## #      #    #
+######  ###### #      # #    # ######  ####
+
+# Compiler
+conf.set_quoted('CC',             cc.get_id())
+
+cc_version=''
+if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
+  cc_cmd = run_command(cc, '-v', check: false)
+  # Note: the call might actually fail when using ccache.
+  # See: https://github.com/mesonbuild/meson/issues/6174
+  if cc_cmd.returncode() == 0
+    cc_version = cc_cmd.stdout() + cc_cmd.stderr()
+  endif
+else
+  # Various compilers have various options. Try most common ones. This
+  # list of options comes from autotools checks.
+  foreach arg : [ '--version', '-v', '-V', '-qversion' ]
+    cc_cmd = run_command(cc, arg, check: false)
+    if cc_cmd.returncode() == 0
+      cc_version = cc_cmd.stdout()
+    endif
+  endforeach
+endif
+if cc_version == ''
+  # We didn't manage to get a meaningful verbose version from the
+  # compiler. Just save its name and version.
+  cc_version = cc.get_id() + ' ' + cc.version()
+else
+  if platform_windows
+    # On Windows the CC_VERSION string can contain backslashes in paths,
+    # specifically in COLLECT_GCC. Replace by slashes.
+    cc_version = '/'.join(cc_version.split('\\'))
+  endif
+  # See also: https://github.com/mesonbuild/meson/pull/6179
+  cc_version = '\\n'.join(cc_version.split('\n'))
+endif
+conf.set_quoted('CC_VERSION',     cc_version.strip())
+
+# Names
+conf.set_quoted('GIMP_PACKAGE',   meson.project_name())
+conf.set_quoted('PACKAGE_NAME',   meson.project_name())
+conf.set_quoted('PACKAGE_STRING', package_string)
+conf.set_quoted('GIMP_COMMAND',   gimp_command)
+
+# Versions
+conf.set_quoted('GIMP_APP_VERSION_STRING',gimp_app_version)
+conf.set_quoted('GIMP_APP_VERSION',       gimp_app_version)
+conf.set_quoted('GIMP_USER_VERSION',      gimp_app_version)
+
+conf.set_quoted('GIMP_DATA_VERSION',      gimp_app_version)
+conf.set_quoted('GIMP_PLUGIN_VERSION',    gimp_app_version)
+conf.set_quoted('GIMP_SYSCONF_VERSION',   gimp_app_version)
+conf.set_quoted('GIMP_TOOL_VERSION',      gimp_app_version)
+conf.set_quoted('GIMP_PKGCONFIG_VERSION', gimp_api_version)
+
+# Directories
+conf.set_quoted('PREFIX',          prefix)
+conf.set_quoted('EXEC_PREFIX',     prefix)
+conf.set_quoted('GIMPDIR',         gimpdir)
+conf.set_quoted('GIMPSYSCONFDIR',  prefix / gimpsysconfdir)
+conf.set_quoted('GIMPDATADIR',     prefix / gimpdatadir)
+conf.set_quoted('GIMPPLUGINDIR',   prefix / gimpplugindir)
+conf.set_quoted('PLUGINDIR',       prefix / gimpplugindir)
+conf.set_quoted('LOCALEDIR',       prefix / localedir)
+conf.set_quoted('DESKTOP_DATADIR', prefix / get_option('datadir'))
+
+conf.set_quoted('LOCALSTATEDIR',   prefix / get_option('localstatedir'))
+# /usr/com?
+conf.set_quoted('SHAREDSTATEDIR',  prefix / get_option('sharedstatedir'))
+conf.set_quoted('SYSCONFDIR',      prefix / get_option('sysconfdir'))
+conf.set_quoted('BINDIR',          prefix / get_option('bindir'))
+conf.set_quoted('DATAROOTDIR',     prefix / get_option('datadir'))
+conf.set_quoted('INFODIR',         prefix / get_option('infodir'))
+conf.set_quoted('LIBDIR',          prefix / get_option('libdir'))
+conf.set_quoted('LIBEXECDIR',      prefix / get_option('libexecdir'))
+conf.set_quoted('MANDIR',          prefix / get_option('mandir'))
+conf.set_quoted('SBINDIR',         prefix / get_option('sbindir'))
+conf.set_quoted('SYSDATADIR',      prefix / get_option('datadir'))
+
+# Third-party/Misc
+if isocodes.found()
+  conf.set_quoted('ISO_CODES_LOCATION',    isocodes_location)
+  conf.set_quoted('ISO_CODES_LOCALEDIR',   isocodes_localedir)
+endif
+
+
+if platform_osx
+  # libgimp_cflags += '-xobjective-c'
+  # libgimp_lflags += ['-framework', 'Cocoa']
+endif
+
+
+################################################################################
+# Generate files
+
+  #####                                   #######
+ #     #  ####  #    # ###### #  ####     #       # #      ######  ####
+ #       #    # ##   # #      # #    #    #       # #      #      #
+ #       #    # # #  # #####  # #         #####   # #      #####   ####
+ #       #    # #  # # #      # #  ###    #       # #      #           #
+ #     # #    # #   ## #      # #    #    #       # #      #      #    #
+  #####   ####  #    # #      #  ####     #       # ###### ######  ####
+
+
+# git-version.h is already present and not generated if dist tarball
+is_git_repository = run_command(python, '-c',
+  'import sys,os; sys.exit(0 if os.path.exists(".git") else 1)',
+  check: false
+).returncode() == 0
+
+has_version_h = run_command(python, '-c',
+  'import sys,os; sys.exit(0 if os.path.exists("git-version.h") else 1)',
+  check: false
+).returncode() == 0
+
+generate_version_h = is_git_repository or not has_version_h
+if generate_version_h
+  gitversion_h1 = vcs_tag(
+    input : 'app/git-version.h.in',
+    output: 'git-version.h.in.1',
+    command: [ 'git', 'describe', '--always', ],
+    replace_string: '@GIMP_GIT_VERSION@',
+    fallback: 'unknown (unsupported)',
+  )
+  gitversion_h2 = vcs_tag(
+    input : gitversion_h1,
+    output: 'git-version.h.in.2',
+    command: [ 'git', 'rev-parse', '--short', 'HEAD', ],
+    replace_string: '@GIMP_GIT_VERSION_ABBREV@',
+    fallback: 'unknown (unsupported)',
+  )
+  gitversion_h = vcs_tag(
+    input : gitversion_h2,
+    output: 'git-version.h',
+    command: [ 'git', 'log', '-n1', '--date=format:%Y', '--pretty=%cd', ],
+    replace_string: '@GIMP_GIT_LAST_COMMIT_YEAR@',
+    fallback: 'unknown (unsupported)',
+  )
+
+  git = find_program('git', required: false)
+  if not is_git_repository or not git.found()
+  # We create git-version.h but know it will be useless because we are
+  # not in a git repository. Output a warning.
+  git_warning = '''
+
+        UNSUPPORTED BUILD!
+
+        This is not a distribution tarball (git-version.h missing) and
+        we could not establish the corresponding commit (either this is
+        not a git repository or git command is missing). Therefore
+        we have no reference for debugging.
+        Please either use release tarballs or build from the repository.
+  '''
+  warning(git_warning)
+  warnings += git_warning
+  endif
+else
+  gitversion_h = files('git-version.h')
+endif
+
+install_conf = configuration_data()
+install_conf.set('GIMP_APP_VERSION', gimp_app_version)
+install_conf.set('GIMP_PKGCONFIG_VERSION', gimp_version)
+install_conf.set('GIMP_VERSION', gimp_version)
+install_conf.set('APPSTREAM_GLIB_REQUIRED_VERSION', appstream_glib_minver)
+install_conf.set('ATK_REQUIRED_VERSION',          atk_minver)
+install_conf.set('BABL_REQUIRED_VERSION',         babl_minver)
+install_conf.set('CAIRO_PDF_REQUIRED_VERSION',    cairopdf_minver)
+install_conf.set('CAIRO_REQUIRED_VERSION',        cairo_minver)
+install_conf.set('FONTCONFIG_REQUIRED_VERSION',   fontconfig_minver)
+install_conf.set('FREETYPE2_REQUIRED_VERSION',    freetype2_minver)
+install_conf.set('GDK_PIXBUF_REQUIRED_VERSION',   gdk_pixbuf_minver)
+install_conf.set('GEGL_REQUIRED_VERSION',         gegl_minver)
+install_conf.set('EXIV2_REQUIRED_VERSION',        exiv2_minver)
+install_conf.set('GEXIV2_REQUIRED_VERSION',       gexiv2_minver)
+install_conf.set('GLIB_REQUIRED_VERSION',         glib_minver)
+install_conf.set('GTK_REQUIRED_VERSION',          gtk3_minver)
+install_conf.set('HARFBUZZ_REQUIRED_VERSION',     harfbuzz_minver)
+install_conf.set('LCMS_REQUIRED_VERSION',         lcms_minver)
+install_conf.set('LIBHEIF_REQUIRED_VERSION',      libheif_minver)
+install_conf.set('LIBLZMA_REQUIRED_VERSION',      liblzma_minver)
+install_conf.set('LIBTIFF_REQUIRED_VERSION',      libtiff_minver)
+install_conf.set('LIBMYPAINT_REQUIRED_VERSION',   libmypaint_minver)
+install_conf.set('LIBPNG_REQUIRED_VERSION',       libpng_minver)
+install_conf.set('OPENEXR_REQUIRED_VERSION',      openexr_minver)
+install_conf.set('OPENJPEG_REQUIRED_VERSION',     openjpeg_minver)
+install_conf.set('PANGOCAIRO_REQUIRED_VERSION',   pangocairo_minver)
+install_conf.set('POPPLER_DATA_REQUIRED_VERSION', poppler_data_minver)
+install_conf.set('POPPLER_REQUIRED_VERSION',      poppler_minver)
+install_conf.set('PYTHON3_REQUIRED_VERSION',      python3_minver)
+install_conf.set('RSVG_REQUIRED_VERSION',         rsvg_minver)
+install_conf.set('WEBKITGTK_REQUIRED_VERSION',    webkit_minver)
+install_conf.set('WEBP_REQUIRED_VERSION',         webp_minver)
+install_conf.set('WMF_REQUIRED_VERSION',          wmf_minver)
+install_conf.set('XGETTEXT_REQUIRED_VERSION',     '0.19')
+
+if is_git_repository
+  # Tarballs won't have INSTALL.in, only the generated INSTALL.
+  INSTALL = configure_file(
+    input : 'INSTALL.in',
+    output: 'INSTALL',
+    configuration: install_conf
+  )
+endif
+
+
+configure_file(
+  output: 'config.h',
+  configuration: conf
+)
+compiler_args +='-DHAVE_CONFIG_H'
+
+
+add_project_arguments(compiler_args, language: [ 'c', 'cpp' ])
+add_project_link_arguments(linker_args, language: [ 'c', 'cpp' ])
+
+################################################################################
+# Miscellaneous targets
+
+
+ #     #                    #######
+ ##   ## #  ####   ####        #      ##   #####   ####  ###### #####  ####
+ # # # # # #      #    #       #     #  #  #    # #    # #        #   #
+ #  #  # #  ####  #            #    #    # #    # #      #####    #    ####
+ #     # #      # #            #    ###### #####  #  ### #        #        #
+ #     # # #    # #    #       #    #    # #   #  #    # #        #   #    #
+ #     # #  ####   ####        #    #    # #    #  ####  ######   #    ####
+
+
+
+custom_target('AUTHORS',
+  input : [ 'authors.xsl', 'authors.xml', ],
+  output: 'AUTHORS',
+  command: [
+    xsltproc,
+    '-o', '@OUTPUT@',
+    '@INPUT@',
+  ],
+  build_by_default: false,
+)
+custom_target('authors.md',
+  input : [ 'authors4gimp-web.xsl', 'authors.xml', ],
+  output: 'authors.md',
+  command: [
+    xsltproc,
+    '--stringparam', 'today', '`date --iso-8601=seconds`',
+    '-o', '@OUTPUT@',
+    '@INPUT@',
+  ],
+  build_by_default: false,
+)
+
+if xmllint.found()
+  custom_target('validate-authors',
+    command: [
+      xmllint,
+      '--output', '@OUTPUT@',
+      '--valid', '@INPUT@',
+    ],
+    input : [ 'authors.xml', ],
+    output: [ 'validate-authors-output.xml' ],
+    build_by_default: true,
+    install: false
+  )
+endif
+
+custom_target('Changelog',
+  input : [ ],
+  output: [ 'Changelog', ],
+  command: [
+    generate_changelog,
+    meson.project_source_root(),
+    '@OUTPUT@'
+  ],
+  build_by_default: false,
+)
+
+meson.add_dist_script('meson_dist_script.sh',
+                      generate_version_h ?  gitversion_h.full_path() : gitversion_h,
+                      meson.project_source_root(), meson.project_build_root())
+
+
+################################################################################
+# Subdirs
+
+
+rootInclude = include_directories('.')
+appInclude  = include_directories('app')
+
+subdir('build/windows')
+
+# Tools
+subdir('libgimpbase')
+subdir('tools')
+subdir('pdb')
+
+# Translations
+subdir('po')
+subdir('po-libgimp')
+subdir('po-plug-ins')
+subdir('po-python')
+subdir('po-script-fu')
+subdir('po-tags')
+subdir('po-tips')
+# Data / Desktop / xml files
+subdir('cursors')
+subdir('data')
+subdir('desktop')
+subdir('etc')
+subdir('icons')
+subdir('menus')
+subdir('themes')
+
+# Libraries (order here is important!)
+subdir('libgimpcolor')
+subdir('libgimpmath')
+subdir('libgimpconfig')
+subdir('libgimpmodule')
+subdir('libgimpthumb')
+subdir('libgimpwidgets')
+subdir('libgimp')
+
+# Executables, plugins
+subdir('extensions')
+subdir('modules')
+subdir('plug-ins')
+subdir('app')
+subdir('app-tools')
+
+# Docs
+subdir('docs')
+subdir('devel-docs')
+
+# Windows installer
+if get_option('windows-installer')
+  subdir('po-windows-installer')
+  subdir('build/windows/installer')
+endif
+
+pkgconfig.generate(libgimp,
+  filebase: 'gimp-' + gimp_api_version,
+  name: prettyname,
+  description: 'GIMP Library',
+  version: gimp_version,
+  requires: [
+    gdk_pixbuf,
+    cairo,
+    gegl,
+  ],
+  libraries: [
+    libgimpbase,
+    libgimpcolor,
+    libgimpconfig,
+    libgimpmath,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+  variables: [
+    'datarootdir='    +'${prefix}/'+ get_option('datadir'),
+    'gimpdatadir='    +'${prefix}/'+ gimpdatadir,
+    'gimplibdir='     +'${prefix}/'+ gimpplugindir,
+    'gimpsysconfdir=' + gimpsysconfdir,
+    'gimplocaledir='  +'${prefix}/'+ localedir,
+  ],
+)
+
+pkgconfig.generate(libgimpthumb,
+  filebase: 'gimpthumb-' + gimp_api_version,
+  name: 'GIMP Thumb',
+  description: 'GIMP Thumbnail Library',
+  version: gimp_version,
+  requires: [
+    libgimp,
+    gdk_pixbuf,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+)
+
+pkgconfig.generate(libgimpui,
+  filebase: 'gimpui-' + gimp_api_version,
+  name: 'GIMP UI',
+  description: 'GIMP User Interface Library',
+  version: gimp_version,
+  requires: [
+    libgimp,
+    gtk3,
+  ],
+  libraries: [
+    libgimpwidgets,
+    libgimpmodule,
+  ],
+  subdirs: [
+    gimp_api_name,
+  ],
+)
+
+
+
+################################################################################
+# Subdir installations
+
+foreach dir : [
+    { 'dir': 'libgimp',        'deps': libgimp},
+    { 'dir': 'libgimpbase',    'deps': libgimpbase},
+    { 'dir': 'libgimpcolor',   'deps': libgimpcolor},
+    { 'dir': 'libgimpconfig',  'deps': libgimpconfig},
+    { 'dir': 'libgimpmath',    'deps': libgimpmath},
+    { 'dir': 'libgimpmodule',  'deps': libgimpmodule},
+    { 'dir': 'libgimpthumb',   'deps': libgimpthumb},
+    { 'dir': 'libgimpwidgets', 'deps': libgimpwidgets},
+    { 'dir': 'icons' },
+    { 'dir': 'plug-ins', },
+    { 'dir': 'extensions', },
+  ]
+  run_target('install-' + dir.get('dir'),
+    command: [
+      meson_install_subdir, '-v', dir.get('dir')
+    ],
+    depends: dir.get('deps', [])
+  )
+endforeach
+
+################################################################################
+
+final_message = [
+'''Extra Binaries:''',
+'''  gimp-console:        @0@'''.format(enable_console_bin),
+'',
+'''Optional Features:''',
+'''  Check updates at startup:  @0@'''.format(check_update),
+'''  Language selection:        @0@'''.format(isocodes.found()),
+'''  Vector icons:              @0@'''.format(have_vector_icons),
+'''  Dr. Mingw (Win32):         @0@'''.format(drmingw.found()),
+'''  Relocatable Bundle:        @0@'''.format(relocatable_bundle),
+'''  Default ICC directory:     @0@'''.format(icc_directory),
+'''  32-bit DLL folder (Win32): @0@'''.format(get_option('win32-32bits-dll-folder')),
+'''  Detailed backtraces:       @0@'''.format(detailed_backtraces),
+'''  Binary symlinks:           @0@'''.format(enable_default_bin),
+'''  OpenMP:                    @0@'''.format(have_openmp),
+'',
+'''Optional Plug-Ins:''',
+'''  Ascii Art:           @0@'''.format(libaa.found()),
+'''  Ghostscript:         @0@'''.format(ghostscript.found()),
+'''  JPEG 2000:           @0@'''.format(openjpeg.found()),
+'''  JPEG XL:             @0@'''.format(libjxl.found()),
+'''  MNG:                 @0@'''.format(libmng.found()),
+'''  OpenEXR:             @0@'''.format(openexr.found()),
+'''  WebP:                @0@'''.format(webp_found),
+'''  HEIC:                import: @0@ - export: @1@ [profile support: @2@]@3@'''
+                                .format(can_import_heic, can_export_heic,
+                                        (can_import_heic or can_export_heic) and
+                                        libheif.version().version_compare('>=1.4.0'),
+                                        libheif_warning != '' ? ' (see warning below)' : ''),
+'''  AVIF:                import: @0@ - export: @1@'''
+                                .format(can_import_avif, can_export_avif),
+'''  PDF (export):        @0@'''.format(cairopdf.found()),
+'''  Print:               @0@'''.format(have_print),
+'''  Python 3 plug-ins:   @0@'''.format(have_python),
+'''  Javascript plug-ins: @0@'''.format(have_javascript),
+'''  Lua plug-ins:        @0@'''.format(have_lua),
+'''  Vala plug-ins:       @0@'''.format(have_vala),
+'''  TWAIN (Win32):       @0@'''.format(platform_windows),
+'''  WMF:                 @0@'''.format(wmf.found()),
+'''  X11 Mouse Cursor:    @0@'''.format(xmc.found()),
+'''  XPM:                 @0@'''.format(libxpm.found()),
+'''  Quite-OK Image:      @0@'''.format(have_qoi),
+'''  Amiga IFF/ILBM:      @0@'''.format(have_ilbm),
+'''  Email:               @0@'''.format(email_message),
+'''  FITS:                @0@'''.format(cfitsio_dep.found()),
+'',
+'''Unmaintained Plug-Ins (discouraged except for developers):''',
+'''  Help Browser:        @0@'''.format(get_option('webkit-unmaintained')),
+'''  Webpage:             @0@'''.format(get_option('webkit-unmaintained')),
+'',
+'''Optional Modules:''',
+'''  ALSA (MIDI Input):   @0@'''.format(alsa.found()),
+'''  Linux Input:         @0@ (GUdev support: @1@)'''
+                                .format(have_linuxinput, gudev.found()),
+'''  DirectInput (Win32): @0@'''.format(directx.found()),
+'',
+'''Tests:''',
+'''  Use xvfb-run         @0@'''.format(xvfb_run.found()),
+'''  Test appdata         @0@'''.format(appstreamcli.found()),
+'',
+'''Documentation:''',
+'''  libgimp API Reference: @0@'''.format(gi_docgen.found() and have_gobject_introspection),
+'''  GObject Introspection: @0@'''.format(get_option('g-ir-doc')),
+'',
+'''Bug report URL: @0@'''.format(bug_report_url),
+]
+
+message('\n'.join(final_message))
+
+if warnings.length() > 0
+  warning('Warnings occurred during configuration')
+  foreach warning : warnings
+    warning(warning)
+  endforeach
+endif
Index: gimp3/patches/README
===================================================================
--- gimp3/patches/README	(nonexistent)
+++ gimp3/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: gimp3/patches
===================================================================
--- gimp3/patches	(nonexistent)
+++ gimp3/patches	(revision 385)

Property changes on: gimp3/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gimp3
===================================================================
--- gimp3	(nonexistent)
+++ gimp3	(revision 385)

Property changes on: gimp3
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gtk-layer-shell/Makefile
===================================================================
--- gtk-layer-shell/Makefile	(nonexistent)
+++ gtk-layer-shell/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/gtk-layer-shell
+
+versions    = 0.8.1
+pkgname     = gtk-layer-shell
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: gtk-layer-shell
===================================================================
--- gtk-layer-shell	(nonexistent)
+++ gtk-layer-shell	(revision 385)

Property changes on: gtk-layer-shell
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: gtk4-layer-shell/Makefile
===================================================================
--- gtk4-layer-shell/Makefile	(nonexistent)
+++ gtk4-layer-shell/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/gtk4-layer-shell
+
+versions    = 1.0.2
+pkgname     = gtk4-layer-shell
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: gtk4-layer-shell
===================================================================
--- gtk4-layer-shell	(nonexistent)
+++ gtk4-layer-shell	(revision 385)

Property changes on: gtk4-layer-shell
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: idesk/Makefile
===================================================================
--- idesk/Makefile	(nonexistent)
+++ idesk/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/idesk
+
+versions    = 0.7.5
+pkgname     = idesk
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: idesk
===================================================================
--- idesk	(nonexistent)
+++ idesk	(revision 385)

Property changes on: idesk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: imagemagick/Makefile
===================================================================
--- imagemagick/Makefile	(nonexistent)
+++ imagemagick/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/imagemagick
+
+versions    = 7.1.1.20
+pkgname     = imagemagick
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: imagemagick
===================================================================
--- imagemagick	(nonexistent)
+++ imagemagick	(revision 385)

Property changes on: imagemagick
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: imath/Makefile
===================================================================
--- imath/Makefile	(nonexistent)
+++ imath/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/imath
+
+versions    = 3.1.9
+pkgname     = imath
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: imath
===================================================================
--- imath	(nonexistent)
+++ imath	(revision 385)

Property changes on: imath
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: jasper/Makefile
===================================================================
--- jasper/Makefile	(nonexistent)
+++ jasper/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/jasper
+
+versions    = 4.1.2
+pkgname     = jasper
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches      = $(CURDIR)/patches/jasper-4.1.2-gnu-warning.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-4.1.2-gnu-warning-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: jasper/create-4.1.2-gnu-warning-patch/create.patch.sh
===================================================================
--- jasper/create-4.1.2-gnu-warning-patch/create.patch.sh	(nonexistent)
+++ jasper/create-4.1.2-gnu-warning-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=4.1.2
+
+tar --files-from=file.list -xJvf ../jasper-$VERSION.tar.xz
+mv jasper-$VERSION jasper-$VERSION-orig
+
+cp -rf ./jasper-$VERSION-new ./jasper-$VERSION
+
+diff --unified -Nr  jasper-$VERSION-orig  jasper-$VERSION > jasper-$VERSION-gnu-warning.patch
+
+mv jasper-$VERSION-gnu-warning.patch ../patches
+
+rm -rf ./jasper-$VERSION
+rm -rf ./jasper-$VERSION-orig

Property changes on: jasper/create-4.1.2-gnu-warning-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: jasper/create-4.1.2-gnu-warning-patch/file.list
===================================================================
--- jasper/create-4.1.2-gnu-warning-patch/file.list	(nonexistent)
+++ jasper/create-4.1.2-gnu-warning-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+jasper-4.1.2/src/libjasper/include/jasper/jas_config.h.in
Index: jasper/create-4.1.2-gnu-warning-patch/jasper-4.1.2-new/src/libjasper/include/jasper/jas_config.h.in
===================================================================
--- jasper/create-4.1.2-gnu-warning-patch/jasper-4.1.2-new/src/libjasper/include/jasper/jas_config.h.in	(nonexistent)
+++ jasper/create-4.1.2-gnu-warning-patch/jasper-4.1.2-new/src/libjasper/include/jasper/jas_config.h.in	(revision 385)
@@ -0,0 +1,116 @@
+#ifndef JAS_CONFIG_H
+#define JAS_CONFIG_H
+
+#if 0
+#define _POSIX_C_SOURCE 200809L
+#endif
+
+#include <jasper/jas_compiler.h>
+#include <jasper/jas_dll.h>
+
+/* This preprocessor symbol identifies the version of JasPer. */
+
+/*!
+@brief
+A null-terminated string containing the JasPer library version
+*/
+#define	JAS_VERSION "@JAS_VERSION@"
+
+/*!
+@brief
+The JasPer library major version number.
+*/
+#define JAS_VERSION_MAJOR @JAS_VERSION_MAJOR@
+
+/*!
+@brief
+The JasPer library minor version number.
+*/
+#define JAS_VERSION_MINOR @JAS_VERSION_MINOR@
+
+/*!
+@brief
+The JasPer library patch version number.
+*/
+#define JAS_VERSION_PATCH @JAS_VERSION_PATCH@
+
+/*
+The version of the C standard against which JasPer was built.
+*/
+#define JAS_STDC_VERSION @JAS_STDC_VERSION@
+
+#cmakedefine JAS_ENABLE_32BIT
+
+#cmakedefine JAS_HAVE_INT128_T
+
+#define JAS_SIZEOF_INT @JAS_SIZEOF_INT@
+#define JAS_SIZEOF_LONG @JAS_SIZEOF_LONG@
+#define JAS_SIZEOF_LLONG @JAS_SIZEOF_LLONG@
+#define JAS_SIZEOF_SIZE_T @JAS_SIZEOF_SIZE_T@
+#define JAS_SIZEOF_SSIZE_T @JAS_SIZEOF_SSIZE_T@
+
+#cmakedefine JAS_HAVE_FCNTL_H
+#cmakedefine JAS_HAVE_IO_H
+#cmakedefine JAS_HAVE_UNISTD_H
+#cmakedefine JAS_HAVE_SYS_TIME_H
+#cmakedefine JAS_HAVE_SYS_TYPES_H
+#cmakedefine JAS_HAVE_SSIZE_T
+#cmakedefine JAS_HAVE_MAX_ALIGN_T
+
+#if 0
+#cmakedefine JAS_HAVE_UINTMAX_T
+#cmakedefine JAS_HAVE_INTMAX_T
+#endif
+
+#cmakedefine JAS_HAVE_MKOSTEMP
+#cmakedefine JAS_HAVE_GETTIMEOFDAY
+#cmakedefine JAS_HAVE_GETRUSAGE
+#cmakedefine JAS_HAVE_NANOSLEEP
+
+#cmakedefine JAS_HAVE_GL_GLUT_H
+#cmakedefine JAS_HAVE_GLUT_GLUT_H
+#cmakedefine JAS_HAVE_GLUT_H
+
+#cmakedefine JAS_INCLUDE_PNM_CODEC
+#cmakedefine JAS_INCLUDE_BMP_CODEC
+#cmakedefine JAS_INCLUDE_RAS_CODEC
+#cmakedefine JAS_INCLUDE_JP2_CODEC
+#cmakedefine JAS_INCLUDE_JPC_CODEC
+#cmakedefine JAS_INCLUDE_JPG_CODEC
+#cmakedefine JAS_INCLUDE_HEIC_CODEC
+#cmakedefine JAS_INCLUDE_PGX_CODEC
+#cmakedefine JAS_INCLUDE_MIF_CODEC
+#cmakedefine JAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE
+
+#cmakedefine01 JAS_ENABLE_PNM_CODEC
+#cmakedefine01 JAS_ENABLE_BMP_CODEC
+#cmakedefine01 JAS_ENABLE_RAS_CODEC
+#cmakedefine01 JAS_ENABLE_JP2_CODEC
+#cmakedefine01 JAS_ENABLE_JPC_CODEC
+#cmakedefine01 JAS_ENABLE_JPG_CODEC
+#cmakedefine01 JAS_ENABLE_HEIC_CODEC
+#cmakedefine01 JAS_ENABLE_PGX_CODEC
+#cmakedefine01 JAS_ENABLE_MIF_CODEC
+
+#define JAS_DEFAULT_MAX_MEM_USAGE @JAS_DEFAULT_MAX_MEM_USAGE@
+
+#cmakedefine JAS_THREADS
+#cmakedefine JAS_THREADS_C11
+#cmakedefine JAS_THREADS_PTHREAD
+#cmakedefine JAS_THREADS_WIN32
+
+#cmakedefine JAS_HAVE_THREAD_LOCAL
+
+#cmakedefine JAS_ENABLE_NON_THREAD_SAFE_DEBUGGING
+
+#cmakedefine JAS_HAVE_SNPRINTF
+
+#if !defined(JAS_DEC_DEFAULT_MAX_SAMPLES)
+#define JAS_DEC_DEFAULT_MAX_SAMPLES (64 * ((size_t) 1048576))
+#endif
+
+#if (JAS_DEFAULT_MAX_MEM_USAGE == 0)
+#define JAS_DEFAULT_MAX_MEM_USAGE (1024ULL * 1024ULL * 1024ULL)
+#endif
+
+#endif
Index: jasper/patches/README
===================================================================
--- jasper/patches/README	(nonexistent)
+++ jasper/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: jasper/patches
===================================================================
--- jasper/patches	(nonexistent)
+++ jasper/patches	(revision 385)

Property changes on: jasper/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: jasper
===================================================================
--- jasper	(nonexistent)
+++ jasper	(revision 385)

Property changes on: jasper
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: lensfun/Makefile
===================================================================
--- lensfun/Makefile	(nonexistent)
+++ lensfun/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/lensfun
+
+versions    = 0.3.4
+pkgname     = lensfun
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: lensfun
===================================================================
--- lensfun	(nonexistent)
+++ lensfun	(revision 385)

Property changes on: lensfun
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libcanberra/Makefile
===================================================================
--- libcanberra/Makefile	(nonexistent)
+++ libcanberra/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libcanberra
+
+versions    = 0.30
+pkgname     = libcanberra
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/libcanberra-0.30-wayland.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-0.30-wayland-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: libcanberra/create-0.30-wayland-patch/create.patch.sh
===================================================================
--- libcanberra/create-0.30-wayland-patch/create.patch.sh	(nonexistent)
+++ libcanberra/create-0.30-wayland-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=0.30
+
+tar --files-from=file.list -xJvf ../libcanberra-$VERSION.tar.xz
+mv libcanberra-$VERSION libcanberra-$VERSION-orig
+
+cp -rf ./libcanberra-$VERSION-new ./libcanberra-$VERSION
+
+diff --unified -Nr  libcanberra-$VERSION-orig  libcanberra-$VERSION > libcanberra-$VERSION-wayland.patch
+
+mv libcanberra-$VERSION-wayland.patch ../patches
+
+rm -rf ./libcanberra-$VERSION
+rm -rf ./libcanberra-$VERSION-orig

Property changes on: libcanberra/create-0.30-wayland-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libcanberra/create-0.30-wayland-patch/file.list
===================================================================
--- libcanberra/create-0.30-wayland-patch/file.list	(nonexistent)
+++ libcanberra/create-0.30-wayland-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+libcanberra-0.30/src/canberra-gtk-module.c
+libcanberra-0.30/src/canberra-gtk.c
Index: libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk-module.c
===================================================================
--- libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk-module.c	(nonexistent)
+++ libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk-module.c	(revision 385)
@@ -0,0 +1,1005 @@
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+/***
+  This file is part of libcanberra.
+
+  Copyright 2008 Lennart Poettering
+
+  libcanberra is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation, either version 2.1 of the
+  License, or (at your option) any later version.
+
+  libcanberra is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with libcanberra. If not, see
+  <http://www.gnu.org/licenses/>.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gdk/gdkx.h>
+#include <X11/Xatom.h>
+
+#include "canberra-gtk.h"
+
+typedef struct {
+        guint signal_id;
+        gboolean arg1_is_set;
+        GObject *object;
+        GValue arg1;
+        GdkEvent *event;
+} SoundEventData;
+
+/*
+   We generate these sounds:
+
+   dialog-error
+   dialog-warning
+   dialog-information
+   dialog-question
+   window-new
+   window-close
+   window-minimized
+   window-unminimized
+   window-maximized
+   window-unmaximized
+   notebook-tab-changed
+   dialog-ok
+   dialog-cancel
+   item-selected
+   link-pressed
+   link-released
+   button-pressed
+   button-released
+   menu-click
+   button-toggle-on
+   button-toggle-off
+   menu-popup
+   menu-popdown
+   menu-replace
+   tooltip-popup
+   tooltip-popdown
+   drag-start
+   drag-accept
+   drag-fail
+   expander-toggle-on
+   expander-toggle-off
+
+   TODO:
+   scroll-xxx
+   window-switch
+   window-resize-xxx
+   window-move-xxx
+
+*/
+
+static gboolean disabled = FALSE;
+
+static GQueue sound_event_queue = G_QUEUE_INIT;
+
+static guint idle_id = 0;
+
+static guint
+        signal_id_dialog_response,
+        signal_id_widget_show,
+        signal_id_widget_hide,
+        signal_id_check_menu_item_toggled,
+        signal_id_menu_item_activate,
+        signal_id_toggle_button_toggled,
+        signal_id_button_pressed,
+        signal_id_button_released,
+        signal_id_widget_window_state_event,
+        signal_id_notebook_switch_page,
+        signal_id_tree_view_cursor_changed,
+        signal_id_icon_view_selection_changed,
+        signal_id_widget_drag_begin,
+        signal_id_widget_drag_failed,
+        signal_id_widget_drag_drop,
+        signal_id_expander_activate;
+
+static GQuark
+        disable_sound_quark,
+        was_iconized_quark,
+        is_xembed_quark;
+
+/* Make sure GCC doesn't warn us about a missing prototype for this
+ * exported function */
+void gtk_module_init(gint *argc, gchar ***argv[]);
+
+static const char *translate_message_tye(GtkMessageType mt) {
+        static const char *const message_type_table[] = {
+                [GTK_MESSAGE_INFO] = "dialog-information",
+                [GTK_MESSAGE_WARNING] = "dialog-warning",
+                [GTK_MESSAGE_QUESTION] = "dialog-question",
+                [GTK_MESSAGE_ERROR] = "dialog-error",
+                [GTK_MESSAGE_OTHER] = NULL
+        };
+
+        if (mt >= G_N_ELEMENTS(message_type_table))
+                return NULL;
+
+        return message_type_table[mt];
+}
+
+static const char *translate_response(int response) {
+        static const char *const response_table[] = {
+                [-GTK_RESPONSE_NONE] = NULL,
+                [-GTK_RESPONSE_REJECT] = "dialog-cancel",
+                [-GTK_RESPONSE_DELETE_EVENT] = "dialog-cancel",
+                [-GTK_RESPONSE_ACCEPT] = "dialog-ok",
+                [-GTK_RESPONSE_OK] = "dialog-ok",
+                [-GTK_RESPONSE_CANCEL] = "dialog-cancel",
+                [-GTK_RESPONSE_CLOSE] = "dialog-ok",
+                [-GTK_RESPONSE_YES] = "dialog-ok",
+                [-GTK_RESPONSE_NO] = "dialog-cancel",
+                [-GTK_RESPONSE_APPLY] = "dialog-ok",
+                [-GTK_RESPONSE_HELP] = NULL,
+        };
+
+        if (response >= 0)
+                return NULL;
+
+        if ((unsigned) -response >= G_N_ELEMENTS(response_table))
+                return NULL;
+
+        return response_table[-response];
+}
+
+static gboolean is_child_of_combo_box(GtkWidget *w) {
+
+        while (w) {
+
+                if (GTK_IS_COMBO_BOX(w))
+                        return TRUE;
+
+                w = gtk_widget_get_parent(w);
+        }
+
+        return FALSE;
+}
+
+static GtkDialog* find_parent_dialog(GtkWidget *w) {
+
+        while (w) {
+
+                if (GTK_IS_DIALOG(w))
+                        return GTK_DIALOG(w);
+
+                w = gtk_widget_get_parent(w);
+        }
+
+        return NULL;
+}
+
+static void free_sound_event(SoundEventData *d) {
+
+        g_object_unref(d->object);
+
+        if (d->arg1_is_set)
+                g_value_unset(&d->arg1);
+
+        if (d->event)
+                gdk_event_free(d->event);
+
+        g_slice_free(SoundEventData, d);
+}
+
+static gboolean is_menu_hint(GdkWindowTypeHint hint) {
+        return
+                hint == GDK_WINDOW_TYPE_HINT_POPUP_MENU ||
+                hint == GDK_WINDOW_TYPE_HINT_DROPDOWN_MENU ||
+                hint == GDK_WINDOW_TYPE_HINT_MENU;
+}
+
+static SoundEventData* filter_sound_event(SoundEventData *d) {
+        GList *i, *n;
+
+        do {
+
+                for (i = sound_event_queue.head; i; i = n) {
+                        SoundEventData *j;
+
+                        j = i->data;
+                        n = i->next;
+
+                        if (d->object == j->object) {
+
+                                /* Let's drop a show event immediately followed by a
+                                 * hide event */
+
+                                if (d->signal_id == signal_id_widget_show &&
+                                    j->signal_id == signal_id_widget_hide) {
+
+                                        free_sound_event(d);
+                                        free_sound_event(j);
+                                        g_queue_delete_link(&sound_event_queue, i);
+
+                                        return NULL;
+                                }
+
+                                /* Let's drop widget hide events in favour of dialog
+                                 * response.
+                                 *
+                                 * Let's drop widget window state events in favour of
+                                 * widget hide/show.
+                                 *
+                                 * Let's drop double events */
+
+                                if ((d->signal_id == signal_id_widget_hide &&
+                                     j->signal_id == signal_id_dialog_response) ||
+
+                                    (d->signal_id == signal_id_widget_window_state_event &&
+                                     j->signal_id == signal_id_widget_hide) ||
+
+                                    (d->signal_id == signal_id_widget_window_state_event &&
+                                     j->signal_id == signal_id_widget_show)) {
+
+                                        free_sound_event(d);
+                                        d = j;
+                                        g_queue_delete_link(&sound_event_queue, i);
+                                        break;
+                                }
+
+                                if ((d->signal_id == signal_id_dialog_response &&
+                                     j->signal_id == signal_id_widget_hide) ||
+
+                                    (d->signal_id == signal_id_widget_show &&
+                                     j->signal_id == signal_id_widget_window_state_event) ||
+
+                                    (d->signal_id == signal_id_widget_hide &&
+                                     j->signal_id == signal_id_widget_window_state_event) ||
+
+                                    (d->signal_id == j->signal_id)) {
+
+                                        free_sound_event(j);
+                                        g_queue_delete_link(&sound_event_queue, i);
+                                }
+
+                        } else if (GTK_IS_WINDOW(d->object) && GTK_IS_WINDOW(j->object)) {
+
+                                GdkWindowTypeHint dhint, jhint;
+
+                                dhint = gtk_window_get_type_hint(GTK_WINDOW(d->object));
+                                jhint = gtk_window_get_type_hint(GTK_WINDOW(j->object));
+
+                                if (is_menu_hint(dhint) && is_menu_hint(jhint)) {
+
+                                        if (d->signal_id == signal_id_widget_hide &&
+                                            j->signal_id == signal_id_widget_show) {
+                                                free_sound_event(d);
+                                                d = j;
+                                                g_queue_delete_link(&sound_event_queue, i);
+                                                break;
+                                        }
+
+                                        if (d->signal_id == signal_id_widget_show &&
+                                            j->signal_id == signal_id_widget_hide) {
+
+                                                free_sound_event(j);
+                                                g_queue_delete_link(&sound_event_queue, i);
+                                        }
+                                }
+                        }
+                }
+
+                /* If we exited the iteration early, let's retry. */
+
+        } while (i);
+
+        /* FIXME: Filter menu hide on menu show */
+
+        return d;
+}
+
+static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+        Atom type_return;
+        gint format_return;
+        gulong nitems_return;
+        gulong bytes_after_return;
+        guchar *data = NULL;
+        gint ret = -1;
+
+#ifdef GDK_IS_X11_DISPLAY
+        if (!GDK_IS_X11_DISPLAY(d))
+                return 0;
+#endif
+
+        if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+                               gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+                               0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+                               &format_return, &nitems_return, &bytes_after_return,
+                               &data) != Success)
+                return -1;
+
+        if (type_return == XA_CARDINAL && format_return == 32 && data) {
+                guint32 desktop = *(guint32*) data;
+
+                if (desktop != 0xFFFFFFFF)
+                        ret = (gint) desktop;
+        }
+
+        if (type_return != None && data != NULL)
+                XFree(data);
+
+        return ret;
+}
+
+static gint display_get_desktop(GdkDisplay *d) {
+        Atom type_return;
+        gint format_return;
+        gulong nitems_return;
+        gulong bytes_after_return;
+        guchar *data = NULL;
+        gint ret = -1;
+
+#ifdef GDK_IS_X11_DISPLAY
+        if (!GDK_IS_X11_DISPLAY(d))
+                return 0;
+#endif
+
+        if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), DefaultRootWindow(GDK_DISPLAY_XDISPLAY(d)),
+                               gdk_x11_get_xatom_by_name_for_display(d, "_NET_CURRENT_DESKTOP"),
+                               0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+                               &format_return, &nitems_return, &bytes_after_return,
+                               &data) != Success)
+                return -1;
+
+        if (type_return == XA_CARDINAL && format_return == 32 && data) {
+
+                guint32 desktop = *(guint32*) data;
+
+                if (desktop != 0xFFFFFFFF)
+                        ret = (gint) desktop;
+        }
+
+        if (type_return != None && data != NULL)
+                XFree(data);
+
+        return ret;
+}
+
+static gboolean window_is_xembed(GdkDisplay *d, GdkWindow *w) {
+        Atom type_return;
+        gint format_return;
+        gulong nitems_return;
+        gulong bytes_after_return;
+        guchar *data = NULL;
+        gboolean ret = FALSE;
+        Atom xembed;
+
+#ifdef GDK_IS_X11_DISPLAY
+        if (!GDK_IS_X11_DISPLAY(d))
+                return FALSE;
+#endif
+
+        /* Gnome Panel applets are XEMBED windows. We need to make sure we
+         * ignore them */
+
+        xembed = gdk_x11_get_xatom_by_name_for_display(d, "_XEMBED_INFO");
+
+        /* be robust against not existing XIDs (LP: #834403) */
+        gdk_error_trap_push();
+        if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+                               xembed,
+                               0, 2, False, xembed, &type_return,
+                               &format_return, &nitems_return, &bytes_after_return,
+                               &data) != Success) {
+                return FALSE;
+        }
+
+#if GTK_CHECK_VERSION(3,0,0)
+        gdk_error_trap_pop_ignored();
+#else
+        gdk_flush();
+        gdk_error_trap_pop();
+#endif
+
+        if (type_return == xembed && format_return == 32 && data)
+                ret = TRUE;
+
+        if (type_return != None && data != NULL)
+                XFree(data);
+
+        return ret;
+}
+
+static void dispatch_sound_event(SoundEventData *d) {
+        int ret = CA_SUCCESS;
+        static gboolean menu_is_popped_up = FALSE;
+
+        if (g_object_get_qdata(d->object, disable_sound_quark))
+                return;
+
+        /* The GdkWindow of the the widget might have changed while this
+         * event was queued for us. Make sure to update it from the
+         * current one if necessary. */
+        if (d->event && d->event->any.window) {
+                GdkWindow *window;
+
+                g_object_unref(G_OBJECT(d->event->any.window));
+
+                if ((window = gtk_widget_get_window(GTK_WIDGET(d->object))))
+                        d->event->any.window = GDK_WINDOW(g_object_ref(G_OBJECT(window)));
+                else
+                        d->event->any.window = NULL;
+        }
+
+        if (d->signal_id == signal_id_widget_show) {
+                GdkWindowTypeHint hint;
+
+                /* Show/hide signals for non-windows have already been filtered out
+                 * by the emission hook! */
+
+                hint = gtk_window_get_type_hint(GTK_WINDOW(d->object));
+
+                if (is_menu_hint(hint)) {
+
+                        if (!menu_is_popped_up) {
+
+                                ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                             CA_PROP_EVENT_ID, "menu-popup",
+                                                             CA_PROP_EVENT_DESCRIPTION, "Menu popped up",
+                                                             CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                             NULL);
+                        } else {
+                                ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                             CA_PROP_EVENT_ID, "menu-replace",
+                                                             CA_PROP_EVENT_DESCRIPTION, "Menu replaced",
+                                                             CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                             NULL);
+                        }
+
+                        menu_is_popped_up = TRUE;
+
+                } else if (hint == GDK_WINDOW_TYPE_HINT_TOOLTIP) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "tooltip-popup",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Tooltip popped up",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+
+                } else if (hint == GDK_WINDOW_TYPE_HINT_NORMAL ||
+                           hint == GDK_WINDOW_TYPE_HINT_DIALOG) {
+
+                        gboolean played_sound = FALSE;
+                        gboolean is_xembed;
+
+                        is_xembed =
+                                gtk_widget_get_realized(GTK_WIDGET(d->object)) &&
+                                window_is_xembed(
+                                                gtk_widget_get_display(GTK_WIDGET(d->object)),
+                                                gtk_widget_get_window(GTK_WIDGET(d->object)));
+
+                        g_object_set_qdata(d->object, is_xembed_quark, GINT_TO_POINTER(is_xembed));
+
+                        if (GTK_IS_MESSAGE_DIALOG(d->object)) {
+                                GtkMessageType mt;
+                                const char *id;
+
+                                g_object_get(d->object, "message_type", &mt, NULL);
+
+                                if ((id = translate_message_tye(mt))) {
+
+                                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                                     CA_PROP_EVENT_ID, id,
+                                                                     CA_PROP_EVENT_DESCRIPTION, "Message dialog shown",
+                                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                                     NULL);
+                                        played_sound = TRUE;
+                                }
+
+                        }
+
+                        if (!played_sound &&
+                            !is_xembed &&
+                            gtk_window_get_decorated(GTK_WINDOW(d->object))) {
+
+                                ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                             CA_PROP_EVENT_ID, "window-new",
+                                                             CA_PROP_EVENT_DESCRIPTION, "Window shown",
+                                                             CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                             NULL);
+
+                        }
+                }
+        }
+
+        if (GTK_IS_DIALOG(d->object) && d->signal_id == signal_id_dialog_response) {
+
+                int response;
+                const char *id;
+
+                response = g_value_get_int(&d->arg1);
+
+                if ((id = translate_response(response))) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, id,
+                                                     CA_PROP_EVENT_DESCRIPTION, "Dialog closed",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+                } else {
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "window-close",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Window closed",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+                }
+
+        } else if (d->signal_id == signal_id_widget_hide) {
+                GdkWindowTypeHint hint;
+
+                hint = gtk_window_get_type_hint(GTK_WINDOW(d->object));
+
+                if (is_menu_hint(hint)) {
+
+                        if (GTK_IS_MENU(gtk_bin_get_child(GTK_BIN(d->object)))) {
+
+                                ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                             CA_PROP_EVENT_ID, "menu-popdown",
+                                                             CA_PROP_EVENT_DESCRIPTION, "Menu popped down",
+                                                             CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                             NULL);
+                        }
+
+                        menu_is_popped_up = FALSE;
+
+                } else if (hint == GDK_WINDOW_TYPE_HINT_TOOLTIP) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "tooltip-popdown",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Tooltip popped down",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+
+                } else if ((hint == GDK_WINDOW_TYPE_HINT_NORMAL ||
+                            hint == GDK_WINDOW_TYPE_HINT_DIALOG)) {
+
+                        gboolean is_xembed;
+
+                        is_xembed = !!g_object_get_qdata(d->object, is_xembed_quark);
+
+                        if (!is_xembed &&
+                            gtk_window_get_decorated(GTK_WINDOW(d->object)))
+                                ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                             CA_PROP_EVENT_ID, "window-close",
+                                                             CA_PROP_EVENT_DESCRIPTION, "Window closed",
+                                                             CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                             NULL);
+                }
+        }
+
+        if (GTK_IS_WINDOW(d->object) && d->signal_id == signal_id_widget_window_state_event) {
+                GdkEventWindowState *e;
+                gint w_desktop = -1, c_desktop = -1;
+
+                e = (GdkEventWindowState*) d->event;
+
+                /* Unfortunately GDK_WINDOW_STATE_ICONIFIED is used both for
+                 * proper minimizing and when a window becomes invisible
+                 * because the desktop was switched. To handle this we check
+                 * if the window becoming invisible is actually on the current
+                 * desktop, and only if that's the case we assume it is being
+                 * minimized. We then store this information, so that we know
+                 * later on when the window is unminimized again. */
+
+                if (gtk_widget_get_realized(GTK_WIDGET(d->object))) {
+                        GdkDisplay *display;
+
+                        display = gtk_widget_get_display(GTK_WIDGET(d->object));
+                        w_desktop = window_get_desktop(display, gtk_widget_get_window(GTK_WIDGET(d->object)));
+                        c_desktop = display_get_desktop(display);
+                }
+
+                if ((e->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
+                    (e->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
+                    (w_desktop == c_desktop || w_desktop < 0)) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "window-minimized",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Window minimized",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+
+                        g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(1));
+
+                } else if ((e->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) &&
+                           (e->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN))) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "window-maximized",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Window maximized",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+
+                        g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(0));
+
+                } else if ((e->changed_mask & GDK_WINDOW_STATE_ICONIFIED) &&
+                           !(e->new_window_state & GDK_WINDOW_STATE_ICONIFIED) &&
+                           g_object_get_qdata(d->object, was_iconized_quark)) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "window-unminimized",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Window unminimized",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+
+                        g_object_set_qdata(d->object, was_iconized_quark, GINT_TO_POINTER(0));
+
+                } else if ((e->changed_mask & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN)) &&
+                           !(e->new_window_state & (GDK_WINDOW_STATE_MAXIMIZED|GDK_WINDOW_STATE_FULLSCREEN))) {
+
+                        ret = ca_gtk_play_for_widget(GTK_WIDGET(d->object), 0,
+                                                     CA_PROP_EVENT_ID, "window-unmaximized",
+                                                     CA_PROP_EVENT_DESCRIPTION, "Window unmaximized",
+                                                     CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                     NULL);
+                }
+        }
+
+        if (GTK_IS_CHECK_MENU_ITEM(d->object) && d->signal_id == signal_id_check_menu_item_toggled) {
+
+                if (gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(d->object)))
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "button-toggle-on",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Check menu item checked",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                else
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "button-toggle-off",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Check menu item unchecked",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+
+        } else if (GTK_IS_MENU_ITEM(d->object) && d->signal_id == signal_id_menu_item_activate) {
+
+                if (!gtk_menu_item_get_submenu(GTK_MENU_ITEM(d->object)))
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "menu-click",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Menu item clicked",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+        }
+
+        if (GTK_IS_TOGGLE_BUTTON(d->object)) {
+
+                if (d->signal_id == signal_id_toggle_button_toggled) {
+
+                        if (!is_child_of_combo_box(GTK_WIDGET(d->object))) {
+
+                                /* We don't want to play this sound if this is a toggle
+                                 * button belonging to combo box. */
+
+                                if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(d->object)))
+                                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                                    CA_PROP_EVENT_ID, "button-toggle-on",
+                                                                    CA_PROP_EVENT_DESCRIPTION, "Toggle button checked",
+                                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                                    NULL);
+                                else
+                                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                                    CA_PROP_EVENT_ID, "button-toggle-off",
+                                                                    CA_PROP_EVENT_DESCRIPTION, "Toggle button unchecked",
+                                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                                    NULL);
+                        }
+                }
+
+        } else if (GTK_IS_LINK_BUTTON(d->object)) {
+
+                if (d->signal_id == signal_id_button_pressed) {
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "link-pressed",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Link pressed",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+
+                } else if (d->signal_id == signal_id_button_released) {
+
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "link-released",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Link released",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                }
+
+        } else if (GTK_IS_BUTTON(d->object) && !GTK_IS_TOGGLE_BUTTON(d->object)) {
+
+                if (d->signal_id == signal_id_button_pressed) {
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "button-pressed",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Button pressed",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+
+                } else if (d->signal_id == signal_id_button_released) {
+                        GtkDialog *dialog;
+                        gboolean dont_play = FALSE;
+
+                        if ((dialog = find_parent_dialog(GTK_WIDGET(d->object)))) {
+                                int response;
+
+                                /* Don't play the click sound if this is a response widget
+                                 * we will generate a dialog-xxx event sound anyway. */
+
+                                response = gtk_dialog_get_response_for_widget(dialog, GTK_WIDGET(d->object));
+                                dont_play = !!translate_response(response);
+                        }
+
+                        if (!dont_play)
+                                ret = ca_gtk_play_for_event(d->event, 0,
+                                                            CA_PROP_EVENT_ID, "button-released",
+                                                            CA_PROP_EVENT_DESCRIPTION, "Button released",
+                                                            CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                            NULL);
+                }
+        }
+
+        if (GTK_IS_NOTEBOOK(d->object) && d->signal_id == signal_id_notebook_switch_page) {
+                ret = ca_gtk_play_for_event(d->event, 0,
+                                            CA_PROP_EVENT_ID, "notebook-tab-changed",
+                                            CA_PROP_EVENT_DESCRIPTION, "Tab changed",
+                                            CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                            NULL);
+                goto finish;
+        }
+
+        if (GTK_IS_TREE_VIEW(d->object) && d->signal_id == signal_id_tree_view_cursor_changed) {
+                ret = ca_gtk_play_for_event(d->event, 0,
+                                            CA_PROP_EVENT_ID, "item-selected",
+                                            CA_PROP_EVENT_DESCRIPTION, "Item selected",
+                                            CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                            NULL);
+                goto finish;
+        }
+
+        if (GTK_IS_ICON_VIEW(d->object) && d->signal_id == signal_id_icon_view_selection_changed) {
+                ret = ca_gtk_play_for_event(d->event, 0,
+                                            CA_PROP_EVENT_ID, "item-selected",
+                                            CA_PROP_EVENT_DESCRIPTION, "Item selected",
+                                            CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                            NULL);
+                goto finish;
+        }
+
+        if (GTK_IS_EXPANDER(d->object) && d->signal_id == signal_id_expander_activate) {
+
+                if (gtk_expander_get_expanded(GTK_EXPANDER(d->object)))
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "expander-toggle-on",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Expander expanded",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                else
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "expander-toggle-off",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Expander unexpanded",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+
+                goto finish;
+        }
+
+        if (GTK_IS_WIDGET(d->object)) {
+
+                if (d->signal_id == signal_id_widget_drag_begin) {
+
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "drag-start",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Drag started",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                        goto finish;
+
+                } else if (d->signal_id == signal_id_widget_drag_drop) {
+
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "drag-accept",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Drag accepted",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                        goto finish;
+
+                } else if (d->signal_id == signal_id_widget_drag_failed) {
+
+                        ret = ca_gtk_play_for_event(d->event, 0,
+                                                    CA_PROP_EVENT_ID, "drag-fail",
+                                                    CA_PROP_EVENT_DESCRIPTION, "Drag failed",
+                                                    CA_PROP_CANBERRA_CACHE_CONTROL, "permanent",
+                                                    NULL);
+                        goto finish;
+                }
+        }
+
+finish:
+
+        ;
+        /* if (ret != CA_SUCCESS) */
+        /*     g_warning("Failed to play event sound: %s", ca_strerror(ret)); */
+}
+
+static void dispatch_queue(void) {
+        SoundEventData *d;
+
+        while ((d = g_queue_pop_head(&sound_event_queue))) {
+
+                if (!(d = filter_sound_event(d)))
+                        continue;
+
+                dispatch_sound_event(d);
+                free_sound_event(d);
+        }
+}
+
+static gboolean idle_cb(void *userdata) {
+        idle_id = 0;
+
+        dispatch_queue();
+
+        return FALSE;
+}
+
+static void connect_settings(void);
+
+static gboolean emission_hook_cb(GSignalInvocationHint *hint, guint n_param_values, const GValue *param_values, gpointer data) {
+        static SoundEventData *d = NULL;
+        GdkEvent *e;
+        GObject *object;
+
+        connect_settings();
+
+        if (disabled)
+                return TRUE;
+
+        object = g_value_get_object(&param_values[0]);
+
+        /* g_message("signal '%s' on object of type '%s' with name '%s'", */
+        /*           g_signal_name(hint->signal_id), */
+        /*           G_OBJECT_TYPE_NAME(object), */
+        /*           gtk_widget_get_name(GTK_WIDGET(object))); */
+
+        /* if (GTK_IS_WINDOW(object)) */
+        /*     g_message("window role='%s' title='%s' type='%u'", */
+        /*               gtk_window_get_role(GTK_WINDOW(object)), */
+        /*               gtk_window_get_title(GTK_WINDOW(object)), */
+        /*               gtk_window_get_type_hint(GTK_WINDOW(object))); */
+
+        /* Filter a few very often occuring signals as quickly as possible */
+        if ((hint->signal_id == signal_id_widget_hide ||
+             hint->signal_id == signal_id_widget_show ||
+             hint->signal_id == signal_id_widget_window_state_event) &&
+            !GTK_IS_WINDOW(object))
+                return TRUE;
+
+        if (hint->signal_id != signal_id_widget_hide &&
+            hint->signal_id != signal_id_dialog_response &&
+            !gtk_widget_is_drawable(GTK_WIDGET (object)))
+                return TRUE;
+
+        d = g_slice_new0(SoundEventData);
+
+        d->object = g_object_ref(object);
+
+        d->signal_id = hint->signal_id;
+
+        if (d->signal_id == signal_id_widget_window_state_event) {
+                d->event = gdk_event_copy(g_value_peek_pointer(&param_values[1]));
+        } else if ((e = gtk_get_current_event()))
+                d->event = gdk_event_copy(e);
+
+        if (n_param_values > 1) {
+                g_value_init(&d->arg1, G_VALUE_TYPE(&param_values[1]));
+                g_value_copy(&param_values[1], &d->arg1);
+                d->arg1_is_set = TRUE;
+        }
+
+        g_queue_push_tail(&sound_event_queue, d);
+
+        if (idle_id == 0)
+                idle_id = gdk_threads_add_idle_full(GDK_PRIORITY_REDRAW-1, (GSourceFunc) idle_cb, NULL, NULL);
+
+        return TRUE;
+}
+
+static void install_hook(GType type, const char *sig, guint *sn) {
+        GTypeClass *type_class;
+
+        type_class = g_type_class_ref(type);
+
+        *sn = g_signal_lookup(sig, type);
+        g_signal_add_emission_hook(*sn, 0, emission_hook_cb, NULL, NULL);
+
+        g_type_class_unref(type_class);
+}
+
+static void read_enable_input_feedback_sounds(GtkSettings *s) {
+        gboolean enabled = !disabled;
+
+        if (g_getenv("CANBERRA_FORCE_INPUT_FEEDBACK_SOUNDS"))
+                disabled = FALSE;
+        else {
+                g_object_get(G_OBJECT(s), "gtk-enable-input-feedback-sounds", &enabled, NULL);
+                disabled = !enabled;
+        }
+}
+
+static void enable_input_feedback_sounds_changed(GtkSettings *s, GParamSpec *arg1, gpointer userdata) {
+        read_enable_input_feedback_sounds(s);
+}
+
+static void connect_settings(void) {
+        GtkSettings *s;
+        static gboolean connected = FALSE;
+
+        if (connected)
+                return;
+
+        if (!(s = gtk_settings_get_default()))
+                return;
+
+        if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-enable-input-feedback-sounds")) {
+                g_signal_connect(G_OBJECT(s), "notify::gtk-enable-input-feedback-sounds", G_CALLBACK(enable_input_feedback_sounds_changed), NULL);
+                read_enable_input_feedback_sounds(s);
+        } else
+                g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-enable-input-feedback-sounds property.");
+
+        connected = TRUE;
+}
+
+#if GTK_CHECK_VERSION(3,0,0)
+#warning "We really need a quit handler in Gtk 3.0, https://bugzilla.gnome.org/show_bug.cgi?id=639770"
+#else
+static gboolean quit_handler(gpointer data) {
+        dispatch_queue();
+        return FALSE;
+}
+#endif
+
+G_MODULE_EXPORT void gtk_module_init(gint *argc, gchar ***argv[]) {
+
+        /* This is the same quark libgnomeui uses! */
+        disable_sound_quark = g_quark_from_string("gnome_disable_sound_events");
+        was_iconized_quark = g_quark_from_string("canberra_was_iconized");
+        is_xembed_quark = g_quark_from_string("canberra_is_xembed");
+
+        /* Hook up the gtk setting */
+        connect_settings();
+
+        install_hook(GTK_TYPE_WINDOW, "show", &signal_id_widget_show);
+        install_hook(GTK_TYPE_WINDOW, "hide", &signal_id_widget_hide);
+        install_hook(GTK_TYPE_DIALOG, "response", &signal_id_dialog_response);
+        install_hook(GTK_TYPE_MENU_ITEM, "activate", &signal_id_menu_item_activate);
+        install_hook(GTK_TYPE_CHECK_MENU_ITEM, "toggled", &signal_id_check_menu_item_toggled);
+        install_hook(GTK_TYPE_TOGGLE_BUTTON, "toggled", &signal_id_toggle_button_toggled);
+        install_hook(GTK_TYPE_BUTTON, "pressed", &signal_id_button_pressed);
+        install_hook(GTK_TYPE_BUTTON, "released", &signal_id_button_released);
+        install_hook(GTK_TYPE_WIDGET, "window-state-event", &signal_id_widget_window_state_event);
+        install_hook(GTK_TYPE_NOTEBOOK, "switch-page", &signal_id_notebook_switch_page);
+        install_hook(GTK_TYPE_TREE_VIEW, "cursor-changed", &signal_id_tree_view_cursor_changed);
+        install_hook(GTK_TYPE_ICON_VIEW, "selection-changed", &signal_id_icon_view_selection_changed);
+        install_hook(GTK_TYPE_WIDGET, "drag-begin", &signal_id_widget_drag_begin);
+        install_hook(GTK_TYPE_WIDGET, "drag-drop", &signal_id_widget_drag_drop);
+        install_hook(GTK_TYPE_WIDGET, "drag-failed", &signal_id_widget_drag_failed);
+        install_hook(GTK_TYPE_EXPANDER, "activate", &signal_id_expander_activate);
+
+#if !GTK_CHECK_VERSION(3,0,0)
+        gtk_quit_add(1, quit_handler, NULL);
+#endif
+}
+
+G_MODULE_EXPORT gchar* g_module_check_init(GModule *module);
+
+G_MODULE_EXPORT gchar* g_module_check_init(GModule *module) {
+        g_module_make_resident(module);
+        return NULL;
+}
Index: libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk.c
===================================================================
--- libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk.c	(nonexistent)
+++ libcanberra/create-0.30-wayland-patch/libcanberra-0.30-new/src/canberra-gtk.c	(revision 385)
@@ -0,0 +1,549 @@
+/*-*- Mode: C; c-basic-offset: 8 -*-*/
+
+/***
+  This file is part of libcanberra.
+
+  Copyright 2008 Lennart Poettering
+
+  libcanberra is free software; you can redistribute it and/or modify
+  it under the terms of the GNU Lesser General Public License as
+  published by the Free Software Foundation, either version 2.1 of the
+  License, or (at your option) any later version.
+
+  libcanberra is distributed in the hope that it will be useful, but
+  WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  Lesser General Public License for more details.
+
+  You should have received a copy of the GNU Lesser General Public
+  License along with libcanberra. If not, see
+  <http://www.gnu.org/licenses/>.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
+#include <X11/Xatom.h>
+
+#include "canberra.h"
+#include "canberra-gtk.h"
+#include "common.h"
+#include "malloc.h"
+#include "proplist.h"
+#include "fork-detect.h"
+
+/**
+ * SECTION:canberra-gtk
+ * @short_description: Gtk+ libcanberra Bindings
+ *
+ * libcanberra-gtk provides a few functions that simplify libcanberra
+ * usage from Gtk+ programs. It maintains a single ca_context object
+ * per #GdkScreen that is made accessible via
+ * ca_gtk_context_get_for_screen(), with a shortcut ca_gtk_context_get()
+ * to get the context for the default screen. More importantly, it provides
+ * a few functions
+ * to compile event sound property lists based on GtkWidget objects or
+ * GdkEvent events.
+ */
+
+static void read_sound_theme_name(ca_context *c, GtkSettings *s) {
+        gchar *theme_name = NULL;
+
+        g_object_get(G_OBJECT(s), "gtk-sound-theme-name", &theme_name, NULL);
+
+        if (theme_name) {
+                ca_context_change_props(c, CA_PROP_CANBERRA_XDG_THEME_NAME, theme_name, NULL);
+                g_free(theme_name);
+        }
+}
+
+static void read_enable_event_sounds(ca_context *c, GtkSettings *s) {
+        gboolean enable_event_sounds = TRUE;
+
+        if (!g_getenv("CANBERRA_FORCE_EVENT_SOUNDS"))
+                g_object_get(G_OBJECT(s), "gtk-enable-event-sounds", &enable_event_sounds, NULL);
+
+        ca_context_change_props(c, CA_PROP_CANBERRA_ENABLE, enable_event_sounds ? "1" : "0", NULL);
+}
+
+static void sound_theme_name_changed(GtkSettings *s, GParamSpec *arg1, ca_context *c) {
+        read_sound_theme_name(c, s);
+}
+
+static void enable_event_sounds_changed(GtkSettings *s, GParamSpec *arg1, ca_context *c) {
+        read_enable_event_sounds(c, s);
+}
+
+/**
+ * ca_gtk_context_get:
+ *
+ * Gets the single ca_context object for the default screen. See
+ * ca_gtk_context_get_for_screen().
+ *
+ * Returns: a ca_context object. The object is owned by libcanberra-gtk
+ *   and must not be destroyed
+ */
+ca_context *ca_gtk_context_get(void) {
+        return ca_gtk_context_get_for_screen(NULL);
+}
+
+/**
+ * ca_gtk_context_get_for_screen:
+ * @screen: the #GdkScreen to get the context for, or %NULL to use
+ *   the default screen
+ *
+ * libcanberra-gtk maintains a single ca_context object for each
+ * #GdkScreen. Use this function to access it. The
+ * %CA_PROP_CANBERRA_XDG_THEME_NAME of this context property is
+ * dynamically bound to the XSETTINGS setting for the XDG theme
+ * name. CA_PROP_APPLICATION_NAME is bound to
+ * g_get_application_name().
+ *
+ * Returns: a ca_context object. The object is owned by libcanberra-gtk
+ *   and must not be destroyed
+ *
+ * Since: 0.13
+ */
+ca_context *ca_gtk_context_get_for_screen(GdkScreen *screen) {
+        ca_context *c = NULL;
+        ca_proplist *p = NULL;
+        const char *name;
+        GtkSettings *s;
+
+        if (!screen)
+                screen = gdk_screen_get_default();
+
+        if ((c = g_object_get_data(G_OBJECT(screen), "canberra::gtk::context")))
+                return c;
+
+        if (ca_context_create(&c) != CA_SUCCESS)
+                return NULL;
+
+        if (ca_proplist_create(&p) != CA_SUCCESS) {
+                ca_context_destroy(c);
+                return NULL;
+        }
+
+        if ((name = g_get_application_name()))
+                ca_proplist_sets(p, CA_PROP_APPLICATION_NAME, name);
+        else {
+                ca_proplist_sets(p, CA_PROP_APPLICATION_NAME, "libcanberra-gtk");
+                ca_proplist_sets(p, CA_PROP_APPLICATION_VERSION, PACKAGE_VERSION);
+                ca_proplist_sets(p, CA_PROP_APPLICATION_ID, "org.freedesktop.libcanberra.gtk");
+        }
+
+        if ((name = gtk_window_get_default_icon_name()))
+                ca_proplist_sets(p, CA_PROP_APPLICATION_ICON_NAME, name);
+
+        if ((name = gdk_display_get_name(gdk_screen_get_display(screen))))
+                ca_proplist_sets(p, CA_PROP_WINDOW_X11_DISPLAY, name);
+
+        ca_proplist_setf(p, CA_PROP_WINDOW_X11_SCREEN, "%i", gdk_screen_get_number(screen));
+
+        ca_context_change_props_full(c, p);
+        ca_proplist_destroy(p);
+
+        if ((s = gtk_settings_get_for_screen(screen))) {
+
+                if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-sound-theme-name")) {
+                        g_signal_connect(G_OBJECT(s), "notify::gtk-sound-theme-name", G_CALLBACK(sound_theme_name_changed), c);
+                        read_sound_theme_name(c, s);
+                } else
+                        g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-sound-theme-name property.");
+
+                if (g_object_class_find_property(G_OBJECT_GET_CLASS(s), "gtk-enable-event-sounds")) {
+                        g_signal_connect(G_OBJECT(s), "notify::gtk-enable-event-sounds", G_CALLBACK(enable_event_sounds_changed), c);
+                        read_enable_event_sounds(c, s);
+                } else
+                        g_debug("This Gtk+ version doesn't have the GtkSettings::gtk-enable-event-sounds property.");
+        }
+
+        g_object_set_data_full(G_OBJECT(screen), "canberra::gtk::context", c, (GDestroyNotify) ca_context_destroy);
+
+        return c;
+}
+
+static GtkWindow* get_toplevel(GtkWidget *w) {
+        if (!(w = gtk_widget_get_toplevel(w)))
+                return NULL;
+
+        if (!GTK_IS_WINDOW(w))
+                return NULL;
+
+        return GTK_WINDOW(w);
+}
+
+static gint window_get_desktop(GdkDisplay *d, GdkWindow *w) {
+        Atom type_return;
+        gint format_return;
+        gulong nitems_return;
+        gulong bytes_after_return;
+        guchar *data = NULL;
+        gint ret = -1;
+
+#ifdef GDK_IS_X11_DISPLAY
+        if (!GDK_IS_X11_DISPLAY(d))
+                return 0;
+#endif
+
+        if (XGetWindowProperty(GDK_DISPLAY_XDISPLAY(d), GDK_WINDOW_XID(w),
+                               gdk_x11_get_xatom_by_name_for_display(d, "_NET_WM_DESKTOP"),
+                               0, G_MAXLONG, False, XA_CARDINAL, &type_return,
+                               &format_return, &nitems_return, &bytes_after_return,
+                               &data) != Success)
+                return -1;
+
+        if (type_return == XA_CARDINAL && format_return == 32 && data) {
+                guint32 desktop = *(guint32*) data;
+
+                if (desktop != 0xFFFFFFFF)
+                        ret = (gint) desktop;
+        }
+
+        if (type_return != None && data != NULL)
+                XFree(data);
+
+        return ret;
+}
+
+/**
+ * ca_gtk_proplist_set_for_widget:
+ * @p: The proplist to store these sound event properties in
+ * @w: The Gtk widget to base these sound event properties on
+ *
+ * Fill in a ca_proplist object for a sound event that shall originate
+ * from the specified Gtk Widget. This will fill in properties like
+ * %CA_PROP_WINDOW_NAME or %CA_PROP_WINDOW_X11_DISPLAY for you.
+ *
+ * Returns: 0 on success, negative error code on error.
+ */
+
+int ca_gtk_proplist_set_for_widget(ca_proplist *p, GtkWidget *widget) {
+        GtkWindow *w;
+        int ret;
+        const char *t, *role;
+
+        ca_return_val_if_fail(p, CA_ERROR_INVALID);
+        ca_return_val_if_fail(widget, CA_ERROR_INVALID);
+        ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED);
+
+        if (!(w = get_toplevel(widget)))
+                return CA_ERROR_INVALID;
+
+        if ((t = gtk_window_get_title(w)))
+                if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_NAME, t)) < 0)
+                        return ret;
+
+        if ((role = gtk_window_get_role(w))) {
+                if (role && t) {
+                        char *id = ca_sprintf_malloc("%s#%s", t, role);
+
+                        if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ID, id)) < 0) {
+                                ca_free(id);
+                                return ret;
+                        }
+
+                        ca_free(id);
+                }
+        } else if (t)
+                if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ID, t)) < 0)
+                        return ret;
+
+        if ((t = gtk_window_get_icon_name(w)))
+                if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_ICON_NAME, t)) < 0)
+                        return ret;
+
+        if (gtk_widget_get_realized(GTK_WIDGET(w))) {
+                GdkWindow *dw = NULL;
+                GdkScreen *screen = NULL;
+                GdkDisplay *display = NULL;
+                gint x = -1, y = -1, width = -1, height = -1, screen_width = -1, screen_height = -1;
+
+                if ((dw = gtk_widget_get_window(GTK_WIDGET(w))))
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_XID, "%lu", (unsigned long) GDK_WINDOW_XID(dw))) < 0)
+                                return ret;
+
+                if ((display = gtk_widget_get_display(GTK_WIDGET(w)))) {
+                        if ((t = gdk_display_get_name(display)))
+                                if ((ret = ca_proplist_sets(p, CA_PROP_WINDOW_X11_DISPLAY, t)) < 0)
+                                        return ret;
+
+                        if (dw)  {
+                                gint desktop = window_get_desktop(display, dw);
+
+                                if (desktop >= 0)
+                                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_DESKTOP, "%i", desktop)) < 0)
+                                                return ret;
+                        }
+                }
+
+                if ((screen = gtk_widget_get_screen(GTK_WIDGET(w)))) {
+
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_SCREEN, "%i", gdk_screen_get_number(screen))) < 0)
+                                return ret;
+
+                        if (dw)
+                                if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X11_MONITOR, "%i", gdk_screen_get_monitor_at_window(screen, dw))) < 0)
+                                        return ret;
+                }
+
+                /* FIXME, this might cause a round trip */
+
+                if (dw) {
+                        gdk_window_get_origin(dw, &x, &y);
+
+                        if (x >= 0)
+                                if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_X, "%i", x)) < 0)
+                                        return ret;
+                        if (y >= 0)
+                                if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_Y, "%i", y)) < 0)
+                                        return ret;
+                }
+
+                gtk_window_get_size(w, &width, &height);
+
+                if (width > 0)
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_WIDTH, "%i", width)) < 0)
+                                return ret;
+                if (height > 0)
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_HEIGHT, "%i", height)) < 0)
+                                return ret;
+
+                if (x >= 0 && width > 0) {
+                        screen_width = gdk_screen_get_width(gtk_widget_get_screen(GTK_WIDGET(w)));
+
+                        x += width/2;
+                        x = CA_CLAMP(x, 0, screen_width-1);
+
+                        /* We use these strange format strings here to avoid that libc
+                         * applies locale information on the formatting of floating
+                         * numbers. */
+
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_HPOS, "%i.%03i",
+                                                    (int) (x/(screen_width-1)), (int) (1000.0*x/(screen_width-1)) % 1000)) < 0)
+                                return ret;
+                }
+
+                if (y >= 0 && height > 0) {
+                        screen_height = gdk_screen_get_height(gtk_widget_get_screen(GTK_WIDGET(w)));
+
+                        y += height/2;
+                        y = CA_CLAMP(y, 0, screen_height-1);
+
+                        if ((ret = ca_proplist_setf(p, CA_PROP_WINDOW_VPOS, "%i.%03i",
+                                                    (int) (y/(screen_height-1)), (int) (1000.0*y/(screen_height-1)) % 1000)) < 0)
+                                return ret;
+                }
+        }
+
+        return CA_SUCCESS;
+}
+
+/**
+ * ca_gtk_proplist_set_for_event:
+ * @p: The proplist to store these sound event properties in
+ * @e: The Gdk event to base these sound event properties on
+ *
+ * Fill in a ca_proplist object for a sound event that is being
+ * triggered by the specified Gdk Event. This will fill in properties
+ * like %CA_PROP_EVENT_MOUSE_X or %CA_PROP_EVENT_MOUSE_BUTTON for
+ * you. This will internally also cal ca_gtk_proplist_set_for_widget()
+ * on the widget this event belongs to.
+ *
+ * Returns: 0 on success, negative error code on error.
+ */
+
+int ca_gtk_proplist_set_for_event(ca_proplist *p, GdkEvent *e) {
+        gdouble x, y;
+        GdkWindow *gw;
+        GtkWidget *w = NULL;
+        int ret;
+
+        ca_return_val_if_fail(p, CA_ERROR_INVALID);
+        ca_return_val_if_fail(e, CA_ERROR_INVALID);
+        ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED);
+
+        if ((gw = e->any.window)) {
+                gdk_window_get_user_data(gw, (gpointer*) &w);
+
+                if (w)
+                        if ((ret = ca_gtk_proplist_set_for_widget(p, w)) < 0)
+                                return ret;
+        }
+
+        if (gdk_event_get_root_coords(e, &x, &y)) {
+
+                if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_X, "%0.0f", x)) < 0)
+                        return ret;
+
+                if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_Y, "%0.0f", y)) < 0)
+                        return ret;
+
+                if (w)  {
+                        int width, height;
+
+                        width = gdk_screen_get_width(gtk_widget_get_screen(w));
+                        height = gdk_screen_get_height(gtk_widget_get_screen(w));
+
+                        /* We use these strange format strings here to avoid that
+                         * libc applies locale information on the formatting of
+                         * floating numbers. */
+
+                        if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_HPOS, "%i.%03i",
+                                                    (int) (x/(width-1)), (int) (1000.0*x/(width-1)) % 1000)) < 0)
+                                return ret;
+
+                        if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_VPOS, "%i.%03i",
+                                                    (int) (y/(height-1)), (int) (1000.0*y/(height-1)) % 1000)) < 0)
+                                return ret;
+                }
+        }
+
+        if (e->type == GDK_BUTTON_PRESS ||
+            e->type == GDK_2BUTTON_PRESS ||
+            e->type == GDK_3BUTTON_PRESS ||
+            e->type == GDK_BUTTON_RELEASE) {
+
+                if ((ret = ca_proplist_setf(p, CA_PROP_EVENT_MOUSE_BUTTON, "%u", e->button.button)) < 0)
+                        return ret;
+        }
+
+        return CA_SUCCESS;
+}
+
+/**
+ * ca_gtk_play_for_widget:
+ * @w: The Gtk widget to base these sound event properties on
+ * @id: The event id that can later be used to cancel this event sound
+ * using ca_context_cancel(). This can be any integer and shall be
+ * chosen be the client program. It is a good idea to pass 0 here if
+ * cancelling the sound later is not needed. If the same id is passed
+ * to multiple sounds they can be canceled with a single
+ * ca_context_cancel() call.
+ * @...: additional event properties as pairs of strings, terminated by NULL.
+ *
+ * Play a sound event for the specified widget. This will internally
+ * call ca_gtk_proplist_set_for_widget() and then merge them with the
+ * properties passed in via the NULL terminated argument
+ * list. Finally, it will call ca_context_play_full() to actually play
+ * the event sound.
+ *
+ * Returns: 0 on success, negative error code on error.
+ */
+
+int ca_gtk_play_for_widget(GtkWidget *w, uint32_t id, ...) {
+        va_list ap;
+        int ret;
+        ca_proplist *p;
+        GdkScreen *s;
+
+        ca_return_val_if_fail(w, CA_ERROR_INVALID);
+        ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED);
+
+        if ((ret = ca_proplist_create(&p)) < 0)
+                return ret;
+
+        if ((ret = ca_gtk_proplist_set_for_widget(p, w)) < 0)
+                goto fail;
+
+        va_start(ap, id);
+        ret = ca_proplist_merge_ap(p, ap);
+        va_end(ap);
+
+        if (ret < 0)
+                goto fail;
+
+        s = gtk_widget_get_screen(w);
+        ret = ca_context_play_full(ca_gtk_context_get_for_screen(s), id, p, NULL, NULL);
+
+fail:
+
+        ca_assert_se(ca_proplist_destroy(p) == 0);
+
+        return ret;
+}
+
+/**
+ * ca_gtk_play_for_event:
+ * @e: The Gdk event to base these sound event properties on
+ * @id: The event id that can later be used to cancel this event sound
+ * using ca_context_cancel(). This can be any integer and shall be
+ * chosen be the client program. It is a good idea to pass 0 here if
+ * cancelling the sound later is not needed. If the same id is passed
+ * to multiple sounds they can be canceled with a single
+ * ca_context_cancel() call.
+ * @...: additional event properties as pairs of strings, terminated by NULL.
+ *
+ * Play a sound event for the specified event. This will internally
+ * call ca_gtk_proplist_set_for_event() and then merge them with the
+ * properties passed in via the NULL terminated argument
+ * list. Finally, it will call ca_context_play_full() to actually play
+ * the event sound.
+ *
+ * Returns: 0 on success, negative error code on error.
+ */
+
+int ca_gtk_play_for_event(GdkEvent *e, uint32_t id, ...) {
+        va_list ap;
+        int ret;
+        ca_proplist *p;
+        GdkScreen *s;
+
+        ca_return_val_if_fail(e, CA_ERROR_INVALID);
+        ca_return_val_if_fail(!ca_detect_fork(), CA_ERROR_FORKED);
+
+        if ((ret = ca_proplist_create(&p)) < 0)
+                return ret;
+
+        if ((ret = ca_gtk_proplist_set_for_event(p, e)) < 0)
+                goto fail;
+
+        va_start(ap, id);
+        ret = ca_proplist_merge_ap(p, ap);
+        va_end(ap);
+
+        if (ret < 0)
+                goto fail;
+
+        if (e->any.window)
+#if GTK_CHECK_VERSION (2, 90, 7)
+                s = gdk_window_get_screen(e->any.window);
+#else
+                s = gdk_drawable_get_screen(GDK_DRAWABLE(e->any.window));
+#endif
+        else
+                s = gdk_screen_get_default();
+
+        ret = ca_context_play_full(ca_gtk_context_get_for_screen(s), id, p, NULL, NULL);
+
+fail:
+
+        ca_assert_se(ca_proplist_destroy(p) == 0);
+
+        return ret;
+}
+
+/**
+ * ca_gtk_widget_disable_sounds:
+ * @w: The Gtk widget to disable automatic event sounds for.
+ * @enable: Boolean specifying whether sound events shall be enabled or disabled for this widget.
+ *
+ * By default sound events are automatically generated for all kinds
+ * of input events. Use this function to disable this. This is
+ * intended to be used for widgets which directly generate sound
+ * events.
+ */
+
+void ca_gtk_widget_disable_sounds(GtkWidget *w, gboolean enable) {
+        static GQuark disable_sound_quark = 0;
+
+        /* This is the same quark used by libgnomeui! */
+        if (!disable_sound_quark)
+                disable_sound_quark = g_quark_from_static_string("gnome_disable_sound_events");
+
+        g_object_set_qdata(G_OBJECT(w), disable_sound_quark, GINT_TO_POINTER(!!enable));
+}
Index: libcanberra/patches/README
===================================================================
--- libcanberra/patches/README	(nonexistent)
+++ libcanberra/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: libcanberra/patches
===================================================================
--- libcanberra/patches	(nonexistent)
+++ libcanberra/patches	(revision 385)

Property changes on: libcanberra/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libcanberra
===================================================================
--- libcanberra	(nonexistent)
+++ libcanberra	(revision 385)

Property changes on: libcanberra
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libdeflate/Makefile
===================================================================
--- libdeflate/Makefile	(nonexistent)
+++ libdeflate/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libdeflate
+
+versions    = 1.19
+pkgname     = libdeflate
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libdeflate
===================================================================
--- libdeflate	(nonexistent)
+++ libdeflate	(revision 385)

Property changes on: libdeflate
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libfakekey/Makefile
===================================================================
--- libfakekey/Makefile	(nonexistent)
+++ libfakekey/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libfakekey
+
+versions    = 0.3
+pkgname     = libfakekey
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libfakekey
===================================================================
--- libfakekey	(nonexistent)
+++ libfakekey	(revision 385)

Property changes on: libfakekey
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libmypaint/Makefile
===================================================================
--- libmypaint/Makefile	(nonexistent)
+++ libmypaint/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libmypaint
+
+versions    = 1.6.1
+pkgname     = libmypaint
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libmypaint
===================================================================
--- libmypaint	(nonexistent)
+++ libmypaint	(revision 385)

Property changes on: libmypaint
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libportal/Makefile
===================================================================
--- libportal/Makefile	(nonexistent)
+++ libportal/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libportal
+
+versions    = 0.6
+pkgname     = libportal
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/libportal-0.6-dbus-connection.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-0.6-dbus-connection-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: libportal/create-0.6-dbus-connection-patch/create.patch.sh
===================================================================
--- libportal/create-0.6-dbus-connection-patch/create.patch.sh	(nonexistent)
+++ libportal/create-0.6-dbus-connection-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=0.6
+
+tar --files-from=file.list -xJvf ../libportal-$VERSION.tar.xz
+mv libportal-$VERSION libportal-$VERSION-orig
+
+cp -rf ./libportal-$VERSION-new ./libportal-$VERSION
+
+diff --unified -Nr  libportal-$VERSION-orig  libportal-$VERSION > libportal-$VERSION-dbus-connection.patch
+
+mv libportal-$VERSION-dbus-connection.patch ../patches
+
+rm -rf ./libportal-$VERSION
+rm -rf ./libportal-$VERSION-orig

Property changes on: libportal/create-0.6-dbus-connection-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libportal/create-0.6-dbus-connection-patch/file.list
===================================================================
--- libportal/create-0.6-dbus-connection-patch/file.list	(nonexistent)
+++ libportal/create-0.6-dbus-connection-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libportal-0.6/libportal/portal.c
Index: libportal/create-0.6-dbus-connection-patch/libportal-0.6-new/libportal/portal.c
===================================================================
--- libportal/create-0.6-dbus-connection-patch/libportal-0.6-new/libportal/portal.c	(nonexistent)
+++ libportal/create-0.6-dbus-connection-patch/libportal-0.6-new/libportal/portal.c	(revision 385)
@@ -0,0 +1,448 @@
+/*
+ * Copyright (C) 2018, Matthias Clasen
+ *
+ * This file is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation, version 3.0 of the
+ * License.
+ *
+ * This file is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ * SPDX-License-Identifier: LGPL-3.0-only
+ */
+
+#include "config.h"
+
+#include "portal-helpers.h"
+#include "portal-private.h"
+#include "portal-enums.h"
+
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <sys/vfs.h>
+#include <stdio.h>
+
+/**
+ * XdpPortal
+ *
+ * Context for portal calls.
+ *
+ * The XdpPortal object provides the main context object
+ * for the portal operations of libportal.
+ *
+ * Typically, an application will create a single XdpPortal
+ * object with [ctor@Portal.new] and use it throughout its lifetime.
+ */
+
+enum {
+  SPAWN_EXITED,
+  SESSION_STATE_CHANGED,
+  UPDATE_AVAILABLE,
+  UPDATE_PROGRESS,
+  LOCATION_UPDATED,
+  NOTIFICATION_ACTION_INVOKED,
+  LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL];
+
+G_DEFINE_TYPE (XdpPortal, xdp_portal, G_TYPE_OBJECT)
+
+static void
+xdp_portal_finalize (GObject *object)
+{
+  XdpPortal *portal = XDP_PORTAL (object);
+
+  /* inhibit */
+  if (portal->inhibit_handles)
+    g_hash_table_unref (portal->inhibit_handles);
+
+  if (portal->state_changed_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->state_changed_signal);
+
+  g_free (portal->session_monitor_handle);
+
+  /* spawn */
+  if (portal->spawn_exited_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->spawn_exited_signal);
+
+  /* updates */
+  if (portal->update_available_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->update_available_signal);
+  if (portal->update_progress_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->update_progress_signal);
+  g_free (portal->update_monitor_handle);
+
+  /* location */
+  if (portal->location_updated_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->location_updated_signal);
+  g_free (portal->location_monitor_handle);
+
+  /* notification */
+  if (portal->action_invoked_signal)
+    g_dbus_connection_signal_unsubscribe (portal->bus, portal->action_invoked_signal);
+
+  g_clear_object (&portal->bus);
+  g_free (portal->sender);
+
+  G_OBJECT_CLASS (xdp_portal_parent_class)->finalize (object);
+}
+
+static void
+xdp_portal_class_init (XdpPortalClass *klass)
+{
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  object_class->finalize = xdp_portal_finalize;
+
+  /**
+   * XdpPortal::spawn-exited:
+   * @portal: the [class@Portal] object
+   * @pid: the pid of the process
+   * @exit_status: the exit status of the process
+   *
+   * Emitted when a process that was spawned with [method@Portal.spawn] exits.
+   */
+  signals[SPAWN_EXITED] = g_signal_new ("spawn-exited",
+                                        G_TYPE_FROM_CLASS (object_class),
+                                        G_SIGNAL_RUN_FIRST,
+                                        0,
+                                        NULL, NULL,
+                                        NULL,
+                                        G_TYPE_NONE, 2,
+                                        G_TYPE_UINT,
+                                        G_TYPE_UINT);
+
+  /**
+   * XdpPortal::session-state-changed:
+   * @portal: the [class@Portal] object
+   * @screensaver_active: whether the screensaver is active
+   * @session_state: the current state of the login session
+   *
+   * Emitted when session state monitoring is
+   * enabled and the state of the login session changes or
+   * the screensaver is activated or deactivated.
+   */
+  signals[SESSION_STATE_CHANGED] = g_signal_new ("session-state-changed",
+                                                 G_TYPE_FROM_CLASS (object_class),
+                                                 G_SIGNAL_RUN_FIRST,
+                                                 0,
+                                                 NULL, NULL,
+                                                 NULL,
+                                                 G_TYPE_NONE, 2,
+                                                 G_TYPE_BOOLEAN,
+                                                 XDP_TYPE_LOGIN_SESSION_STATE);
+
+  /**
+   * XdpPortal::update-available:
+   * @portal: the [class@Portal] object
+   * @running_commit: the commit that the sandbox is running with
+   * @local_commit: the commit that is currently deployed. Restarting
+   *     the app will use this commit
+   * @remote_commit: the commit that is available as an update.
+   *     Updating the app will deloy this commit
+   *
+   * Emitted when updates monitoring is enabled
+   * and a new update is available.
+   *
+   * It is only sent once with the same information, but it can be sent many
+   * times if new updates appear.
+   */
+  signals[UPDATE_AVAILABLE] = g_signal_new ("update-available",
+                                            G_TYPE_FROM_CLASS (object_class),
+                                            G_SIGNAL_RUN_FIRST,
+                                            0,
+                                            NULL, NULL,
+                                            NULL,
+                                            G_TYPE_NONE, 3,
+                                            G_TYPE_STRING,
+                                            G_TYPE_STRING,
+                                            G_TYPE_STRING);
+
+  /**
+   * XdpPortal::update-progress:
+   * @portal: the [class@Portal] object
+   * @n_ops: the number of operations that the update consists of
+   * @op: the position of the currently active operation
+   * @progress: the progress of the currently active operation, as
+   *   a number between 0 and 100
+   * @status: the overall status of the update
+   * @error: the error name if the status is 'failed'
+   * @error_message: the error message if the status is 'failed'
+   *
+   * Emitted to indicate progress of an update installation.
+   *
+   * It is undefined exactly how often it is sent, but it will be emitted at
+   * least once at the end with a non-zero @status. For each successful
+   * operation in the update, we're also guaranteed to send exactly one signal
+   * with @progress 100.
+   */
+  signals[UPDATE_PROGRESS] = g_signal_new ("update-progress",
+                                           G_TYPE_FROM_CLASS (object_class),
+                                           G_SIGNAL_RUN_FIRST,
+                                           0,
+                                           NULL, NULL,
+                                           NULL,
+                                           G_TYPE_NONE, 6,
+                                           G_TYPE_UINT,
+                                           G_TYPE_UINT,
+                                           G_TYPE_UINT,
+                                           XDP_TYPE_UPDATE_STATUS,
+                                           G_TYPE_STRING,
+                                           G_TYPE_STRING);
+
+ /**
+   * XdpPortal::location-updated:
+   * @portal: the [class@Portal]
+   * @latitude: the latitude, in degrees
+   * @longitude: the longitude, in degrees
+   * @altitude: the altitude, in meters
+   * @accuracy: the accuracy, in meters
+   * @speed: the speed, in meters per second
+   * @heading: the heading, in degrees
+   * @description: the description
+   * @timestamp_s: the timestamp seconds since the Unix epoch
+   * @timestamp_ms: the microseconds fraction of the timestamp
+   *
+   * Emitted when location monitoring is enabled and the location changes.
+   */
+  signals[LOCATION_UPDATED] =
+    g_signal_new ("location-updated",
+                  G_TYPE_FROM_CLASS (object_class),
+                  G_SIGNAL_RUN_FIRST,
+                  0,
+                  NULL, NULL,
+                  NULL,
+                  G_TYPE_NONE, 9,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_DOUBLE,
+                  G_TYPE_STRING,
+                  G_TYPE_INT64,
+                  G_TYPE_INT64);
+
+  /**
+   * XdpPortal::notification-action-invoked:
+   * @portal: the [class@Portal]
+   * @id: the notification ID
+   * @action: the action name
+   * @parameter: (nullable): the target parameter for the action
+   *
+   * Emitted when a non-exported action is activated on a notification.
+   */
+  signals[NOTIFICATION_ACTION_INVOKED] =
+    g_signal_new ("notification-action-invoked",
+                  G_TYPE_FROM_CLASS (object_class),
+                  G_SIGNAL_RUN_FIRST,
+                  0,
+                  NULL, NULL,
+                  NULL,
+                  G_TYPE_NONE, 3,
+                  G_TYPE_STRING,
+                  G_TYPE_STRING,
+                  G_TYPE_VARIANT);
+}
+
+static void
+xdp_portal_init (XdpPortal *portal)
+{
+  int i;
+  const gchar *dbus_connection_name;
+
+  portal->bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
+  dbus_connection_name = portal->bus ? g_dbus_connection_get_unique_name (portal->bus) : NULL;
+  if (!dbus_connection_name)
+    dbus_connection_name = "_DBUS_NOT_PRESENT";
+  portal->sender = g_strdup (dbus_connection_name + 1);
+  for (i = 0; portal->sender[i]; i++)
+    if (portal->sender[i] == '.')
+      portal->sender[i] = '_';
+}
+
+/**
+ * xdp_portal_new:
+ *
+ * Creates a new [class@Portal] object.
+ *
+ * Returns: a newly created [class@Portal] object
+ */
+XdpPortal *
+xdp_portal_new (void)
+{
+  return g_object_new (XDP_TYPE_PORTAL, NULL);
+}
+
+/* This function is copied from xdg-desktop-portal */
+static int
+_xdp_parse_cgroup_file (FILE *f, gboolean *is_snap)
+{
+  ssize_t n;
+  g_autofree char *id = NULL;
+  g_autofree char *controller = NULL;
+  g_autofree char *cgroup = NULL;
+  size_t id_len = 0, controller_len = 0, cgroup_len = 0;
+
+  g_return_val_if_fail (f != NULL, -1);
+  g_return_val_if_fail (is_snap != NULL, -1);
+
+  *is_snap = FALSE;
+  do
+    {
+      n = getdelim (&id, &id_len, ':', f);
+      if (n == -1) break;
+      n = getdelim (&controller, &controller_len, ':', f);
+      if (n == -1) break;
+      n = getdelim (&cgroup, &cgroup_len, '\n', f);
+      if (n == -1) break;
+
+      /* Only consider the freezer, systemd group or unified cgroup
+       * hierarchies */
+      if ((!strcmp (controller, "freezer:") != 0 ||
+           !strcmp (controller, "name=systemd:") != 0 ||
+           !strcmp (controller, ":") != 0) &&
+          strstr (cgroup, "/snap.") != NULL)
+        {
+          *is_snap = TRUE;
+          break;
+        }
+    }
+  while (n >= 0);
+
+  if (n < 0 && !feof(f)) return -1;
+
+  return 0;
+}
+
+/* This function is copied from xdg-desktop-portal pid_is_snap() */
+static gpointer
+get_under_snap (gpointer user_data)
+{
+  g_autofree char *cgroup_path = NULL;;
+  int fd;
+  FILE *f = NULL;
+  gboolean is_snap = FALSE;
+  int err = 0;
+  pid_t pid = getpid ();
+  GError **error = user_data;
+
+  cgroup_path = g_strdup_printf ("/proc/%u/cgroup", (guint) pid);
+  fd = open (cgroup_path, O_RDONLY | O_CLOEXEC | O_NOCTTY);
+  if (fd == -1)
+    {
+      err = errno;
+      goto end;
+    }
+
+  f = fdopen (fd, "r");
+  if (f == NULL)
+    {
+      err = errno;
+      goto end;
+    }
+
+  fd = -1; /* fd is now owned by f */
+
+  if (_xdp_parse_cgroup_file (f, &is_snap) == -1)
+    err = errno;
+
+  fclose (f);
+
+end:
+  /* Silence ENOENT, treating it as "not a snap" */
+  if (err != 0 && err != ENOENT)
+    {
+      g_set_error (error, G_IO_ERROR, g_io_error_from_errno (err),
+                   "Could not parse cgroup info for pid %u: %s", (guint) pid,
+                   g_strerror (err));
+      return GINT_TO_POINTER (FALSE);
+    }
+  return GINT_TO_POINTER (is_snap);
+}
+
+/**
+ * xdp_portal_running_under_flatpak:
+ *
+ * Detects if running inside of a Flatpak or WebKit sandbox.
+ *
+ * See also: [func@Portal.running_under_sandbox].
+ *
+ * Returns: %TRUE if the current process is running under a Flatpak sandbox
+ */
+gboolean
+xdp_portal_running_under_flatpak (void)
+{
+  static gsize under_flatpak = 0;
+  enum {
+    NOT_FLATPAK = 1,
+    IS_FLATPAK  = 2
+  };
+
+  if (g_once_init_enter (&under_flatpak))
+    {
+      gboolean flatpak_info_exists = g_file_test ("/.flatpak-info", G_FILE_TEST_EXISTS);
+      if (flatpak_info_exists)
+        g_once_init_leave (&under_flatpak, IS_FLATPAK);
+      else
+        g_once_init_leave (&under_flatpak, NOT_FLATPAK);
+    }
+
+  return under_flatpak == IS_FLATPAK;
+}
+
+/**
+ * xdp_portal_running_under_snap:
+ * @error: return location for a #GError pointer
+ *
+ * Detects if you are running inside of a Snap sandbox.
+ *
+ * See also: [func@Portal.running_under_sandbox].
+ *
+ * Returns: %TRUE if the current process is running under a Snap sandbox, or
+ *   %FALSE if either unsandboxed or an error was encountered in which case
+ *   @error will be set
+ */
+gboolean
+xdp_portal_running_under_snap (GError **error)
+{
+  static GOnce under_snap_once = G_ONCE_INIT;
+  static GError *cached_error = NULL;
+  gboolean under_snap;
+
+  under_snap = GPOINTER_TO_INT (g_once (&under_snap_once, get_under_snap, &cached_error));
+
+  if (error != NULL && cached_error != NULL)
+    g_propagate_error (error, g_error_copy (cached_error));
+
+  return under_snap;
+}
+
+/**
+ * xdp_portal_running_under_sandbox:
+ *
+ * This function tries to determine if the current process is running under a
+ * sandbox that requires the use of portals.
+ *
+ * If you need to check error conditions see [func@Portal.running_under_snap].
+ *
+ * Note that these functions are all cached and will always return the same result.
+ *
+ * Returns: %TRUE if the current process should use portals to access resources
+ *   on the host system, or %FALSE if either an error was encountered or the
+ *   process is running unsandboxed
+ */
+gboolean
+xdp_portal_running_under_sandbox (void)
+{
+  return xdp_portal_running_under_flatpak () || xdp_portal_running_under_snap (NULL);
+}
Index: libportal/patches/README
===================================================================
--- libportal/patches/README	(nonexistent)
+++ libportal/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: libportal/patches
===================================================================
--- libportal/patches	(nonexistent)
+++ libportal/patches	(revision 385)

Property changes on: libportal/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libportal
===================================================================
--- libportal	(nonexistent)
+++ libportal	(revision 385)

Property changes on: libportal
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libraw/Makefile
===================================================================
--- libraw/Makefile	(nonexistent)
+++ libraw/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libraw
+
+versions    = 0.21.2
+pkgname     = LibRaw
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libraw
===================================================================
--- libraw	(nonexistent)
+++ libraw	(revision 385)

Property changes on: libraw
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libreoffice/Makefile
===================================================================
--- libreoffice/Makefile	(nonexistent)
+++ libreoffice/Makefile	(revision 385)
@@ -0,0 +1,64 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libreoffice
+
+versions    = 24.2.0.3 7.6.2.1
+pkgname     = libreoffice
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+tarballs   += $(foreach add, dictionaries help translations, $(addsuffix .$(suffix), $(addprefix $(pkgname)-$(add)-, $(versions))))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/libreoffice-24.2.0.3-isystem.patch
+patches    += $(CURDIR)/patches/libreoffice-24.2.0.3-odk-idl.patch
+
+patches    += $(CURDIR)/patches/libreoffice-7.6.2.1-isystem.patch
+patches    += $(CURDIR)/patches/libreoffice-7.6.2.1-odk-idl.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-24.2.0.3-isystem-patch ; ./create.patch.sh ) ; \
+	 ( cd create-24.2.0.3-odk-idl-patch ; ./create.patch.sh ) ; \
+	 ( cd create-7.6.2.1-isystem-patch  ; ./create.patch.sh ) ; \
+	 ( cd create-7.6.2.1-odk-idl-patch  ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: libreoffice/create-24.2.0.3-isystem-patch/create.patch.sh
===================================================================
--- libreoffice/create-24.2.0.3-isystem-patch/create.patch.sh	(nonexistent)
+++ libreoffice/create-24.2.0.3-isystem-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=24.2.0.3
+
+tar --files-from=file.list -xJvf ../libreoffice-$VERSION.tar.xz
+mv libreoffice-$VERSION libreoffice-$VERSION-orig
+
+cp -rf ./libreoffice-$VERSION-new ./libreoffice-$VERSION
+
+diff --unified -Nr  libreoffice-$VERSION-orig  libreoffice-$VERSION > libreoffice-$VERSION-isystem.patch
+
+mv libreoffice-$VERSION-isystem.patch ../patches
+
+rm -rf ./libreoffice-$VERSION
+rm -rf ./libreoffice-$VERSION-orig

Property changes on: libreoffice/create-24.2.0.3-isystem-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/create-24.2.0.3-isystem-patch/file.list
===================================================================
--- libreoffice/create-24.2.0.3-isystem-patch/file.list	(nonexistent)
+++ libreoffice/create-24.2.0.3-isystem-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libreoffice-24.2.0.3/configure.ac
Index: libreoffice/create-24.2.0.3-isystem-patch/libreoffice-24.2.0.3-new/configure.ac
===================================================================
--- libreoffice/create-24.2.0.3-isystem-patch/libreoffice-24.2.0.3-new/configure.ac	(nonexistent)
+++ libreoffice/create-24.2.0.3-isystem-patch/libreoffice-24.2.0.3-new/configure.ac	(revision 385)
@@ -0,0 +1,15327 @@
+dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 100 -*-
+dnl configure.ac serves as input for the GNU autoconf package
+dnl in order to create a configure script.
+
+# The version number in the second argument to AC_INIT should be four numbers separated by
+# periods. Some parts of the code requires the first one to be less than 128 and the others to be less
+# than 256. The four numbers can optionally be followed by a period and a free-form string containing
+# no spaces or periods, like "frobozz-mumble-42" or "alpha0". If the free-form string ends with one or
+# several non-alphanumeric characters, those are split off and used only for the
+# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
+
+AC_INIT([LibreOffice],[24.2.0.3],[],[],[http://documentfoundation.org/])
+
+dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
+dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
+dnl so check for the version of autoconf that is actually used to create the configure script
+AC_PREREQ([2.59])
+m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.68]), -1,
+    [AC_MSG_ERROR([at least autoconf version 2.68 is needed (you can use AUTOCONF environment variable to point to a suitable one)])])
+
+if test -n "$BUILD_TYPE"; then
+    AC_MSG_ERROR([You have sourced config_host.mk in this shell.  This may lead to trouble, please run in a fresh (login) shell.])
+fi
+
+save_CC=$CC
+save_CXX=$CXX
+
+first_arg_basename()
+{
+    for i in $1; do
+        basename "$i"
+        break
+    done
+}
+
+CC_BASE=`first_arg_basename "$CC"`
+CXX_BASE=`first_arg_basename "$CXX"`
+
+BUILD_TYPE="LibO"
+SCPDEFS=""
+GIT_NEEDED_SUBMODULES=""
+LO_PATH= # used by path_munge to construct a PATH variable
+
+FilterLibs()
+{
+    # Return value: $filteredlibs
+
+    filteredlibs=
+    if test "$COM" = "MSC"; then
+        for f in $1; do
+            if test "x$f" != "x${f#-L}"; then
+                filteredlibs="$filteredlibs -LIBPATH:${f:2}"
+            elif test "x$f" != "x${f#-l}"; then
+                filteredlibs="$filteredlibs ${f:2}.lib"
+            else
+                filteredlibs="$filteredlibs $f"
+            fi
+        done
+    else
+        for f in $1; do
+            case "$f" in
+                # let's start with Fedora's paths for now
+                -L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/)
+                    # ignore it: on UNIXoids it is searched by default anyway
+                    # but if it's given explicitly then it may override other paths
+                    # (on macOS it would be an error to use it instead of SDK)
+                    ;;
+                *)
+                    filteredlibs="$filteredlibs $f"
+                    ;;
+            esac
+        done
+    fi
+}
+
+PathFormat()
+{
+    # Args: $1: A pathname. On Cygwin and WSL, in either the Unix or the Windows format. Note that this
+    # function is called also on Unix.
+    #
+    # Return value: $formatted_path and $formatted_path_unix.
+    #
+    # $formatted_path is the argument in Windows format, but using forward slashes instead of
+    # backslashes, using 8.3 pathname components if necessary (if it otherwise would contains spaces
+    # or shell metacharacters).
+    #
+    # $formatted_path_unix is the argument in a form usable in Cygwin or WSL, using 8.3 components if
+    # necessary. On Cygwin, it is the same as $formatted_path, but on WSL it is $formatted_path as a
+    # Unix pathname.
+    #
+    # Errors out if 8.3 names are needed but aren't present for some of the path components.
+
+    # Examples:
+    #
+    # /home/tml/lo/master-optimised => C:/cygwin64/home/tml/lo/master-optimised
+    #
+    # C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe => C:/PROGRA~2/MICROS~3/INSTAL~1/vswhere.exe
+    #
+    # C:\Program Files (x86)\Microsoft Visual Studio\2019\Community => C:/PROGRA~2/MICROS~3/2019/COMMUN~1
+    #
+    # C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt => C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt
+    #
+    # /cygdrive/c/PROGRA~2/WI3CF2~1/10 => C:/PROGRA~2/WI3CF2~1/10
+    #
+    # C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\ => C:/PROGRA~2/WI3CF2~1/NETFXSDK/4.8/
+    #
+    # /usr/bin/find.exe => C:/cygwin64/bin/find.exe
+
+    if test -n "$UNITTEST_WSL_PATHFORMAT"; then
+        printf "PathFormat $1 ==> "
+    fi
+
+    formatted_path="$1"
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        if test "$build_os" = "wsl"; then
+            formatted_path=$(echo "$formatted_path" | tr -d '\r')
+        fi
+
+        pf_conv_to_dos=
+        # spaces,parentheses,brackets,braces are problematic in pathname
+        # so are backslashes
+        case "$formatted_path" in
+            *\ * | *\)* | *\(* | *\{* | *\}* | *\[* | *\]* | *\\* )
+                pf_conv_to_dos="yes"
+            ;;
+        esac
+        if test "$pf_conv_to_dos" = "yes"; then
+            if test "$build_os" = "wsl"; then
+                case "$formatted_path" in
+                    /*)
+                        formatted_path=$(wslpath -w "$formatted_path")
+                        ;;
+                esac
+                formatted_path=$($WSL_LO_HELPER --8.3 "$formatted_path")
+            elif test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+                formatted_path=`cygpath -sm "$formatted_path"`
+            else
+                formatted_path=`cygpath -d "$formatted_path"`
+            fi
+            if test $? -ne 0;  then
+                AC_MSG_ERROR([path conversion failed for "$1".])
+            fi
+        fi
+        fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
+        fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
+        if test "$fp_count_slash$fp_count_colon" != "00"; then
+            if test "$fp_count_colon" = "0"; then
+                new_formatted_path=`realpath "$formatted_path"`
+                if test $? -ne 0;  then
+                    AC_MSG_WARN([realpath failed for "$formatted_path", not necessarily a problem.])
+                else
+                    formatted_path="$new_formatted_path"
+                fi
+            fi
+            if test "$build_os" = "wsl"; then
+                if test "$fp_count_colon" != "0"; then
+                    formatted_path=$(wslpath "$formatted_path")
+                    local final_slash=
+                    case "$formatted_path" in
+                        */)
+                            final_slash=/
+                            ;;
+                    esac
+                    formatted_path=$(wslpath -m $formatted_path)
+                    case "$formatted_path" in
+                        */)
+                            ;;
+                        *)
+                            formatted_path="$formatted_path"$final_slash
+                            ;;
+                    esac
+                else
+                    formatted_path=$(wslpath -m "$formatted_path")
+                fi
+            else
+                formatted_path=`cygpath -m "$formatted_path"`
+            fi
+            if test $? -ne 0;  then
+                AC_MSG_ERROR([path conversion failed for "$1".])
+            fi
+        fi
+        fp_count_space=`echo "$formatted_path" | $GREP -c "[ ]"`
+        if test "$fp_count_space" != "0"; then
+            AC_MSG_ERROR([converted path "$formatted_path" still contains spaces. Short filenames (8.3 filenames) support was disabled on this system?])
+        fi
+    fi
+    if test "$build_os" = "wsl"; then
+        # WSL can't run Windows binaries from Windows pathnames so we need a separate return value in Unix format
+        formatted_path_unix=$(wslpath "$formatted_path")
+    else
+        # But Cygwin can
+        formatted_path_unix="$formatted_path"
+    fi
+}
+
+AbsolutePath()
+{
+    # There appears to be no simple and portable method to get an absolute and
+    # canonical path, so we try creating the directory if does not exist and
+    # utilizing the shell and pwd.
+
+    # Args: $1: A possibly relative pathname
+    # Return value: $absolute_path
+
+    # Convert to unix path, mkdir would treat c:/path as a relative path.
+    PathFormat "$1"
+    local rel="$formatted_path_unix"
+    absolute_path=""
+    test ! -e "$rel" && mkdir -p "$rel"
+    if test -d "$rel" ; then
+        cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".])
+        absolute_path="$(pwd)"
+        cd - > /dev/null
+    else
+        AC_MSG_ERROR([Failed to resolve absolute path.  "$rel" does not exist or is not a directory.])
+    fi
+}
+
+WARNINGS_FILE=config.warn
+WARNINGS_FILE_FOR_BUILD=config.Build.warn
+rm -f "$WARNINGS_FILE" "$WARNINGS_FILE_FOR_BUILD"
+have_WARNINGS="no"
+add_warning()
+{
+    if test "$have_WARNINGS" = "no"; then
+        echo "*************************************" > "$WARNINGS_FILE"
+        have_WARNINGS="yes"
+        if which tput >/dev/null && test "`tput colors 2>/dev/null || echo 0`" -ge 8; then
+            dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@
+            COLORWARN='*@<:@1;33;40m WARNING @<:@0m:'
+        else
+            COLORWARN="* WARNING :"
+        fi
+    fi
+    echo "$COLORWARN $@" >> "$WARNINGS_FILE"
+}
+
+dnl Some Mac User have the bad habit of letting a lot of crap
+dnl accumulate in their PATH and even adding stuff in /usr/local/bin
+dnl that confuse the build.
+dnl For the ones that use LODE, let's be nice and protect them
+dnl from themselves
+
+mac_sanitize_path()
+{
+    mac_path="$LODE_HOME/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin"
+dnl a common but nevertheless necessary thing that may be in a fancy
+dnl path location is git, so make sure we have it
+    mac_git_path=`which git 2>/dev/null`
+    if test -n "$mac_git_path" -a -x "$mac_git_path" -a "$mac_git_path" != "/usr/bin/git" ; then
+        mac_path="$mac_path:`dirname $mac_git_path`"
+    fi
+dnl a not so common but nevertheless quite helpful thing that may be in a fancy
+dnl path location is gpg, so make sure we find it
+    mac_gpg_path=`which gpg 2>/dev/null`
+    if test -n "$mac_gpg_path" -a -x "$mac_gpg_path" -a "$mac_gpg_path" != "/usr/bin/gpg" ; then
+        mac_path="$mac_path:`dirname $mac_gpg_path`"
+    fi
+    PATH="$mac_path"
+    unset mac_path
+    unset mac_git_path
+    unset mac_gpg_path
+}
+
+dnl semantically test a three digits version
+dnl $1 - $3 = minimal version
+dnl $4 - $6 = current version
+
+check_semantic_version_three()
+{
+    test "$4" -gt "$1" \
+        -o \( "$4" -eq "$1" -a "$5" -gt "$2" \) \
+        -o \( "$4" -eq "$1" -a "$5" -eq "$2" -a "$6" -ge "$3" \)
+    return $?
+}
+
+dnl calls check_semantic_version_three with digits in named variables $1_MAJOR, $1_MINOR, $1_TINY
+dnl $1 = current version prefix, e.g. EMSCRIPTEN => EMSCRIPTEN_
+dnl $2 = postfix to $1, e.g. MIN => EMSCRIPTEN_MIN_
+
+check_semantic_version_three_prefixed()
+{
+    eval local MIN_MAJOR="\$${1}_${2}_MAJOR"
+    eval local MIN_MINOR="\$${1}_${2}_MINOR"
+    eval local MIN_TINY="\$${1}_${2}_TINY"
+    eval local CUR_MAJOR="\$${1}_MAJOR"
+    eval local CUR_MINOR="\$${1}_MINOR"
+    eval local CUR_TINY="\$${1}_TINY"
+    check_semantic_version_three $MIN_MAJOR $MIN_MINOR $MIN_TINY $CUR_MAJOR $CUR_MINOR $CUR_TINY
+    return $?
+}
+
+echo "********************************************************************"
+echo "*"
+echo "*   Running ${PACKAGE_NAME} build configuration."
+echo "*"
+echo "********************************************************************"
+echo ""
+
+dnl ===================================================================
+dnl checks build and host OSes
+dnl do this before argument processing to allow for platform dependent defaults
+dnl ===================================================================
+
+# Check for WSL (version 2, at least). But if --host is explicitly specified (to really do build for
+# Linux on WSL) trust that.
+if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
+    ac_cv_host="x86_64-pc-wsl"
+    ac_cv_host_cpu="x86_64"
+    ac_cv_host_os="wsl"
+    ac_cv_build="$ac_cv_host"
+    ac_cv_build_cpu="$ac_cv_host_cpu"
+    ac_cv_build_os="$ac_cv_host_os"
+
+    # Emulation of Cygwin's cygpath command for WSL.
+    cygpath()
+    {
+        if test -n "$UNITTEST_WSL_CYGPATH"; then
+            echo -n cygpath "$@" "==> "
+        fi
+
+        # Cygwin's real cygpath has a plethora of options but we use only a few here.
+        local args="$@"
+        local opt
+        local opt_d opt_m opt_u opt_w opt_l opt_s opt_p
+        OPTIND=1
+
+        while getopts dmuwlsp opt; do
+            case "$opt" in
+                \?)
+                    AC_MSG_ERROR([Unimplemented cygpath emulation option in invocation: cygpath $args])
+                    ;;
+                ?)
+                    eval opt_$opt=yes
+                    ;;
+            esac
+        done
+
+        shift $((OPTIND-1))
+
+        if test $# -ne 1; then
+            AC_MSG_ERROR([Invalid cygpath emulation invocation: Pathname missing]);
+        fi
+
+        local input="$1"
+
+        local result
+
+        if test -n "$opt_d" -o -n "$opt_m" -o -n "$opt_w"; then
+            # Print Windows path, possibly in 8.3 form (-d) or with forward slashes (-m)
+
+            if test -n "$opt_u"; then
+                AC_MSG_ERROR([Invalid cygpath invocation: Both Windows and Unix path output requested])
+            fi
+
+            case "$input" in
+                /mnt/*)
+                    # A Windows file in WSL format
+                    input=$(wslpath -w "$input")
+                    ;;
+                [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
+                    # Already in Windows format
+                    ;;
+                /*)
+                    input=$(wslpath -w "$input")
+                    ;;
+                *)
+                    AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute])
+                    ;;
+            esac
+            if test -n "$opt_d" -o -n "$opt_s"; then
+                input=$($WSL_LO_HELPER --8.3 "$input")
+            fi
+            if test -n "$opt_m"; then
+                input="${input//\\//}"
+            fi
+            echo "$input"
+        else
+            # Print Unix path
+
+            case "$input" in
+                [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
+                    wslpath -u "$input"
+                    ;;
+                /)
+                    echo "$input"
+                    ;;
+                *)
+                    AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute])
+                    ;;
+            esac
+        fi
+    }
+
+    if test -n "$UNITTEST_WSL_CYGPATH"; then
+        BUILDDIR=.
+
+        # Nothing special with these file names, just arbitrary ones picked to test with
+        cygpath -d /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -w /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -m /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -m -s /usr/lib64/ld-linux-x86-64.so.2
+        # At least on my machine for instance this file does have an 8.3 name
+        cygpath -d /mnt/c/windows/WindowsUpdate.log
+        # But for instance this one doesn't
+        cygpath -w /mnt/c/windows/system32/AboutSettingsHandlers.dll
+        cygpath -ws /mnt/c/windows/WindowsUpdate.log
+        cygpath -m /mnt/c/windows/system32/AboutSettingsHandlers.dll
+        cygpath -ms /mnt/c/windows/WindowsUpdate.log
+
+        cygpath -u 'c:\windows\system32\AboutSettingsHandlers.dll'
+        cygpath -u 'c:/windows/system32/AboutSettingsHandlers.dll'
+
+        exit 0
+    fi
+
+    if test -z "$WSL_LO_HELPER"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/wsl-lo-helper" ; then
+            WSL_LO_HELPER="$LODE_HOME/opt/bin/wsl-lo-helper"
+        elif test -x "/opt/lo/bin/wsl-lo-helper"; then
+            WSL_LO_HELPER="/opt/lo/bin/wsl-lo-helper"
+        fi
+    fi
+    if test -z "$WSL_LO_HELPER"; then
+        AC_MSG_ERROR([wsl-lo-helper not found. See solenv/wsl/README.])
+    fi
+fi
+
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+
+if test -n "$UNITTEST_WSL_PATHFORMAT"; then
+    BUILDDIR=.
+    GREP=grep
+
+    # Use of PathFormat must be after AC_CANONICAL_BUILD above
+    PathFormat /
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    PathFormat $PWD
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    PathFormat "$PROGRAMFILESX86"
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    exit 0
+fi
+
+AC_MSG_CHECKING([for product name])
+PRODUCTNAME="AC_PACKAGE_NAME"
+if test -n "$with_product_name" -a "$with_product_name" != no; then
+    PRODUCTNAME="$with_product_name"
+fi
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    PRODUCTNAME="${PRODUCTNAME}Dev"
+fi
+AC_MSG_RESULT([$PRODUCTNAME])
+AC_SUBST(PRODUCTNAME)
+PRODUCTNAME_WITHOUT_SPACES=$(printf %s "$PRODUCTNAME" | sed 's/ //g')
+AC_SUBST(PRODUCTNAME_WITHOUT_SPACES)
+
+dnl ===================================================================
+dnl Our version is defined by the AC_INIT() at the top of this script.
+dnl ===================================================================
+
+AC_MSG_CHECKING([for package version])
+if test -n "$with_package_version" -a "$with_package_version" != no; then
+    PACKAGE_VERSION="$with_package_version"
+fi
+AC_MSG_RESULT([$PACKAGE_VERSION])
+
+set `echo "$PACKAGE_VERSION" | sed "s/\./ /g"`
+
+LIBO_VERSION_MAJOR=$1
+LIBO_VERSION_MINOR=$2
+LIBO_VERSION_MICRO=$3
+LIBO_VERSION_PATCH=$4
+
+LIBO_VERSION_SUFFIX=$5
+
+# Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in
+# openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake,
+# they get undoubled before actually passed to sed.
+LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'`
+test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}"
+# LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
+test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
+
+# The value for key CFBundleVersion in the Info.plist file must be a period-separated list of at most
+# three non-negative integers. Please find more information about CFBundleVersion at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
+
+# The value for key CFBundleShortVersionString in the Info.plist file must be a period-separated list
+# of at most three non-negative integers. Please find more information about
+# CFBundleShortVersionString at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
+
+# But that is enforced only in the App Store, and we apparently want to break the rules otherwise.
+
+if test "$enable_macosx_sandbox" = yes; then
+    MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
+    MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION
+else
+    MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.$LIBO_VERSION_MICRO.$LIBO_VERSION_PATCH
+    MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION$LIBO_VERSION_SUFFIX
+fi
+
+AC_SUBST(LIBO_VERSION_MAJOR)
+AC_SUBST(LIBO_VERSION_MINOR)
+AC_SUBST(LIBO_VERSION_MICRO)
+AC_SUBST(LIBO_VERSION_PATCH)
+AC_SUBST(LIBO_VERSION_SUFFIX)
+AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
+AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
+AC_SUBST(MACOSX_BUNDLE_VERSION)
+
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH)
+
+git_date=`git log -1 --pretty=format:"%cd" --date=format:'%Y' 2>&/dev/null`
+LIBO_THIS_YEAR=${git_date:-2024}
+AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR)
+
+dnl ===================================================================
+dnl Product version
+dnl ===================================================================
+AC_MSG_CHECKING([for product version])
+PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR"
+AC_MSG_RESULT([$PRODUCTVERSION])
+AC_SUBST(PRODUCTVERSION)
+
+AC_PROG_EGREP
+# AC_PROG_EGREP doesn't set GREP on all systems as well
+AC_PATH_PROG(GREP, grep)
+
+BUILDDIR=`pwd`
+cd $srcdir
+SRC_ROOT=`pwd`
+cd $BUILDDIR
+x_Cygwin=[\#]
+
+dnl ======================================
+dnl Required GObject introspection version
+dnl ======================================
+INTROSPECTION_REQUIRED_VERSION=1.32.0
+
+dnl ===================================================================
+dnl Search all the common names for GNU Make
+dnl ===================================================================
+AC_MSG_CHECKING([for GNU Make])
+
+# try to use our own make if it is available and GNUMAKE was not already defined
+if test -z "$GNUMAKE"; then
+    if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/make" ; then
+        GNUMAKE="$LODE_HOME/opt/bin/make"
+    elif test -x "/opt/lo/bin/make"; then
+        GNUMAKE="/opt/lo/bin/make"
+    fi
+fi
+
+GNUMAKE_WIN_NATIVE=
+for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
+    if test -n "$a"; then
+        $a --version 2> /dev/null | grep GNU  2>&1 > /dev/null
+        if test $? -eq 0;  then
+            if test "$build_os" = "cygwin"; then
+                if test -n "$($a -v | grep 'Built for Windows')" ; then
+                    GNUMAKE="$(cygpath -m "$(which "$(cygpath -u $a)")")"
+                    GNUMAKE_WIN_NATIVE="TRUE"
+                else
+                    GNUMAKE=`which $a`
+                fi
+            else
+                GNUMAKE=`which $a`
+            fi
+            break
+        fi
+    fi
+done
+AC_MSG_RESULT($GNUMAKE)
+if test -z "$GNUMAKE"; then
+    AC_MSG_ERROR([not found. install GNU Make.])
+else
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        AC_MSG_NOTICE([Using a native Win32 GNU Make version.])
+    fi
+fi
+
+win_short_path_for_make()
+{
+    local short_path="$1"
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        cygpath -sm "$short_path"
+    else
+        cygpath -u "$(cygpath -d "$short_path")"
+    fi
+}
+
+
+if test "$build_os" = "cygwin"; then
+    PathFormat "$SRC_ROOT"
+    SRC_ROOT="$formatted_path"
+    PathFormat "$BUILDDIR"
+    BUILDDIR="$formatted_path"
+    x_Cygwin=
+    AC_MSG_CHECKING(for explicit COMSPEC)
+    if test -z "$COMSPEC"; then
+        AC_MSG_ERROR([COMSPEC not set in environment, please set it and rerun])
+    else
+        AC_MSG_RESULT([found: $COMSPEC])
+    fi
+fi
+
+AC_SUBST(SRC_ROOT)
+AC_SUBST(BUILDDIR)
+AC_SUBST(x_Cygwin)
+AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT")
+AC_DEFINE_UNQUOTED(SRC_ROOT,"$SRC_ROOT")
+AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR")
+
+if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then
+    AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
+fi
+
+# need sed in os checks...
+AC_PATH_PROGS(SED, sed)
+if test -z "$SED"; then
+    AC_MSG_ERROR([install sed to run this script])
+fi
+
+# Set the ENABLE_LTO variable
+# ===================================================================
+AC_MSG_CHECKING([whether to use link-time optimization])
+if test -n "$enable_lto" -a "$enable_lto" != "no"; then
+    ENABLE_LTO="TRUE"
+    AC_MSG_RESULT([yes])
+else
+    ENABLE_LTO=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_LTO)
+
+AC_ARG_ENABLE(fuzz-options,
+    AS_HELP_STRING([--enable-fuzz-options],
+        [Randomly enable or disable each of those configurable options
+         that are supposed to be freely selectable without interdependencies,
+         or where bad interaction from interdependencies is automatically avoided.])
+)
+
+dnl ===================================================================
+dnl When building for Android, --with-android-ndk,
+dnl --with-android-ndk-toolchain-version and --with-android-sdk are
+dnl mandatory
+dnl ===================================================================
+
+AC_ARG_WITH(android-ndk,
+    AS_HELP_STRING([--with-android-ndk],
+        [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
+,)
+
+AC_ARG_WITH(android-ndk-toolchain-version,
+    AS_HELP_STRING([--with-android-ndk-toolchain-version],
+        [Specify which toolchain version to use, of those present in the
+        Android NDK you are using. The default (and only supported version currently) is "clang5.0"]),,
+        with_android_ndk_toolchain_version=clang5.0)
+
+AC_ARG_WITH(android-sdk,
+    AS_HELP_STRING([--with-android-sdk],
+        [Specify location of the Android SDK. Mandatory when building for Android.]),
+,)
+
+AC_ARG_WITH(android-api-level,
+    AS_HELP_STRING([--with-android-api-level],
+        [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]),
+,)
+
+ANDROID_NDK_DIR=
+if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then
+    with_android_ndk="$SRC_ROOT/external/android-ndk"
+fi
+if test -n "$with_android_ndk"; then
+    eval ANDROID_NDK_DIR=$with_android_ndk
+
+    ANDROID_API_LEVEL=21
+    if test -n "$with_android_api_level" ; then
+        ANDROID_API_LEVEL="$with_android_api_level"
+    fi
+
+    if test $host_cpu = arm; then
+        LLVM_TRIPLE=armv7a-linux-androideabi
+        ANDROID_SYSROOT_PLATFORM=arm-linux-androideabi
+        ANDROID_APP_ABI=armeabi-v7a
+        ANDROIDCFLAGS="-mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8"
+    elif test $host_cpu = aarch64; then
+        LLVM_TRIPLE=aarch64-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        ANDROID_APP_ABI=arm64-v8a
+    elif test $host_cpu = x86_64; then
+        LLVM_TRIPLE=x86_64-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        ANDROID_APP_ABI=x86_64
+    else
+        # host_cpu is something like "i386" or "i686" I guess, NDK uses
+        # "x86" in some contexts
+        LLVM_TRIPLE=i686-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        ANDROID_APP_ABI=x86
+    fi
+
+    # Set up a lot of pre-canned defaults
+
+    if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then
+        if test ! -f $ANDROID_NDK_DIR/source.properties; then
+            AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.])
+        fi
+        ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties`
+    else
+        ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT`
+    fi
+    if test -z "$ANDROID_NDK_VERSION";  then
+        AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.])
+    fi
+    case $ANDROID_NDK_VERSION in
+    r9*|r10*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    23.*|24.*|25.*)
+        ;;
+    *)
+        AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk.])
+        add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk."
+        ;;
+    esac
+
+    case "$with_android_ndk_toolchain_version" in
+    clang5.0)
+        ANDROID_GCC_TOOLCHAIN_VERSION=4.9
+        ;;
+    *)
+        AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option. Building for Android is only supported with Clang 5.*])
+    esac
+
+    AC_MSG_NOTICE([using the Android API level... $ANDROID_API_LEVEL])
+
+    # NDK 15 or later toolchain is 64bit-only, except for Windows that we don't support. Using a 64-bit
+    # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
+    # manage to link the (app-specific) single huge .so that is built for the app in
+    # android/source/ if there is debug information in a significant part of the object files.
+    # (A 64-bit ld.gold grows too much over 10 gigabytes of virtual space when linking such a .so if
+    # all objects have been built with debug information.)
+    case $build_os in
+    linux-gnu*)
+        android_HOST_TAG=linux-x86_64
+        ;;
+    darwin*)
+        android_HOST_TAG=darwin-x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([We only support building for Android from Linux or macOS])
+        # ndk would also support windows and windows-x86_64
+        ;;
+    esac
+    ANDROID_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG
+    ANDROID_COMPILER_BIN=$ANDROID_TOOLCHAIN/bin
+
+    test -z "$AR" && AR=$ANDROID_COMPILER_BIN/llvm-ar
+    test -z "$NM" && NM=$ANDROID_COMPILER_BIN/llvm-nm
+    test -z "$OBJDUMP" && OBJDUMP=$ANDROID_COMPILER_BIN/llvm-objdump
+    test -z "$RANLIB" && RANLIB=$ANDROID_COMPILER_BIN/llvm-ranlib
+    test -z "$STRIP" && STRIP=$ANDROID_COMPILER_BIN/llvm-strip
+
+    ANDROIDCFLAGS="$ANDROIDCFLAGS -target ${LLVM_TRIPLE}${ANDROID_API_LEVEL}"
+    ANDROIDCFLAGS="$ANDROIDCFLAGS -no-canonical-prefixes -ffunction-sections -fdata-sections -Qunused-arguments"
+    if test "$ENABLE_LTO" = TRUE; then
+        # -flto comes from com_GCC_defs.mk, too, but we need to make sure it gets passed as part of
+        # $CC and $CXX when building external libraries
+        ANDROIDCFLAGS="$ANDROIDCFLAGS -flto -fuse-linker-plugin -O2"
+    fi
+
+    ANDROIDCXXFLAGS="$ANDROIDCFLAGS -stdlib=libc++"
+
+    if test -z "$CC"; then
+        CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS"
+        CC_BASE="clang"
+    fi
+    if test -z "$CXX"; then
+        CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
+        CXX_BASE="clang++"
+    fi
+fi
+AC_SUBST(ANDROID_NDK_DIR)
+AC_SUBST(ANDROID_API_LEVEL)
+AC_SUBST(ANDROID_APP_ABI)
+AC_SUBST(ANDROID_GCC_TOOLCHAIN_VERSION)
+AC_SUBST(ANDROID_SYSROOT_PLATFORM)
+AC_SUBST(ANDROID_TOOLCHAIN)
+
+dnl ===================================================================
+dnl --with-android-sdk
+dnl ===================================================================
+ANDROID_SDK_DIR=
+if test -z "$with_android_sdk" -a -e "$SRC_ROOT/external/android-sdk-linux" -a "$build" != "$host"; then
+    with_android_sdk="$SRC_ROOT/external/android-sdk-linux"
+fi
+if test -n "$with_android_sdk"; then
+    eval ANDROID_SDK_DIR=$with_android_sdk
+    PATH="$ANDROID_SDK_DIR/platform-tools:$ANDROID_SDK_DIR/tools:$PATH"
+fi
+AC_SUBST(ANDROID_SDK_DIR)
+
+AC_ARG_ENABLE([android-lok],
+    AS_HELP_STRING([--enable-android-lok],
+        [The Android app from the android/ subdir needs several tweaks all
+         over the place that break the LOK when used in the Online-based
+         Android app.  This switch indicates that the intent of this build is
+         actually the Online-based, non-modified LOK.])
+)
+ENABLE_ANDROID_LOK=
+if test -n "$ANDROID_NDK_DIR" ; then
+    if test "$enable_android_lok" = yes; then
+        ENABLE_ANDROID_LOK=TRUE
+        AC_DEFINE(HAVE_FEATURE_ANDROID_LOK)
+        AC_MSG_NOTICE([building the Android version... for the Online-based Android app])
+    else
+        AC_MSG_NOTICE([building the Android version... for the app from the android/ subdir])
+    fi
+fi
+AC_SUBST([ENABLE_ANDROID_LOK])
+
+libo_FUZZ_ARG_ENABLE([android-editing],
+    AS_HELP_STRING([--enable-android-editing],
+        [Enable the experimental editing feature on Android.])
+)
+ENABLE_ANDROID_EDITING=
+if test "$enable_android_editing" = yes; then
+    ENABLE_ANDROID_EDITING=TRUE
+fi
+AC_SUBST([ENABLE_ANDROID_EDITING])
+
+disable_database_connectivity_dependencies()
+{
+    enable_evolution2=no
+    enable_firebird_sdbc=no
+    enable_mariadb_sdbc=no
+    enable_postgresql_sdbc=no
+    enable_report_builder=no
+}
+
+# ===================================================================
+#
+# Start initial platform setup
+#
+# The using_* variables reflect platform support and should not be
+# changed after the "End initial platform setup" block.
+# This is also true for most test_* variables.
+# ===================================================================
+build_crypto=yes
+test_clucene=no
+test_gdb_index=no
+test_openldap=yes
+test_split_debug=no
+test_webdav=yes
+usable_dlapi=yes
+
+# There is currently just iOS not using salplug, so this explicitly enables it.
+# must: using_freetype_fontconfig
+#  may: using_headless_plugin defaults to $using_freetype_fontconfig
+# must: using_x11
+
+# Default values, as such probably valid just for Linux, set
+# differently below just for Mac OSX, but at least better than
+# hardcoding these as we used to do. Much of this is duplicated also
+# in solenv for old build system and for gbuild, ideally we should
+# perhaps define stuff like this only here in configure.ac?
+
+LINKFLAGSSHL="-shared"
+PICSWITCH="-fpic"
+DLLPOST=".so"
+
+LINKFLAGSNOUNDEFS="-Wl,-z,defs"
+
+INSTROOTBASESUFFIX=
+INSTROOTCONTENTSUFFIX=
+SDKDIRNAME=sdk
+
+HOST_PLATFORM="$host"
+
+host_cpu_for_clang="$host_cpu"
+
+case "$host_os" in
+
+solaris*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    _os=SunOS
+
+    dnl ===========================================================
+    dnl Check whether we're using Solaris 10 - SPARC or Intel.
+    dnl ===========================================================
+    AC_MSG_CHECKING([the Solaris operating system release])
+    _os_release=`echo $host_os | $SED -e s/solaris2\.//`
+    if test "$_os_release" -lt "10"; then
+        AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
+    else
+        AC_MSG_RESULT([ok ($_os_release)])
+    fi
+
+    dnl Check whether we're using a SPARC or i386 processor
+    AC_MSG_CHECKING([the processor type])
+    if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
+        AC_MSG_RESULT([ok ($host_cpu)])
+    else
+        AC_MSG_ERROR([only SPARC and i386 processors are supported])
+    fi
+    ;;
+
+linux-gnu*|k*bsd*-gnu*|linux-musl*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    test_gdb_index=yes
+    test_split_debug=yes
+    if test "$enable_fuzzers" = yes; then
+        test_system_freetype=no
+    fi
+    _os=Linux
+    ;;
+
+gnu)
+    using_freetype_fontconfig=yes
+    using_x11=no
+    _os=GNU
+     ;;
+
+cygwin*|wsl*)
+    # When building on Windows normally with MSVC under Cygwin,
+    # configure thinks that the host platform (the platform the
+    # built code will run on) is Cygwin, even if it obviously is
+    # Windows, which in Autoconf terminology is called
+    # "mingw32". (Which is misleading as MinGW is the name of the
+    # tool-chain, not an operating system.)
+
+    # Somewhat confusing, yes. But this configure script doesn't
+    # look at $host etc that much, it mostly uses its own $_os
+    # variable, set here in this case statement.
+
+    using_freetype_fontconfig=no
+    using_x11=no
+    test_unix_dlapi=no
+    test_openldap=no
+    enable_pagein=no
+    build_skia=yes
+    _os=WINNT
+
+    DLLPOST=".dll"
+    LINKFLAGSNOUNDEFS=
+
+    if test "$host_cpu" = "aarch64"; then
+        build_skia=no
+        enable_gpgmepp=no
+        enable_coinmp=no
+        enable_firebird_sdbc=no
+    fi
+    ;;
+
+darwin*) # macOS
+    using_freetype_fontconfig=no
+    using_x11=no
+    build_skia=yes
+    enable_pagein=no
+    if test -n "$LODE_HOME" ; then
+        mac_sanitize_path
+        AC_MSG_NOTICE([sanitized the PATH to $PATH])
+    fi
+    _os=Darwin
+    INSTROOTBASESUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app
+    INSTROOTCONTENTSUFFIX=/Contents
+    SDKDIRNAME=${PRODUCTNAME_WITHOUT_SPACES}${PRODUCTVERSION}_SDK
+    # See "Default values, as such probably valid just for Linux" comment above the case "$host_os"
+    LINKFLAGSSHL="-dynamiclib"
+
+    # -fPIC is default
+    PICSWITCH=""
+
+    DLLPOST=".dylib"
+
+    # -undefined error is the default
+    LINKFLAGSNOUNDEFS=""
+    case "$host_cpu" in
+    aarch64|arm64)
+        # Apple's Clang uses "arm64"
+        host_cpu_for_clang=arm64
+    esac
+;;
+
+ios*) # iOS
+    using_freetype_fontconfig=no
+    using_x11=no
+    build_crypto=no
+    test_libcmis=no
+    test_openldap=no
+    test_webdav=no
+    if test -n "$LODE_HOME" ; then
+        mac_sanitize_path
+        AC_MSG_NOTICE([sanitized the PATH to $PATH])
+    fi
+    enable_gpgmepp=no
+    _os=iOS
+    enable_mpl_subset=yes
+    enable_lotuswordpro=no
+    disable_database_connectivity_dependencies
+    enable_coinmp=no
+    enable_lpsolve=no
+    enable_extension_integration=no
+    enable_xmlhelp=no
+    with_ppds=no
+    if test "$enable_ios_simulator" = "yes"; then
+        host=x86_64-apple-darwin
+    fi
+    # See "Default values, as such probably valid just for Linux" comment above the case "$host_os"
+    LINKFLAGSSHL="-dynamiclib"
+
+    # -fPIC is default
+    PICSWITCH=""
+
+    DLLPOST=".dylib"
+
+    # -undefined error is the default
+    LINKFLAGSNOUNDEFS=""
+
+    # HOST_PLATFORM is used for external projects and their configury typically doesn't like the "ios"
+    # part, so use aarch64-apple-darwin for now.
+    HOST_PLATFORM=aarch64-apple-darwin
+
+    # Apple's Clang uses "arm64"
+    host_cpu_for_clang=arm64
+;;
+
+freebsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    AC_MSG_CHECKING([the FreeBSD operating system release])
+    if test -n "$with_os_version"; then
+        OSVERSION="$with_os_version"
+    else
+        OSVERSION=`/sbin/sysctl -n kern.osreldate`
+    fi
+    AC_MSG_RESULT([found OSVERSION=$OSVERSION])
+    AC_MSG_CHECKING([which thread library to use])
+    if test "$OSVERSION" -lt "500016"; then
+        PTHREAD_CFLAGS="-D_THREAD_SAFE"
+        PTHREAD_LIBS="-pthread"
+    elif test "$OSVERSION" -lt "502102"; then
+        PTHREAD_CFLAGS="-D_THREAD_SAFE"
+        PTHREAD_LIBS="-lc_r"
+    else
+        PTHREAD_CFLAGS=""
+        PTHREAD_LIBS="-pthread"
+    fi
+    AC_MSG_RESULT([$PTHREAD_LIBS])
+    _os=FreeBSD
+    ;;
+
+*netbsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    test_gtk3_kde5=no
+    build_skia=yes
+    PTHREAD_LIBS="-pthread -lpthread"
+    _os=NetBSD
+    ;;
+
+openbsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    PTHREAD_CFLAGS="-D_THREAD_SAFE"
+    PTHREAD_LIBS="-pthread"
+    _os=OpenBSD
+    ;;
+
+dragonfly*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    PTHREAD_LIBS="-pthread"
+    _os=DragonFly
+    ;;
+
+linux-android*)
+    # API exists, but seems not really usable since Android 7 AFAIK
+    usable_dlapi=no
+    using_freetype_fontconfig=yes
+    using_headless_plugin=no
+    using_x11=no
+    build_crypto=no
+    test_openldap=no
+    test_system_freetype=no
+    test_webdav=no
+    disable_database_connectivity_dependencies
+    enable_lotuswordpro=no
+    enable_mpl_subset=yes
+    enable_cairo_canvas=no
+    enable_coinmp=yes
+    enable_lpsolve=no
+    enable_odk=no
+    enable_python=no
+    enable_xmlhelp=no
+    _os=Android
+    ;;
+
+haiku*)
+    using_freetype_fontconfig=yes
+    using_x11=no
+    test_gtk3=no
+    test_gtk3_kde5=no
+    test_kf5=yes
+    test_kf6=yes
+    enable_odk=no
+    enable_coinmp=no
+    enable_pdfium=no
+    enable_sdremote=no
+    enable_postgresql_sdbc=no
+    enable_firebird_sdbc=no
+    _os=Haiku
+    ;;
+
+emscripten)
+    # API currently just exists in headers, not code
+    usable_dlapi=no
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    test_openldap=no
+    test_qt5=yes
+    test_split_debug=yes
+    test_system_freetype=no
+    enable_compiler_plugins=no
+    enable_customtarget_components=yes
+    enable_split_debug=yes
+    enable_wasm_strip=yes
+    with_system_zlib=no
+    with_theme="colibre"
+    _os=Emscripten
+    ;;
+
+*)
+    AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
+    ;;
+esac
+
+AC_SUBST(HOST_PLATFORM)
+
+if test -z "$using_x11" -o -z "$using_freetype_fontconfig"; then
+    AC_MSG_ERROR([You must set \$using_freetype_fontconfig and \$using_x11 for your platform])
+fi
+
+# Set defaults, if not set by platform
+test "${test_cups+set}" = set || test_cups="$using_x11"
+test "${test_dbus+set}" = set || test_dbus="$using_x11"
+test "${test_gen+set}" = set || test_gen="$using_x11"
+test "${test_gstreamer_1_0+set}" = set || test_gstreamer_1_0="$using_x11"
+test "${test_gtk3+set}" = set || test_gtk3="$using_x11"
+test "${test_gtk4+set}" = set || test_gtk4="$using_x11"
+test "${test_kf5+set}" = set || test_kf5="$using_x11"
+test "${test_kf6+set}" = set || test_kf6="$using_x11"
+# don't handle test_qt5, so it can disable test_kf5 later
+test "${test_qt6+set}" = set || test_qt6="$using_x11"
+test "${test_randr+set}" = set || test_randr="$using_x11"
+test "${test_xrender+set}" = set || test_xrender="$using_x11"
+test "${using_headless_plugin+set}" = set || using_headless_plugin="$using_freetype_fontconfig"
+
+test "${test_gtk3_kde5+set}" != set -a "$test_kf5" = yes -a "$test_gtk3" = yes && test_gtk3_kde5="yes"
+# Make sure fontconfig and freetype test both either system or not
+test "${test_system_fontconfig+set}" != set -a "${test_system_freetype+set}" = set && test_system_fontconfig="$test_system_freetype"
+test "${test_system_freetype+set}" != set -a "${test_system_fontconfig+set}" = set && test_system_freetype="$test_system_fontconfig"
+
+# convenience / platform overriding "fixes"
+# Don't sort!
+test "$test_kf5" = yes -a "$test_qt5" = no && test_kf5=no
+test "$test_kf5" = yes && test_qt5=yes
+test "$test_gtk3" != yes && enable_gtk3=no
+test "$test_gtk3" != yes -o "$test_kf5" != yes && test_gtk3_kde5=no
+test "$using_freetype_fontconfig" = no && using_headless_plugin=no
+test "$using_freetype_fontconfig" = yes && test_cairo=yes
+
+# Keep in sync with the above $using_x11 depending test default list
+disable_x11_tests()
+{
+    test_cups=no
+    test_dbus=no
+    test_gen=no
+    test_gstreamer_1_0=no
+    test_gtk3_kde5=no
+    test_gtk3=no
+    test_gtk4=no
+    test_kf5=no
+    test_kf6=no
+    test_qt5=no
+    test_qt6=no
+    test_randr=no
+    test_xrender=no
+}
+
+test "$using_x11" = yes && USING_X11=TRUE
+
+if test "$using_freetype_fontconfig" = yes; then
+    AC_DEFINE(USE_HEADLESS_CODE)
+    USE_HEADLESS_CODE=TRUE
+    if test "$using_headless_plugin" = yes; then
+        AC_DEFINE(ENABLE_HEADLESS)
+        ENABLE_HEADLESS=TRUE
+    fi
+else
+    test_fontconfig=no
+    test_freetype=no
+fi
+
+AC_SUBST(ENABLE_HEADLESS)
+AC_SUBST(USE_HEADLESS_CODE)
+
+AC_MSG_NOTICE([VCL platform has a usable dynamic loading API: $usable_dlapi])
+AC_MSG_NOTICE([VCL platform uses freetype+fontconfig: $using_freetype_fontconfig])
+AC_MSG_NOTICE([VCL platform uses headless plugin: $using_headless_plugin])
+AC_MSG_NOTICE([VCL platform uses X11: $using_x11])
+
+# ===================================================================
+#
+# End initial platform setup
+#
+# ===================================================================
+
+if test "$_os" = "Android" ; then
+    # Verify that the NDK and SDK options are proper
+    if test -z "$with_android_ndk"; then
+        AC_MSG_ERROR([the --with-android-ndk option is mandatory, unless it is available at external/android-ndk/.])
+    elif test ! -f "$ANDROID_NDK_DIR/meta/abis.json"; then
+        AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
+    fi
+
+    if test -z "$ANDROID_SDK_DIR"; then
+        AC_MSG_ERROR([the --with-android-sdk option is mandatory, unless it is available at external/android-sdk-linux/.])
+    elif test ! -d "$ANDROID_SDK_DIR/platforms"; then
+        AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
+    fi
+fi
+
+AC_SUBST(SDKDIRNAME)
+
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_LIBS)
+
+# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
+# By default use the ones specified by our build system,
+# but explicit override is possible.
+AC_MSG_CHECKING(for explicit AFLAGS)
+if test -n "$AFLAGS"; then
+    AC_MSG_RESULT([$AFLAGS])
+    x_AFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_AFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CFLAGS)
+if test -n "$CFLAGS"; then
+    AC_MSG_RESULT([$CFLAGS])
+    x_CFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_CFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CXXFLAGS)
+if test -n "$CXXFLAGS"; then
+    AC_MSG_RESULT([$CXXFLAGS])
+    x_CXXFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_CXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCFLAGS)
+if test -n "$OBJCFLAGS"; then
+    AC_MSG_RESULT([$OBJCFLAGS])
+    x_OBJCFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_OBJCFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
+if test -n "$OBJCXXFLAGS"; then
+    AC_MSG_RESULT([$OBJCXXFLAGS])
+    x_OBJCXXFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_OBJCXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit LDFLAGS)
+if test -n "$LDFLAGS"; then
+    AC_MSG_RESULT([$LDFLAGS])
+    x_LDFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_LDFLAGS=[\#]
+fi
+AC_SUBST(AFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(OBJCFLAGS)
+AC_SUBST(OBJCXXFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(x_AFLAGS)
+AC_SUBST(x_CFLAGS)
+AC_SUBST(x_CXXFLAGS)
+AC_SUBST(x_OBJCFLAGS)
+AC_SUBST(x_OBJCXXFLAGS)
+AC_SUBST(x_LDFLAGS)
+
+dnl These are potentially set for MSVC, in the code checking for UCRT below:
+my_original_CFLAGS=$CFLAGS
+my_original_CXXFLAGS=$CXXFLAGS
+my_original_CPPFLAGS=$CPPFLAGS
+
+dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
+dnl Needs to precede the AC_C_BIGENDIAN and AC_SEARCH_LIBS calls below, which apparently call
+dnl AC_PROG_CC internally.
+if test "$_os" != "WINNT"; then
+    # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
+    save_CFLAGS=$CFLAGS
+    AC_PROG_CC
+    CFLAGS=$save_CFLAGS
+    if test -z "$CC_BASE"; then
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+fi
+
+if test "$_os" != "WINNT"; then
+    AC_C_BIGENDIAN([ENDIANNESS=big], [ENDIANNESS=little])
+else
+    ENDIANNESS=little
+fi
+AC_SUBST(ENDIANNESS)
+
+if test "$usable_dlapi" != no; then
+    AC_DEFINE([HAVE_DLAPI])
+    if test "$test_unix_dlapi" != no; then
+        save_LIBS="$LIBS"
+        AC_SEARCH_LIBS([dlsym], [dl],
+            [case "$ac_cv_search_dlsym" in -l*) UNIX_DLAPI_LIBS="$ac_cv_search_dlsym";; esac],
+            [AC_MSG_ERROR([dlsym not found in either libc nor libdl])])
+        LIBS="$save_LIBS"
+        AC_DEFINE([HAVE_UNIX_DLAPI])
+    fi
+fi
+AC_SUBST(UNIX_DLAPI_LIBS)
+
+# Check for a (GNU) backtrace implementation
+AC_ARG_VAR([BACKTRACE_CFLAGS], [Compiler flags needed to use backtrace(3)])
+AC_ARG_VAR([BACKTRACE_LIBS], [Linker flags needed to use backtrace(3)])
+AS_IF([test "x$BACKTRACE_LIBS$BACKTRACE_CFLAGS" = x], [
+    save_LIBS="$LIBS"
+    AC_SEARCH_LIBS([backtrace], [libexecinfo],
+        [case "$ac_cv_search_backtrace" in -l*) BACKTRACE_LIBS="$ac_cv_search_backtrace";; esac],
+        [PKG_CHECK_MODULES([BACKTRACE], [libexecinfo], [ac_cv_search_backtrace=], [:])])
+    LIBS="$save_LIBS"
+])
+AS_IF([test "x$ac_cv_search_backtrace" != xno ], [
+    AC_DEFINE([HAVE_FEATURE_BACKTRACE])
+])
+
+dnl ===================================================================
+dnl Sanity checks for Emscripten SDK setup
+dnl ===================================================================
+
+EMSCRIPTEN_MIN_MAJOR=2
+EMSCRIPTEN_MIN_MINOR=0
+EMSCRIPTEN_MIN_TINY=31
+EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}"
+
+if test "$_os" = "Emscripten"; then
+    AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION])
+    AS_IF([test -z "$EMSDK"],
+          [AC_MSG_ERROR([No \$EMSDK environment variable.])])
+    EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h
+    if test -f "$EMSCRIPTEN_VERSION_H"; then
+        EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
+        EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
+        EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
+    else
+        EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_)
+        EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
+        EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
+        EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
+    fi
+
+    EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}"
+
+    check_semantic_version_three_prefixed EMSCRIPTEN MIN
+    if test $? -eq 0; then
+        AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)])
+    else
+        AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION])
+    fi
+
+    EMSCRIPTEN_ERROR=0
+    if ! which emconfigure >/dev/null 2>&1; then
+        AC_MSG_WARN([emconfigure must be in your \$PATH])
+        EMSCRIPTEN_ERROR=1
+    fi
+    if test -z "$EMMAKEN_JUST_CONFIGURE"; then
+        AC_MSG_WARN(["\$EMMAKEN_JUST_CONFIGURE wasn't set by emconfigure. Prefix configure or use autogen.sh])
+        EMSCRIPTEN_ERROR=1
+    fi
+    EMSDK_FILE_PACKAGER="$(em-config EMSCRIPTEN_ROOT)"/tools/file_packager
+    if ! test -x "$EMSDK_FILE_PACKAGER"; then
+        AC_MSG_WARN([No file_packager found in $(em-config EMSCRIPTEN_ROOT)/tools/file_packager.])
+        EMSCRIPTEN_ERROR=1
+    fi
+    if test $EMSCRIPTEN_ERROR -ne 0; then
+        AC_MSG_ERROR(["Please fix your EMSDK setup to build with Emscripten!"])
+    fi
+fi
+AC_SUBST(EMSDK_FILE_PACKAGER)
+
+###############################################################################
+# Extensions switches --enable/--disable
+###############################################################################
+# By default these should be enabled unless having extra dependencies.
+# If there is extra dependency over configure options then the enable should
+# be automagic based on whether the requiring feature is enabled or not.
+# All this options change anything only with --enable-extension-integration.
+
+# The name of this option and its help string makes it sound as if
+# extensions are built anyway, just not integrated in the installer,
+# if you use --disable-extension-integration. Is that really the
+# case?
+
+AC_ARG_ENABLE(ios-simulator,
+    AS_HELP_STRING([--enable-ios-simulator],
+        [build for iOS simulator])
+)
+
+libo_FUZZ_ARG_ENABLE(extension-integration,
+    AS_HELP_STRING([--disable-extension-integration],
+        [Disable integration of the built extensions in the installer of the
+         product. Use this switch to disable the integration.])
+)
+
+AC_ARG_ENABLE(avmedia,
+    AS_HELP_STRING([--disable-avmedia],
+        [Disable displaying and inserting AV media in documents. Work in progress, use only if you are hacking on it.]),
+,test "${enable_avmedia+set}" = set || enable_avmedia=yes)
+
+AC_ARG_ENABLE(database-connectivity,
+    AS_HELP_STRING([--disable-database-connectivity],
+        [Disable various database connectivity. Work in progress, use only if you are hacking on it.])
+)
+
+# This doesn't mean not building (or "integrating") extensions
+# (although it probably should; i.e. it should imply
+# --disable-extension-integration I guess), it means not supporting
+# any extension mechanism at all
+libo_FUZZ_ARG_ENABLE(extensions,
+    AS_HELP_STRING([--disable-extensions],
+        [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
+)
+
+AC_ARG_ENABLE(scripting,
+    AS_HELP_STRING([--disable-scripting],
+        [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.]),
+,test "${enable_scripting+set}" = set || enable_scripting=yes)
+
+# This is mainly for Android and iOS, but could potentially be used in some
+# special case otherwise, too, so factored out as a separate setting
+
+AC_ARG_ENABLE(dynamic-loading,
+    AS_HELP_STRING([--disable-dynamic-loading],
+        [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.])
+)
+
+libo_FUZZ_ARG_ENABLE(report-builder,
+    AS_HELP_STRING([--disable-report-builder],
+        [Disable the Report Builder.])
+)
+
+libo_FUZZ_ARG_ENABLE(ext-wiki-publisher,
+    AS_HELP_STRING([--enable-ext-wiki-publisher],
+        [Enable the Wiki Publisher extension.])
+)
+
+libo_FUZZ_ARG_ENABLE(lpsolve,
+    AS_HELP_STRING([--disable-lpsolve],
+        [Disable compilation of the lp solve solver ])
+)
+libo_FUZZ_ARG_ENABLE(coinmp,
+    AS_HELP_STRING([--disable-coinmp],
+        [Disable compilation of the CoinMP solver ])
+)
+
+libo_FUZZ_ARG_ENABLE(pdfimport,
+    AS_HELP_STRING([--disable-pdfimport],
+        [Disable building the PDF import feature.])
+)
+
+libo_FUZZ_ARG_ENABLE(pdfium,
+    AS_HELP_STRING([--disable-pdfium],
+        [Disable building PDFium. Results in unsecure PDF signature verification.])
+)
+
+libo_FUZZ_ARG_ENABLE(skia,
+    AS_HELP_STRING([--disable-skia],
+        [Disable building Skia. Use --enable-skia=debug to build without optimizations.])
+)
+
+###############################################################################
+
+dnl ---------- *** ----------
+
+libo_FUZZ_ARG_ENABLE(mergelibs,
+    AS_HELP_STRING([--enable-mergelibs],
+        [Merge several of the smaller libraries into one big, "merged", one.])
+)
+
+libo_FUZZ_ARG_ENABLE(breakpad,
+    AS_HELP_STRING([--enable-breakpad],
+        [Enables breakpad for crash reporting.])
+)
+
+libo_FUZZ_ARG_ENABLE(crashdump,
+    AS_HELP_STRING([--disable-crashdump],
+        [Disable dump.ini and dump-file, when --enable-breakpad])
+)
+
+AC_ARG_ENABLE(fetch-external,
+    AS_HELP_STRING([--disable-fetch-external],
+        [Disables fetching external tarballs from web sources.])
+)
+
+AC_ARG_ENABLE(fuzzers,
+    AS_HELP_STRING([--enable-fuzzers],
+        [Enables building libfuzzer targets for fuzz testing.])
+)
+
+libo_FUZZ_ARG_ENABLE(pch,
+    AS_HELP_STRING([--enable-pch=<yes/no/system/base/normal/full>],
+        [Enables precompiled header support for C++. Forced default on Windows/VC build.
+         Using 'system' will include only external headers, 'base' will add also headers
+         from base modules, 'normal' will also add all headers except from the module built,
+         'full' will use all suitable headers even from a module itself.])
+)
+
+libo_FUZZ_ARG_ENABLE(epm,
+    AS_HELP_STRING([--enable-epm],
+        [LibreOffice includes self-packaging code, that requires epm, however epm is
+         useless for large scale package building.])
+)
+
+libo_FUZZ_ARG_ENABLE(odk,
+    AS_HELP_STRING([--enable-odk],
+        [Enable building the Office Development Kit, the part that extensions need to build against])
+)
+
+AC_ARG_ENABLE(mpl-subset,
+    AS_HELP_STRING([--enable-mpl-subset],
+        [Don't compile any pieces which are not MPL or more liberally licensed])
+)
+
+libo_FUZZ_ARG_ENABLE(evolution2,
+    AS_HELP_STRING([--enable-evolution2],
+        [Allows the built-in evolution 2 addressbook connectivity build to be
+         enabled.])
+)
+
+AC_ARG_ENABLE(avahi,
+    AS_HELP_STRING([--enable-avahi],
+        [Determines whether to use Avahi to advertise Impress to remote controls.])
+)
+
+libo_FUZZ_ARG_ENABLE(werror,
+    AS_HELP_STRING([--enable-werror],
+        [Turn warnings to errors. (Has no effect in modules where the treating
+         of warnings as errors is disabled explicitly.)]),
+,)
+
+libo_FUZZ_ARG_ENABLE(assert-always-abort,
+    AS_HELP_STRING([--enable-assert-always-abort],
+        [make assert() failures abort even when building without --enable-debug or --enable-dbgutil.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(dbgutil,
+    AS_HELP_STRING([--enable-dbgutil],
+        [Provide debugging support from --enable-debug and include additional debugging
+         utilities such as object counting or more expensive checks.
+         This is the recommended option for developers.
+         Note that this makes the build ABI incompatible, it is not possible to mix object
+         files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
+
+libo_FUZZ_ARG_ENABLE(debug,
+    AS_HELP_STRING([--enable-debug],
+        [Include debugging information, disable compiler optimization and inlining plus
+         extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
+
+libo_FUZZ_ARG_ENABLE(split-debug,
+    AS_HELP_STRING([--disable-split-debug],
+        [Disable using split debug information (-gsplit-dwarf compile flag). Split debug information
+         saves disk space and build time, but requires tools that support it (both build tools and debuggers).]))
+
+libo_FUZZ_ARG_ENABLE(gdb-index,
+    AS_HELP_STRING([--disable-gdb-index],
+        [Disables creating debug information in the gdb index format, which makes gdb start faster.
+         The feature requires a linker that supports the --gdb-index option.]))
+
+libo_FUZZ_ARG_ENABLE(sal-log,
+    AS_HELP_STRING([--enable-sal-log],
+        [Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.]))
+
+libo_FUZZ_ARG_ENABLE(symbols,
+    AS_HELP_STRING([--enable-symbols],
+        [Generate debug information.
+         By default, enabled for --enable-debug and --enable-dbgutil, disabled
+         otherwise. It is possible to explicitly specify gbuild build targets
+         (where 'all' means everything, '-' prepended means to not enable, '/' appended means
+         everything in the directory; there is no ordering, more specific overrides
+         more general, and disabling takes precedence).
+         Example: --enable-symbols="all -sw/ -Library_sc".]))
+
+libo_FUZZ_ARG_ENABLE(optimized,
+    AS_HELP_STRING([--enable-optimized=<yes/no/debug>],
+        [Whether to compile with optimization flags.
+         By default, disabled for --enable-debug and --enable-dbgutil, enabled
+         otherwise. Using 'debug' will try to use only optimizations that should
+         not interfere with debugging. For Emscripten we default to optimized (-O1)
+         debug build, as otherwise binaries become too large.]))
+
+libo_FUZZ_ARG_ENABLE(runtime-optimizations,
+    AS_HELP_STRING([--disable-runtime-optimizations],
+        [Statically disable certain runtime optimizations (like rtl/alloc.h or
+         JVM JIT) that are known to interact badly with certain dynamic analysis
+         tools (like -fsanitize=address or Valgrind).  By default, disabled iff
+         CC contains "-fsanitize=*".  (For Valgrind, those runtime optimizations
+         are typically disabled dynamically via RUNNING_ON_VALGRIND.)]))
+
+AC_ARG_WITH(valgrind,
+    AS_HELP_STRING([--with-valgrind],
+        [Make availability of Valgrind headers a hard requirement.]))
+
+libo_FUZZ_ARG_ENABLE(compiler-plugins,
+    AS_HELP_STRING([--enable-compiler-plugins],
+        [Enable compiler plugins that will perform additional checks during
+         building. Enabled automatically by --enable-dbgutil.
+         Use --enable-compiler-plugins=debug to also enable debug code in the plugins.]))
+COMPILER_PLUGINS_DEBUG=
+if test "$enable_compiler_plugins" = debug; then
+    enable_compiler_plugins=yes
+    COMPILER_PLUGINS_DEBUG=TRUE
+fi
+
+libo_FUZZ_ARG_ENABLE(compiler-plugins-analyzer-pch,
+    AS_HELP_STRING([--disable-compiler-plugins-analyzer-pch],
+        [Disable use of precompiled headers when running the Clang compiler plugin analyzer.  Not
+         relevant in the --disable-compiler-plugins case.]))
+
+libo_FUZZ_ARG_ENABLE(ooenv,
+    AS_HELP_STRING([--enable-ooenv],
+        [Enable ooenv for the instdir installation.]))
+
+AC_ARG_ENABLE(lto,
+    AS_HELP_STRING([--enable-lto],
+        [Enable link-time optimization. Suitable for (optimised) product builds. Building might take
+         longer but libraries and executables are optimized for speed. For GCC, best to use the 'gold'
+         linker.)]))
+
+AC_ARG_ENABLE(python,
+    AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],
+        [Enables or disables Python support at run-time.
+         Also specifies what Python to use at build-time.
+         'fully-internal' even forces the internal version for uses of Python
+         during the build.
+         On macOS the only choices are
+         'internal' (default) or 'fully-internal'. Otherwise the default is 'auto'.
+         ]))
+
+libo_FUZZ_ARG_ENABLE(gtk3,
+    AS_HELP_STRING([--disable-gtk3],
+        [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
+,test "${test_gtk3}" = no -o "${enable_gtk3+set}" = set || enable_gtk3=yes)
+
+AC_ARG_ENABLE(gtk4,
+    AS_HELP_STRING([--enable-gtk4],
+        [Determines whether to use Gtk+ 4.0 vclplug on platforms where Gtk+ 4.0 is available.]))
+
+AC_ARG_ENABLE(atspi-tests,
+    AS_HELP_STRING([--disable-atspi-tests],
+        [Determines whether to enable AT-SPI2 tests for the GTK3 vclplug.]))
+
+AC_ARG_ENABLE(introspection,
+    AS_HELP_STRING([--enable-introspection],
+        [Generate files for GObject introspection.  Requires --enable-gtk3.  (Typically used by
+         Linux distributions.)]))
+
+AC_ARG_ENABLE(split-app-modules,
+    AS_HELP_STRING([--enable-split-app-modules],
+        [Split file lists for app modules, e.g. base, calc.
+         Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_ENABLE(split-opt-features,
+    AS_HELP_STRING([--enable-split-opt-features],
+        [Split file lists for some optional features, e.g. pyuno, testtool.
+         Has effect only with make distro-pack-install]),
+,)
+
+libo_FUZZ_ARG_ENABLE(cairo-canvas,
+    AS_HELP_STRING([--disable-cairo-canvas],
+        [Determines whether to build the Cairo canvas on platforms where Cairo is available.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(dbus,
+    AS_HELP_STRING([--disable-dbus],
+        [Determines whether to enable features that depend on dbus.
+         e.g. Presentation mode screensaver control, bluetooth presentation control, automatic font install]),
+,test "${enable_dbus+set}" = set || enable_dbus=yes)
+
+libo_FUZZ_ARG_ENABLE(sdremote,
+    AS_HELP_STRING([--disable-sdremote],
+        [Determines whether to enable Impress remote control (i.e. the server component).]),
+,test "${enable_sdremote+set}" = set || enable_sdremote=yes)
+
+libo_FUZZ_ARG_ENABLE(sdremote-bluetooth,
+    AS_HELP_STRING([--disable-sdremote-bluetooth],
+        [Determines whether to build sdremote with bluetooth support.
+         Requires dbus on Linux.]))
+
+libo_FUZZ_ARG_ENABLE(gio,
+    AS_HELP_STRING([--disable-gio],
+        [Determines whether to use the GIO support.]),
+,test "${enable_gio+set}" = set || enable_gio=yes)
+
+AC_ARG_ENABLE(qt5,
+    AS_HELP_STRING([--enable-qt5],
+        [Determines whether to use Qt5 vclplug on platforms where Qt5 is
+         available.]),
+,)
+
+AC_ARG_ENABLE(qt6,
+    AS_HELP_STRING([--enable-qt6],
+        [Determines whether to use Qt6 vclplug on platforms where Qt6 is
+         available.]),
+,)
+
+AC_ARG_ENABLE(kf5,
+    AS_HELP_STRING([--enable-kf5],
+        [Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and
+         KF5 are available.]),
+,)
+
+AC_ARG_ENABLE(kf6,
+    AS_HELP_STRING([--enable-kf6],
+        [Determines whether to use KF6 vclplug on platforms where Qt6 and
+         KF6 are available.]),
+,)
+
+
+AC_ARG_ENABLE(gtk3_kde5,
+    AS_HELP_STRING([--enable-gtk3-kde5],
+        [Determines whether to use Gtk3 vclplug with KF5 file dialogs on
+         platforms where Gtk3, Qt5 and Plasma is available.]),
+,)
+
+AC_ARG_ENABLE(gen,
+    AS_HELP_STRING([--enable-gen],
+        [To select the gen backend in case of --disable-dynamic-loading.
+         Per default auto-enabled when X11 is used.]),
+,test "${test_gen}" = no -o "${enable_gen+set}" = set || enable_gen=yes)
+
+AC_ARG_ENABLE(gui,
+    AS_HELP_STRING([--disable-gui],
+        [Disable use of X11 or Wayland to reduce dependencies (e.g. for building LibreOfficeKit).]),
+,enable_gui=yes)
+
+libo_FUZZ_ARG_ENABLE(randr,
+    AS_HELP_STRING([--disable-randr],
+        [Disable RandR support in the vcl project.]),
+,test "${enable_randr+set}" = set || enable_randr=yes)
+
+libo_FUZZ_ARG_ENABLE(gstreamer-1-0,
+    AS_HELP_STRING([--disable-gstreamer-1-0],
+        [Disable building with the gstreamer 1.0 avmedia backend.]),
+,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes)
+
+libo_FUZZ_ARG_ENABLE([eot],
+    [AS_HELP_STRING([--enable-eot],
+        [Enable support for Embedded OpenType fonts.])],
+,test "${enable_eot+set}" = set || enable_eot=no)
+
+libo_FUZZ_ARG_ENABLE(cve-tests,
+    AS_HELP_STRING([--disable-cve-tests],
+        [Prevent CVE tests to be executed]),
+,)
+
+AC_ARG_ENABLE(build-opensymbol,
+    AS_HELP_STRING([--enable-build-opensymbol],
+        [Do not use the prebuilt opens___.ttf. Build it instead. This needs
+         fontforge installed.]),
+,)
+
+AC_ARG_ENABLE(dependency-tracking,
+    AS_HELP_STRING([--enable-dependency-tracking],
+        [Do not reject slow dependency extractors.])[
+  --disable-dependency-tracking
+                          Disables generation of dependency information.
+                          Speed up one-time builds.],
+,)
+
+AC_ARG_ENABLE(icecream,
+    AS_HELP_STRING([--enable-icecream],
+        [Use the 'icecream' distributed compiling tool to speedup the compilation.
+         It defaults to /opt/icecream for the location of the icecream gcc/g++
+         wrappers, you can override that using --with-gcc-home=/the/path switch.]),
+,)
+
+AC_ARG_ENABLE(ld,
+    AS_HELP_STRING([--enable-ld=<linker>],
+        [Use the specified linker. Both 'gold' and 'lld' linkers generally use less memory and link faster.
+         By default tries to use the best linker possible, use --disable-ld to use the default linker.
+         If <linker> contains any ':', the part before the first ':' is used as the value of
+         -fuse-ld, while the part after the first ':' is used as the value of --ld-path (which is
+         needed for Clang 12).]),
+,)
+
+libo_FUZZ_ARG_ENABLE(cups,
+    AS_HELP_STRING([--disable-cups],
+        [Do not build cups support.])
+)
+
+AC_ARG_ENABLE(ccache,
+    AS_HELP_STRING([--disable-ccache],
+        [Do not try to use ccache automatically.
+         By default we will try to detect if ccache is available; in that case if
+         CC/CXX are not yet set, and --enable-icecream is not given, we
+         attempt to use ccache. --disable-ccache disables ccache completely.
+         Additionally ccache's depend mode is enabled if possible,
+         use --enable-ccache=nodepend to enable ccache without depend mode.
+]),
+,)
+
+AC_ARG_ENABLE(z7-debug,
+    AS_HELP_STRING([--enable-z7-debug],
+        [Makes the MSVC compiler use -Z7 for debugging instead of the default -Zi. Using this option takes
+         more disk spaces but allows to use ccache. Final PDB files are created even with this option enabled.
+         Enabled by default if ccache is detected.]))
+
+libo_FUZZ_ARG_ENABLE(online-update,
+    AS_HELP_STRING([--enable-online-update],
+        [Enable the online update service that will check for new versions of
+         LibreOffice. Disabled by default. Requires --with-privacy-policy-url to be set.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(online-update-mar,
+    AS_HELP_STRING([--enable-online-update-mar],
+        [Enable the experimental Mozilla-like online update service that will
+         check for new versions of LibreOffice. Disabled by default.]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-baseurl,
+    AS_HELP_STRING([--with-online-update-mar-baseurl=...],
+        [Set the base URL value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-certificateder,
+    AS_HELP_STRING([--with-online-update-mar-certificateder=...],
+        [Set the certificate DER value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-certificatename,
+    AS_HELP_STRING([--with-online-update-mar-certificatename=...],
+        [Set the certificate name value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-certificatepath,
+    AS_HELP_STRING([--with-online-update-mar-certificatepath=...],
+        [Set the certificate path value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-serverurl,
+    AS_HELP_STRING([--with-online-update-mar-serverurl=...],
+        [Set the server URL value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_WITH(online-update-mar-uploadurl,
+    AS_HELP_STRING([--with-online-update-mar-uploadurl=...],
+        [Set the upload URL value for --enable-online-update-mar.
+         (Can be left off for debug purposes, even if that may render the feature
+         non-functional.)]),
+,)
+
+libo_FUZZ_ARG_ENABLE(extension-update,
+    AS_HELP_STRING([--disable-extension-update],
+        [Disable possibility to update installed extensions.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(release-build,
+    AS_HELP_STRING([--enable-release-build],
+        [Enable release build. Note that the "release build" choice is orthogonal to
+         whether symbols are present, debug info is generated, or optimization
+         is done.
+         See https://wiki.documentfoundation.org/Development/DevBuild]),
+,)
+
+AC_ARG_ENABLE(windows-build-signing,
+    AS_HELP_STRING([--enable-windows-build-signing],
+        [Enable signing of windows binaries (*.exe, *.dll)]),
+,)
+
+AC_ARG_ENABLE(silent-msi,
+    AS_HELP_STRING([--enable-silent-msi],
+        [Enable MSI with LIMITUI=1 (silent install).]),
+,)
+
+AC_ARG_ENABLE(wix,
+    AS_HELP_STRING([--enable-wix],
+        [Build Windows installer using WiX.]),
+,)
+
+AC_ARG_ENABLE(macosx-code-signing,
+    AS_HELP_STRING([--enable-macosx-code-signing=<identity>],
+        [Sign executables, dylibs, frameworks and the app bundle. If you
+         don't provide an identity the first suitable certificate
+         in your keychain is used.]),
+,)
+
+AC_ARG_ENABLE(macosx-package-signing,
+    AS_HELP_STRING([--enable-macosx-package-signing=<identity>],
+        [Create a .pkg suitable for uploading to the Mac App Store and sign
+         it. If you don't provide an identity the first suitable certificate
+         in your keychain is used.]),
+,)
+
+AC_ARG_ENABLE(macosx-sandbox,
+    AS_HELP_STRING([--enable-macosx-sandbox],
+        [Make the app bundle run in a sandbox. Requires code signing.
+         Is required by apps distributed in the Mac App Store, and implies
+         adherence to App Store rules.]),
+,)
+
+AC_ARG_WITH(macosx-bundle-identifier,
+    AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice],
+        [Define the macOS bundle identifier. Default is the somewhat weird
+         org.libreoffice.script ("script", huh?).]),
+,with_macosx_bundle_identifier=org.libreoffice.script)
+
+AC_ARG_WITH(macosx-provisioning-profile,
+    AS_HELP_STRING([--with-macosx-provisioning-profile=/path/to/mac.provisionprofile],
+        [Specify the path to a provisioning profile to use]),
+,)
+
+AC_ARG_WITH(product-name,
+    AS_HELP_STRING([--with-product-name='My Own Office Suite'],
+        [Define the product name. Default is AC_PACKAGE_NAME.]),
+,with_product_name=$PRODUCTNAME)
+
+libo_FUZZ_ARG_ENABLE(community-flavor,
+    AS_HELP_STRING([--disable-community-flavor],
+        [Disable the Community branding.]),
+,)
+
+AC_ARG_WITH(package-version,
+    AS_HELP_STRING([--with-package-version='3.1.4.5'],
+        [Define the package version. Default is AC_PACKAGE_VERSION. Use only if you distribute an own build for macOS.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(readonly-installset,
+    AS_HELP_STRING([--enable-readonly-installset],
+        [Prevents any attempts by LibreOffice to write into its installation. That means
+         at least that no "system-wide" extensions can be added. Partly experimental work in
+         progress, probably not fully implemented. Always enabled for macOS.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(mariadb-sdbc,
+    AS_HELP_STRING([--disable-mariadb-sdbc],
+        [Disable the build of the MariaDB/MySQL-SDBC driver.])
+)
+
+libo_FUZZ_ARG_ENABLE(postgresql-sdbc,
+    AS_HELP_STRING([--disable-postgresql-sdbc],
+        [Disable the build of the PostgreSQL-SDBC driver.])
+)
+
+libo_FUZZ_ARG_ENABLE(lotuswordpro,
+    AS_HELP_STRING([--disable-lotuswordpro],
+        [Disable the build of the Lotus Word Pro filter.]),
+,test "${enable_lotuswordpro+set}" = set || enable_lotuswordpro=yes)
+
+libo_FUZZ_ARG_ENABLE(firebird-sdbc,
+    AS_HELP_STRING([--disable-firebird-sdbc],
+        [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
+,test "${enable_firebird_sdbc+set}" = set || enable_firebird_sdbc=yes)
+
+AC_ARG_ENABLE(bogus-pkg-config,
+    AS_HELP_STRING([--enable-bogus-pkg-config],
+        [MACOSX only: on MacOSX pkg-config can cause trouble. by default if one is found in the PATH, an error is issued. This flag turn that error into a warning.]),
+)
+
+AC_ARG_ENABLE(openssl,
+    AS_HELP_STRING([--disable-openssl],
+        [Disable using libssl/libcrypto from OpenSSL. If disabled,
+         components will use NSS. Work in progress,
+         use only if you are hacking on it.]),
+,enable_openssl=yes)
+
+libo_FUZZ_ARG_ENABLE(cipher-openssl-backend,
+    AS_HELP_STRING([--enable-cipher-openssl-backend],
+        [Enable using OpenSSL as the actual implementation of the rtl/cipher.h functionality.
+         Requires --enable-openssl.]))
+
+AC_ARG_ENABLE(nss,
+    AS_HELP_STRING([--disable-nss],
+        [Disable using NSS. If disabled,
+         components will use openssl. Work in progress,
+         use only if you are hacking on it.]),
+,enable_nss=yes)
+
+AC_ARG_ENABLE(library-bin-tar,
+    AS_HELP_STRING([--enable-library-bin-tar],
+        [Enable the building and reused of tarball of binary build for some 'external' libraries.
+        Some libraries can save their build result in a tarball
+        stored in TARFILE_LOCATION. That binary tarball is
+        uniquely identified by the source tarball,
+        the content of the config_host.mk file and the content
+        of the top-level directory in core for that library
+        If this option is enabled, then if such a tarfile exist, it will be untarred
+        instead of the source tarfile, and the build step will be skipped for that
+        library.
+        If a proper tarfile does not exist, then the normal source-based
+        build is done for that library and a proper binary tarfile is created
+        for the next time.]),
+)
+
+AC_ARG_ENABLE(dconf,
+    AS_HELP_STRING([--disable-dconf],
+        [Disable the dconf configuration backend (enabled by default where
+         available).]))
+
+libo_FUZZ_ARG_ENABLE(formula-logger,
+    AS_HELP_STRING(
+        [--enable-formula-logger],
+        [Enable formula logger for logging formula calculation flow in Calc.]
+    )
+)
+
+AC_ARG_ENABLE(ldap,
+    AS_HELP_STRING([--disable-ldap],
+        [Disable LDAP support.]),
+,enable_ldap=yes)
+
+AC_ARG_ENABLE(opencl,
+    AS_HELP_STRING([--disable-opencl],
+        [Disable OpenCL support.]),
+,enable_opencl=yes)
+
+libo_FUZZ_ARG_ENABLE(librelogo,
+    AS_HELP_STRING([--disable-librelogo],
+        [Do not build LibreLogo.]),
+,enable_librelogo=yes)
+
+AC_ARG_ENABLE(wasm-strip,
+    AS_HELP_STRING([--enable-wasm-strip],
+        [Strip the static build like for WASM/emscripten platform.]),
+,)
+
+AC_ARG_WITH(main-module,
+    AS_HELP_STRING([--with-main-module=<writer/calc>],
+        [Specify which main module to build for wasm.
+        Default value is 'writer'.]),
+,)
+
+AC_ARG_ENABLE(wasm-exceptions,
+    AS_HELP_STRING([--enable-wasm-exceptions],
+        [Build with native WASM exceptions (AKA -fwasm-exceptions),
+        matter of fact, this is currently not finished by any implementation)
+        (see https://webassembly.org/roadmap/ for the current state]),
+,)
+
+AC_ARG_ENABLE(xmlhelp,
+    AS_HELP_STRING([--disable-xmlhelp],
+        [Disable XML help support]),
+,enable_xmlhelp=yes)
+
+AC_ARG_ENABLE(customtarget-components,
+    AS_HELP_STRING([--enable-customtarget-components],
+        [Generates the static UNO object constructor mapping from the build.]))
+
+dnl ===================================================================
+dnl Optional Packages (--with/without-)
+dnl ===================================================================
+
+AC_ARG_WITH(gcc-home,
+    AS_HELP_STRING([--with-gcc-home],
+        [Specify the location of gcc/g++ manually. This can be used in conjunction
+         with --enable-icecream when icecream gcc/g++ wrappers are installed in a
+         non-default path.]),
+,)
+
+AC_ARG_WITH(gnu-patch,
+    AS_HELP_STRING([--with-gnu-patch],
+        [Specify location of GNU patch on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(build-platform-configure-options,
+    AS_HELP_STRING([--with-build-platform-configure-options],
+        [Specify options for the configure script run for the *build* platform in a cross-compilation]),
+,)
+
+AC_ARG_WITH(gnu-cp,
+    AS_HELP_STRING([--with-gnu-cp],
+        [Specify location of GNU cp on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(external-tar,
+    AS_HELP_STRING([--with-external-tar=<TARFILE_PATH>],
+        [Specify an absolute path of where to find (and store) tarfiles.]),
+    TARFILE_LOCATION=$withval ,
+)
+
+AC_ARG_WITH(referenced-git,
+    AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>],
+        [Specify another checkout directory to reference. This makes use of
+                 git submodule update --reference, and saves a lot of diskspace
+                 when having multiple trees side-by-side.]),
+    GIT_REFERENCE_SRC=$withval ,
+)
+
+AC_ARG_WITH(linked-git,
+    AS_HELP_STRING([--with-linked-git=<submodules repo basedir>],
+        [Specify a directory where the repositories of submodules are located.
+         This uses a method similar to git-new-workdir to get submodules.]),
+    GIT_LINK_SRC=$withval ,
+)
+
+AC_ARG_WITH(galleries,
+    AS_HELP_STRING([--with-galleries],
+        [Specify how galleries should be built. It is possible either to
+         build these internally from source ("build"),
+         or to disable them ("no")]),
+)
+
+AC_ARG_WITH(templates,
+    AS_HELP_STRING([--with-templates],
+        [Specify we build with or without template files. It is possible either to
+         build with templates ("yes"),
+         or to disable them ("no")]),
+)
+
+AC_ARG_WITH(theme,
+    AS_HELP_STRING([--with-theme="theme1 theme2..."],
+        [Choose which themes to include. By default those themes with an '*' are included.
+         Possible choices: *breeze, *breeze_dark, *breeze_dark_svg, *breeze_svg,
+         *colibre, *colibre_svg, *colibre_dark, *colibre_dark_svg,
+         *elementary, *elementary_svg,
+         *karasa_jaga, *karasa_jaga_svg,
+         *sifr, *sifr_dark, *sifr_dark_svg, *sifr_svg,
+         *sukapura, *sukapura_dark, *sukapura_dark_svg, *sukapura_svg.]),
+,)
+
+libo_FUZZ_ARG_WITH(helppack-integration,
+    AS_HELP_STRING([--without-helppack-integration],
+        [It will not integrate the helppacks to the installer
+         of the product. Please use this switch to use the online help
+         or separate help packages.]),
+,)
+
+libo_FUZZ_ARG_WITH(fonts,
+    AS_HELP_STRING([--without-fonts],
+        [LibreOffice includes some third-party fonts to provide a reliable basis for
+         help content, templates, samples, etc. When these fonts are already
+         known to be available on the system then you should use this option.]),
+,)
+
+AC_ARG_WITH(epm,
+    AS_HELP_STRING([--with-epm],
+        [Decides which epm to use. Default is to use the one from the system if
+         one is built. When either this is not there or you say =internal epm
+         will be built.]),
+,)
+
+AC_ARG_WITH(package-format,
+    AS_HELP_STRING([--with-package-format],
+        [Specify package format(s) for LibreOffice installation sets. The
+         implicit --without-package-format leads to no installation sets being
+         generated. Possible values: archive, bsd, deb, dmg,
+         installed, msi, pkg, and rpm.
+         Example: --with-package-format='deb rpm']),
+,)
+
+AC_ARG_WITH(tls,
+    AS_HELP_STRING([--with-tls],
+        [Decides which TLS/SSL and cryptographic implementations to use for
+         LibreOffice's code. Default is to use NSS although OpenSSL is also
+         possible. Notice that selecting NSS restricts the usage of OpenSSL
+         in LO's code but selecting OpenSSL doesn't restrict by now the
+         usage of NSS in LO's code. Possible values: openssl, nss.
+         Example: --with-tls="nss"]),
+,)
+
+AC_ARG_WITH(system-libs,
+    AS_HELP_STRING([--with-system-libs],
+        [Use libraries already on system -- enables all --with-system-* flags.]),
+,)
+
+AC_ARG_WITH(system-bzip2,
+    AS_HELP_STRING([--with-system-bzip2],
+        [Use bzip2 already on system. Used when --enable-online-update-mar
+        or --enable-python=internal]),,
+    [with_system_bzip2="$with_system_libs"])
+
+AC_ARG_WITH(system-headers,
+    AS_HELP_STRING([--with-system-headers],
+        [Use headers already on system -- enables all --with-system-* flags for
+         external packages whose headers are the only entities used i.e.
+         boost/odbc/sane-header(s).]),,
+    [with_system_headers="$with_system_libs"])
+
+AC_ARG_WITH(system-jars,
+    AS_HELP_STRING([--without-system-jars],
+        [When building with --with-system-libs, also the needed jars are expected
+         on the system. Use this to disable that]),,
+    [with_system_jars="$with_system_libs"])
+
+AC_ARG_WITH(system-cairo,
+    AS_HELP_STRING([--with-system-cairo],
+        [Use cairo libraries already on system.  Happens automatically for
+         (implicit) --enable-gtk3.]))
+
+AC_ARG_WITH(system-epoxy,
+    AS_HELP_STRING([--with-system-epoxy],
+        [Use epoxy libraries already on system.  Happens automatically for
+         (implicit) --enable-gtk3.]),,
+       [with_system_epoxy="$with_system_libs"])
+
+AC_ARG_WITH(myspell-dicts,
+    AS_HELP_STRING([--with-myspell-dicts],
+        [Adds myspell dictionaries to the LibreOffice installation set]),
+,)
+
+AC_ARG_WITH(system-dicts,
+    AS_HELP_STRING([--without-system-dicts],
+        [Do not use dictionaries from system paths.]),
+,)
+
+AC_ARG_WITH(external-dict-dir,
+    AS_HELP_STRING([--with-external-dict-dir],
+        [Specify external dictionary dir.]),
+,)
+
+AC_ARG_WITH(external-hyph-dir,
+    AS_HELP_STRING([--with-external-hyph-dir],
+        [Specify external hyphenation pattern dir.]),
+,)
+
+AC_ARG_WITH(external-thes-dir,
+    AS_HELP_STRING([--with-external-thes-dir],
+        [Specify external thesaurus dir.]),
+,)
+
+AC_ARG_WITH(system-zlib,
+    AS_HELP_STRING([--with-system-zlib],
+        [Use zlib already on system.]),,
+    [with_system_zlib=auto])
+
+AC_ARG_WITH(system-jpeg,
+    AS_HELP_STRING([--with-system-jpeg],
+        [Use jpeg already on system.]),,
+    [with_system_jpeg="$with_system_libs"])
+
+AC_ARG_WITH(system-expat,
+    AS_HELP_STRING([--with-system-expat],
+        [Use expat already on system.]),,
+    [with_system_expat="$with_system_libs"])
+
+AC_ARG_WITH(system-libxml,
+    AS_HELP_STRING([--with-system-libxml],
+        [Use libxml/libxslt already on system.]),,
+    [with_system_libxml=auto])
+
+AC_ARG_WITH(system-openldap,
+    AS_HELP_STRING([--with-system-openldap],
+        [Use the OpenLDAP LDAP SDK already on system.]),,
+    [with_system_openldap="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(poppler,
+    AS_HELP_STRING([--disable-poppler],
+        [Disable building Poppler.])
+)
+
+AC_ARG_WITH(system-poppler,
+    AS_HELP_STRING([--with-system-poppler],
+        [Use system poppler (only needed for PDF import).]),,
+    [with_system_poppler="$with_system_libs"])
+
+AC_ARG_WITH(system-abseil,
+    AS_HELP_STRING([--with-system-abseil],
+        [Use the abseil libraries already on system.]),,
+    [with_system_abseil="$with_system_libs"])
+
+AC_ARG_WITH(system-openjpeg,
+    AS_HELP_STRING([--with-system-openjpeg],
+        [Use the OpenJPEG library already on system.]),,
+    [with_system_openjpeg="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(gpgmepp,
+    AS_HELP_STRING([--disable-gpgmepp],
+        [Disable building gpgmepp. Do not use in normal cases unless you want to fix potential problems it causes.])
+)
+
+AC_ARG_WITH(system-gpgmepp,
+    AS_HELP_STRING([--with-system-gpgmepp],
+        [Use gpgmepp already on system]),,
+    [with_system_gpgmepp="$with_system_libs"])
+
+AC_ARG_WITH(system-mariadb,
+    AS_HELP_STRING([--with-system-mariadb],
+        [Use MariaDB/MySQL libraries already on system.]),,
+    [with_system_mariadb="$with_system_libs"])
+
+AC_ARG_ENABLE(bundle-mariadb,
+    AS_HELP_STRING([--enable-bundle-mariadb],
+        [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice.])
+)
+
+AC_ARG_WITH(system-postgresql,
+    AS_HELP_STRING([--with-system-postgresql],
+        [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
+         driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
+    [with_system_postgresql="$with_system_libs"])
+
+AC_ARG_WITH(libpq-path,
+    AS_HELP_STRING([--with-libpq-path=<absolute path to your libpq installation>],
+        [Use this PostgreSQL C interface (libpq) installation for building
+         the PostgreSQL-SDBC extension.]),
+,)
+
+AC_ARG_WITH(system-firebird,
+    AS_HELP_STRING([--with-system-firebird],
+        [Use Firebird libraries already on system, for building the Firebird-SDBC
+         driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
+    [with_system_firebird="$with_system_libs"])
+
+AC_ARG_WITH(system-libtommath,
+            AS_HELP_STRING([--with-system-libtommath],
+                           [Use libtommath already on system]),,
+            [with_system_libtommath="$with_system_libs"])
+
+AC_ARG_WITH(system-hsqldb,
+    AS_HELP_STRING([--with-system-hsqldb],
+        [Use hsqldb already on system.]))
+
+AC_ARG_WITH(hsqldb-jar,
+    AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    HSQLDB_JAR=$withval)
+
+libo_FUZZ_ARG_ENABLE(scripting-beanshell,
+    AS_HELP_STRING([--disable-scripting-beanshell],
+        [Disable support for scripts in BeanShell.]),
+,
+)
+
+AC_ARG_WITH(system-beanshell,
+    AS_HELP_STRING([--with-system-beanshell],
+        [Use beanshell already on system.]),,
+    [with_system_beanshell="$with_system_jars"])
+
+AC_ARG_WITH(beanshell-jar,
+    AS_HELP_STRING([--with-beanshell-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    BSH_JAR=$withval)
+
+libo_FUZZ_ARG_ENABLE(scripting-javascript,
+    AS_HELP_STRING([--disable-scripting-javascript],
+        [Disable support for scripts in JavaScript.]),
+,
+)
+
+AC_ARG_WITH(system-rhino,
+    AS_HELP_STRING([--with-system-rhino],
+        [Use rhino already on system.]),,)
+#    [with_system_rhino="$with_system_jars"])
+# Above is not used as we have different debug interface
+# patched into internal rhino. This code needs to be fixed
+# before we can enable it by default.
+
+AC_ARG_WITH(rhino-jar,
+    AS_HELP_STRING([--with-rhino-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    RHINO_JAR=$withval)
+
+AC_ARG_WITH(system-jfreereport,
+    AS_HELP_STRING([--with-system-jfreereport],
+        [Use JFreeReport already on system.]),,
+    [with_system_jfreereport="$with_system_jars"])
+
+AC_ARG_WITH(sac-jar,
+    AS_HELP_STRING([--with-sac-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    SAC_JAR=$withval)
+
+AC_ARG_WITH(libxml-jar,
+    AS_HELP_STRING([--with-libxml-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBXML_JAR=$withval)
+
+AC_ARG_WITH(flute-jar,
+    AS_HELP_STRING([--with-flute-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    FLUTE_JAR=$withval)
+
+AC_ARG_WITH(jfreereport-jar,
+    AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    JFREEREPORT_JAR=$withval)
+
+AC_ARG_WITH(liblayout-jar,
+    AS_HELP_STRING([--with-liblayout-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBLAYOUT_JAR=$withval)
+
+AC_ARG_WITH(libloader-jar,
+    AS_HELP_STRING([--with-libloader-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBLOADER_JAR=$withval)
+
+AC_ARG_WITH(libformula-jar,
+    AS_HELP_STRING([--with-libformula-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBFORMULA_JAR=$withval)
+
+AC_ARG_WITH(librepository-jar,
+    AS_HELP_STRING([--with-librepository-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBREPOSITORY_JAR=$withval)
+
+AC_ARG_WITH(libfonts-jar,
+    AS_HELP_STRING([--with-libfonts-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBFONTS_JAR=$withval)
+
+AC_ARG_WITH(libserializer-jar,
+    AS_HELP_STRING([--with-libserializer-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBSERIALIZER_JAR=$withval)
+
+AC_ARG_WITH(libbase-jar,
+    AS_HELP_STRING([--with-libbase-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBBASE_JAR=$withval)
+
+AC_ARG_WITH(system-odbc,
+    AS_HELP_STRING([--with-system-odbc],
+        [Use the odbc headers already on system.]),,
+    [with_system_odbc="auto"])
+
+AC_ARG_WITH(system-sane,
+    AS_HELP_STRING([--with-system-sane],
+        [Use sane.h already on system.]),,
+    [with_system_sane="$with_system_headers"])
+
+AC_ARG_WITH(system-bluez,
+    AS_HELP_STRING([--with-system-bluez],
+        [Use bluetooth.h already on system.]),,
+    [with_system_bluez="$with_system_headers"])
+
+AC_ARG_WITH(system-boost,
+    AS_HELP_STRING([--with-system-boost],
+        [Use boost already on system.]),,
+    [with_system_boost="$with_system_headers"])
+
+AC_ARG_WITH(system-dragonbox,
+    AS_HELP_STRING([--with-system-dragonbox],
+        [Use dragonbox already on system.]),,
+    [with_system_dragonbox="$with_system_headers"])
+
+AC_ARG_WITH(system-frozen,
+    AS_HELP_STRING([--with-system-frozen],
+        [Use frozen already on system.]),,
+    [with_system_frozen="$with_system_headers"])
+
+AC_ARG_WITH(system-libfixmath,
+    AS_HELP_STRING([--with-system-libfixmath],
+        [Use libfixmath already on system.]),,
+    [with_system_libfixmath="$with_system_libs"])
+
+AC_ARG_WITH(system-glm,
+    AS_HELP_STRING([--with-system-glm],
+        [Use glm already on system.]),,
+    [with_system_glm="$with_system_headers"])
+
+AC_ARG_WITH(system-hunspell,
+    AS_HELP_STRING([--with-system-hunspell],
+        [Use libhunspell already on system.]),,
+    [with_system_hunspell="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(cairo-rgba,
+    AS_HELP_STRING([--enable-cairo-rgba],
+        [Use RGBA order, instead of default BRGA. Not possible with --with-system-cairo]))
+
+libo_FUZZ_ARG_ENABLE(zxing,
+    AS_HELP_STRING([--disable-zxing],
+       [Disable use of zxing external library.]))
+
+AC_ARG_WITH(system-zxing,
+    AS_HELP_STRING([--with-system-zxing],
+        [Use libzxing already on system.]),,
+    [with_system_zxing="$with_system_libs"])
+
+AC_ARG_WITH(system-zxcvbn,
+    AS_HELP_STRING([--with-system-zxcvbn],
+        [Use libzxcvbn already on system.]),,
+    [with_system_zxcvbn="$with_system_libs"])
+
+AC_ARG_WITH(system-box2d,
+    AS_HELP_STRING([--with-system-box2d],
+        [Use box2d already on system.]),,
+    [with_system_box2d="$with_system_libs"])
+
+AC_ARG_WITH(system-mythes,
+    AS_HELP_STRING([--with-system-mythes],
+        [Use mythes already on system.]),,
+    [with_system_mythes="$with_system_libs"])
+
+AC_ARG_WITH(system-altlinuxhyph,
+    AS_HELP_STRING([--with-system-altlinuxhyph],
+        [Use ALTLinuxhyph already on system.]),,
+    [with_system_altlinuxhyph="$with_system_libs"])
+
+AC_ARG_WITH(system-lpsolve,
+    AS_HELP_STRING([--with-system-lpsolve],
+        [Use lpsolve already on system.]),,
+    [with_system_lpsolve="$with_system_libs"])
+
+AC_ARG_WITH(system-coinmp,
+    AS_HELP_STRING([--with-system-coinmp],
+        [Use CoinMP already on system.]),,
+    [with_system_coinmp="$with_system_libs"])
+
+AC_ARG_WITH(system-liblangtag,
+    AS_HELP_STRING([--with-system-liblangtag],
+        [Use liblangtag library already on system.]),,
+    [with_system_liblangtag="$with_system_libs"])
+
+AC_ARG_WITH(system-lockfile,
+    AS_HELP_STRING([--with-system-lockfile[=file]],
+        [Detect a system lockfile program or use the \$file argument.]))
+
+AC_ARG_WITH(webdav,
+    AS_HELP_STRING([--without-webdav],
+        [Disable WebDAV support in the UCB.]))
+
+AC_ARG_WITH(linker-hash-style,
+    AS_HELP_STRING([--with-linker-hash-style],
+        [Use linker with --hash-style=<style> when linking shared objects.
+         Possible values: "sysv", "gnu", "both". The default value is "gnu"
+         if supported on the build system, and "sysv" otherwise.]))
+
+AC_ARG_WITH(jdk-home,
+    AS_HELP_STRING([--with-jdk-home=<absolute path to JDK home>],
+        [If you have installed JDK 17 or later on your system please supply the
+         path here. Note that this is not the location of the java command but the
+         location of the entire distribution. In case of cross-compiling, this
+         is the JDK of the host os. Use --with-build-platform-configure-options
+         to point to a different build platform JDK.]),
+,)
+
+AC_ARG_WITH(help,
+    AS_HELP_STRING([--with-help],
+        [Enable the build of help. There is a special parameter "common" that
+         can be used to bundle only the common part, .e.g help-specific icons.
+         This is useful when you build the helpcontent separately.])
+    [
+                          Usage:     --with-help    build the old local help
+                                 --without-help     no local help (default)
+                                 --with-help=html   build the new HTML local help
+                                 --with-help=online build the new HTML online help
+    ],
+,)
+
+AC_ARG_WITH(omindex,
+   AS_HELP_STRING([--with-omindex],
+        [Enable the support of xapian-omega index for online help.])
+   [
+                         Usage: --with-omindex=server prepare the pages for omindex
+                                but let xapian-omega be built in server.
+                                --with-omindex=noxap do not prepare online pages
+                                for xapian-omega
+  ],
+,)
+
+libo_FUZZ_ARG_WITH(java,
+    AS_HELP_STRING([--with-java=<java command>],
+        [Specify the name of the Java interpreter command. Typically "java"
+         which is the default.
+
+         To build without support for Java components, applets, accessibility
+         or the XML filters written in Java, use --without-java or --with-java=no.]),
+    [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
+    [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ]
+)
+
+AC_ARG_WITH(jvm-path,
+    AS_HELP_STRING([--with-jvm-path=<absolute path to parent of jvm home>],
+        [Use a specific JVM search path at runtime.
+         e.g. use --with-jvm-path=/usr/lib/ to find JRE/JDK in /usr/lib/jvm/]),
+,)
+
+AC_ARG_WITH(ant-home,
+    AS_HELP_STRING([--with-ant-home=<absolute path to Ant home>],
+        [If you have installed Apache Ant on your system, please supply the path here.
+         Note that this is not the location of the Ant binary but the location
+         of the entire distribution.]),
+,)
+
+AC_ARG_WITH(symbol-config,
+    AS_HELP_STRING([--with-symbol-config],
+        [Configuration for the crashreport symbol upload]),
+        [],
+        [with_symbol_config=no])
+
+AC_ARG_WITH(export-validation,
+    AS_HELP_STRING([--without-export-validation],
+        [Disable validating OOXML and ODF files as exported from in-tree tests.]),
+,with_export_validation=auto)
+
+AC_ARG_WITH(bffvalidator,
+    AS_HELP_STRING([--with-bffvalidator=<absolute path to BFFValidator>],
+        [Enables export validation for Microsoft Binary formats (doc, xls, ppt).
+         Requires installed Microsoft Office Binary File Format Validator.
+         Note: export-validation (--with-export-validation) is required to be turned on.
+         See https://web.archive.org/web/20200804155745/https://www.microsoft.com/en-us/download/details.aspx?id=26794]),
+,with_bffvalidator=no)
+
+libo_FUZZ_ARG_WITH(junit,
+    AS_HELP_STRING([--with-junit=<absolute path to JUnit 4 jar>],
+        [Specifies the JUnit 4 jar file to use for JUnit-based tests.
+         --without-junit disables those tests. Not relevant in the --without-java case.]),
+,with_junit=yes)
+
+AC_ARG_WITH(hamcrest,
+    AS_HELP_STRING([--with-hamcrest=<absolute path to hamcrest jar>],
+        [Specifies the hamcrest jar file to use for JUnit-based tests.
+         --without-junit disables those tests. Not relevant in the --without-java case.]),
+,with_hamcrest=yes)
+
+AC_ARG_WITH(perl-home,
+    AS_HELP_STRING([--with-perl-home=<abs. path to Perl 5 home>],
+        [If you have installed Perl 5 Distribution, on your system, please
+         supply the path here. Note that this is not the location of the Perl
+         binary but the location of the entire distribution.]),
+,)
+
+libo_FUZZ_ARG_WITH(doxygen,
+    AS_HELP_STRING(
+        [--with-doxygen=<absolute path to doxygen executable>],
+        [Specifies the doxygen executable to use when generating ODK C/C++
+         documentation. --without-doxygen disables generation of ODK C/C++
+         documentation. Not relevant in the --disable-odk case.]),
+,with_doxygen=yes)
+
+AC_ARG_WITH(visual-studio,
+    AS_HELP_STRING([--with-visual-studio=<2019/2022/2022preview>],
+        [Specify which Visual Studio version to use in case several are
+         installed. Currently 2019 (default) and 2022 are supported.]),
+,)
+
+AC_ARG_WITH(windows-sdk,
+    AS_HELP_STRING([--with-windows-sdk=<8.0(A)/8.1(A)/10.0>],
+        [Specify which Windows SDK, or "Windows Kit", version to use
+         in case the one that came with the selected Visual Studio
+         is not what you want for some reason. Note that not all compiler/SDK
+         combinations are supported. The intent is that this option should not
+         be needed.]),
+,)
+
+AC_ARG_WITH(lang,
+    AS_HELP_STRING([--with-lang="es sw tu cs sk"],
+        [Use this option to build LibreOffice with additional UI language support.
+         English (US) is always included by default.
+         Separate multiple languages with space.
+         For all languages, use --with-lang=ALL.]),
+,)
+
+AC_ARG_WITH(locales,
+    AS_HELP_STRING([--with-locales="en es pt fr zh kr ja"],
+        [Use this option to limit the locale information built in.
+         Separate multiple locales with space.
+         Very experimental and might well break stuff.
+         Just a desperate measure to shrink code and data size.
+         By default all the locales available is included.
+         Just works with --disable-dynloading. Defaults to "ALL".
+         This option is completely unrelated to --with-lang.])
+    [
+                          Affects also our character encoding conversion
+                          tables for encodings mainly targeted for a
+                          particular locale, like EUC-CN and EUC-TW for
+                          zh, ISO-2022-JP for ja.
+
+                          Affects also our add-on break iterator data for
+                          some languages.
+
+                          For the default, all locales, don't use this switch at all.
+                          Specifying just the language part of a locale means all matching
+                          locales will be included.
+    ],
+,)
+
+# Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
+libo_FUZZ_ARG_WITH(krb5,
+    AS_HELP_STRING([--with-krb5],
+        [Enable MIT Kerberos 5 support in modules that support it.
+         By default automatically enabled on platforms
+         where a good system Kerberos 5 is available.]),
+,)
+
+libo_FUZZ_ARG_WITH(gssapi,
+    AS_HELP_STRING([--with-gssapi],
+        [Enable GSSAPI support in modules that support it.
+         By default automatically enabled on platforms
+         where a good system GSSAPI is available.]),
+,)
+
+libo_FUZZ_ARG_WITH(lxml,
+    AS_HELP_STRING([--without-lxml],
+        [gla11y will use python lxml when available, potentially building a local copy if necessary.
+         --without-lxml tells it to not use python lxml at all, which means that gla11y will only
+         report widget classes and ids.]),
+,)
+
+libo_FUZZ_ARG_WITH(latest-c++,
+    AS_HELP_STRING([--with-latest-c++],
+        [Try to enable the latest features of the C++ compiler, even if they are not yet part of a
+         published standard.  This option is ignored when CXXFLAGS_CXX11 is set explicitly.]),,
+        [with_latest_c__=no])
+
+AC_ARG_WITH(gtk3-build,
+    AS_HELP_STRING([--with-gtk3-build=<absolute path to GTK3 build>],
+        [(Windows-only) In order to build GtkTiledViewer on Windows, pass the path
+         to a GTK3 build, like '--with-gtk3-build=C:/gtk-build/gtk/x64/release'.]))
+
+dnl ===================================================================
+dnl Branding
+dnl ===================================================================
+
+AC_ARG_WITH(branding,
+    AS_HELP_STRING([--with-branding=/path/to/images],
+        [Use given path to retrieve branding images set.])
+    [
+                          Search for intro.png about.svg and logo.svg.
+                          If any is missing, default ones will be used instead.
+
+                          Search also progress.conf for progress
+                          settings on intro screen :
+
+                          PROGRESSBARCOLOR="255,255,255" Set color of
+                          progress bar. Comma separated RGB decimal values.
+                          PROGRESSSIZE="407,6" Set size of progress bar.
+                          Comma separated decimal values (width, height).
+                          PROGRESSPOSITION="61,317" Set position of progress
+                          bar from left,top. Comma separated decimal values.
+                          PROGRESSFRAMECOLOR="20,136,3" Set color of progress
+                          bar frame. Comma separated RGB decimal values.
+                          PROGRESSTEXTCOLOR="0,0,0" Set color of progress
+                          bar text. Comma separated RGB decimal values.
+                          PROGRESSTEXTBASELINE="287" Set vertical position of
+                          progress bar text from top. Decimal value.
+
+                          Default values will be used if not found.
+    ],
+,)
+
+
+AC_ARG_WITH(extra-buildid,
+    AS_HELP_STRING([--with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"],
+        [Show addition build identification in about dialog.]),
+,)
+
+
+AC_ARG_WITH(vendor,
+    AS_HELP_STRING([--with-vendor="John the Builder"],
+        [Set vendor of the build.]),
+,)
+
+AC_ARG_WITH(privacy-policy-url,
+    AS_HELP_STRING([--with-privacy-policy-url="https://yourdomain/privacy-policy"],
+        [The URL to your privacy policy (needed when
+         enabling online-update or crashreporting via breakpad)]),
+        [if test "x$with_privacy_policy_url" = "xyes"; then
+            AC_MSG_FAILURE([you need to specify an argument when using --with-privacy-policy-url])
+         elif test "x$with_privacy_policy_url" = "xno"; then
+            with_privacy_policy_url="undefined"
+         fi]
+,[with_privacy_policy_url="undefined"])
+
+AC_ARG_WITH(android-package-name,
+    AS_HELP_STRING([--with-android-package-name="org.libreoffice"],
+        [Set Android package name of the build.]),
+,)
+
+AC_ARG_WITH(compat-oowrappers,
+    AS_HELP_STRING([--with-compat-oowrappers],
+        [Install oo* wrappers in parallel with
+         lo* ones to keep backward compatibility.
+         Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_WITH(os-version,
+    AS_HELP_STRING([--with-os-version=<OSVERSION>],
+        [For FreeBSD users, use this option to override the detected OSVERSION.]),
+,)
+
+AC_ARG_WITH(parallelism,
+    AS_HELP_STRING([--with-parallelism],
+        [Number of jobs to run simultaneously during build. Parallel builds can
+        save a lot of time on multi-cpu machines. Defaults to the number of
+        CPUs on the machine, unless you configure --enable-icecream - then to
+        40.]),
+,)
+
+AC_ARG_WITH(all-tarballs,
+    AS_HELP_STRING([--with-all-tarballs],
+        [Download all external tarballs unconditionally]))
+
+AC_ARG_WITH(gdrive-client-id,
+    AS_HELP_STRING([--with-gdrive-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on Google Drive. If either this or --with-gdrive-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(gdrive-client-secret,
+    AS_HELP_STRING([--with-gdrive-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on Google Drive. If either this or
+        --with-gdrive-client-id is empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(alfresco-cloud-client-id,
+    AS_HELP_STRING([--with-alfresco-cloud-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(alfresco-cloud-client-secret,
+    AS_HELP_STRING([--with-alfresco-cloud-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on Alfresco Cloud. If either this or
+        --with-alfresco-cloud-client-id is empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(onedrive-client-id,
+    AS_HELP_STRING([--with-onedrive-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on OneDrive. If either this or --with-onedrive-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(onedrive-client-secret,
+    AS_HELP_STRING([--with-onedrive-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on OneDrive. If either this or
+        --with-onedrive-client-id is empty, the feature will be disabled]),
+)
+
+dnl Check for coredumpctl support to present information about crashing test processes:
+AC_ARG_WITH(coredumpctl,
+    AS_HELP_STRING([--with-coredumpctl],
+        [Use coredumpctl (together with systemd-run) to retrieve core dumps of crashing test
+        processes.]))
+
+AC_ARG_WITH(buildconfig-recorded,
+    AS_HELP_STRING([--with-buildconfig-recorded],
+        [Put build config into version info reported by LOK. Incompatible with reproducible builds.]),
+)
+
+AC_MSG_CHECKING([whether to record build config])
+if test -z "$with_buildconfig_recorded"; then
+    with_buildconfig_recorded=no
+fi
+if test "$with_buildconfig_recorded" = no; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    # replace backslashes, to get a valid c++ string
+    config_args=$(echo $ac_configure_args | tr '\\' '/')
+    AC_DEFINE_UNQUOTED([BUILDCONFIG],[["$config_args"]],[Options passed to configure script])
+    AC_DEFINE([BUILDCONFIG_RECORDED],[1],[Options passed to configure script])
+fi
+
+dnl ===================================================================
+dnl Do we want to use pre-build binary tarball for recompile
+dnl ===================================================================
+
+if test "$enable_library_bin_tar" = "yes" ; then
+    USE_LIBRARY_BIN_TAR=TRUE
+else
+    USE_LIBRARY_BIN_TAR=
+fi
+AC_SUBST(USE_LIBRARY_BIN_TAR)
+
+dnl ===================================================================
+dnl Test whether build target is Release Build
+dnl ===================================================================
+AC_MSG_CHECKING([whether build target is Release Build])
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_RELEASE_BUILD=
+    dnl Pu the value on one line as make (at least on macOS) seems to ignore
+    dnl the newlines and then complains about spaces.
+    GET_TASK_ALLOW_ENTITLEMENT='<!-- We want to be able to debug a hardened process when not building for release --><key>com.apple.security.get-task-allow</key><true/>'
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_RELEASE_BUILD=TRUE
+    GET_TASK_ALLOW_ENTITLEMENT=
+fi
+AC_SUBST(ENABLE_RELEASE_BUILD)
+AC_SUBST(GET_TASK_ALLOW_ENTITLEMENT)
+
+AC_MSG_CHECKING([whether to build a Community flavor])
+if test -z "$enable_community_flavor" -o "$enable_community_flavor" = "yes"; then
+    AC_DEFINE(HAVE_FEATURE_COMMUNITY_FLAVOR)
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Test whether to sign Windows Build
+dnl ===================================================================
+AC_MSG_CHECKING([whether to sign windows build])
+if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT"; then
+    AC_MSG_RESULT([yes])
+    WINDOWS_BUILD_SIGNING="TRUE"
+else
+    AC_MSG_RESULT([no])
+    WINDOWS_BUILD_SIGNING="FALSE"
+fi
+AC_SUBST(WINDOWS_BUILD_SIGNING)
+
+dnl ===================================================================
+dnl MacOSX build and runtime environment options
+dnl ===================================================================
+
+AC_ARG_WITH(macosx-version-min-required,
+    AS_HELP_STRING([--with-macosx-version-min-required=<version>],
+        [set the minimum OS version needed to run the built LibreOffice])
+    [
+                          e. g.: --with-macosx-version-min-required=10.15
+    ],
+,)
+
+dnl ===================================================================
+dnl Check for incompatible options set by fuzzing, and reset those
+dnl automatically to working combinations
+dnl ===================================================================
+
+if test "$libo_fuzzed_enable_dbus" = yes -a "$libo_fuzzed_enable_avahi" -a \
+        "$enable_dbus" != "$enable_avahi"; then
+    AC_MSG_NOTICE([Resetting --enable-avahi=$enable_dbus])
+    enable_avahi=$enable_dbus
+fi
+
+add_lopath_after ()
+{
+    if ! echo "$LO_PATH" | $EGREP -q "(^|${P_SEP})$1($|${P_SEP})"; then
+        LO_PATH="${LO_PATH:+$LO_PATH$P_SEP}$1"
+    fi
+}
+
+add_lopath_before ()
+{
+    local IFS=${P_SEP}
+    local path_cleanup
+    local dir
+    for dir in $LO_PATH ; do
+        if test "$dir" != "$1" ; then
+            path_cleanup=${path_cleanup:+$path_cleanup$P_SEP}$dir
+        fi
+    done
+    LO_PATH="$1${path_cleanup:+$P_SEP$path_cleanup}"
+}
+
+dnl ===================================================================
+dnl check for required programs (grep, awk, sed, bash)
+dnl ===================================================================
+
+pathmunge ()
+{
+    local new_path
+    if test -n "$1"; then
+        if test "$build_os" = "cygwin"; then
+            if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+                PathFormat "$1"
+                new_path=`cygpath -sm "$formatted_path"`
+            else
+                PathFormat "$1"
+                new_path=`cygpath -u "$formatted_path"`
+            fi
+        else
+            new_path="$1"
+        fi
+        if test "$2" = "after"; then
+            add_lopath_after "$new_path"
+        else
+            add_lopath_before "$new_path"
+        fi
+    fi
+}
+
+AC_PROG_AWK
+AC_PATH_PROG( AWK, $AWK)
+if test -z "$AWK"; then
+    AC_MSG_ERROR([install awk to run this script])
+fi
+
+AC_PATH_PROG(BASH, bash)
+if test -z "$BASH"; then
+    AC_MSG_ERROR([bash not found in \$PATH])
+fi
+AC_SUBST(BASH)
+
+# prefer parallel compression tools, if available
+AC_PATH_PROG(COMPRESSIONTOOL, pigz)
+if test -z "$COMPRESSIONTOOL"; then
+    AC_PATH_PROG(COMPRESSIONTOOL, gzip)
+    if test -z "$COMPRESSIONTOOL"; then
+        AC_MSG_ERROR([gzip not found in \$PATH])
+    fi
+fi
+AC_SUBST(COMPRESSIONTOOL)
+
+AC_MSG_CHECKING([for GNU or BSD tar])
+for a in $GNUTAR gtar gnutar tar bsdtar /usr/sfw/bin/gtar; do
+    $a --version 2> /dev/null | grep -E "GNU|bsdtar"  2>&1 > /dev/null
+    if test $? -eq 0;  then
+        GNUTAR=$a
+        break
+    fi
+done
+AC_MSG_RESULT($GNUTAR)
+if test -z "$GNUTAR"; then
+    AC_MSG_ERROR([not found. install GNU or BSD tar.])
+fi
+AC_SUBST(GNUTAR)
+
+AC_MSG_CHECKING([for tar's option to strip components])
+$GNUTAR --help 2> /dev/null | grep -E "bsdtar|strip-components" 2>&1 >/dev/null
+if test $? -eq 0; then
+    STRIP_COMPONENTS="--strip-components"
+else
+    $GNUTAR --help 2> /dev/null | grep -E "strip-path" 2>&1 >/dev/null
+    if test $? -eq 0; then
+        STRIP_COMPONENTS="--strip-path"
+    else
+        STRIP_COMPONENTS="unsupported"
+    fi
+fi
+AC_MSG_RESULT($STRIP_COMPONENTS)
+if test x$STRIP_COMPONENTS = xunsupported; then
+    AC_MSG_ERROR([you need a tar that is able to strip components.])
+fi
+AC_SUBST(STRIP_COMPONENTS)
+
+dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
+dnl desktop OSes from "mobile" ones.
+
+dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
+dnl In other words, that when building for an OS that is not a
+dnl "desktop" one but a "mobile" one, we are always cross-compiling.
+
+dnl Note the direction of the implication; there is no assumption that
+dnl cross-compiling would imply a non-desktop OS.
+
+if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
+    BUILD_TYPE="$BUILD_TYPE DESKTOP"
+    AC_DEFINE(HAVE_FEATURE_DESKTOP)
+    if test "$_os" != Emscripten; then
+        AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+    fi
+fi
+
+# explicitly doesn't include enable_gtk3=no and enable_qt5=yes, so it should
+# also work with the default gtk3 plugin.
+if test "$enable_wasm_strip" = "yes"; then
+    enable_avmedia=no
+    enable_libcmis=no
+    enable_coinmp=no
+    enable_cups=no
+    test "$_os" = Emscripten && enable_curl=no
+    enable_database_connectivity=no
+    enable_dbus=no
+    enable_dconf=no
+    test "${enable_dynamic_loading+set}" = set -o "$_os" != Emscripten || enable_dynamic_loading=no
+    enable_extension_integration=no
+    enable_extensions=no
+    enable_extension_update=no
+    enable_gio=no
+    enable_gpgmepp=no
+    enable_ldap=no
+    enable_lotuswordpro=no
+    enable_lpsolve=no
+    enable_nss=no
+    enable_odk=no
+    enable_online_update=no
+    enable_opencl=no
+    enable_pdfimport=no
+    enable_randr=no
+    enable_report_builder=no
+    enable_scripting=no
+    enable_sdremote_bluetooth=no
+    enable_skia=no
+    enable_xmlhelp=no
+    enable_zxing=no
+    test_libepubgen=no
+    test_libcdr=no
+    test_libcmis=no
+    test_libetonyek=no
+    test_libfreehand=no
+    test_libmspub=no
+    test_libpagemaker=no
+    test_libqxp=no
+    test_libvisio=no
+    test_libzmf=no
+    test_webdav=no
+    with_galleries=no
+    with_templates=no
+    with_webdav=no
+    with_x=no
+
+    test "${with_fonts+set}" = set || with_fonts=yes
+    test "${with_locales+set}" = set || with_locales=en
+
+    AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
+    AC_DEFINE(ENABLE_WASM_STRIP_WRITER)
+    AC_DEFINE(ENABLE_WASM_STRIP_CALC)
+    AC_DEFINE(ENABLE_WASM_STRIP_CANVAS)
+#    AC_DEFINE(ENABLE_WASM_STRIP_CHART)
+    AC_DEFINE(ENABLE_WASM_STRIP_DBACCESS)
+    AC_DEFINE(ENABLE_WASM_STRIP_EPUB)
+    AC_DEFINE(ENABLE_WASM_STRIP_EXTRA)
+    AC_DEFINE(ENABLE_WASM_STRIP_GUESSLANG)
+#    AC_DEFINE(ENABLE_WASM_STRIP_HUNSPELL)
+    AC_DEFINE(ENABLE_WASM_STRIP_LANGUAGETOOL)
+    AC_DEFINE(ENABLE_WASM_STRIP_PINGUSER)
+    AC_DEFINE(ENABLE_WASM_STRIP_PREMULTIPLY)
+    AC_DEFINE(ENABLE_WASM_STRIP_RECENT)
+    AC_DEFINE(ENABLE_WASM_STRIP_RECOVERYUI)
+    AC_DEFINE(ENABLE_WASM_STRIP_SPLASH)
+    AC_DEFINE(ENABLE_WASM_STRIP_SWEXPORTS)
+    AC_DEFINE(ENABLE_WASM_STRIP_SCEXPORTS)
+fi
+
+EMSCRIPTEN_NEH_MAJOR=3
+EMSCRIPTEN_NEH_MINOR=1
+EMSCRIPTEN_NEH_TINY=3
+EMSCRIPTEN_NEH_VERSION="${EMSCRIPTEN_NEH_MAJOR}.${EMSCRIPTEN_NEH_MINOR}.${EMSCRIPTEN_NEH_TINY}"
+
+if test "$enable_wasm_exceptions" = yes; then
+    AC_MSG_CHECKING([if Emscripten version is at least $EMSCRIPTEN_NEH_VERSION for SjLj + native EH])
+    check_semantic_version_three_prefixed EMSCRIPTEN NEH
+    if test $? -ne 0; then
+        AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION])
+    else
+        AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)])
+    fi
+    ENABLE_WASM_EXCEPTIONS=TRUE
+fi
+AC_SUBST(ENABLE_WASM_EXCEPTIONS)
+
+# Whether to build "avmedia" functionality or not.
+
+if test "$enable_avmedia" = yes; then
+    BUILD_TYPE="$BUILD_TYPE AVMEDIA"
+    AC_DEFINE(HAVE_FEATURE_AVMEDIA)
+else
+    test_gstreamer_1_0=no
+fi
+
+# Decide whether to build database connectivity stuff (including Base) or not.
+if test "$enable_database_connectivity" != no; then
+    BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
+    AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
+else
+    if test "$_os" = iOS; then
+        AC_MSG_ERROR([Presumly can't disable DB connectivity on iOS.])
+    fi
+    disable_database_connectivity_dependencies
+fi
+
+if test -z "$enable_extensions"; then
+    # For iOS and Android Viewer, disable extensions unless specifically overridden with --enable-extensions.
+    if test $_os != iOS && test $_os != Android -o "$ENABLE_ANDROID_LOK" = TRUE ; then
+        enable_extensions=yes
+    fi
+fi
+
+DISABLE_SCRIPTING=''
+if test "$enable_scripting" = yes; then
+    BUILD_TYPE="$BUILD_TYPE SCRIPTING"
+    AC_DEFINE(HAVE_FEATURE_SCRIPTING)
+else
+    DISABLE_SCRIPTING='TRUE'
+    SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
+fi
+
+if test $_os = iOS -o $_os = Android -o $_os = Emscripten; then
+    # Disable dynamic_loading always for iOS and Android
+    enable_dynamic_loading=no
+elif test -z "$enable_dynamic_loading"; then
+    # Otherwise enable it unless specifically disabled
+    enable_dynamic_loading=yes
+fi
+
+DISABLE_DYNLOADING=''
+if test "$enable_dynamic_loading" = yes; then
+    BUILD_TYPE="$BUILD_TYPE DYNLOADING"
+else
+    DISABLE_DYNLOADING='TRUE'
+    if test $_os != iOS -a $_os != Android; then
+        enable_database_connectivity=no
+        enable_nss=no
+        enable_odk=no
+        enable_python=no
+        enable_skia=no
+        with_java=no
+    fi
+fi
+AC_SUBST(DISABLE_DYNLOADING)
+
+ENABLE_CUSTOMTARGET_COMPONENTS=
+if test "$enable_customtarget_components" = yes -a "$DISABLE_DYNLOADING" = TRUE; then
+    ENABLE_CUSTOMTARGET_COMPONENTS=TRUE
+    if test -n "$with_locales" -a "$with_locales" != en -a "$with_locales" != ALL; then
+        AC_MSG_ERROR([Currently just --with-locales=all or en is supported with --enable-customtarget-components])
+    fi
+fi
+AC_SUBST(ENABLE_CUSTOMTARGET_COMPONENTS)
+
+if test "$enable_extensions" = yes; then
+    BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
+    AC_DEFINE(HAVE_FEATURE_EXTENSIONS)
+else
+    enable_extension_integration=no
+    enable_extension_update=no
+fi
+
+# remember SYSBASE value
+AC_SUBST(SYSBASE)
+
+dnl ===================================================================
+dnl  Sort out various gallery compilation options
+dnl ===================================================================
+WITH_GALLERY_BUILD=TRUE
+AC_MSG_CHECKING([how to build and package galleries])
+if test -n "${with_galleries}"; then
+    if test "$with_galleries" = "build"; then
+        if test "$enable_database_connectivity" = no; then
+            AC_MSG_ERROR([DB connectivity is needed for gengal / svx])
+        fi
+        AC_MSG_RESULT([build from source images internally])
+    elif test "$with_galleries" = "no"; then
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable non-internal gallery build])
+    else
+        AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
+    fi
+else
+    if test $_os != iOS -a $_os != Android; then
+        AC_MSG_RESULT([internal src images for desktop])
+    else
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable src image build])
+    fi
+fi
+AC_SUBST(WITH_GALLERY_BUILD)
+
+dnl ===================================================================
+dnl  Sort out various templates compilation options
+dnl ===================================================================
+WITH_TEMPLATES=TRUE
+AC_MSG_CHECKING([build with or without template files])
+if test -n "${with_templates}"; then
+    if test "$with_templates" = "yes"; then
+        AC_MSG_RESULT([enable all templates])
+    elif test "$with_templates" = "no"; then
+        WITH_TEMPLATES=
+        AC_MSG_RESULT([disable non-internal templates])
+    else
+        AC_MSG_ERROR([unknown value --with-templates=$with_templates])
+    fi
+else
+    if test $_os != iOS -a $_os != Android -a $_os != Emscripten; then
+        AC_MSG_RESULT([enable all templates])
+    else
+        WITH_TEMPLATES=
+        AC_MSG_RESULT([disable non-internal templates])
+    fi
+fi
+AC_SUBST(WITH_TEMPLATES)
+
+dnl ===================================================================
+dnl  Checks if ccache is available
+dnl ===================================================================
+CCACHE_DEPEND_MODE=
+if test "$enable_ccache" = "no"; then
+    CCACHE=""
+elif test -n "$enable_ccache" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
+    case "%$CC%$CXX%" in
+    # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some version number etc),
+    # assume that's good then
+    *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
+        AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
+        CCACHE_DEPEND_MODE=1
+        ;;
+    *)
+        # try to use our own ccache if it is available and CCACHE was not already defined
+        if test -z "$CCACHE"; then
+            if test "$_os" = "WINNT"; then
+                ccache_ext=.exe # e.g. openssl build needs ccache.exe, not just ccache
+            fi
+            if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/ccache$ccache_ext" ; then
+                CCACHE="$LODE_HOME/opt/bin/ccache$ccache_ext"
+            elif test -x "/opt/lo/bin/ccache$ccache_ext"; then
+                CCACHE="/opt/lo/bin/ccache$ccache_ext"
+            fi
+        fi
+        AC_PATH_PROG([CCACHE],[ccache],[not found])
+        if test "$CCACHE" != "not found" -a "$_os" = "WINNT"; then
+            CCACHE=`win_short_path_for_make "$CCACHE"`
+            # check that it has MSVC support (it should recognize it in CCACHE_COMPILERTYPE)
+            rm -f conftest.txt
+            AC_MSG_CHECKING([whether $CCACHE has MSVC support])
+            CCACHE_COMPILERTYPE=cl CCACHE_LOGFILE=conftest.txt $CCACHE echo >/dev/null 2>/dev/null
+            if grep -q 'Config: (environment) compiler_type = cl' conftest.txt; then
+                AC_MSG_RESULT(yes)
+            else
+                AC_MSG_RESULT(no)
+                CCACHE="not found"
+            fi
+            rm -f conftest.txt
+        fi
+        if test "$CCACHE" = "not found" -a "$_os" = "WINNT"; then
+            # on windows/VC perhaps sccache is around?
+            case "%$CC%$CXX%" in
+            # If $CC and/or $CXX already contain "sccache" (possibly suffixed with some version number etc),
+            # assume that's good then
+            *%sccache[[-_' ']]*|*/sccache[[-_' ']]*)
+                AC_MSG_NOTICE([sccache seems to be included in a pre-defined CC and/or CXX])
+                CCACHE_DEPEND_MODE=1
+                SCCACHE=1
+                ;;
+            *)
+                # for sharing code below, reuse CCACHE env var
+                AC_PATH_PROG([CCACHE],[sccache],[not found])
+                if test "$CCACHE" != "not found"; then
+                    CCACHE=`win_short_path_for_make "$CCACHE"`
+                    SCCACHE=1
+                    CCACHE_DEPEND_MODE=1
+                fi
+                ;;
+            esac
+        fi
+        if test "$CCACHE" = "not found"; then
+            CCACHE=""
+        fi
+        if test -n "$CCACHE" -a -z "$SCCACHE"; then
+            CCACHE_DEPEND_MODE=1
+            # Need to check for ccache version: otherwise prevents
+            # caching of the results (like "-x objective-c++" for Mac)
+            if test $_os = Darwin -o $_os = iOS; then
+                # Check ccache version
+                AC_MSG_CHECKING([whether version of ccache is suitable])
+                CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
+                CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+                if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
+                    AC_MSG_RESULT([yes, $CCACHE_VERSION])
+                else
+                    AC_MSG_RESULT([no, $CCACHE_VERSION])
+                    CCACHE=""
+                    CCACHE_DEPEND_MODE=
+                fi
+            fi
+        fi
+        ;;
+    esac
+else
+    CCACHE=""
+fi
+if test "$enable_ccache" = "nodepend"; then
+    CCACHE_DEPEND_MODE=""
+fi
+AC_SUBST(CCACHE_DEPEND_MODE)
+
+# sccache defaults are good enough
+if test "$CCACHE" != "" -a -z "$SCCACHE"; then
+    # e.g. (/home/rene/.config/ccache/ccache.conf) max_size = 20.0G
+    # or (...) max_size = 20.0 G
+    # -p works with both 4.2 and 4.4
+    ccache_size_msg=$([$CCACHE -p | $AWK /max_size/'{ print $4 $5 }' | sed -e 's/\.[0-9]*//'])
+    ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
+    if test "$ccache_size" = ""; then
+        ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
+        if test "$ccache_size" = ""; then
+            ccache_size=0
+        fi
+        # we could not determine the size or it was less than 1GB -> disable auto-ccache
+        if test $ccache_size -lt 1024; then
+            CCACHE=""
+            AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-productive: Disabling auto-ccache detection])
+            add_warning "ccache's cache size is less than 1GB using it is counter-productive: auto-ccache detection disabled"
+        else
+            # warn that ccache may be too small for debug build
+            AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
+            add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
+        fi
+    else
+        if test $ccache_size -lt 5; then
+            #warn that ccache may be too small for debug build
+            AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
+            add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
+        fi
+    fi
+fi
+
+ENABLE_Z7_DEBUG=
+if test "$enable_z7_debug" != no; then
+    if test "$enable_z7_debug" = yes -o -n "$CCACHE"; then
+        ENABLE_Z7_DEBUG=TRUE
+    fi
+else
+    AC_MSG_WARN([ccache will not work with --disable-z7-debug])
+    add_warning "ccache will not work with --disable-z7-debug"
+fi
+AC_SUBST(ENABLE_Z7_DEBUG)
+
+dnl ===================================================================
+dnl  Checks for C compiler,
+dnl  The check for the C++ compiler is later on.
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+    GCC_HOME_SET="true"
+    AC_MSG_CHECKING([gcc home])
+    if test -z "$with_gcc_home"; then
+        if test "$enable_icecream" = "yes"; then
+            if test -d "/usr/lib/icecc/bin"; then
+                GCC_HOME="/usr/lib/icecc/"
+            elif test -d "/usr/libexec/icecc/bin"; then
+                GCC_HOME="/usr/libexec/icecc/"
+            elif test -d "/opt/icecream/bin"; then
+                GCC_HOME="/opt/icecream/"
+            else
+                AC_MSG_ERROR([Could not figure out the location of icecream GCC wrappers, manually use --with-gcc-home])
+
+            fi
+        else
+            GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
+            GCC_HOME_SET="false"
+        fi
+    else
+        GCC_HOME="$with_gcc_home"
+    fi
+    AC_MSG_RESULT($GCC_HOME)
+    AC_SUBST(GCC_HOME)
+
+    if test "$GCC_HOME_SET" = "true"; then
+        if test -z "$CC"; then
+            CC="$GCC_HOME/bin/gcc"
+            CC_BASE="gcc"
+        fi
+        if test -z "$CXX"; then
+            CXX="$GCC_HOME/bin/g++"
+            CXX_BASE="g++"
+        fi
+    fi
+fi
+
+COMPATH=`dirname "$CC"`
+if test "$COMPATH" = "."; then
+    AC_PATH_PROGS(COMPATH, $CC)
+    dnl double square bracket to get single because of M4 quote...
+    COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
+fi
+COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
+
+dnl ===================================================================
+dnl Java support
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build with Java support])
+if test "$with_java" != "no"; then
+    if test "$DISABLE_SCRIPTING" = TRUE; then
+        AC_MSG_RESULT([no, overridden by --disable-scripting])
+        ENABLE_JAVA=""
+        with_java=no
+    else
+        AC_MSG_RESULT([yes])
+        ENABLE_JAVA="TRUE"
+        AC_DEFINE(HAVE_FEATURE_JAVA)
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_JAVA=""
+fi
+
+AC_SUBST(ENABLE_JAVA)
+
+dnl ENABLE_JAVA="TRUE" if we want there to be *run-time* (and build-time) support for Java
+
+dnl ENABLE_JAVA="" indicate no Java support at all
+
+dnl ===================================================================
+dnl Check macOS SDK and compiler
+dnl ===================================================================
+
+if test $_os = Darwin; then
+
+    # The SDK in the currently selected Xcode should be found.
+
+    AC_MSG_CHECKING([what macOS SDK to use])
+    # XCode only ships with a single SDK for a while now, and using older SDKs alongside is not
+    # really supported anymore, instead you'd use different copies of Xcode, each with their own
+    # SDK, and thus xcrun will pick the SDK that matches the currently selected Xcode version
+    # also restricting the SDK version to "known good" versions doesn't seem necessary anymore, the
+    # problems that existed in the PPC days with target versions not being respected or random
+    # failures seems to be a thing of the past or rather: limiting either the Xcode version or the
+    # SDK version is enough, no need to do both...
+    MACOSX_SDK_PATH=`xcrun --sdk macosx --show-sdk-path 2> /dev/null`
+    if test ! -d "$MACOSX_SDK_PATH"; then
+        AC_MSG_ERROR([Could not find an appropriate macOS SDK])
+    fi
+    macosx_sdk=`xcodebuild -version -sdk "$MACOSX_SDK_PATH" SDKVersion`
+    MACOSX_SDK_BUILD_VERSION=$(xcodebuild -version -sdk "$MACOSX_SDK_PATH" ProductBuildVersion)
+    # format changed between 10.9 and 10.10 - up to 10.9 it was just four digits (1090), starting
+    # with macOS 10.10 it was switched to account for x.y.z with six digits, 10.10 is 101000,
+    # 10.10.2 is 101002
+    # we don't target the lower versions anymore, so it doesn't matter that we don't generate the
+    # correct version in case such an old SDK is specified, it will be rejected later anyway
+    MACOSX_SDK_VERSION=$(echo $macosx_sdk | $AWK -F. '{ print $1*10000+$2*100+$3 }')
+    if test $MACOSX_SDK_VERSION -lt 101500; then
+        AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported, lowest supported version is 10.15])
+    fi
+    if test "$host_cpu" = arm64 -a $MACOSX_SDK_VERSION -lt 110000; then
+        AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported for Apple Silicon (need at least 11.0)])
+    fi
+    AC_MSG_RESULT([macOS SDK $macosx_sdk at $MACOSX_SDK_PATH])
+
+    AC_MSG_CHECKING([what minimum version of macOS to require])
+    if test "$with_macosx_version_min_required" = "" ; then
+        if test "$host_cpu" = x86_64; then
+            with_macosx_version_min_required="10.15";
+        else
+            with_macosx_version_min_required="11.0";
+        fi
+    fi
+    # see same notes about MACOSX_SDK_VERSION above
+    MAC_OS_X_VERSION_MIN_REQUIRED=$(echo $with_macosx_version_min_required | $AWK -F. '{ print $1*10000+$2*100+$3 }')
+    if test $MAC_OS_X_VERSION_MIN_REQUIRED -lt 101500; then
+        AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, minimum supported version is 10.15])
+    fi
+    AC_MSG_RESULT([$with_macosx_version_min_required])
+
+    AC_MSG_CHECKING([that macosx-version-min-required is coherent with macos-with-sdk])
+    if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MACOSX_SDK_VERSION; then
+        AC_MSG_ERROR([the version minimum required ($with_macosx_version_min_required) cannot be greater than the sdk level ($macosx_sdk)])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+
+    # export this so that "xcrun" invocations later return matching values
+    DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
+    DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
+    export DEVELOPER_DIR
+    FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
+    MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
+
+    AC_MSG_CHECKING([whether Xcode is new enough])
+    my_xcode_ver1=$(xcrun xcodebuild -version | head -n 1)
+    my_xcode_ver2=${my_xcode_ver1#Xcode }
+    my_xcode_ver3=$(printf %s "$my_xcode_ver2" | $AWK -F. '{ print $1*100+($2<100?$2:99) }')
+    if test "$my_xcode_ver3" -ge 1205; then
+        AC_MSG_RESULT([yes ($my_xcode_ver2)])
+        if test $MAC_OS_X_VERSION_MIN_REQUIRED -lt 120000; then
+            if test "$my_xcode_ver3" -ge 1600; then
+                dnl the Xcode 15 relnotes state that the classic linker will disappear in the next version, but nothing about
+                dnl fixing the problem with weak symbols/macOS 11 compatibility, so assume for now that Xcode 16 will break it...
+                AC_MSG_ERROR([Check that Xcode 16 still supports the old linker/that it doesn't break macOS 11 compatibility, then remove this check]);
+            fi
+            if test "$my_xcode_ver3" -ge 1500; then
+                AC_MSG_WARN([Xcode 15 has a new linker that causes runtime crashes on macOS 11])
+                add_warning "Xcode 15 has a new linker that causes runtime crashes on macOS 11, forcing the old linker."
+                add_warning "see https://developer.apple.com/documentation/xcode-release-notes/xcode-15-release-notes#Linking"
+                LDFLAGS="$LDFLAGS -Wl,-ld_classic"
+                # if LDFLAGS weren't set already, a check above sets x_LDFLAGS=[#] to comment-out the export LDFLAGS line in config_host.mk
+                x_LDFLAGS=
+            fi
+        fi
+    else
+        AC_MSG_ERROR(["$my_xcode_ver1" is too old or unrecognized, must be at least Xcode 12.5])
+    fi
+
+    my_xcode_ver1=$(xcrun xcodebuild -version | tail -n 1)
+    MACOSX_XCODE_BUILD_VERSION=${my_xcode_ver1#Build version }
+
+    LIBTOOL=/usr/bin/libtool
+    INSTALL_NAME_TOOL=install_name_tool
+    if test -z "$save_CC"; then
+        stdlib=-stdlib=libc++
+
+        AC_MSG_CHECKING([what C compiler to use])
+        CC="`xcrun -find clang`"
+        CC_BASE=`first_arg_basename "$CC"`
+        if test "$host_cpu" = x86_64; then
+            CC+=" -target x86_64-apple-macos"
+        else
+            CC+=" -target arm64-apple-macos"
+        fi
+        CC+=" -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
+        AC_MSG_RESULT([$CC])
+
+        AC_MSG_CHECKING([what C++ compiler to use])
+        CXX="`xcrun -find clang++`"
+        CXX_BASE=`first_arg_basename "$CXX"`
+        if test "$host_cpu" = x86_64; then
+            CXX+=" -target x86_64-apple-macos"
+        else
+            CXX+=" -target arm64-apple-macos"
+        fi
+        CXX+=" $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
+        AC_MSG_RESULT([$CXX])
+
+        INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
+        AR=`xcrun -find ar`
+        NM=`xcrun -find nm`
+        STRIP=`xcrun -find strip`
+        LIBTOOL=`xcrun -find libtool`
+        RANLIB=`xcrun -find ranlib`
+    fi
+
+    AC_MSG_CHECKING([whether to do code signing])
+
+    if test -z "$enable_macosx_code_signing" -o "$enable_macosx_code_signing" == "no" ; then
+        AC_MSG_RESULT([no])
+    else
+        if test "$enable_macosx_code_signing" = yes; then
+            # By default use the first suitable certificate (?).
+
+            # https://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
+            # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
+            # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
+            # the App Store, the "3rd Party Mac Developer" one. I think it works best to the
+            # "Developer ID Application" one.
+            identity="Developer ID Application:"
+        else
+            identity=$enable_macosx_code_signing
+        fi
+        identity=`security find-identity -p codesigning -v 2>/dev/null | $AWK "/$identity/{print \\$2; exit}"`
+        if test -n "$identity"; then
+            MACOSX_CODESIGNING_IDENTITY=$identity
+            pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
+            AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
+        else
+            AC_MSG_ERROR([cannot determine identity to use])
+        fi
+    fi
+
+    AC_MSG_CHECKING([whether to create a Mac App Store package])
+
+    if test -z "$enable_macosx_package_signing" || test "$enable_macosx_package_signing" == no; then
+        AC_MSG_RESULT([no])
+    elif test -z "$MACOSX_CODESIGNING_IDENTITY"; then
+        AC_MSG_ERROR([You forgot --enable-macosx-code-signing])
+    else
+        if test "$enable_macosx_package_signing" = yes; then
+            # By default use the first suitable certificate.
+            # It should be a "3rd Party Mac Developer Installer" one
+            identity="3rd Party Mac Developer Installer:"
+        else
+            identity=$enable_macosx_package_signing
+        fi
+        identity=`security find-identity -v 2>/dev/null | $AWK "/$identity/ {print \\$2; exit}"`
+        if test -n "$identity"; then
+            MACOSX_PACKAGE_SIGNING_IDENTITY=$identity
+            pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
+            AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
+        else
+            AC_MSG_ERROR([Could not find any suitable '3rd Party Mac Developer Installer' certificate])
+        fi
+    fi
+
+    if test -n "$MACOSX_CODESIGNING_IDENTITY" -a -n "$MACOSX_PACKAGE_SIGNING_IDENTITY" -a "$MACOSX_CODESIGNING_IDENTITY" = "$MACOSX_PACKAGE_SIGNING_IDENTITY"; then
+        AC_MSG_ERROR([You should not use the same identity for code and package signing])
+    fi
+
+    AC_MSG_CHECKING([whether to sandbox the application])
+
+    if test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
+        AC_MSG_ERROR([macOS sandboxing (actually App Store rules) disallows use of Java])
+    elif test "$enable_macosx_sandbox" = yes; then
+        ENABLE_MACOSX_SANDBOX=TRUE
+        AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([what macOS app bundle identifier to use])
+    MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
+    AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
+
+    if test -n "$with_macosx_provisioning_profile" ; then
+        if test ! -f "$with_macosx_provisioning_profile"; then
+            AC_MSG_ERROR([provisioning profile not found at $with_macosx_provisioning_profile])
+        else
+            MACOSX_PROVISIONING_PROFILE=$with_macosx_provisioning_profile
+            MACOSX_PROVISIONING_INFO=$([security cms -D -i "$MACOSX_PROVISIONING_PROFILE" | \
+                xmllint --xpath "//key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier'] \
+                    | //key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier']/following-sibling::string[1]" - | \
+                sed -e 's#><#>\n\t<#g' -e 's#^#\t#'])
+        fi
+    fi
+fi
+AC_SUBST(MACOSX_SDK_PATH)
+AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
+AC_SUBST(INSTALL_NAME_TOOL)
+AC_SUBST(LIBTOOL) # Note that the macOS libtool command is unrelated to GNU libtool
+AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
+AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
+AC_SUBST(ENABLE_MACOSX_SANDBOX)
+AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
+AC_SUBST(MACOSX_PROVISIONING_INFO)
+AC_SUBST(MACOSX_PROVISIONING_PROFILE)
+AC_SUBST(MACOSX_SDK_BUILD_VERSION)
+AC_SUBST(MACOSX_XCODE_BUILD_VERSION)
+
+dnl ===================================================================
+dnl Check iOS SDK and compiler
+dnl ===================================================================
+
+if test $_os = iOS; then
+    AC_MSG_CHECKING([what iOS SDK to use])
+
+    if test "$enable_ios_simulator" = "yes"; then
+        platformlc=iphonesimulator
+        versionmin=-mios-simulator-version-min=14.5
+    else
+        platformlc=iphoneos
+        versionmin=-miphoneos-version-min=14.5
+    fi
+
+    sysroot=`xcrun --sdk $platformlc --show-sdk-path`
+
+    if ! test -d "$sysroot"; then
+        AC_MSG_ERROR([Could not find iOS SDK $sysroot])
+    fi
+
+    AC_MSG_RESULT($sysroot)
+
+    stdlib="-stdlib=libc++"
+
+    AC_MSG_CHECKING([what C compiler to use])
+    CC="`xcrun -find clang`"
+    CC_BASE=`first_arg_basename "$CC"`
+    CC+=" -arch $host_cpu_for_clang -isysroot $sysroot $versionmin"
+    AC_MSG_RESULT([$CC])
+
+    AC_MSG_CHECKING([what C++ compiler to use])
+    CXX="`xcrun -find clang++`"
+    CXX_BASE=`first_arg_basename "$CXX"`
+    CXX+=" -arch $host_cpu_for_clang $stdlib -isysroot $sysroot $versionmin"
+    AC_MSG_RESULT([$CXX])
+
+    INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
+    AR=`xcrun -find ar`
+    NM=`xcrun -find nm`
+    STRIP=`xcrun -find strip`
+    LIBTOOL=`xcrun -find libtool`
+    RANLIB=`xcrun -find ranlib`
+fi
+
+AC_MSG_CHECKING([whether to treat the installation as read-only])
+
+if test $_os = Darwin; then
+    enable_readonly_installset=yes
+elif test "$enable_extensions" != yes; then
+    enable_readonly_installset=yes
+fi
+if test "$enable_readonly_installset" = yes; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(HAVE_FEATURE_READONLY_INSTALLSET)
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Structure of install set
+dnl ===================================================================
+
+if test $_os = Darwin; then
+    LIBO_BIN_FOLDER=MacOS
+    LIBO_ETC_FOLDER=Resources
+    LIBO_LIBEXEC_FOLDER=MacOS
+    LIBO_LIB_FOLDER=Frameworks
+    LIBO_LIB_PYUNO_FOLDER=Resources
+    LIBO_SHARE_FOLDER=Resources
+    LIBO_SHARE_HELP_FOLDER=Resources/help
+    LIBO_SHARE_JAVA_FOLDER=Resources/java
+    LIBO_SHARE_PRESETS_FOLDER=Resources/presets
+    LIBO_SHARE_READMES_FOLDER=Resources/readmes
+    LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
+    LIBO_SHARE_SHELL_FOLDER=Resources/shell
+    LIBO_URE_BIN_FOLDER=MacOS
+    LIBO_URE_ETC_FOLDER=Resources/ure/etc
+    LIBO_URE_LIB_FOLDER=Frameworks
+    LIBO_URE_MISC_FOLDER=Resources/ure/share/misc
+    LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
+elif test $_os = WINNT; then
+    LIBO_BIN_FOLDER=program
+    LIBO_ETC_FOLDER=program
+    LIBO_LIBEXEC_FOLDER=program
+    LIBO_LIB_FOLDER=program
+    LIBO_LIB_PYUNO_FOLDER=program
+    LIBO_SHARE_FOLDER=share
+    LIBO_SHARE_HELP_FOLDER=help
+    LIBO_SHARE_JAVA_FOLDER=program/classes
+    LIBO_SHARE_PRESETS_FOLDER=presets
+    LIBO_SHARE_READMES_FOLDER=readmes
+    LIBO_SHARE_RESOURCE_FOLDER=program/resource
+    LIBO_SHARE_SHELL_FOLDER=program/shell
+    LIBO_URE_BIN_FOLDER=program
+    LIBO_URE_ETC_FOLDER=program
+    LIBO_URE_LIB_FOLDER=program
+    LIBO_URE_MISC_FOLDER=program
+    LIBO_URE_SHARE_JAVA_FOLDER=program/classes
+else
+    LIBO_BIN_FOLDER=program
+    LIBO_ETC_FOLDER=program
+    LIBO_LIBEXEC_FOLDER=program
+    LIBO_LIB_FOLDER=program
+    LIBO_LIB_PYUNO_FOLDER=program
+    LIBO_SHARE_FOLDER=share
+    LIBO_SHARE_HELP_FOLDER=help
+    LIBO_SHARE_JAVA_FOLDER=program/classes
+    LIBO_SHARE_PRESETS_FOLDER=presets
+    LIBO_SHARE_READMES_FOLDER=readmes
+    if test "$enable_fuzzers" != yes; then
+        LIBO_SHARE_RESOURCE_FOLDER=program/resource
+    else
+        LIBO_SHARE_RESOURCE_FOLDER=resource
+    fi
+    LIBO_SHARE_SHELL_FOLDER=program/shell
+    LIBO_URE_BIN_FOLDER=program
+    LIBO_URE_ETC_FOLDER=program
+    LIBO_URE_LIB_FOLDER=program
+    LIBO_URE_MISC_FOLDER=program
+    LIBO_URE_SHARE_JAVA_FOLDER=program/classes
+fi
+AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_MISC_FOLDER,"$LIBO_URE_MISC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
+
+# Not all of them needed in config_host.mk, add more if need arises
+AC_SUBST(LIBO_BIN_FOLDER)
+AC_SUBST(LIBO_ETC_FOLDER)
+AC_SUBST(LIBO_LIB_FOLDER)
+AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
+AC_SUBST(LIBO_SHARE_FOLDER)
+AC_SUBST(LIBO_SHARE_HELP_FOLDER)
+AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
+AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
+AC_SUBST(LIBO_SHARE_READMES_FOLDER)
+AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
+AC_SUBST(LIBO_URE_BIN_FOLDER)
+AC_SUBST(LIBO_URE_ETC_FOLDER)
+AC_SUBST(LIBO_URE_LIB_FOLDER)
+AC_SUBST(LIBO_URE_MISC_FOLDER)
+AC_SUBST(LIBO_URE_SHARE_JAVA_FOLDER)
+
+dnl ===================================================================
+dnl Windows specific tests and stuff
+dnl ===================================================================
+
+reg_get_value()
+{
+    # Return value: $regvalue
+    unset regvalue
+
+    if test "$build_os" = "wsl"; then
+        regvalue=$($WSL_LO_HELPER --read-registry $1 "$2" 2>/dev/null)
+        return
+    fi
+
+    local _regentry="/proc/registry${1}/${2}"
+    if test -f "$_regentry"; then
+        # Stop bash complaining about \0 bytes in input, as it can't handle them.
+        # Registry keys read via /proc/registry* are always \0 terminated!
+        local _regvalue=$(tr -d '\0' < "$_regentry")
+        if test $? -eq 0; then
+            regvalue=$_regvalue
+        fi
+    fi
+}
+
+# Get a value from the 32-bit side of the Registry
+reg_get_value_32()
+{
+    reg_get_value "32" "$1"
+}
+
+# Get a value from the 64-bit side of the Registry
+reg_get_value_64()
+{
+    reg_get_value "64" "$1"
+}
+
+reg_list_values()
+{
+    # Return value: $reglist
+    unset reglist
+
+    if test "$build_os" = "wsl"; then
+        reglist=$($WSL_LO_HELPER --list-registry $1 "$2" 2>/dev/null | tr -d '\r')
+        return
+    fi
+
+    reglist=$(ls "/proc/registry${1}/${2}")
+}
+
+# List values from the 32-bit side of the Registry
+reg_list_values_32()
+{
+    reg_list_values "32" "$1"
+}
+
+# List values from the 64-bit side of the Registry
+reg_list_values_64()
+{
+    reg_list_values "64" "$1"
+}
+
+case "$host_os" in
+cygwin*|wsl*)
+    COM=MSC
+    OS=WNT
+    RTL_OS=Windows
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        P_SEP=";"
+    else
+        P_SEP=:
+    fi
+    case "$host_cpu" in
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=windows_x86_64
+        WINDOWS_X64=1
+        SCPDEFS="$SCPDEFS -DWINDOWS_X64"
+        WIN_HOST_ARCH="x64"
+        WIN_MULTI_ARCH="x86"
+        WIN_HOST_BITS=64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=windows_x86
+        WIN_HOST_ARCH="x86"
+        WIN_HOST_BITS=32
+        WIN_OTHER_ARCH="x64"
+        ;;
+    aarch64)
+        CPUNAME=AARCH64
+        RTL_ARCH=AARCH64
+        PLATFORMID=windows_aarch64
+        WINDOWS_X64=1
+        SCPDEFS="$SCPDEFS -DWINDOWS_AARCH64"
+        WIN_HOST_ARCH="arm64"
+        WIN_HOST_BITS=64
+        with_ucrt_dir=no
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+
+    case "$build_cpu" in
+    x86_64) WIN_BUILD_ARCH="x64" ;;
+    i*86) WIN_BUILD_ARCH="x86" ;;
+    aarch64) WIN_BUILD_ARCH="arm64" ;;
+    *)
+        AC_MSG_ERROR([Unsupported build_cpu $build_cpu for host_os $host_os])
+        ;;
+    esac
+
+    SCPDEFS="$SCPDEFS -D_MSC_VER"
+    ;;
+esac
+
+# multi-arch is an arch, which can execute on the host (x86 on x64), while
+# other-arch won't, but wouldn't break the build (x64 on x86).
+if test -n "$WIN_MULTI_ARCH" -a -n "$WIN_OTHER_ARCH"; then
+    AC_MSG_ERROR([Broken configure.ac file: can't have set \$WIN_MULTI_ARCH and $WIN_OTHER_ARCH])
+fi
+
+
+if test "$build_cpu" != "$host_cpu" -o "$DISABLE_DYNLOADING" = TRUE; then
+    # To allow building Windows multi-arch releases without cross-tooling
+    if test "$DISABLE_DYNLOADING" = TRUE -o \( -z "$WIN_MULTI_ARCH" -a -z "$WIN_OTHER_ARCH" \); then
+        cross_compiling="yes"
+    fi
+fi
+
+if test "$cross_compiling" = "yes"; then
+    export CROSS_COMPILING=TRUE
+    if test "$enable_dynamic_loading" != yes -a "$enable_wasm_strip" = yes; then
+        ENABLE_WASM_STRIP=TRUE
+    fi
+    if test "$_os" = "Emscripten"; then
+        if test "$with_main_module" = "calc"; then
+            ENABLE_WASM_STRIP_WRITER=TRUE
+        elif test "$with_main_module" = "writer"; then
+            ENABLE_WASM_STRIP_CALC=TRUE
+        fi
+    fi
+else
+    CROSS_COMPILING=
+    BUILD_TYPE="$BUILD_TYPE NATIVE"
+fi
+AC_SUBST(CROSS_COMPILING)
+AC_SUBST(ENABLE_WASM_STRIP)
+AC_SUBST(ENABLE_WASM_STRIP_WRITER)
+AC_SUBST(ENABLE_WASM_STRIP_CALC)
+
+ISYSTEM=-I
+AC_SUBST(ISYSTEM)
+
+dnl ===================================================================
+dnl  Check which Visual Studio compiler is used
+dnl ===================================================================
+
+map_vs_year_to_version()
+{
+    # Return value: $vsversion
+
+    unset vsversion
+
+    case $1 in
+    2019)
+        vsversion=16;;
+    2022)
+        vsversion=17;;
+    2022preview)
+        vsversion=17.9;;
+    *)
+        AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
+    esac
+}
+
+vs_versions_to_check()
+{
+    # Args: $1 (optional) : versions to check, in the order of preference
+    # Return value: $vsversions
+
+    unset vsversions
+
+    if test -n "$1"; then
+        map_vs_year_to_version "$1"
+        vsversions=$vsversion
+    else
+        # Default version is 2019
+        vsversions="16"
+    fi
+}
+
+win_get_env_from_vsdevcmdbat()
+{
+    local WRAPPERBATCHFILEPATH="`mktemp -t wrpXXXXXX.bat`"
+    printf '@set VSCMD_SKIP_SENDTELEMETRY=1\r\n' > $WRAPPERBATCHFILEPATH
+    printf '@call "%s/../Common7/Tools/VsDevCmd.bat" /no_logo\r\n' "$(cygpath -w $VC_PRODUCT_DIR)" >> $WRAPPERBATCHFILEPATH
+    # use 'echo.%ENV%' syntax (instead of 'echo %ENV%') to avoid outputting "ECHO is off." in case when ENV is empty or a space
+    printf '@setlocal\r\n@echo.%%%s%%\r\n@endlocal\r\n' "$1" >> $WRAPPERBATCHFILEPATH
+    local result
+    if test "$build_os" = "wsl"; then
+        result=$(cd /mnt/c && cmd.exe /c $(wslpath -w $WRAPPERBATCHFILEPATH) | tr -d '\r')
+    else
+        chmod +x $WRAPPERBATCHFILEPATH
+        result=$("$WRAPPERBATCHFILEPATH" | tr -d '\r')
+    fi
+    rm -f $WRAPPERBATCHFILEPATH
+    printf '%s' "$result"
+}
+
+find_ucrt()
+{
+    reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/InstallationFolder"
+    if test -n "$regvalue"; then
+        PathFormat "$regvalue"
+        UCRTSDKDIR=$formatted_path_unix
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/ProductVersion"
+        UCRTVERSION=$regvalue
+        # Rest if not exist
+        if ! test -d "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"; then
+          UCRTSDKDIR=
+        fi
+    fi
+    if test -z "$UCRTSDKDIR"; then
+        ide_env_dir="$VC_PRODUCT_DIR/../Common7/Tools/"
+        ide_env_file="${ide_env_dir}VsDevCmd.bat"
+        if test -f "$ide_env_file"; then
+            PathFormat "$(win_get_env_from_vsdevcmdbat UniversalCRTSdkDir)"
+            UCRTSDKDIR=$formatted_path
+            UCRTVERSION=$(win_get_env_from_vsdevcmdbat UCRTVersion)
+            dnl Hack needed at least by tml:
+            if test "$UCRTVERSION" = 10.0.15063.0 \
+                -a ! -f "${UCRTSDKDIR}Include/10.0.15063.0/um/sqlext.h" \
+                -a -f "${UCRTSDKDIR}Include/10.0.14393.0/um/sqlext.h"
+            then
+                UCRTVERSION=10.0.14393.0
+            fi
+        else
+          AC_MSG_ERROR([No UCRT found])
+        fi
+    fi
+}
+
+find_msvc()
+{
+    # Find Visual C++
+    # Args: $1 (optional) : The VS version year
+    # Return values: $vctest, $vcyear, $vctoolset, $vcnumwithdot, $vcbuildnumber
+
+    unset vctest vctoolset vcnumwithdot vcbuildnumber
+
+    vs_versions_to_check "$1"
+    if test "$build_os" = wsl; then
+        vswhere="$PROGRAMFILESX86"
+        if test -z "$vswhere"; then
+            vswhere="c:\\Program Files (x86)"
+        fi
+    else
+        vswhere="$(perl -e 'print $ENV{"ProgramFiles(x86)"}')"
+    fi
+    vswhere+="\\Microsoft Visual Studio\\Installer\\vswhere.exe"
+    PathFormat "$vswhere"
+    vswhere=$formatted_path_unix
+    for ver in $vsversions; do
+        vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        if test -z "$vswhereoutput"; then
+            vswhereoutput=`$vswhere -prerelease -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        fi
+        # Fall back to all MS products (this includes VC++ Build Tools)
+        if ! test -n "$vswhereoutput"; then
+            AC_MSG_CHECKING([VC++ Build Tools and similar])
+            vswhereoutput=`$vswhere -products \* -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        fi
+        if test -n "$vswhereoutput"; then
+            PathFormat "$vswhereoutput"
+            vctest=$formatted_path_unix
+            break
+        fi
+    done
+
+    if test -n "$vctest"; then
+        vcnumwithdot="$ver"
+        if test "${vcnumwithdot%%.*}" = "$vcnumwithdot"; then
+            vcnumwithdot=$vcnumwithdot.0
+        fi
+        case "$vcnumwithdot" in
+        16.0)
+            vcyear=2019
+            vctoolset=v142
+            ;;
+        17.0 | 17.9)
+            vcyear=2022
+            vctoolset=v143
+            ;;
+        esac
+        vcbuildnumber=`ls $vctest/VC/Tools/MSVC -A1r | head -1`
+
+    fi
+}
+
+test_cl_exe()
+{
+    AC_MSG_CHECKING([$1 compiler])
+
+    CL_EXE_PATH="$2/cl.exe"
+
+    if test ! -f "$CL_EXE_PATH"; then
+        if test "$1" = "multi-arch"; then
+            AC_MSG_WARN([no compiler (cl.exe) in $2])
+            return 1
+        else
+            AC_MSG_ERROR([no compiler (cl.exe) in $2])
+        fi
+    fi
+
+    dnl ===========================================================
+    dnl  Check for the corresponding mspdb*.dll
+    dnl ===========================================================
+
+    # MSVC 15.0 has libraries from 14.0?
+    mspdbnum="140"
+
+    if test ! -e "$2/mspdb${mspdbnum}.dll"; then
+        AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $2, Visual Studio installation broken?])
+    fi
+
+    # The compiles has to find its shared libraries
+    OLD_PATH="$PATH"
+    TEMP_PATH=`cygpath -d "$2"`
+    PATH="`cygpath -u "$TEMP_PATH"`:$PATH"
+
+    if ! "$CL_EXE_PATH" -? </dev/null >/dev/null 2>&1; then
+        AC_MSG_ERROR([no compiler (cl.exe) in $2])
+    fi
+
+    PATH="$OLD_PATH"
+
+    AC_MSG_RESULT([$CL_EXE_PATH])
+}
+
+SOLARINC=
+MSBUILD_PATH=
+DEVENV=
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([Visual C++])
+    find_msvc "$with_visual_studio"
+    if test -z "$vctest"; then
+        if test -n "$with_visual_studio"; then
+            AC_MSG_ERROR([no Visual Studio $with_visual_studio installation found])
+        else
+            AC_MSG_ERROR([no Visual Studio installation found])
+        fi
+    fi
+    AC_MSG_RESULT([])
+
+    VC_PRODUCT_DIR="$vctest/VC"
+    COMPATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber"
+
+    # $WIN_OTHER_ARCH is a hack to test the x64 compiler on x86, even if it's not multi-arch
+    if test -n "$WIN_MULTI_ARCH" -o -n "$WIN_OTHER_ARCH"; then
+        MSVC_MULTI_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/${WIN_MULTI_ARCH}${WIN_OTHER_ARCH}"
+        test_cl_exe "multi-arch" "$MSVC_MULTI_PATH"
+        if test $? -ne 0; then
+            WIN_MULTI_ARCH=""
+            WIN_OTHER_ARCH=""
+        fi
+    fi
+
+    if test "$WIN_BUILD_ARCH" = "$WIN_HOST_ARCH"; then
+        MSVC_BUILD_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_BUILD_ARCH"
+        test_cl_exe "build" "$MSVC_BUILD_PATH"
+    fi
+
+    if test "$WIN_BUILD_ARCH" != "$WIN_HOST_ARCH"; then
+        MSVC_HOST_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_HOST_ARCH"
+        test_cl_exe "host" "$MSVC_HOST_PATH"
+    else
+        MSVC_HOST_PATH="$MSVC_BUILD_PATH"
+    fi
+
+    AC_MSG_CHECKING([for short pathname of VC product directory])
+    VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
+    AC_MSG_RESULT([$VC_PRODUCT_DIR])
+
+    UCRTSDKDIR=
+    UCRTVERSION=
+
+    AC_MSG_CHECKING([for UCRT location])
+    find_ucrt
+    # find_ucrt errors out if it doesn't find it
+    AC_MSG_RESULT([$UCRTSDKDIR ($UCRTVERSION)])
+    PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
+    ucrtincpath_formatted=$formatted_path
+    # SOLARINC is used for external modules and must be set too.
+    # And no, it's not sufficient to set SOLARINC only, as configure
+    # itself doesn't honour it.
+    SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
+    CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
+    CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
+    CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
+
+    AC_SUBST(UCRTSDKDIR)
+    AC_SUBST(UCRTVERSION)
+
+    AC_MSG_CHECKING([for MSBuild.exe location for: $vcnumwithdot])
+    # Find the proper version of MSBuild.exe to use based on the VS version
+    reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
+    if test -z "$regvalue" ; then
+        if test "$WIN_BUILD_ARCH" != "x64"; then
+            regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin"
+        else
+            regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin/amd64"
+        fi
+    fi
+    if test -d "$regvalue" ; then
+        MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
+        AC_MSG_RESULT([$regvalue])
+    else
+        AC_MSG_ERROR([MSBuild.exe location not found])
+    fi
+
+    # Find the version of devenv.exe
+    # MSVC 2017 devenv does not start properly from a DOS 8.3 path
+    DEVENV=$(cygpath -lm "$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe")
+    DEVENV_unix=$(cygpath -u "$DEVENV")
+    if test ! -e "$DEVENV_unix"; then
+        AC_MSG_WARN([No devenv.exe found - this is expected for VC++ Build Tools])
+    fi
+
+    dnl Save the true MSVC cl.exe for use when CC/CXX is actually clang-cl,
+    dnl needed when building CLR code:
+    if test -z "$MSVC_CXX"; then
+        # This gives us a posix path with 8.3 filename restrictions
+        MSVC_CXX=`win_short_path_for_make "$MSVC_HOST_PATH/cl.exe"`
+    fi
+
+    if test -z "$CC"; then
+        CC=$MSVC_CXX
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+    if test -z "$CXX"; then
+        CXX=$MSVC_CXX
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+
+    if test -n "$CC"; then
+        # Remove /cl.exe from CC case insensitive
+        AC_MSG_NOTICE([found Visual C++ $vcyear])
+
+        main_include_dir=`cygpath -d -m "$COMPATH/Include"`
+        CPPFLAGS="$CPPFLAGS -I$main_include_dir"
+
+        PathFormat "$COMPATH"
+        COMPATH=`win_short_path_for_make "$formatted_path"`
+
+        VCVER=$vcnumwithdot
+        VCTOOLSET=$vctoolset
+
+        # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess...  Assuming newer ones
+        # are always "better", we list them in reverse chronological order.
+
+        case "$vcnumwithdot" in
+        16.0 | 17.0 | 17.9)
+            WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0 8.1A 8.1 8.0"
+            ;;
+        esac
+
+        # The expectation is that --with-windows-sdk should not need to be used
+        if test -n "$with_windows_sdk"; then
+            case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
+            *" "$with_windows_sdk" "*)
+                WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
+                ;;
+            *)
+                AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work with VS $vcyear])
+                ;;
+            esac
+        fi
+
+        # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
+        ac_objext=obj
+        ac_exeext=exe
+
+    else
+        AC_MSG_ERROR([Visual C++ not found after all, huh])
+    fi
+
+    # ERROR if VS version < 16.5
+    AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.5])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        // See <https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros> for mapping
+        // between Visual Studio versions and _MSC_VER:
+        #if _MSC_VER < 1925
+        #error
+        #endif
+    ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no])])
+
+    # WARN if VS version < 16.10
+    AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.10])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        #if _MSC_VER < 1929
+        #error
+        #endif
+    ]])],[vs2019_recommended_version=yes],[vs2019_recommended_version=no])
+
+    if test $vs2019_recommended_version = yes; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_WARN([no])
+        add_warning "You should have at least Visual Studio 2019 version 16.10 to avoid build problems. Otherwise, you may face problems with the build of some modules including dragonbox."
+    fi
+
+    # Check for 64-bit (cross-)compiler to use to build the 64-bit
+    # version of the Explorer extension (and maybe other small
+    # bits, too) needed when installing a 32-bit LibreOffice on a
+    # 64-bit OS. The 64-bit Explorer extension is a feature that
+    # has been present since long in OOo. Don't confuse it with
+    # building LibreOffice itself as 64-bit code.
+
+    BUILD_X64=
+    CXX_X64_BINARY=
+
+    if test "$WIN_HOST_ARCH" = "x86" -a -n "$WIN_OTHER_ARCH"; then
+        AC_MSG_CHECKING([for the libraries to build the 64-bit Explorer extensions])
+        if test -f "$COMPATH/atlmfc/lib/x64/atls.lib" -o \
+             -f "$COMPATH/atlmfc/lib/spectre/x64/atls.lib"
+        then
+            BUILD_X64=TRUE
+            CXX_X64_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
+            AC_MSG_RESULT([found])
+        else
+            AC_MSG_RESULT([not found])
+            AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
+        fi
+    elif test "$WIN_HOST_ARCH" = "x64"; then
+        CXX_X64_BINARY=$CXX
+    fi
+    AC_SUBST(BUILD_X64)
+
+    # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
+    AC_SUBST(CXX_X64_BINARY)
+
+    # Check for 32-bit compiler to use to build the 32-bit TWAIN shim
+    # needed to support TWAIN scan on both 32- and 64-bit systems
+
+    case "$WIN_HOST_ARCH" in
+    x64)
+        AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries required for TWAIN support])
+        if test -n "$CXX_X86_BINARY"; then
+            BUILD_X86=TRUE
+            AC_MSG_RESULT([preset])
+        elif test -n "$WIN_MULTI_ARCH"; then
+            BUILD_X86=TRUE
+            CXX_X86_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
+            AC_MSG_RESULT([found])
+        else
+            AC_MSG_RESULT([not found])
+            AC_MSG_WARN([Installation set will not contain 32-bit binaries required for TWAIN support])
+        fi
+        ;;
+    x86)
+        BUILD_X86=TRUE
+        CXX_X86_BINARY=$MSVC_CXX
+        ;;
+    esac
+    AC_SUBST(BUILD_X86)
+    AC_SUBST(CXX_X86_BINARY)
+fi
+AC_SUBST(VCVER)
+AC_SUBST(VCTOOLSET)
+AC_SUBST(DEVENV)
+AC_SUBST(MSVC_CXX)
+
+COM_IS_CLANG=
+AC_MSG_CHECKING([whether the compiler is actually Clang])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+    #ifndef __clang__
+    you lose
+    #endif
+    int foo=42;
+    ]])],
+    [AC_MSG_RESULT([yes])
+     COM_IS_CLANG=TRUE],
+    [AC_MSG_RESULT([no])])
+AC_SUBST(COM_IS_CLANG)
+
+CLANGVER=
+if test "$COM_IS_CLANG" = TRUE; then
+    AC_MSG_CHECKING([whether Clang is new enough])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        #if !defined __apple_build_version__
+        #error
+        #endif
+        ]])],
+        [my_apple_clang=yes],[my_apple_clang=])
+    if test "$my_apple_clang" = yes; then
+        AC_MSG_RESULT([assumed yes (Apple Clang)])
+    elif test "$_os" = Emscripten; then
+        AC_MSG_RESULT([assumed yes (Emscripten Clang)])
+    else
+        if test "$_os" = WINNT; then
+            dnl In which case, assume clang-cl:
+            my_args="/EP /TC"
+        else
+            my_args="-E -P"
+        fi
+        clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC $my_args - | sed 's/ //g'`
+        CLANG_FULL_VERSION=`echo __clang_version__ | $CC $my_args -`
+        CLANGVER=`echo $clang_version \
+            | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
+        if test "$CLANGVER" -ge 120000; then
+            AC_MSG_RESULT([yes ($clang_version)])
+        else
+            AC_MSG_ERROR(["$CLANG_FULL_VERSION" is too old or unrecognized, must be at least Clang 12])
+        fi
+        AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
+        AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
+    fi
+fi
+
+SHOWINCLUDES_PREFIX=
+if test "$_os" = WINNT; then
+    dnl We need to guess the prefix of the -showIncludes output, it can be
+    dnl localized
+    AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
+    echo "#include <stdlib.h>" > conftest.c
+    SHOWINCLUDES_PREFIX=`VSLANG=1033 $CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
+        grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+    rm -f conftest.c conftest.obj
+    if test -z "$SHOWINCLUDES_PREFIX"; then
+        AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+    else
+        AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
+    fi
+fi
+AC_SUBST(SHOWINCLUDES_PREFIX)
+
+#
+# prefix C with ccache if needed
+#
+if test "$CCACHE" != ""; then
+    AC_MSG_CHECKING([whether $CC_BASE is already ccached])
+
+    AC_LANG_PUSH([C])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS --ccache-skip -O2"
+    # msvc does not fail on unknown options, check stdout
+    if test "$COM" = MSC; then
+        CFLAGS="$CFLAGS -nologo"
+    fi
+    save_ac_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    CFLAGS=$save_CFLAGS
+    ac_c_werror_flag=$save_ac_c_werror_flag
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        CC="$CCACHE $CC"
+        CC_BASE="ccache $CC_BASE"
+        AC_MSG_RESULT([no])
+    fi
+    AC_LANG_POP([C])
+fi
+
+# ===================================================================
+# check various GCC options that Clang does not support now but maybe
+# will somewhen in the future, check them even for GCC, so that the
+# flags are set
+# ===================================================================
+
+HAVE_GCC_GGDB2=
+if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+    AC_MSG_CHECKING([whether $CC_BASE supports -ggdb2])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -ggdb2"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
+    CFLAGS=$save_CFLAGS
+    if test "$HAVE_GCC_GGDB2" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    if test "$host_cpu" = "m68k"; then
+        AC_MSG_CHECKING([whether $CC_BASE supports -mlong-jump-table-offsets])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -mlong-jump-table-offsets"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_LONG_JUMP_TABLE_OFFSETS=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_GCC_LONG_JUMP_TABLE_OFFSETS" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_ERROR([no])
+        fi
+    fi
+fi
+AC_SUBST(HAVE_GCC_GGDB2)
+
+dnl ===================================================================
+dnl  Test the gcc version
+dnl ===================================================================
+if test "$GCC" = "yes" -a -z "$COM_IS_CLANG"; then
+    AC_MSG_CHECKING([the GCC version])
+    _gcc_version=`$CC -dumpfullversion`
+    gcc_full_version=$(printf '%s' "$_gcc_version" | \
+        $AWK -F. '{ print $1*10000+$2*100+(NF<3?1:$3) }')
+    GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
+
+    AC_MSG_RESULT([gcc $_gcc_version ($gcc_full_version)])
+
+    if test "$gcc_full_version" -lt 120000; then
+        AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 12])
+    fi
+else
+    # Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
+    # GCC version should generally be checked only when handling GCC-specific bugs, for testing
+    # things like features configure checks should be used, otherwise they may e.g. fail with Clang
+    # (which reports itself as GCC 4.2.1).
+    GCC_VERSION=
+fi
+AC_SUBST(GCC_VERSION)
+
+dnl Set the ENABLE_DBGUTIL variable
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build with additional debug utilities])
+if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
+    ENABLE_DBGUTIL="TRUE"
+    # this is an extra var so it can have different default on different MSVC
+    # versions (in case there are version specific problems with it)
+    MSVC_USE_DEBUG_RUNTIME="TRUE"
+
+    AC_MSG_RESULT([yes])
+    # cppunit and graphite expose STL in public headers
+    if test "$with_system_cppunit" = "yes"; then
+        AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
+    else
+        with_system_cppunit=no
+    fi
+    if test "$with_system_graphite" = "yes"; then
+        AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
+    else
+        with_system_graphite=no
+    fi
+    if test "$with_system_orcus" = "yes"; then
+        AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
+    else
+        with_system_orcus=no
+    fi
+    if test "$with_system_libcmis" = "yes"; then
+        AC_MSG_ERROR([--with-system-libcmis conflicts with --enable-dbgutil])
+    else
+        with_system_libcmis=no
+    fi
+    if test "$with_system_hunspell" = "yes"; then
+        AC_MSG_ERROR([--with-system-hunspell conflicts with --enable-dbgutil])
+    else
+        with_system_hunspell=no
+    fi
+    if test "$with_system_gpgmepp" = "yes"; then
+        AC_MSG_ERROR([--with-system-gpgmepp conflicts with --enable-dbgutil])
+    else
+        with_system_gpgmepp=no
+    fi
+    # As mixing system libwps and non-system libnumbertext or vice versa likely causes trouble (see
+    # 603074c5f2b84de8a24593faf807da784b040625 "Pass _GLIBCXX_DEBUG into external/libwps" and the
+    # mail thread starting at <https://gcc.gnu.org/ml/gcc/2018-05/msg00057.html> "libstdc++: ODR
+    # violation when using std::regex with and without -D_GLIBCXX_DEBUG"), simply make sure neither
+    # of those two is using the system variant:
+    if test "$with_system_libnumbertext" = "yes"; then
+        AC_MSG_ERROR([--with-system-libnumbertext conflicts with --enable-dbgutil])
+    else
+        with_system_libnumbertext=no
+    fi
+    if test "$with_system_libwps" = "yes"; then
+        AC_MSG_ERROR([--with-system-libwps conflicts with --enable-dbgutil])
+    else
+        with_system_libwps=no
+    fi
+else
+    ENABLE_DBGUTIL=""
+    MSVC_USE_DEBUG_RUNTIME=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_DBGUTIL)
+AC_SUBST(MSVC_USE_DEBUG_RUNTIME)
+
+dnl Set the ENABLE_DEBUG variable.
+dnl ===================================================================
+if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
+    AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-symbols])
+fi
+if test -n "$ENABLE_DBGUTIL" -a "$enable_debug" = "no"; then
+    if test -z "$libo_fuzzed_enable_debug"; then
+        AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
+    else
+        AC_MSG_NOTICE([Resetting --enable-debug=yes])
+        enable_debug=yes
+    fi
+fi
+
+AC_MSG_CHECKING([whether to do a debug build])
+if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" \) ; then
+    ENABLE_DEBUG="TRUE"
+    if test -n "$ENABLE_DBGUTIL" ; then
+        AC_MSG_RESULT([yes (dbgutil)])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+else
+    ENABLE_DEBUG=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_DEBUG)
+
+dnl ===================================================================
+dnl Select the linker to use (gold/lld/ld.bfd/mold).
+dnl This is done only after compiler checks (need to know if Clang is
+dnl used, for different defaults) and after checking if a debug build
+dnl is wanted (non-debug builds get the default linker if not explicitly
+dnl specified otherwise).
+dnl All checks for linker features/options should come after this.
+dnl ===================================================================
+check_use_ld()
+{
+    use_ld=-fuse-ld=${1%%:*}
+    use_ld_path=${1#*:}
+    if test "$use_ld_path" != "$1"; then
+        if test "$COM_IS_CLANG" = TRUE; then
+            if test "$CLANGVER" -ge 120000; then
+                use_ld="${use_ld} --ld-path=${use_ld_path}"
+            else
+                use_ld="-fuse-ld=${use_ld_path}"
+            fi
+        else
+            # I tried to use gcc's '-B<path>' and a directory + symlink setup in
+            # $BUILDDIR, but libtool always filtered-out that option, so gcc wouldn't
+            # pickup the alternative linker, when called by libtool for linking.
+            # For mold, one can use LD_PRELOAD=/usr/lib/mold/mold-wrapper.so instead.
+            AC_MSG_ERROR([A linker path is just supported with clang, because of libtool's -B filtering!])
+        fi
+    fi
+    use_ld_fail_if_error=$2
+    use_ld_ok=
+    AC_MSG_CHECKING([for $use_ld linker support])
+    use_ld_ldflags_save="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $use_ld"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+        ],[
+printf ("hello world\n");
+        ])], USE_LD=$use_ld, [])
+    if test -n "$USE_LD"; then
+        AC_MSG_RESULT( yes )
+        use_ld_ok=yes
+    else
+        if test -n "$use_ld_fail_if_error"; then
+            AC_MSG_ERROR( no )
+        else
+            AC_MSG_RESULT( no )
+        fi
+    fi
+    if test -n "$use_ld_ok"; then
+        dnl keep the value of LDFLAGS
+        return 0
+    fi
+    LDFLAGS="$use_ld_ldflags_save"
+    return 1
+}
+USE_LD=
+if test "$enable_ld" != "no"; then
+    if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+        if test -n "$enable_ld"; then
+            check_use_ld "$enable_ld" fail_if_error
+        elif test -z "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            dnl non-debug builds default to the default linker
+            true
+        elif test -n "$COM_IS_CLANG"; then
+            check_use_ld lld
+            if test $? -ne 0; then
+                check_use_ld gold
+                if test $? -ne 0; then
+                    check_use_ld mold
+                fi
+            fi
+        else
+            # For gcc first try gold, new versions also support lld/mold.
+            check_use_ld gold
+            if test $? -ne 0; then
+                check_use_ld lld
+                if test $? -ne 0; then
+                    check_use_ld mold
+                fi
+            fi
+        fi
+        ld_output=$(echo 'int main() { return 0; }' | $CC -Wl,-v -x c -o conftest.out - $CFLAGS $LDFLAGS 2>/dev/null)
+        rm conftest.out
+        ld_used=$(echo "$ld_output" | grep -E '(^GNU gold|^GNU ld|^LLD|^mold)')
+        if test -z "$ld_used"; then
+            ld_used="unknown"
+        fi
+        AC_MSG_CHECKING([for linker that is used])
+        AC_MSG_RESULT([$ld_used])
+        if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            if echo "$ld_used" | grep -q "^GNU ld"; then
+                AC_MSG_WARN([The default GNU linker is slow, consider using LLD, mold or the GNU gold linker.])
+                add_warning "The default GNU linker is slow, consider using LLD, mold or the GNU gold linker."
+            fi
+        fi
+    else
+        if test "$enable_ld" = "yes"; then
+            AC_MSG_ERROR([--enable-ld not supported])
+        fi
+    fi
+fi
+AC_SUBST(USE_LD)
+AC_SUBST(LD)
+
+HAVE_LD_BSYMBOLIC_FUNCTIONS=
+if test "$GCC" = "yes" -a "$_os" != Emscripten ; then
+    AC_MSG_CHECKING([for -Bsymbolic-functions linker support])
+    bsymbolic_functions_ldflags_save=$LDFLAGS
+    LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+        ],[
+printf ("hello world\n");
+        ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
+    if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
+        AC_MSG_RESULT( found )
+    else
+        AC_MSG_RESULT( not found )
+    fi
+    LDFLAGS=$bsymbolic_functions_ldflags_save
+fi
+AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
+
+LD_GC_SECTIONS=
+if test "$GCC" = "yes"; then
+    for flag in "--gc-sections" "-dead_strip"; do
+        AC_MSG_CHECKING([for $flag linker support])
+        ldflags_save=$LDFLAGS
+        LDFLAGS="$LDFLAGS -Wl,$flag"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+            ],[
+printf ("hello world\n");
+            ])],[
+            LD_GC_SECTIONS="-Wl,$flag"
+            AC_MSG_RESULT( found )
+            ], [
+            AC_MSG_RESULT( not found )
+            ])
+        LDFLAGS=$ldflags_save
+        if test -n "$LD_GC_SECTIONS"; then
+            break
+        fi
+    done
+fi
+AC_SUBST(LD_GC_SECTIONS)
+
+HAVE_EXTERNAL_DWARF=
+if test "$enable_split_debug" != no; then
+    use_split_debug=
+    if test -n "$ENABLE_LTO"; then
+        : # Inherently incompatible, since no debug info is created while compiling, GCC complains.
+    elif test "$enable_split_debug" = yes; then
+        use_split_debug=1
+    dnl Currently by default enabled only on Linux, feel free to set test_split_debug above also for other platforms.
+    elif test "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        use_split_debug=1
+    fi
+    if test -n "$use_split_debug"; then
+        if test "$_os" = "Emscripten"; then
+            TEST_CC_FLAG=-gseparate-dwarf
+        else
+            TEST_CC_FLAG=-gsplit-dwarf
+        fi
+        AC_MSG_CHECKING([whether $CC_BASE supports $TEST_CC_FLAG])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror $TEST_CC_FLAG"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_EXTERNAL_DWARF=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_EXTERNAL_DWARF" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            if test "$enable_split_debug" = yes; then
+                AC_MSG_ERROR([no])
+            else
+                AC_MSG_RESULT([no])
+            fi
+        fi
+    fi
+    if test -z "$HAVE_EXTERNAL_DWARF" -a "$test_split_debug" = "yes" -a -n "$use_split_debug"; then
+        AC_MSG_WARN([Compiler is not capable of creating split debug info, linking will require more time and disk space.])
+        add_warning "Compiler is not capable of creating split debug info, linking will require more time and disk space."
+    fi
+fi
+AC_SUBST(HAVE_EXTERNAL_DWARF)
+
+HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=
+AC_MSG_CHECKING([whether $CC_BASE supports -Xclang -debug-info-kind=constructor])
+save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -Werror -Xclang -debug-info-kind=constructor"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=TRUE ],[])
+CFLAGS=$save_CFLAGS
+if test "$HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR" = "TRUE"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR)
+
+ENABLE_GDB_INDEX=
+if test "$enable_gdb_index" != "no"; then
+    dnl Currently by default enabled only on Linux, feel free to set test_gdb_index above also for other platforms.
+    if test "$enable_gdb_index" = yes -o \( "$test_gdb_index" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL" \); then
+        AC_MSG_CHECKING([whether $CC_BASE supports -ggnu-pubnames])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -g -ggnu-pubnames"
+        have_ggnu_pubnames=
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[have_ggnu_pubnames=TRUE],[have_ggnu_pubnames=])
+        if test "$have_ggnu_pubnames" != "TRUE"; then
+            if test "$enable_gdb_index" = "yes"; then
+                AC_MSG_ERROR([no, --enable-gdb-index not supported])
+            else
+                AC_MSG_RESULT( no )
+            fi
+        else
+            AC_MSG_RESULT( yes )
+            AC_MSG_CHECKING([whether $CC_BASE supports -Wl,--gdb-index])
+            ldflags_save=$LDFLAGS
+            LDFLAGS="$LDFLAGS -Wl,--gdb-index"
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+                ],[
+printf ("hello world\n");
+                ])], ENABLE_GDB_INDEX=TRUE, [])
+            if test "$ENABLE_GDB_INDEX" = "TRUE"; then
+                AC_MSG_RESULT( yes )
+            else
+                if test "$enable_gdb_index" = "yes"; then
+                    AC_MSG_ERROR( no )
+                else
+                    AC_MSG_RESULT( no )
+                fi
+            fi
+            LDFLAGS=$ldflags_save
+        fi
+        CFLAGS=$save_CFLAGS
+        fi
+    if test -z "$ENABLE_GDB_INDEX" -a "$test_gdb_index" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        AC_MSG_WARN([Linker is not capable of creating gdb index, debugger startup will be slow.])
+        add_warning "Linker is not capable of creating gdb index, debugger startup will be slow."
+    fi
+fi
+AC_SUBST(ENABLE_GDB_INDEX)
+
+if test -z "$enable_sal_log" && test "$ENABLE_DEBUG" = TRUE; then
+    enable_sal_log=yes
+fi
+if test "$enable_sal_log" = yes; then
+    ENABLE_SAL_LOG=TRUE
+fi
+AC_SUBST(ENABLE_SAL_LOG)
+
+dnl Check for enable symbols option
+dnl ===================================================================
+AC_MSG_CHECKING([whether to generate debug information])
+if test -z "$enable_symbols"; then
+    if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        enable_symbols=yes
+    else
+        enable_symbols=no
+    fi
+fi
+if test "$enable_symbols" = yes; then
+    ENABLE_SYMBOLS_FOR=all
+    AC_MSG_RESULT([yes])
+elif test "$enable_symbols" = no; then
+    ENABLE_SYMBOLS_FOR=
+    AC_MSG_RESULT([no])
+else
+    # Selective debuginfo.
+    ENABLE_SYMBOLS_FOR="$enable_symbols"
+    AC_MSG_RESULT([for "$enable_symbols"])
+fi
+AC_SUBST(ENABLE_SYMBOLS_FOR)
+
+if test -n "$with_android_ndk" -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \) -a "$ENABLE_DEBUGINFO_FOR" = "all"; then
+    # Building on Android with full symbols: without enough memory the linker never finishes currently.
+    AC_MSG_CHECKING([whether enough memory is available for linking])
+    mem_size=$(grep -o 'MemTotal: *.\+ kB' /proc/meminfo | sed 's/MemTotal: *\(.\+\) kB/\1/')
+    # Check for 15GB, as Linux reports a bit less than the physical memory size.
+    if test -n "$mem_size" -a $mem_size -lt 15728640; then
+        AC_MSG_ERROR([building with full symbols and less than 16GB of memory is not supported])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+fi
+
+ENABLE_OPTIMIZED=
+ENABLE_OPTIMIZED_DEBUG=
+AC_MSG_CHECKING([whether to compile with optimization flags])
+if test -z "$enable_optimized"; then
+    if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        enable_optimized=no
+    else
+        enable_optimized=yes
+    fi
+fi
+if test "$enable_optimized" = yes; then
+    ENABLE_OPTIMIZED=TRUE
+    AC_MSG_RESULT([yes])
+elif test "$enable_optimized" = debug; then
+    ENABLE_OPTIMIZED_DEBUG=TRUE
+    AC_MSG_RESULT([yes (debug)])
+    HAVE_GCC_OG=
+    if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+        AC_MSG_CHECKING([whether $CC_BASE supports -Og])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -Og"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_GCC_OG" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no])
+        fi
+    fi
+    if test -z "$HAVE_GCC_OG" -a "$_os" != "Emscripten"; then
+        AC_MSG_ERROR([The compiler does not support optimizations suitable for debugging.])
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_OPTIMIZED)
+AC_SUBST(ENABLE_OPTIMIZED_DEBUG)
+
+#
+# determine CPUNAME, OS, ...
+#
+case "$host_os" in
+
+cygwin*|wsl*)
+    # Already handled
+    ;;
+
+darwin*)
+    COM=GCC
+    OS=MACOSX
+    RTL_OS=MacOSX
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64|arm64)
+        if test "$enable_ios_simulator" = "yes"; then
+            OS=iOS
+        else
+            CPUNAME=AARCH64
+            RTL_ARCH=AARCH64
+            PLATFORMID=macosx_aarch64
+        fi
+        ;;
+    x86_64)
+        if test "$enable_ios_simulator" = "yes"; then
+            OS=iOS
+        fi
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=macosx_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+ios*)
+    COM=GCC
+    OS=iOS
+    RTL_OS=iOS
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64|arm64)
+        if test "$enable_ios_simulator" = "yes"; then
+            AC_MSG_ERROR([iOS simulator is only available in macOS not iOS])
+        fi
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    CPUNAME=AARCH64
+    RTL_ARCH=AARCH64
+    PLATFORMID=ios_arm64
+    ;;
+
+dragonfly*)
+    COM=GCC
+    OS=DRAGONFLY
+    RTL_OS=DragonFly
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=dragonfly_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=dragonfly_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+freebsd*)
+    COM=GCC
+    RTL_OS=FreeBSD
+    OS=FREEBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64)
+        CPUNAME=AARCH64
+        PLATFORMID=freebsd_aarch64
+        RTL_ARCH=AARCH64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=freebsd_x86
+        ;;
+    x86_64|amd64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=freebsd_x86_64
+        ;;
+    powerpc64)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64
+        PLATFORMID=freebsd_powerpc64
+        ;;
+    powerpc|powerpcspe)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=freebsd_powerpc
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+haiku*)
+    COM=GCC
+    GUIBASE=haiku
+    RTL_OS=Haiku
+    OS=HAIKU
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=haiku_x86
+        ;;
+    x86_64|amd64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=haiku_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+kfreebsd*)
+    COM=GCC
+    OS=LINUX
+    RTL_OS=kFreeBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=kfreebsd_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=kfreebsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+linux-gnu*|linux-musl*)
+    COM=GCC
+    OS=LINUX
+    RTL_OS=Linux
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    aarch64)
+        CPUNAME=AARCH64
+        PLATFORMID=linux_aarch64
+        RTL_ARCH=AARCH64
+        EPM_FLAGS="-a arm64"
+        ;;
+    alpha)
+        CPUNAME=AXP
+        RTL_ARCH=ALPHA
+        PLATFORMID=linux_alpha
+        ;;
+    arm*)
+        CPUNAME=ARM
+        EPM_FLAGS="-a arm"
+        RTL_ARCH=ARM_EABI
+        PLATFORMID=linux_arm_eabi
+        case "$host_cpu" in
+        arm*-linux)
+            RTL_ARCH=ARM_OABI
+            PLATFORMID=linux_arm_oabi
+            ;;
+        esac
+        ;;
+    hppa)
+        CPUNAME=HPPA
+        RTL_ARCH=HPPA
+        EPM_FLAGS="-a hppa"
+        PLATFORMID=linux_hppa
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=linux_x86
+        ;;
+    ia64)
+        CPUNAME=IA64
+        RTL_ARCH=IA64
+        PLATFORMID=linux_ia64
+        ;;
+    mips)
+        CPUNAME=MIPS
+        RTL_ARCH=MIPS_EB
+        EPM_FLAGS="-a mips"
+        PLATFORMID=linux_mips_eb
+        ;;
+    mips64)
+        CPUNAME=MIPS64
+        RTL_ARCH=MIPS64_EB
+        EPM_FLAGS="-a mips64"
+        PLATFORMID=linux_mips64_eb
+        ;;
+    mips64el)
+        CPUNAME=MIPS64
+        RTL_ARCH=MIPS64_EL
+        EPM_FLAGS="-a mips64el"
+        PLATFORMID=linux_mips64_el
+        ;;
+    mipsel)
+        CPUNAME=MIPS
+        RTL_ARCH=MIPS_EL
+        EPM_FLAGS="-a mipsel"
+        PLATFORMID=linux_mips_el
+        ;;
+    riscv64)
+        CPUNAME=RISCV64
+        RTL_ARCH=RISCV64
+        EPM_FLAGS="-a riscv64"
+        PLATFORMID=linux_riscv64
+        ;;
+    m68k)
+        CPUNAME=M68K
+        RTL_ARCH=M68K
+        PLATFORMID=linux_m68k
+        ;;
+    powerpc)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=linux_powerpc
+        ;;
+    powerpc64)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64
+        PLATFORMID=linux_powerpc64
+        ;;
+    powerpc64le)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64_LE
+        PLATFORMID=linux_powerpc64_le
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=linux_sparc
+        ;;
+    sparc64)
+        CPUNAME=SPARC64
+        RTL_ARCH=SPARC64
+        PLATFORMID=linux_sparc64
+        ;;
+    s390x)
+        CPUNAME=S390X
+        RTL_ARCH=S390x
+        PLATFORMID=linux_s390x
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=linux_x86_64
+        ;;
+    loongarch64)
+        CPUNAME=LOONGARCH64
+        RTL_ARCH=LOONGARCH64
+        PLATFORMID=linux_loongarch64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+linux-android*)
+    COM=GCC
+    OS=ANDROID
+    RTL_OS=Android
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    arm|armel)
+        CPUNAME=ARM
+        RTL_ARCH=ARM_EABI
+        PLATFORMID=android_arm_eabi
+        ;;
+    aarch64)
+        CPUNAME=AARCH64
+        RTL_ARCH=AARCH64
+        PLATFORMID=android_aarch64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=android_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=android_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+*netbsd*)
+    COM=GCC
+    OS=NETBSD
+    RTL_OS=NetBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=netbsd_x86
+        ;;
+    powerpc)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=netbsd_powerpc
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=netbsd_sparc
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=netbsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+openbsd*)
+    COM=GCC
+    OS=OPENBSD
+    RTL_OS=OpenBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=openbsd_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=openbsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    SOLARINC="$SOLARINC -I/usr/local/include"
+    ;;
+
+solaris*)
+    COM=GCC
+    OS=SOLARIS
+    RTL_OS=Solaris
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=solaris_x86
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=solaris_sparc
+        ;;
+    sparc64)
+        CPUNAME=SPARC64
+        RTL_ARCH=SPARC64
+        PLATFORMID=solaris_sparc64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    SOLARINC="$SOLARINC -I/usr/local/include"
+    ;;
+
+emscripten*)
+    COM=GCC
+    OS=EMSCRIPTEN
+    RTL_OS=Emscripten
+    P_SEP=:
+
+    case "$host_cpu" in
+    wasm32|wasm64)
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    CPUNAME=INTEL
+    RTL_ARCH=x86
+    PLATFORMID=linux_x86
+    ;;
+
+*)
+    AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
+    ;;
+esac
+
+DISABLE_GUI=""
+if test "$enable_gui" = "no"; then
+    if test "$using_x11" != yes; then
+        AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --disable-gui.])
+    fi
+    USING_X11=
+    DISABLE_GUI=TRUE
+    test_epoxy=no
+else
+    AC_DEFINE(HAVE_FEATURE_UI)
+fi
+AC_SUBST(DISABLE_GUI)
+
+if test "$with_x" = "no"; then
+    USING_X11=
+fi
+
+if test -z "$USING_X11" -a "$enable_qt5" = "yes" -a "$enable_gen" = "yes"; then
+    AC_MSG_ERROR([Can't select gen VCL plugin, if --without-x is used!])
+fi
+
+if test "$using_x11" = yes; then
+    if test "$USING_X11" = TRUE; then
+        AC_DEFINE(USING_X11)
+    else
+        disable_x11_tests
+        if test "$DISABLE_DYNLOADING" = TRUE; then
+            test_qt5=yes
+        fi
+    fi
+else
+    if test "$USING_X11" = TRUE; then
+        AC_MSG_ERROR([Platform doesn't support X11 (\$using_x11), but \$USING_X11 is set!])
+    fi
+fi
+
+WORKDIR="${BUILDDIR}/workdir"
+INSTDIR="${BUILDDIR}/instdir"
+INSTROOTBASE=${INSTDIR}${INSTROOTBASESUFFIX}
+INSTROOT=${INSTROOTBASE}${INSTROOTCONTENTSUFFIX}
+AC_SUBST(COM)
+AC_SUBST(CPUNAME)
+AC_SUBST(RTL_OS)
+AC_SUBST(RTL_ARCH)
+AC_SUBST(EPM_FLAGS)
+AC_SUBST(USING_X11)
+AC_SUBST([INSTDIR])
+AC_SUBST([INSTROOT])
+AC_SUBST([INSTROOTBASE])
+AC_SUBST(OS)
+AC_SUBST(P_SEP)
+AC_SUBST(WORKDIR)
+AC_SUBST(PLATFORMID)
+AC_SUBST(WINDOWS_X64)
+AC_DEFINE_UNQUOTED(SDKDIR, "$INSTDIR/$SDKDIRNAME")
+AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
+
+if test "$OS" = WNT -a "$COM" = MSC; then
+    case "$CPUNAME" in
+    INTEL) CPPU_ENV=msci ;;
+    X86_64) CPPU_ENV=mscx ;;
+    AARCH64) CPPU_ENV=msca ;;
+    *)
+        AC_MSG_ERROR([Unknown \$CPUNAME '$CPUNAME' for $OS / $COM"])
+        ;;
+    esac
+else
+    CPPU_ENV=gcc3
+fi
+AC_SUBST(CPPU_ENV)
+
+dnl ===================================================================
+dnl Test which package format to use
+dnl ===================================================================
+AC_MSG_CHECKING([which package format to use])
+if test -n "$with_package_format" -a "$with_package_format" != no; then
+    for i in $with_package_format; do
+        case "$i" in
+        bsd | deb | pkg | rpm | archive | dmg | installed | msi)
+            ;;
+        *)
+            AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
+bsd - FreeBSD, NetBSD, or OpenBSD software distribution
+deb - Debian software distribution
+pkg - Solaris software distribution
+rpm - RedHat software distribution
+
+LibreOffice additionally supports:
+archive - .tar.gz or .zip
+dmg - macOS .dmg
+installed - installation tree
+msi - Windows .msi
+        ])
+            ;;
+        esac
+    done
+    # fakeroot is needed to ensure correct file ownerships/permissions
+    # inside deb packages and tar archives created on Linux and Solaris.
+    if test "$OS" = "LINUX" || test "$OS" = "SOLARIS"; then
+        AC_PATH_PROG(FAKEROOT, fakeroot, no)
+        if test "$FAKEROOT" = "no"; then
+            AC_MSG_ERROR(
+                [--with-package-format='$with_package_format' requires fakeroot. Install fakeroot.])
+        fi
+    fi
+    PKGFORMAT="$with_package_format"
+    AC_MSG_RESULT([$PKGFORMAT])
+else
+    PKGFORMAT=
+    AC_MSG_RESULT([none])
+fi
+AC_SUBST(PKGFORMAT)
+
+dnl ===================================================================
+dnl handle help related options
+dnl
+dnl If you change help related options, please update README.help
+dnl ===================================================================
+
+ENABLE_HTMLHELP=
+HELP_OMINDEX_PAGE=
+HELP_ONLINE=
+WITH_HELPPACKS=
+
+AC_MSG_CHECKING([which help to build])
+if test -n "$with_help" -a "$with_help" != "no"; then
+    GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
+    BUILD_TYPE="$BUILD_TYPE HELP"
+    case "$with_help" in
+    "html")
+        ENABLE_HTMLHELP=TRUE
+        WITH_HELPPACKS=TRUE
+        SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
+        AC_MSG_RESULT([HTML (local)])
+        ;;
+    "online")
+        ENABLE_HTMLHELP=TRUE
+        HELP_ONLINE=TRUE
+        AC_MSG_RESULT([HTML (online)])
+        ;;
+    yes)
+        WITH_HELPPACKS=TRUE
+        SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
+        AC_MSG_RESULT([XML (local)])
+        ;;
+    *)
+        AC_MSG_ERROR([Unknown --with-help=$with_help])
+        ;;
+    esac
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([if we need to build the help index tooling])
+if test \( "$with_help" = yes -o "$enable_extension_integration" != no \) -a -z "$DISABLE_DYNLOADING"; then
+    BUILD_TYPE="$BUILD_TYPE HELPTOOLS"
+    test_clucene=yes
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([whether to enable xapian-omega support for online help])
+if test -n "$with_omindex" -a "$with_omindex" != "no"; then
+    if test "$HELP_ONLINE" != TRUE; then
+        AC_MSG_ERROR([Can't build xapian-omega index without --help=online])
+    fi
+    case "$with_omindex" in
+    "server")
+        HELP_OMINDEX_PAGE=TRUE
+        AC_MSG_RESULT([SERVER])
+        ;;
+    "noxap")
+        AC_MSG_RESULT([NOXAP])
+        ;;
+    *)
+        AC_MSG_ERROR([Unknown --with-omindex=$with_omindex])
+        ;;
+    esac
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([whether to include the XML-help support])
+if test "$enable_xmlhelp" = yes; then
+    BUILD_TYPE="$BUILD_TYPE XMLHELP"
+    test_clucene=yes
+    AC_DEFINE(HAVE_FEATURE_XMLHELP)
+    AC_MSG_RESULT([yes])
+else
+    if test "$with_help" = yes; then
+        add_warning "Building the XML help, but LO with disabled xmlhelp support. Generated help can't be accessed from this LO build!"
+    fi
+    AC_MSG_RESULT([no])
+fi
+
+dnl Test whether to integrate helppacks into the product's installer
+AC_MSG_CHECKING([for helppack integration])
+if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
+    AC_MSG_RESULT([no integration])
+else
+    SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
+    AC_MSG_RESULT([integration])
+fi
+
+AC_SUBST([ENABLE_HTMLHELP])
+AC_SUBST([HELP_OMINDEX_PAGE])
+AC_SUBST([HELP_ONLINE])
+# WITH_HELPPACKS is used only in configure
+
+dnl ===================================================================
+dnl Set up a different compiler to produce tools to run on the build
+dnl machine when doing cross-compilation
+dnl ===================================================================
+
+m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
+m4_pattern_allow([PKG_CONFIG_LIBDIR])
+if test "$cross_compiling" = "yes"; then
+    AC_MSG_CHECKING([for BUILD platform configuration])
+    echo
+    rm -rf CONF-FOR-BUILD config_build.mk
+    mkdir CONF-FOR-BUILD
+    # Here must be listed all files needed when running the configure script. In particular, also
+    # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
+    # keep them in the same order as there.
+    (cd $SRC_ROOT && tar cf - \
+        config.guess \
+        bin/get_config_variables \
+        solenv/bin/getcompver.awk \
+        solenv/inc/langlist.mk \
+        download.lst \
+        config_host.mk.in \
+        config_host_lang.mk.in \
+        Makefile.in \
+        bin/bffvalidator.sh.in \
+        bin/odfvalidator.sh.in \
+        bin/officeotron.sh.in \
+        instsetoo_native/util/openoffice.lst.in \
+        config_host/*.in \
+        sysui/desktop/macosx/Info.plist.in \
+        sysui/desktop/macosx/hardened_runtime.xcent.in \
+        sysui/desktop/macosx/lo.xcent.in \
+        .vscode/vs-code-template.code-workspace.in \
+        solenv/lockfile/autoconf.h.in \
+        ) \
+    | (cd CONF-FOR-BUILD && tar xf -)
+    cp configure CONF-FOR-BUILD
+    test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
+    (
+    unset COM USING_X11 OS CPUNAME
+    unset CC CXX SYSBASE CFLAGS
+    unset AR LD NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
+    unset CPPUNIT_CFLAGS CPPUNIT_LIBS
+    unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
+    unset PKG_CONFIG_LIBDIR PKG_CONFIG_PATH
+    if test -n "$CC_FOR_BUILD"; then
+        export CC="$CC_FOR_BUILD"
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+    if test -n "$CXX_FOR_BUILD"; then
+        export CXX="$CXX_FOR_BUILD"
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+    test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
+    cd CONF-FOR-BUILD
+
+    # Handle host configuration, which affects the cross-toolset too
+    sub_conf_opts=""
+    test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
+    test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
+    test "$with_junit" = "no" && sub_conf_opts="$sub_conf_opts --without-junit"
+    # While we don't need scripting support, we don't have a PYTHON_FOR_BUILD Java equivalent, so must enable scripting for Java
+    if test -n "$ENABLE_JAVA"; then
+        case "$_os" in
+        Android)
+            # Hack for Android - the build doesn't need a host JDK, so just forward to build for convenience
+            test -n "$with_jdk_home" && sub_conf_opts="$sub_conf_opts --with-jdk-home=$with_jdk_home"
+            ;;
+        *)
+            if test -z "$with_jdk_home"; then
+                AC_MSG_ERROR([Missing host JDK! This can't be detected for the build OS, so you have to specify it with --with-jdk-home.])
+            fi
+            ;;
+        esac
+    else
+        sub_conf_opts="$sub_conf_opts --without-java"
+    fi
+    test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
+    test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no --disable-database-connectivity"
+    test "$with_templates" = "no" -o -z "$WITH_TEMPLATES" && sub_conf_opts="$sub_conf_opts --with-templates=no"
+    test -n "$with_help" -a "$with_help" != "no" && sub_conf_opts="$sub_conf_opts --with-help=$with_help"
+    test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts --disable-extensions"
+    test "${enable_ld+set}" = set -a "$build_cpu" = "$host_cpu" && sub_conf_opts="$sub_conf_opts --enable-ld=${enable_ld}"
+    test "${enable_pch+set}" = set && sub_conf_opts="$sub_conf_opts --enable-pch=${enable_pch}"
+    test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts --enable-wasm-strip"
+    test "${with_system_lockfile+set}" = set && sub_conf_opts="$sub_conf_opts --with-system-lockfile=${with_system_lockfile}"
+    test "${enable_fuzzers}" = yes && sub_conf_opts="$sub_conf_opts --without-system-libxml"
+    if test "$_os" = "Emscripten"; then
+        sub_conf_opts="$sub_conf_opts --without-system-libxml --without-system-fontconfig --without-system-freetype --without-system-zlib"
+        if test "${with_main_module+set}" = set; then
+            sub_conf_opts="$sub_conf_opts --with-main-module=${with_main_module}"
+        else
+            sub_conf_opts="$sub_conf_opts --with-main-module=writer"
+        fi
+    fi
+    # windows uses full-internal python and that in turn relies on openssl, so also enable openssl
+    # when cross-compiling for aarch64, overriding the defaults below
+    test "${PLATFORMID}" = "windows_aarch64" && sub_conf_opts="$sub_conf_opts --enable-openssl --with-tls=openssl"
+
+    # Don't bother having configure look for stuff not needed for the build platform anyway
+    # WARNING: any option with an argument containing spaces must be handled separately (see --with-theme)
+    sub_conf_defaults=" \
+        --build="$build_alias" \
+        --disable-cairo-canvas \
+        --disable-cups \
+        --disable-customtarget-components \
+        --disable-firebird-sdbc \
+        --disable-gpgmepp \
+        --disable-gstreamer-1-0 \
+        --disable-gtk3 \
+        --disable-gtk4 \
+        --disable-libcmis \
+        --disable-mariadb-sdbc \
+        --disable-nss \
+        --disable-online-update \
+        --disable-opencl \
+        --disable-openssl \
+        --disable-pdfimport \
+        --disable-postgresql-sdbc \
+        --disable-skia \
+        --disable-xmlhelp \
+        --enable-dynamic-loading \
+        --enable-icecream="$enable_icecream" \
+        --without-doxygen \
+        --without-tls \
+        --without-webdav \
+        --without-x \
+"
+    # single quotes added for better readability in case of spaces
+    echo "    Running CONF-FOR-BUILD/configure" \
+        $sub_conf_defaults \
+        --with-parallelism="'$with_parallelism'" \
+        --with-theme="'$with_theme'" \
+        --with-vendor="'$with_vendor'" \
+        $sub_conf_opts \
+        $with_build_platform_configure_options \
+        --srcdir=$srcdir
+
+    ./configure \
+        $sub_conf_defaults \
+        --with-parallelism="$with_parallelism" \
+        --with-theme="$with_theme" \
+        "--with-vendor=$with_vendor" \
+        $sub_conf_opts \
+        $with_build_platform_configure_options \
+        --srcdir=$srcdir \
+        2>&1 | sed -e 's/^/    /'
+    if test [${PIPESTATUS[0]}] -ne 0; then
+        AC_MSG_ERROR([Running the configure script for BUILD side failed, see CONF-FOR-BUILD/config.log])
+    fi
+
+    # filter permitted build targets
+    PERMITTED_BUILD_TARGETS="
+        ARGON2
+        AVMEDIA
+        BOOST
+        BZIP2
+        CAIRO
+        CLUCENE
+        CURL
+        DBCONNECTIVITY
+        DESKTOP
+        DRAGONBOX
+        DYNLOADING
+        EPOXY
+        EXPAT
+        FROZEN
+        GLM
+        GRAPHITE
+        HARFBUZZ
+        HELPTOOLS
+        ICU
+        LCMS2
+        LIBJPEG_TURBO
+        LIBLANGTAG
+        LibO
+        LIBFFI
+        LIBPN
+        LIBTIFF
+        LIBWEBP
+        LIBXML2
+        LIBXSLT
+        MDDS
+        NATIVE
+        OPENSSL
+        ORCUS
+        PYTHON
+        SCRIPTING
+        ZLIB
+        ZXCVBN
+"
+    # converts BUILD_TYPE and PERMITTED_BUILD_TARGETS into non-whitespace,
+    # newlined lists, to use grep as a filter
+    PERMITTED_BUILD_TARGETS=$(echo "$PERMITTED_BUILD_TARGETS" | sed -e '/^ *$/d' -e 's/ *//')
+    BUILD_TARGETS="$(sed -n -e '/^export BUILD_TYPE=/ s/.*=//p' config_host.mk | tr ' ' '\n')"
+    BUILD_TARGETS="$(echo "$BUILD_TARGETS" | grep -F "$PERMITTED_BUILD_TARGETS" | tr '\n' ' ')"
+    sed -i -e "s/ BUILD_TYPE=.*$/ BUILD_TYPE=$BUILD_TARGETS/" config_host.mk
+
+    cp config_host.mk ../config_build.mk
+    cp config_host_lang.mk ../config_build_lang.mk
+    mv config.log ../config.Build.log
+    mkdir -p ../config_build
+    mv config_host/*.h ../config_build
+    test -f "$WARNINGS_FILE" && mv "$WARNINGS_FILE" "../$WARNINGS_FILE_FOR_BUILD"
+
+    # all these will get a _FOR_BUILD postfix
+    DIRECT_FOR_BUILD_SETTINGS="
+        CC
+        CPPU_ENV
+        CXX
+        ILIB
+        JAVA_HOME
+        JAVAIFLAGS
+        JDK
+        JDK_SECURITYMANAGER_DISALLOWED
+        LIBO_BIN_FOLDER
+        LIBO_LIB_FOLDER
+        LIBO_URE_LIB_FOLDER
+        LIBO_URE_MISC_FOLDER
+        OS
+        SDKDIRNAME
+        SYSTEM_LIBXML
+        SYSTEM_LIBXSLT
+"
+    # these overwrite host config with build config
+    OVERWRITING_SETTINGS="
+        ANT
+        ANT_HOME
+        ANT_LIB
+        JAVA_SOURCE_VER
+        JAVA_TARGET_VER
+        JAVACFLAGS
+        JAVACOMPILER
+        JAVADOC
+        JAVADOCISGJDOC
+        LOCKFILE
+        SYSTEM_GENBRK
+        SYSTEM_GENCCODE
+        SYSTEM_GENCMN
+"
+    # these need some special handling
+    EXTRA_HANDLED_SETTINGS="
+        INSTDIR
+        INSTROOT
+        PATH
+        WORKDIR
+"
+    OLD_PATH=$PATH
+    . ./bin/get_config_variables $DIRECT_FOR_BUILD_SETTINGS $OVERWRITING_SETTINGS $EXTRA_HANDLED_SETTINGS
+    BUILD_PATH=$PATH
+    PATH=$OLD_PATH
+
+    line=`echo "LO_PATH_FOR_BUILD='${BUILD_PATH}'" | sed -e 's,/CONF-FOR-BUILD,,g'`
+    echo "$line" >>build-config
+
+    for V in $DIRECT_FOR_BUILD_SETTINGS; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        if test -n "$VV"; then
+            line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
+            echo "$line" >>build-config
+        fi
+    done
+
+    for V in $OVERWRITING_SETTINGS; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        if test -n "$VV"; then
+            line=${V}='${'${V}:-$VV'}'
+            echo "$line" >>build-config
+        fi
+    done
+
+    for V in INSTDIR INSTROOT WORKDIR; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        VV=`echo $VV | sed -e "s,/CONF-FOR-BUILD/\([[a-z]]*\),/\1_for_build,g"`
+        if test -n "$VV"; then
+            line="${V}_FOR_BUILD='$VV'"
+            echo "$line" >>build-config
+        fi
+    done
+
+    )
+    test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([setup/configure for BUILD side failed, see CONF-FOR-BUILD/config.log])
+    test -f config_build.mk || AC_MSG_ERROR([A file called config_build.mk was supposed to have been copied here, but it isn't found])
+    perl -pi -e 's,/(workdir|instdir)(/|$),/\1_for_build\2,g;' \
+             -e 's,/CONF-FOR-BUILD,,g;' config_build.mk
+
+    eval `cat CONF-FOR-BUILD/build-config`
+
+    AC_MSG_RESULT([checking for BUILD platform configuration... done])
+
+    rm -rf CONF-FOR-BUILD
+else
+    OS_FOR_BUILD="$OS"
+    CC_FOR_BUILD="$CC"
+    CPPU_ENV_FOR_BUILD="$CPPU_ENV"
+    CXX_FOR_BUILD="$CXX"
+    INSTDIR_FOR_BUILD="$INSTDIR"
+    INSTROOT_FOR_BUILD="$INSTROOT"
+    LIBO_BIN_FOLDER_FOR_BUILD="$LIBO_BIN_FOLDER"
+    LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER"
+    LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER"
+    LIBO_URE_MISC_FOLDER_FOR_BUILD="$LIBO_URE_MISC_FOLDER"
+    SDKDIRNAME_FOR_BUILD="$SDKDIRNAME"
+    WORKDIR_FOR_BUILD="$WORKDIR"
+fi
+AC_SUBST(OS_FOR_BUILD)
+AC_SUBST(INSTDIR_FOR_BUILD)
+AC_SUBST(INSTROOT_FOR_BUILD)
+AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_URE_MISC_FOLDER_FOR_BUILD)
+AC_SUBST(SDKDIRNAME_FOR_BUILD)
+AC_SUBST(WORKDIR_FOR_BUILD)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(CPPU_ENV_FOR_BUILD)
+
+dnl ===================================================================
+dnl Check for lockfile deps
+dnl ===================================================================
+if test -z "$CROSS_COMPILING"; then
+    test -n "$LOCKFILE" -a "${with_system_lockfile+set}" != set && with_system_lockfile="$LOCKFILE"
+    test "${with_system_lockfile+set}" = set || with_system_lockfile=no
+    AC_MSG_CHECKING([which lockfile binary to use])
+    case "$with_system_lockfile" in
+    yes)
+        AC_MSG_RESULT([external])
+        AC_PATH_PROGS([LOCKFILE],[dotlockfile lockfile])
+        ;;
+    no)
+        AC_MSG_RESULT([internal])
+        ;;
+    *)
+        if test -x "$with_system_lockfile"; then
+            LOCKFILE="$with_system_lockfile"
+        else
+            AC_MSG_ERROR(['$with_system_lockfile' is not executable.])
+        fi
+        AC_MSG_RESULT([$with_system_lockfile])
+        ;;
+    esac
+fi
+
+if test -n "$LOCKFILE" -a "$DISABLE_DYNLOADING" = TRUE; then
+    add_warning "The default system lockfile has increasing poll intervals up to 60s, so linking executables may be delayed."
+fi
+
+AC_CHECK_HEADERS([getopt.h paths.h sys/param.h])
+AC_CHECK_FUNCS([utime utimes])
+AC_SUBST(LOCKFILE)
+
+dnl ===================================================================
+dnl Check for syslog header
+dnl ===================================================================
+AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
+
+dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to turn warnings to errors])
+if test -n "$enable_werror" -a "$enable_werror" != "no"; then
+    ENABLE_WERROR="TRUE"
+    PYTHONWARNINGS="error"
+    AC_MSG_RESULT([yes])
+else
+    if test -n "$LODE_HOME" -a -z "$enable_werror"; then
+        ENABLE_WERROR="TRUE"
+        PYTHONWARNINGS="error"
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_WERROR)
+AC_SUBST(PYTHONWARNINGS)
+
+dnl Check for --enable-assert-always-abort, set ASSERT_ALWAYS_ABORT
+dnl ===================================================================
+AC_MSG_CHECKING([whether to have assert() failures abort even without --enable-debug])
+if test -z "$enable_assert_always_abort"; then
+   if test "$ENABLE_DEBUG" = TRUE; then
+       enable_assert_always_abort=yes
+   else
+       enable_assert_always_abort=no
+   fi
+fi
+if test "$enable_assert_always_abort" = "yes"; then
+    ASSERT_ALWAYS_ABORT="TRUE"
+    AC_MSG_RESULT([yes])
+else
+    ASSERT_ALWAYS_ABORT="FALSE"
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ASSERT_ALWAYS_ABORT)
+
+# Determine whether to use ooenv for the instdir installation
+# ===================================================================
+if test $_os != "WINNT" -a $_os != "Darwin"; then
+    AC_MSG_CHECKING([whether to use ooenv for the instdir installation])
+    if test -z "$enable_ooenv"; then
+        if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            enable_ooenv=yes
+        else
+            enable_ooenv=no
+        fi
+    fi
+    if test "$enable_ooenv" = "no"; then
+        AC_MSG_RESULT([no])
+    else
+        ENABLE_OOENV="TRUE"
+        AC_MSG_RESULT([yes])
+    fi
+fi
+AC_SUBST(ENABLE_OOENV)
+
+if test "$test_kf5" = "yes" -a "$enable_kf5" = "yes"; then
+    if test "$enable_qt5" = "no"; then
+        AC_MSG_ERROR([KF5 support depends on QT5, so it conflicts with --disable-qt5])
+    else
+        enable_qt5=yes
+    fi
+fi
+
+if test "$test_kf6" = "yes" -a "$enable_kf6" = "yes"; then
+    if test "$enable_qt6" = "no"; then
+        AC_MSG_ERROR([KF6 support depends on QT6, so it conflicts with --disable-qt6])
+    else
+        enable_qt6=yes
+    fi
+fi
+
+
+AC_MSG_CHECKING([whether to build the pagein binaries for oosplash])
+if test "${enable_pagein}" != no -a -z "$DISABLE_DYNLOADING"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PAGEIN=TRUE
+    AC_DEFINE(HAVE_FEATURE_PAGEIN)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_PAGEIN)
+
+dnl ===================================================================
+dnl check for cups support
+dnl ===================================================================
+
+AC_MSG_CHECKING([whether to enable CUPS support])
+if test "$test_cups" = yes -a "$enable_cups" != no; then
+    ENABLE_CUPS=TRUE
+    AC_MSG_RESULT([yes])
+
+    AC_MSG_CHECKING([whether cups support is present])
+    AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
+    AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
+    if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
+        AC_MSG_ERROR([Could not find CUPS. Install libcups2-dev or cups-devel.])
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_CUPS)
+
+libo_CHECK_SYSTEM_MODULE([fontconfig],[FONTCONFIG],[fontconfig >= 2.12.0],,system,TRUE)
+
+dnl whether to find & fetch external tarballs?
+dnl ===================================================================
+if test -z "$TARFILE_LOCATION" -a -n "$LODE_HOME" ; then
+   if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+       TARFILE_LOCATION="`cygpath -m $LODE_HOME/ext_tar`"
+   else
+       TARFILE_LOCATION="$LODE_HOME/ext_tar"
+   fi
+fi
+if test -z "$TARFILE_LOCATION"; then
+    if test -d "$SRC_ROOT/src" ; then
+        mv "$SRC_ROOT/src" "$SRC_ROOT/external/tarballs"
+        ln -s "$SRC_ROOT/external/tarballs" "$SRC_ROOT/src"
+    fi
+    TARFILE_LOCATION="$SRC_ROOT/external/tarballs"
+else
+    AbsolutePath "$TARFILE_LOCATION"
+    PathFormat "${absolute_path}"
+    TARFILE_LOCATION="${formatted_path_unix}"
+fi
+AC_SUBST(TARFILE_LOCATION)
+
+AC_MSG_CHECKING([whether we want to fetch tarballs])
+if test "$enable_fetch_external" != "no"; then
+    if test "$with_all_tarballs" = "yes"; then
+        AC_MSG_RESULT([yes, all of them])
+        DO_FETCH_TARBALLS="ALL"
+    else
+        AC_MSG_RESULT([yes, if we use them])
+        DO_FETCH_TARBALLS="TRUE"
+    fi
+else
+    AC_MSG_RESULT([no])
+    DO_FETCH_TARBALLS=
+fi
+AC_SUBST(DO_FETCH_TARBALLS)
+
+dnl Test whether to include MySpell dictionaries
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include MySpell dictionaries])
+if test "$with_myspell_dicts" = "yes"; then
+    AC_MSG_RESULT([yes])
+    WITH_MYSPELL_DICTS=TRUE
+    BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
+    GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
+else
+    AC_MSG_RESULT([no])
+    WITH_MYSPELL_DICTS=
+fi
+AC_SUBST(WITH_MYSPELL_DICTS)
+
+# There are no "system" myspell, hyphen or mythes dictionaries on macOS, Windows, Android or iOS.
+if test $_os = Darwin -o $_os = WINNT -o $_os = iOS -o $_os = Android; then
+    if test "$with_system_dicts" = yes; then
+        AC_MSG_ERROR([There are no system dicts on this OS in the formats the 3rd-party libs we use expect]);
+    fi
+    with_system_dicts=no
+fi
+
+AC_MSG_CHECKING([whether to use dicts from external paths])
+if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
+    AC_MSG_RESULT([yes])
+    SYSTEM_DICTS=TRUE
+    AC_MSG_CHECKING([for spelling dictionary directory])
+    if test -n "$with_external_dict_dir"; then
+        DICT_SYSTEM_DIR=file://$with_external_dict_dir
+    else
+        DICT_SYSTEM_DIR=file:///usr/share/hunspell
+        if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
+            DICT_SYSTEM_DIR=file:///usr/share/myspell
+        fi
+    fi
+    AC_MSG_RESULT([$DICT_SYSTEM_DIR])
+    AC_MSG_CHECKING([for hyphenation patterns directory])
+    if test -n "$with_external_hyph_dir"; then
+        HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
+    else
+        HYPH_SYSTEM_DIR=file:///usr/share/hyphen
+    fi
+    AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
+    AC_MSG_CHECKING([for thesaurus directory])
+    if test -n "$with_external_thes_dir"; then
+        THES_SYSTEM_DIR=file://$with_external_thes_dir
+    else
+        THES_SYSTEM_DIR=file:///usr/share/mythes
+    fi
+    AC_MSG_RESULT([$THES_SYSTEM_DIR])
+else
+    AC_MSG_RESULT([no])
+    SYSTEM_DICTS=
+fi
+AC_SUBST(SYSTEM_DICTS)
+AC_SUBST(DICT_SYSTEM_DIR)
+AC_SUBST(HYPH_SYSTEM_DIR)
+AC_SUBST(THES_SYSTEM_DIR)
+
+dnl ===================================================================
+dnl Precompiled headers.
+ENABLE_PCH=""
+AC_MSG_CHECKING([whether to enable pch feature])
+if test -z "$enable_pch"; then
+    if test "$_os" = "WINNT"; then
+        # Enabled by default on Windows.
+        enable_pch=yes
+        # never use sccache on auto-enabled PCH builds, except if requested explicitly
+        if test -z "$enable_ccache" -a "$SCCACHE"; then
+            CCACHE=""
+        fi
+    else
+        enable_pch=no
+    fi
+fi
+if test "$enable_pch" != no -a "$_os" = Emscripten -a "$ENABLE_WASM_EXCEPTIONS" = TRUE; then
+    AC_MSG_ERROR([PCH currently isn't supported for Emscripten with native EH (nEH) because of missing Sj/Lj support with nEH in clang.])
+fi
+if test "$enable_pch" != "no" -a "$_os" != "WINNT" -a "$GCC" != "yes" ; then
+    AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
+fi
+if test "$enable_pch" = "system"; then
+    ENABLE_PCH="1"
+    AC_MSG_RESULT([yes (system headers)])
+elif test "$enable_pch" = "base"; then
+    ENABLE_PCH="2"
+    AC_MSG_RESULT([yes (system and base headers)])
+elif test "$enable_pch" = "normal"; then
+    ENABLE_PCH="3"
+    AC_MSG_RESULT([yes (normal)])
+elif test "$enable_pch" = "full"; then
+    ENABLE_PCH="4"
+    AC_MSG_RESULT([yes (full)])
+elif test "$enable_pch" = "yes"; then
+    # Pick a suitable default.
+    if test "$GCC" = "yes"; then
+        # With Clang and GCC higher levels do not seem to make a noticeable improvement,
+        # while making the PCHs larger and rebuilds more likely.
+        ENABLE_PCH="2"
+        AC_MSG_RESULT([yes (system and base headers)])
+    else
+        # With MSVC the highest level makes a significant difference,
+        # and it was the default when there used to be no PCH levels.
+        ENABLE_PCH="4"
+        AC_MSG_RESULT([yes (full)])
+    fi
+elif test "$enable_pch" = "no"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_ERROR([Unknown value for --enable-pch])
+fi
+AC_SUBST(ENABLE_PCH)
+# ccache 3.7.1 and older do not properly detect/handle -include .gch in CCACHE_DEPEND mode
+if test -n "$ENABLE_PCH" -a -n "$CCACHE_DEPEND_MODE" -a "$GCC" = "yes" -a "$COM_IS_CLANG" != "TRUE"; then
+    AC_PATH_PROG([CCACHE_BIN],[ccache],[not found])
+    if test "$CCACHE_BIN" != "not found"; then
+        AC_MSG_CHECKING([ccache version])
+        CCACHE_VERSION=`"$CCACHE_BIN" -V | "$AWK" '/^ccache version/{print $3}'`
+        CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+        AC_MSG_RESULT([$CCACHE_VERSION])
+        AC_MSG_CHECKING([whether ccache depend mode works properly with GCC PCH])
+        if test "$CCACHE_NUMVER" -gt "030701"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no (not newer than 3.7.1)])
+            CCACHE_DEPEND_MODE=
+        fi
+    fi
+fi
+
+PCH_INSTANTIATE_TEMPLATES=
+if test -n "$ENABLE_PCH"; then
+    AC_MSG_CHECKING([whether $CC supports -fpch-instantiate-templates])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -fpch-instantiate-templates"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_INSTANTIATE_TEMPLATES="-fpch-instantiate-templates" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_INSTANTIATE_TEMPLATES"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_INSTANTIATE_TEMPLATES)
+
+BUILDING_PCH_WITH_OBJ=
+if test -n "$ENABLE_PCH"; then
+    AC_MSG_CHECKING([whether $CC supports -Xclang -building-pch-with-obj])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -Xclang -building-pch-with-obj"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ BUILDING_PCH_WITH_OBJ="-Xclang -building-pch-with-obj" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$BUILDING_PCH_WITH_OBJ"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(BUILDING_PCH_WITH_OBJ)
+
+PCH_CODEGEN=
+PCH_NO_CODEGEN=
+fpch_prefix=
+if test "$COM" = MSC; then
+    fpch_prefix="-Xclang "
+fi
+if test -n "$BUILDING_PCH_WITH_OBJ"; then
+    AC_MSG_CHECKING([whether $CC supports ${fpch_prefix}-fpch-codegen])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fpch-codegen"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
+        [ PCH_CODEGEN="${fpch_prefix}-fpch-codegen" ],[])
+    CFLAGS=$save_CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fno-pch-codegen"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
+        [ PCH_NO_CODEGEN="${fpch_prefix}-fno-pch-codegen" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_CODEGEN"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_CODEGEN)
+AC_SUBST(PCH_NO_CODEGEN)
+PCH_DEBUGINFO=
+if test -n "$BUILDING_PCH_WITH_OBJ"; then
+    AC_MSG_CHECKING([whether $CC supports ${fpch_prefix}-fpch-debuginfo])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fpch-debuginfo"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_DEBUGINFO="${fpch_prefix}-fpch-debuginfo" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_DEBUGINFO"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_DEBUGINFO)
+
+TAB=`printf '\t'`
+
+AC_MSG_CHECKING([the GNU Make version])
+_make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
+_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+if test "$_make_longver" -ge "040000"; then
+    AC_MSG_RESULT([$GNUMAKE $_make_version])
+else
+    AC_MSG_ERROR([failed ($GNUMAKE version >= 4.0 needed)])
+fi
+
+_make_ver_check=`$GNUMAKE --version | grep "Built for Windows"`
+STALE_MAKE=
+if test "$_make_ver_check" = ""; then
+   STALE_MAKE=TRUE
+fi
+
+HAVE_LD_HASH_STYLE=FALSE
+WITH_LINKER_HASH_STYLE=
+AC_MSG_CHECKING([for --hash-style gcc linker support])
+if test "$GCC" = "yes"; then
+    if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
+        hash_styles="gnu sysv"
+    elif test "$with_linker_hash_style" = "no"; then
+        hash_styles=
+    else
+        hash_styles="$with_linker_hash_style"
+    fi
+
+    for hash_style in $hash_styles; do
+        test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
+        hash_style_ldflags_save=$LDFLAGS
+        LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
+
+        AC_RUN_IFELSE([AC_LANG_PROGRAM(
+            [
+#include <stdio.h>
+            ],[
+printf ("");
+            ])],
+            [
+                  HAVE_LD_HASH_STYLE=TRUE
+                  WITH_LINKER_HASH_STYLE=$hash_style
+            ],
+            [HAVE_LD_HASH_STYLE=FALSE],
+            [HAVE_LD_HASH_STYLE=FALSE])
+        LDFLAGS=$hash_style_ldflags_save
+    done
+
+    if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
+        AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
+    else
+        AC_MSG_RESULT( no )
+    fi
+    LDFLAGS=$hash_style_ldflags_save
+else
+    AC_MSG_RESULT( no )
+fi
+AC_SUBST(HAVE_LD_HASH_STYLE)
+AC_SUBST(WITH_LINKER_HASH_STYLE)
+
+dnl ===================================================================
+dnl Check whether there's a Perl version available.
+dnl ===================================================================
+if test -z "$with_perl_home"; then
+    AC_PATH_PROG(PERL, perl)
+else
+    test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
+    _perl_path="$with_perl_home/bin/perl"
+    if test -x "$_perl_path"; then
+        PERL=$_perl_path
+    else
+        AC_MSG_ERROR([$_perl_path not found])
+    fi
+fi
+
+dnl ===================================================================
+dnl Testing for Perl version 5 or greater.
+dnl $] is the Perl version variable, it is returned as an integer
+dnl ===================================================================
+if test "$PERL"; then
+    AC_MSG_CHECKING([the Perl version])
+    ${PERL} -e "exit($]);"
+    _perl_version=$?
+    if test "$_perl_version" -lt 5; then
+        AC_MSG_ERROR([found Perl $_perl_version, use Perl 5])
+    fi
+    AC_MSG_RESULT([Perl $_perl_version])
+else
+    AC_MSG_ERROR([Perl not found, install Perl 5])
+fi
+
+dnl ===================================================================
+dnl Testing for required Perl modules
+dnl ===================================================================
+
+AC_MSG_CHECKING([for required Perl modules])
+perl_use_string="use Cwd ; use Digest::MD5"
+if test "$_os" = "WINNT"; then
+    if test -n "$PKGFORMAT"; then
+        for i in $PKGFORMAT; do
+            case "$i" in
+            msi)
+                # for getting fonts versions to use in MSI
+                perl_use_string="$perl_use_string ; use Font::TTF::Font"
+                ;;
+            esac
+        done
+    fi
+fi
+if test "$with_system_hsqldb" = "yes"; then
+    perl_use_string="$perl_use_string ; use Archive::Zip"
+fi
+if test "$enable_openssl" = "yes" -a "$with_system_openssl" != "yes"; then
+    # OpenSSL needs that to build
+    perl_use_string="$perl_use_string ; use FindBin"
+fi
+if $PERL -e "$perl_use_string">/dev/null 2>&1; then
+    AC_MSG_RESULT([all modules found])
+else
+    AC_MSG_RESULT([failed to find some modules])
+    # Find out which modules are missing.
+    for i in $perl_use_string; do
+        if test "$i" != "use" -a "$i" != ";"; then
+            if ! $PERL -e "use $i;">/dev/null 2>&1; then
+                missing_perl_modules="$missing_perl_modules $i"
+            fi
+        fi
+    done
+    AC_MSG_ERROR([
+    The missing Perl modules are: $missing_perl_modules
+    Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
+fi
+
+dnl ===================================================================
+dnl Check for pkg-config
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+    PKG_PROG_PKG_CONFIG
+fi
+AC_SUBST(PKG_CONFIG)
+AC_SUBST(PKG_CONFIG_PATH)
+AC_SUBST(PKG_CONFIG_LIBDIR)
+
+if test "$_os" != "WINNT"; then
+
+    # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
+    # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
+    # explicitly. Or put /path/to/compiler in PATH yourself.
+
+    toolprefix=gcc
+    if test "$COM_IS_CLANG" = "TRUE"; then
+        toolprefix=llvm
+    fi
+    AC_CHECK_TOOLS(AR,$toolprefix-ar ar)
+    AC_CHECK_TOOLS(NM,$toolprefix-nm nm)
+    AC_CHECK_TOOLS(RANLIB,$toolprefix-ranlib ranlib)
+    AC_CHECK_TOOLS(OBJDUMP,$toolprefix-objdump objdump)
+    AC_CHECK_TOOLS(READELF,$toolprefix-readelf readelf)
+    AC_CHECK_TOOLS(STRIP,$toolprefix-strip strip)
+fi
+AC_SUBST(AR)
+AC_SUBST(NM)
+AC_SUBST(OBJDUMP)
+AC_SUBST(RANLIB)
+AC_SUBST(READELF)
+AC_SUBST(STRIP)
+
+dnl ===================================================================
+dnl pkg-config checks on macOS
+dnl ===================================================================
+
+if test $_os = Darwin; then
+    AC_MSG_CHECKING([for bogus pkg-config])
+    if test -n "$PKG_CONFIG"; then
+        if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
+            AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
+        else
+            if test "$enable_bogus_pkg_config" = "yes"; then
+                AC_MSG_RESULT([yes, user-approved from unknown origin.])
+            else
+                AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that $PKG_CONFIG is no longer found by configure scripts.])
+            fi
+        fi
+    else
+        AC_MSG_RESULT([no, good])
+    fi
+fi
+
+find_csc()
+{
+    # Return value: $csctest
+
+    unset csctest
+
+    reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"
+    if test -n "$regvalue"; then
+        csctest=$regvalue
+        return
+    fi
+}
+
+find_al()
+{
+    # Return value: $altest
+
+    unset altest
+
+    # We need this check to detect 4.6.1 or above.
+    for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/WinSDK-NetFx40Tools/InstallationFolder"
+        PathFormat "$regvalue"
+        if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then
+            altest=$regvalue
+            return
+        fi
+    done
+
+    reg_list_values_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows"
+    for x in $reglist; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder"
+        PathFormat "$regvalue"
+        if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then
+            altest=$regvalue
+            return
+        fi
+    done
+}
+
+find_dotnetsdk()
+{
+    unset frametest
+
+    for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1 4.6; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/KitsInstallationFolder"
+        if test -n "$regvalue"; then
+            frametest=$regvalue
+            return
+        fi
+    done
+    AC_MSG_ERROR([The Windows NET SDK (minimum 4.6) not found, check the installation])
+}
+
+find_winsdk_version()
+{
+    # Args: $1 : SDK version as in "8.0", "8.1A" etc
+    # Return values: $winsdktest, $winsdkbinsubdir, $winsdklibsubdir
+
+    unset winsdktest winsdkbinsubdir winsdklibsubdir
+
+    case "$1" in
+    8.0|8.0A)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            winsdklibsubdir=win8
+            return
+        fi
+        ;;
+    8.1|8.1A)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot81"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            winsdklibsubdir=winv6.3
+            return
+        fi
+        ;;
+    10.0)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/ProductVersion"
+            if test -n "$regvalue"; then
+                winsdkbinsubdir="$regvalue".0
+                winsdklibsubdir=$winsdkbinsubdir
+                local tmppath="$winsdktest\\Include\\$winsdklibsubdir"
+                local tmppath_unix=$(cygpath -u "$tmppath")
+                # test exist the SDK path
+                if test -d "$tmppath_unix"; then
+                   # when path is convertible to a short path then path is okay
+                   cygpath -d "$tmppath" >/dev/null 2>&1
+                   if test $? -ne 0; then
+                      AC_MSG_ERROR([Windows SDK doesn't have a 8.3 name, see NtfsDisable8dot3NameCreation])
+                   fi
+                else
+                   AC_MSG_ERROR([The Windows SDK not found, check the installation])
+                fi
+            fi
+            return
+        fi
+        ;;
+    esac
+}
+
+find_winsdk()
+{
+    # Return value: From find_winsdk_version
+
+    unset winsdktest
+
+    for ver in $WINDOWS_SDK_ACCEPTABLE_VERSIONS; do
+        find_winsdk_version $ver
+        if test -n "$winsdktest"; then
+            return
+        fi
+    done
+}
+
+find_msms()
+{
+    # Return value: $msmdir
+    local version="$1"
+
+    AC_MSG_CHECKING([for MSVC $version merge modules directory])
+    local my_msm_file="Microsoft_VC${version}_CRT_x86.msm"
+    local my_msm_dir
+
+    echo "$as_me:$LINENO: searching for $my_msm_file" >&5
+
+    msmdir=
+    case "$VCVER" in
+    16.0 | 17.0 | 17.9)
+        for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+            my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
+            echo "$as_me:$LINENO: looking for $my_msm_dir${my_msm_file}])" >&5
+            if test -e "$my_msm_dir${my_msm_file}"; then
+                msmdir=$my_msm_dir
+            fi
+        done
+        ;;
+    esac
+
+    if test -n "$msmdir"; then
+        msmdir=`cygpath -m "$msmdir"`
+        AC_MSG_RESULT([$msmdir])
+    else
+        if test "$ENABLE_RELEASE_BUILD" = "TRUE" ; then
+            AC_MSG_FAILURE([not found])
+        else
+            AC_MSG_WARN([not found (check config.log)])
+            add_warning "MSM ${my_msm_file} not found"
+        fi
+    fi
+}
+
+find_msvc_x64_dlls()
+{
+    # Return value: $msvcdllpath, $msvcdlls
+
+    AC_MSG_CHECKING([for MSVC x64 DLL path])
+
+    dnl Order crtver in increasing order. Then check the directories returned by
+    dnl ls in an inner loop; assuming they are also ordered in increasing order,
+    dnl the result will be the highest CRT version found in the highest directory.
+
+    msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
+    case "$VCVER" in
+    16.0 | 17.0 | 17.9)
+        for crtver in 141 142 143; do
+            for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+                echo "$as_me:$LINENO: testing $VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT" >&5
+                if test -d "$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT"; then
+                    msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT"
+                fi
+            done
+        done
+        ;;
+    esac
+    AC_MSG_RESULT([$msvcdllpath])
+    AC_MSG_CHECKING([for MSVC x64 DLLs])
+    msvcdlls="msvcp140.dll vcruntime140.dll"
+    for dll in $msvcdlls; do
+        if ! test -f "$msvcdllpath/$dll"; then
+            AC_MSG_FAILURE([missing $dll])
+        fi
+    done
+    AC_MSG_RESULT([found all ($msvcdlls)])
+}
+
+dnl =========================================
+dnl Check for the Windows  SDK.
+dnl =========================================
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([for Windows SDK])
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        find_winsdk
+        WINDOWS_SDK_HOME=$winsdktest
+
+        # normalize if found
+        if test -n "$WINDOWS_SDK_HOME"; then
+            WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
+            WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
+        fi
+
+        WINDOWS_SDK_LIB_SUBDIR=$winsdklibsubdir
+    fi
+
+    if test -n "$WINDOWS_SDK_HOME"; then
+        # Remove a possible trailing backslash
+        WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
+
+        if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
+            have_windows_sdk_headers=yes
+        elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
+            have_windows_sdk_headers=yes
+        elif test -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/usp10.h"; then
+            have_windows_sdk_headers=yes
+        else
+            have_windows_sdk_headers=no
+        fi
+
+        if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
+            have_windows_sdk_libs=yes
+        elif test -f "$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/user32.lib"; then
+            have_windows_sdk_libs=yes
+        else
+            have_windows_sdk_libs=no
+        fi
+
+        if test $have_windows_sdk_headers = no -o $have_windows_sdk_libs = no; then
+            AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
+the  Windows SDK are installed.])
+        fi
+    fi
+
+    if test -z "$WINDOWS_SDK_HOME"; then
+        AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway!?])
+    elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=80
+        AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
+    elif echo $WINDOWS_SDK_HOME | grep "8.1" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=81
+        AC_MSG_RESULT([found Windows SDK 8.1 ($WINDOWS_SDK_HOME)])
+    elif echo $WINDOWS_SDK_HOME | grep "/10" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=10
+        AC_MSG_RESULT([found Windows SDK 10.0 ($WINDOWS_SDK_HOME)])
+    else
+        AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
+    fi
+    PathFormat "$WINDOWS_SDK_HOME"
+    WINDOWS_SDK_HOME="$formatted_path"
+    WINDOWS_SDK_HOME_unix="$formatted_path_unix"
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/Include"
+        if test -d "$WINDOWS_SDK_HOME/include/um"; then
+            SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
+        elif test -d "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um"; then
+            SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/shared"
+        fi
+    fi
+
+    dnl TODO: solenv/bin/modules/installer/windows/msiglobal.pm wants to use a
+    dnl WiLangId.vbs that is included only in some SDKs (e.g., included in v7.1
+    dnl but not in v8.0), so allow this to be overridden with a
+    dnl WINDOWS_SDK_WILANGID for now; a full-blown --with-windows-sdk-wilangid
+    dnl and configuration error if no WiLangId.vbs is found would arguably be
+    dnl better, but I do not know under which conditions exactly it is needed by
+    dnl msiglobal.pm:
+    if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
+        WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
+        WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WIN_BUILD_ARCH}/WiLangId.vbs"
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WIN_BUILD_ARCH/WiLangId.vbs
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WIN_BUILD_ARCH/WiLangId.vbs")
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+    fi
+    if test -n "$with_lang" -a "$with_lang" != "en-US"; then
+        if test -n "$with_package_format" -a "$with_package_format" != no; then
+            for i in "$with_package_format"; do
+                if test "$i" = "msi"; then
+                    if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+                        AC_MSG_ERROR([WiLangId.vbs not found - building translated packages will fail])
+                    fi
+                fi
+            done
+        fi
+    fi
+fi
+AC_SUBST(WINDOWS_SDK_HOME)
+AC_SUBST(WINDOWS_SDK_LIB_SUBDIR)
+AC_SUBST(WINDOWS_SDK_VERSION)
+AC_SUBST(WINDOWS_SDK_WILANGID)
+
+if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+    dnl Check midl.exe; this being the first check for a tool in the SDK bin
+    dnl dir, it also determines that dir's path w/o an arch segment if any,
+    dnl WINDOWS_SDK_BINDIR_NO_ARCH:
+    AC_MSG_CHECKING([for midl.exe])
+
+    find_winsdk
+    PathFormat "$winsdktest"
+    winsdktest_unix="$formatted_path_unix"
+
+    if test -n "$winsdkbinsubdir" \
+        -a -f "$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/midl.exe"
+    then
+        MIDL_PATH=$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin/$winsdkbinsubdir
+    elif test -f "$winsdktest_unix/Bin/$WIN_BUILD_ARCH/midl.exe"; then
+        MIDL_PATH=$winsdktest/Bin/$WIN_BUILD_ARCH
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin
+    elif test -f "$winsdktest_unix/Bin/midl.exe"; then
+        MIDL_PATH=$winsdktest/Bin
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin
+    fi
+    PathFormat "$MIDL_PATH"
+    if test ! -f "$formatted_path_unix/midl.exe"; then
+        AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WIN_BUILD_ARCH, Windows SDK installation broken?])
+    else
+        AC_MSG_RESULT([$MIDL_PATH/midl.exe])
+    fi
+
+    # Convert to posix path with 8.3 filename restrictions ( No spaces )
+    MIDL_PATH=`win_short_path_for_make "$MIDL_PATH"`
+
+    if test -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msitran.exe"; then :
+    elif test -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msitran.exe"; then :
+    elif test -f "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
+    else
+        AC_MSG_ERROR([Some (all?) Windows Installer tools in the Windows SDK are missing, please install.])
+    fi
+
+    dnl Check csc.exe
+    AC_MSG_CHECKING([for csc.exe])
+    find_csc
+    PathFormat "$csctest"
+    csctest_unix="$formatted_path_unix"
+    if test -f "$csctest_unix/csc.exe"; then
+        CSC_PATH="$csctest"
+    fi
+    if test ! -f "$csctest_unix/csc.exe"; then
+        AC_MSG_ERROR([csc.exe not found as $CSC_PATH/csc.exe])
+    else
+        AC_MSG_RESULT([$CSC_PATH/csc.exe])
+    fi
+
+    CSC_PATH=`win_short_path_for_make "$CSC_PATH"`
+
+    dnl Check al.exe
+    AC_MSG_CHECKING([for al.exe])
+    if test -n "$winsdkbinsubdir" \
+        -a -f "$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/al.exe"
+    then
+        AL_PATH="$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH"
+    elif test -f "$winsdktest_unix/Bin/$WIN_BUILD_ARCH/al.exe"; then
+        AL_PATH="$winsdktest/Bin/$WIN_BUILD_ARCH"
+    elif test -f "$winsdktest_unix/Bin/al.exe"; then
+        AL_PATH="$winsdktest/Bin"
+    fi
+
+    if test -z "$AL_PATH"; then
+        find_al
+        PathFormat "$altest"
+        altest_unix="$formatted_path_unix"
+        if test -f "$altest_unix/bin/al.exe"; then
+            AL_PATH="$altest/bin"
+        elif test -f "$altest_unix/al.exe"; then
+            AL_PATH="$altest"
+        fi
+    fi
+    PathFormat "$AL_PATH"
+    if test ! -f "$formatted_path_unix/al.exe"; then
+        AC_MSG_ERROR([al.exe not found as $AL_PATH/al.exe])
+    else
+        AC_MSG_RESULT([$AL_PATH/al.exe])
+    fi
+
+    AL_PATH=`win_short_path_for_make "$AL_PATH"`
+
+    dnl Check mscoree.lib / .NET Framework dir
+    AC_MSG_CHECKING(.NET Framework)
+    find_dotnetsdk
+    PathFormat "$frametest"
+    frametest="$formatted_path_unix"
+    if test -f "$frametest/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+        DOTNET_FRAMEWORK_HOME="$frametest"
+    else
+        if test -f "$winsdktest_unix/lib/mscoree.lib" -o -f "$winsdktest_unix/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+            DOTNET_FRAMEWORK_HOME="$winsdktest"
+        fi
+    fi
+    PathFormat "$DOTNET_FRAMEWORK_HOME"
+    if test ! -f "$formatted_path_unix/lib/mscoree.lib" -a ! -f "$formatted_path_unix/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib" -a ! -f "$formatted_path_unix/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+        AC_MSG_ERROR([mscoree.lib not found])
+    fi
+    AC_MSG_RESULT([found: $DOTNET_FRAMEWORK_HOME])
+
+    PathFormat "$MIDL_PATH"
+    MIDL_PATH="$formatted_path"
+
+    PathFormat "$AL_PATH"
+    AL_PATH="$formatted_path"
+
+    PathFormat "$DOTNET_FRAMEWORK_HOME"
+    DOTNET_FRAMEWORK_HOME="$formatted_path"
+
+    PathFormat "$CSC_PATH"
+    CSC_PATH="$formatted_path"
+fi
+
+dnl ===================================================================
+dnl Testing for C++ compiler and version...
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+    # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
+    save_CXXFLAGS=$CXXFLAGS
+    AC_PROG_CXX
+    CXXFLAGS=$save_CXXFLAGS
+    if test -z "$CXX_BASE"; then
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+fi
+
+dnl check for GNU C++ compiler version
+if test "$GXX" = "yes" -a -z "$COM_IS_CLANG"; then
+    AC_MSG_CHECKING([the GNU C++ compiler version])
+
+    _gpp_version=`$CXX -dumpversion`
+    _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
+
+    if test "$_gpp_majmin" -lt "700"; then
+        AC_MSG_ERROR([You need to use GNU C++ compiler version >= 7.0 to build LibreOffice, you have $_gpp_version.])
+    else
+        AC_MSG_RESULT([ok (g++ $_gpp_version)])
+    fi
+
+    dnl see https://issuetracker.google.com/issues/36962819
+        glibcxx_threads=no
+        AC_LANG_PUSH([C++])
+        AC_REQUIRE_CPP
+        AC_MSG_CHECKING([whether $CXX_BASE is broken with boost.thread])
+        AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+            #include <bits/c++config.h>]],[[
+            #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
+            && !defined(_GLIBCXX__PTHREADS) \
+            && !defined(_GLIBCXX_HAS_GTHREADS)
+            choke me
+            #endif
+        ]])],[AC_MSG_RESULT([yes])
+        glibcxx_threads=yes],[AC_MSG_RESULT([no])])
+        AC_LANG_POP([C++])
+        if test $glibcxx_threads = yes; then
+            BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
+        fi
+fi
+AC_SUBST(BOOST_CXXFLAGS)
+
+#
+# prefx CXX with ccache if needed
+#
+if test "$CCACHE" != ""; then
+    AC_MSG_CHECKING([whether $CXX_BASE is already ccached])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+    # msvc does not fail on unknown options, check stdout
+    if test "$COM" = MSC; then
+        CXXFLAGS="$CXXFLAGS -nologo"
+    fi
+    save_ac_cxx_werror_flag=$ac_cxx_werror_flag
+    ac_cxx_werror_flag=yes
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        CXX="$CCACHE $CXX"
+        CXX_BASE="ccache $CXX_BASE"
+        AC_MSG_RESULT([no])
+    fi
+    CXXFLAGS=$save_CXXFLAGS
+    ac_cxx_werror_flag=$save_ac_cxx_werror_flag
+    AC_LANG_POP([C++])
+fi
+
+dnl ===================================================================
+dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+    AC_PROG_CXXCPP
+
+    dnl Check whether there's a C pre-processor.
+    AC_PROG_CPP
+fi
+
+
+dnl ===================================================================
+dnl Find integral type sizes and alignments
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+
+    AC_CHECK_SIZEOF(long)
+    AC_CHECK_SIZEOF(short)
+    AC_CHECK_SIZEOF(int)
+    AC_CHECK_SIZEOF(long long)
+    AC_CHECK_SIZEOF(double)
+    AC_CHECK_SIZEOF(void*)
+    AC_CHECK_SIZEOF(size_t)
+
+    SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
+    SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
+    SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
+    SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
+    SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
+    SIZEOF_SIZE_T=$ac_cv_sizeof_size_t
+
+    dnl Allow build without AC_CHECK_ALIGNOF, grrr
+    m4_pattern_allow([AC_CHECK_ALIGNOF])
+    m4_ifdef([AC_CHECK_ALIGNOF],
+        [
+            AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
+        ],
+        [
+            case "$_os-$host_cpu" in
+            Linux-i686)
+                test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
+                test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
+                test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
+                test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
+                ;;
+            Linux-x86_64)
+                test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
+                test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
+                test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
+                test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
+                ;;
+            *)
+                if test -z "$ac_cv_alignof_short" -o \
+                        -z "$ac_cv_alignof_int" -o \
+                        -z "$ac_cv_alignof_long" -o \
+                        -z "$ac_cv_alignof_double"; then
+                   AC_MSG_ERROR([Your Autoconf doesn't have [AC_][CHECK_ALIGNOF]. You need to set the environment variables ac_cv_alignof_short, ac_cv_alignof_int, ac_cv_alignof_long and ac_cv_alignof_double.])
+                fi
+                ;;
+            esac
+        ])
+
+    SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
+    SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
+    if test $ac_cv_sizeof_long -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
+    elif test $ac_cv_sizeof_double -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
+    else
+        AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
+    fi
+
+    dnl Check for large file support
+    AC_SYS_LARGEFILE
+    if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
+        LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+    fi
+    if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
+        LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
+    fi
+else
+    # Hardcode for MSVC
+    SAL_TYPES_SIZEOFSHORT=2
+    SAL_TYPES_SIZEOFINT=4
+    SAL_TYPES_SIZEOFLONG=4
+    SAL_TYPES_SIZEOFLONGLONG=8
+    if test $WIN_HOST_BITS -eq 32; then
+        SAL_TYPES_SIZEOFPOINTER=4
+        SIZEOF_SIZE_T=4
+    else
+        SAL_TYPES_SIZEOFPOINTER=8
+        SIZEOF_SIZE_T=8
+    fi
+    SAL_TYPES_ALIGNMENT2=2
+    SAL_TYPES_ALIGNMENT4=4
+    SAL_TYPES_ALIGNMENT8=8
+    LFS_CFLAGS=''
+fi
+AC_SUBST(LFS_CFLAGS)
+AC_SUBST(SIZEOF_SIZE_T)
+
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
+
+dnl Calc jumbo sheets (1m+ rows) depend on 64 bit tools::Long .
+AC_MSG_CHECKING([whether jumbo sheets are supported])
+if test "$_os" != "WINNT"; then
+    if test $SAL_TYPES_SIZEOFLONG -gt 4; then
+        AC_MSG_RESULT([yes])
+        ENABLE_JUMBO_SHEETS=TRUE
+        AC_DEFINE(HAVE_FEATURE_JUMBO_SHEETS)
+    else
+        AC_MSG_RESULT([no])
+    fi
+else
+    if test $WIN_HOST_BITS -gt 32; then
+        # 64bit windows is special-cased for tools::Long because long is 32bit
+        AC_MSG_RESULT([yes])
+        ENABLE_JUMBO_SHEETS=TRUE
+        AC_DEFINE(HAVE_FEATURE_JUMBO_SHEETS)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_JUMBO_SHEETS)
+
+dnl ===================================================================
+dnl Check whether to enable runtime optimizations
+dnl ===================================================================
+ENABLE_RUNTIME_OPTIMIZATIONS=
+AC_MSG_CHECKING([whether to enable runtime optimizations])
+if test -z "$enable_runtime_optimizations"; then
+    for i in $CC; do
+        case $i in
+        -fsanitize=*)
+            enable_runtime_optimizations=no
+            break
+            ;;
+        esac
+    done
+fi
+if test "$enable_runtime_optimizations" != no; then
+    ENABLE_RUNTIME_OPTIMIZATIONS=TRUE
+    AC_DEFINE(ENABLE_RUNTIME_OPTIMIZATIONS)
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_RUNTIME_OPTIMIZATIONS])
+
+dnl ===================================================================
+dnl Check if valgrind headers are available
+dnl ===================================================================
+ENABLE_VALGRIND=
+if test "$cross_compiling" != yes -a "$with_valgrind" != no; then
+    prev_cppflags=$CPPFLAGS
+    # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
+    # or where does it come from?
+    CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
+    AC_CHECK_HEADER([valgrind/valgrind.h],
+        [ENABLE_VALGRIND=TRUE])
+    CPPFLAGS=$prev_cppflags
+fi
+AC_SUBST([ENABLE_VALGRIND])
+if test -z "$ENABLE_VALGRIND"; then
+    if test "$with_valgrind" = yes; then
+        AC_MSG_ERROR([--with-valgrind specified but no Valgrind headers found])
+    fi
+    VALGRIND_CFLAGS=
+fi
+AC_SUBST([VALGRIND_CFLAGS])
+
+
+dnl ===================================================================
+dnl Check if SDT probes (for systemtap, gdb, dtrace) are available
+dnl ===================================================================
+
+# We need at least the sys/sdt.h include header.
+AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='TRUE'], [SDT_H_FOUND='FALSE'])
+if test "$SDT_H_FOUND" = "TRUE"; then
+    # Found sys/sdt.h header, now make sure the c++ compiler works.
+    # Old g++ versions had problems with probes in constructors/destructors.
+    AC_MSG_CHECKING([working sys/sdt.h and c++ support])
+    AC_LANG_PUSH([C++])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+    #include <sys/sdt.h>
+    class ProbeClass
+    {
+    private:
+      int& ref;
+      const char *name;
+
+    public:
+      ProbeClass(int& v, const char *n) : ref(v), name(n)
+      {
+        DTRACE_PROBE2(_test_, cons, name, ref);
+      }
+
+      void method(int min)
+      {
+        DTRACE_PROBE3(_test_, meth, name, ref, min);
+        ref -= min;
+      }
+
+      ~ProbeClass()
+      {
+        DTRACE_PROBE2(_test_, dest, name, ref);
+      }
+    };
+    ]],[[
+    int i = 64;
+    DTRACE_PROBE1(_test_, call, i);
+    ProbeClass inst = ProbeClass(i, "call");
+    inst.method(24);
+    ]])], [AC_MSG_RESULT([yes]); AC_DEFINE([USE_SDT_PROBES])],
+          [AC_MSG_RESULT([no, sdt.h or c++ compiler too old])])
+    AC_LANG_POP([C++])
+fi
+AC_CONFIG_HEADERS([config_host/config_probes.h])
+
+dnl ===================================================================
+dnl GCC features
+dnl ===================================================================
+HAVE_GCC_STACK_CLASH_PROTECTION=
+if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+    AC_MSG_CHECKING([whether $CC_BASE supports -fstack-clash-protection])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -fstack-clash-protection"
+    AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(, [[return 0;]])],
+        [AC_MSG_RESULT([yes]); HAVE_GCC_STACK_CLASH_PROTECTION=TRUE],
+        [AC_MSG_RESULT([no])])
+    CFLAGS=$save_CFLAGS
+
+    AC_MSG_CHECKING([whether $CC_BASE supports -mno-avx])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -mno-avx"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
+    CFLAGS=$save_CFLAGS
+    if test "$HAVE_GCC_AVX" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([whether $CC_BASE supports atomic functions])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+    int v = 0;
+    if (__sync_add_and_fetch(&v, 1) != 1 ||
+        __sync_sub_and_fetch(&v, 1) != 0)
+        return 1;
+    __sync_synchronize();
+    if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
+        v != 1)
+        return 1;
+    return 0;
+]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
+    if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_GCC_BUILTIN_ATOMIC)
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __base_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__base_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_BASE_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_allocate_exception in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_eh_globals in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__cxa_eh_globals); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_EH_GLOBALS],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exception in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTION],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_get_globals in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_get_globals(); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_GET_GLOBALS],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_current_exception_type in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_current_exception_type(); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_throw in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_THROW],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __si_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__si_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_SI_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __vmi_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__vmi_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_VMI_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+fi
+
+AC_SUBST(HAVE_GCC_AVX)
+AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
+AC_SUBST(HAVE_GCC_STACK_CLASH_PROTECTION)
+
+dnl ===================================================================
+dnl Identify the C++ library
+dnl ===================================================================
+
+AC_MSG_CHECKING([what the C++ library is])
+HAVE_LIBSTDCPP=
+HAVE_LIBCPP=
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef __GLIBCXX__
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=GLIBCXX
+     cpp_library_name="GNU libstdc++"
+     HAVE_LIBSTDCPP=TRUE
+    ],
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _LIBCPP_VERSION
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=LIBCPP
+     cpp_library_name="LLVM libc++"
+     AC_DEFINE([HAVE_LIBCPP])
+     HAVE_LIBCPP=TRUE
+    ],
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _MSC_VER
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=MSVCRT
+     cpp_library_name="Microsoft"
+    ],
+    AC_MSG_ERROR([Could not figure out what C++ library this is]))))
+AC_MSG_RESULT([$cpp_library_name])
+AC_LANG_POP([C++])
+AC_SUBST([HAVE_LIBSTDCPP])
+AC_SUBST([HAVE_LIBCPP])
+
+if test -z "${LIBCPP_DEBUG+x}" -a -z "$CROSS_COMPILING" -a -n "$HAVE_LIBCPP" -a -n "$ENABLE_DBGUTIL"
+then
+    # Libc++ has two levels of debug mode, assertions mode enabled with -D_LIBCPP_DEBUG=0,
+    # and actual debug mode enabled with -D_LIBCPP_DEBUG=1 (and starting with LLVM15
+    # assertions mode will be separate and controlled by -D_LIBCPP_ENABLE_ASSERTIONS=1,
+    # although there will be backwards compatibility).
+    # Debug mode is supported by libc++ only if built for it, e.g. Mac libc++ isn't,
+    # and there would be undefined references to debug functions.
+    # Moreover std::to_string() has a bug (https://reviews.llvm.org/D125184).
+    # So check if debug mode can be used and disable or downgrade it to assertions
+    # if needed.
+    AC_MSG_CHECKING([if libc++ has a usable debug mode])
+    AC_LANG_PUSH([C++])
+    libcpp_debug_links=
+    AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#define _LIBCPP_DEBUG 0 // only assertions
+#include <vector>
+int main()
+{
+    std::vector<int> v;
+    v.push_back( 1 );
+    return v[ 3 ];
+}
+]])], [libcpp_debug_links=1])
+    if test -n "$libcpp_debug_links"; then
+        # we can use at least assertions, check if debug mode works
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#define _LIBCPP_DEBUG 1 // debug mode
+#include <string>
+#include <vector>
+int foo(const std::vector<int>& v) { return *v.begin(); }
+int main()
+{
+    std::vector<int> v;
+    v.push_back( 1 );
+    std::string s = "xxxxxxxxxxxxxxxxxxxxxxxxx" + std::to_string(10);
+    return (foo(v) + s.size()) != 0 ? 0 : 1;
+}
+]])],
+        [AC_MSG_RESULT(yes)
+         LIBCPP_DEBUG=-D_LIBCPP_DEBUG=1
+        ],
+        [AC_MSG_RESULT(no, using only assertions)
+         LIBCPP_DEBUG=-D_LIBCPP_DEBUG=0
+        ]
+        )
+    else
+        AC_MSG_RESULT(no)
+    fi
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([LIBCPP_DEBUG])
+
+dnl ===================================================================
+dnl Check for gperf
+dnl ===================================================================
+AC_PATH_PROG(GPERF, gperf)
+if test -z "$GPERF"; then
+    AC_MSG_ERROR([gperf not found but needed. Install it.])
+fi
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GPERF=`cygpath -m $GPERF`
+fi
+AC_MSG_CHECKING([whether gperf is new enough])
+my_gperf_ver1=$($GPERF --version | head -n 1)
+my_gperf_ver2=${my_gperf_ver1#GNU gperf }
+my_gperf_ver3=$(printf %s "$my_gperf_ver2" | $AWK -F. '{ print $1*100+($2<100?$2:99) }')
+if test "$my_gperf_ver3" -ge 301; then
+    AC_MSG_RESULT([yes ($my_gperf_ver2)])
+else
+    AC_MSG_ERROR(["$my_gperf_ver1" is too old or unrecognized, must be at least gperf 3.1])
+fi
+AC_SUBST(GPERF)
+
+dnl ===================================================================
+dnl Check for system libcmis
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.6 >= 0.6.1],enabled)
+
+dnl ===================================================================
+dnl C++11
+dnl ===================================================================
+
+if test -z "${CXXFLAGS_CXX11+x}"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports C++20])
+    if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
+        if test "$with_latest_c__" = yes; then
+            CXXFLAGS_CXX11=-std:c++latest
+        else
+            CXXFLAGS_CXX11=-std:c++20
+        fi
+        CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus,preprocessor"
+    elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+        my_flags='-std=c++20 -std=c++2a'
+        if test "$with_latest_c__" = yes; then
+            my_flags="-std=c++26 -std=c++2c -std=c++23 -std=c++2b $my_flags"
+        fi
+        for flag in $my_flags; do
+            if test "$COM" = MSC; then
+                flag="-Xclang $flag"
+            fi
+            save_CXXFLAGS=$CXXFLAGS
+            CXXFLAGS="$CXXFLAGS $flag -Werror"
+            AC_LANG_PUSH([C++])
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+                #include <algorithm>
+                #include <functional>
+                #include <vector>
+
+                void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
+                    std::sort(v.begin(), v.end(), fn);
+                }
+                ]])],[CXXFLAGS_CXX11=$flag])
+            AC_LANG_POP([C++])
+            CXXFLAGS=$save_CXXFLAGS
+            if test -n "$CXXFLAGS_CXX11"; then
+                break
+            fi
+        done
+    fi
+    if test -n "$CXXFLAGS_CXX11"; then
+        AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
+    else
+        AC_MSG_ERROR(no)
+    fi
+fi
+AC_SUBST(CXXFLAGS_CXX11)
+
+if test "$GCC" = "yes"; then
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+    CHECK_L_ATOMIC
+    CXXFLAGS=$save_CXXFLAGS
+    AC_SUBST(ATOMIC_LIB)
+fi
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++11 without Language Defect 757])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_LANG_PUSH([C++])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stddef.h>
+
+template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
+
+namespace
+{
+        struct b
+        {
+                int i;
+                int j;
+        };
+}
+]], [[
+struct a
+{
+        int i;
+        int j;
+};
+a thinga[]={{0,0}, {1,1}};
+b thingb[]={{0,0}, {1,1}};
+size_t i = sizeof(sal_n_array_size(thinga));
+size_t j = sizeof(sal_n_array_size(thingb));
+return !(i != 0 && j != 0);
+]])
+    ], [ AC_MSG_RESULT(yes) ],
+    [ AC_MSG_ERROR(no)])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+
+HAVE_GCC_FNO_SIZED_DEALLOCATION=
+if test "$GCC" = yes; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -fno-sized-deallocation])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -fno-sized-deallocation"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM()],[HAVE_GCC_FNO_SIZED_DEALLOCATION=TRUE])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    if test "$HAVE_GCC_FNO_SIZED_DEALLOCATION" = TRUE; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++2a constinit sorted vectors])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <algorithm>
+        #include <initializer_list>
+        #include <vector>
+        template<typename T> class S {
+        private:
+            std::vector<T> v_;
+        public:
+            constexpr S(std::initializer_list<T> i): v_(i) { std::sort(v_.begin(), v_.end()); }
+        };
+        constinit S<int> s{3, 2, 1};
+    ])], [
+        AC_DEFINE([HAVE_CPP_CONSTINIT_SORTED_VECTOR],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether $CXX_BASE implements C++ DR P1155R3])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        struct S1 { S1(S1 &&); };
+        struct S2: S1 {};
+        S1 f(S2 s) { return s; }
+    ])], [
+        AC_DEFINE([HAVE_P1155R3],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++20 std::atomic_ref])
+HAVE_CXX20_ATOMIC_REF=
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <atomic>
+        int x;
+        std::atomic_ref<int> y(x);
+    ])], [
+        HAVE_CXX20_ATOMIC_REF=TRUE
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+AC_SUBST([HAVE_CXX20_ATOMIC_REF])
+
+dnl Supported since GCC 9 and Clang 10 (which each also started to support -Wdeprecated-copy, but
+dnl which is included in -Wextra anyway):
+HAVE_WDEPRECATED_COPY_DTOR=
+if test "$GCC" = yes; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -Wdeprecated-copy-dtor])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -Werror -Wdeprecated-copy-dtor"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+            HAVE_WDEPRECATED_COPY_DTOR=TRUE
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_WDEPRECATED_COPY_DTOR])
+
+dnl At least GCC 8.2 with -O2 (i.e., --enable-optimized) causes a false-positive -Wmaybe-
+dnl uninitialized warning for code like
+dnl
+dnl   OString f();
+dnl   boost::optional<OString> * g(bool b) {
+dnl       boost::optional<OString> o;
+dnl       if (b) o = f();
+dnl       return new boost::optional<OString>(o);
+dnl   }
+dnl
+dnl (as is e.g. present, in a slightly more elaborate form, in
+dnl librdf_TypeConverter::extractNode_NoLock in unoxml/source/rdf/librdf_repository.cxx); the below
+dnl code is meant to be a faithfully stripped-down and self-contained version of the above code:
+HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=
+if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then
+    AC_MSG_CHECKING([whether $CXX_BASE might report false -Werror=maybe-uninitialized])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror -Wmaybe-uninitialized"
+    if test "$ENABLE_OPTIMIZED" = TRUE; then
+        CXXFLAGS="$CXXFLAGS -O2"
+    else
+        CXXFLAGS="$CXXFLAGS -O0"
+    fi
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            #include <new>
+            void f1(int);
+            struct S1 {
+                ~S1() { f1(n); }
+                int n = 0;
+            };
+            struct S2 {
+                S2() {}
+                S2(S2 const & s) { if (s.init) set(*reinterpret_cast<S1 const *>(s.stg)); }
+                ~S2() { if (init) reinterpret_cast<S1 *>(stg)->S1::~S1(); }
+                void set(S1 s) {
+                    new (stg) S1(s);
+                    init = true;
+                }
+                bool init = false;
+                char stg[sizeof (S1)];
+            } ;
+            S1 f2();
+            S2 * f3(bool b) {
+                S2 o;
+                if (b) o.set(f2());
+                return new S2(o);
+            }
+        ]])], [AC_MSG_RESULT([no])], [
+            HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=TRUE
+            AC_MSG_RESULT([yes])
+        ])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED])
+
+dnl Check for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c5> "[8/9/10/11 Regression]
+dnl -Wstringop-overflow false positive due to using MEM_REF type of &MEM" (fixed in GCC 11), which
+dnl hits us e.g. with GCC 10 and --enable-optimized at
+dnl
+dnl   In file included from include/rtl/string.hxx:49,
+dnl                    from include/rtl/ustring.hxx:43,
+dnl                    from include/osl/file.hxx:35,
+dnl                    from include/codemaker/global.hxx:28,
+dnl                    from include/codemaker/options.hxx:23,
+dnl                    from codemaker/source/commoncpp/commoncpp.cxx:24:
+dnl   In function ‘char* rtl::addDataHelper(char*, const char*, std::size_t)’,
+dnl       inlined from ‘static char* rtl::ToStringHelper<const char [N]>::addData(char*, const char*) [with long unsigned int N = 3]’ at include/rtl/stringconcat.hxx:147:85,
+dnl       inlined from ‘char* rtl::OStringConcat<T1, T2>::addData(char*) const [with T1 = const char [3]; T2 = rtl::OString]’ at include/rtl/stringconcat.hxx:226:103,
+dnl       inlined from ‘rtl::OStringBuffer& rtl::OStringBuffer::append(rtl::OStringConcat<T1, T2>&&) [with T1 = const char [3]; T2 = rtl::OString]’ at include/rtl/strbuf.hxx:599:30,
+dnl       inlined from ‘rtl::OString codemaker::cpp::scopedCppName(const rtl::OString&, bool)’ at codemaker/source/commoncpp/commoncpp.cxx:53:55:
+dnl   include/rtl/stringconcat.hxx:78:15: error: writing 2 bytes into a region of size 1 [-Werror=stringop-overflow=]
+dnl      78 |         memcpy( buffer, data, length );
+dnl         |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
+HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW=
+if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then
+    AC_MSG_CHECKING([whether $CXX_BASE might report false -Werror=stringop-overflow=])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror -Wstringop-overflow"
+    if test "$ENABLE_OPTIMIZED" = TRUE; then
+        CXXFLAGS="$CXXFLAGS -O2"
+    else
+        CXXFLAGS="$CXXFLAGS -O0"
+    fi
+    dnl Test code taken from <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c0>:
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            void fill(char const * begin, char const * end, char c);
+            struct q {
+                char ids[4];
+                char username[6];
+            };
+            void test(q & c) {
+                fill(c.ids, c.ids + sizeof(c.ids), '\0');
+                __builtin_strncpy(c.username, "root", sizeof(c.username));
+            }
+        ]])], [AC_MSG_RESULT([no])], [
+            HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW=TRUE
+            AC_MSG_RESULT([yes])
+        ])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW])
+
+HAVE_DLLEXPORTINLINES=
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -Zc:dllexportInlines-])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -Werror -Zc:dllexportInlines-"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+            HAVE_DLLEXPORTINLINES=TRUE
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_DLLEXPORTINLINES])
+
+dnl ===================================================================
+dnl CPU Intrinsics support - SSE, AVX
+dnl ===================================================================
+
+CXXFLAGS_INTRINSICS_SSE2=
+CXXFLAGS_INTRINSICS_SSSE3=
+CXXFLAGS_INTRINSICS_SSE41=
+CXXFLAGS_INTRINSICS_SSE42=
+CXXFLAGS_INTRINSICS_AVX=
+CXXFLAGS_INTRINSICS_AVX2=
+CXXFLAGS_INTRINSICS_AVX512=
+CXXFLAGS_INTRINSICS_AVX512F=
+CXXFLAGS_INTRINSICS_F16C=
+CXXFLAGS_INTRINSICS_FMA=
+
+if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+    # GCC, Clang or Clang-cl (clang-cl + MSVC's -arch options don't work well together)
+    flag_sse2=-msse2
+    flag_ssse3=-mssse3
+    flag_sse41=-msse4.1
+    flag_sse42=-msse4.2
+    flag_avx=-mavx
+    flag_avx2=-mavx2
+    flag_avx512="-mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd"
+    flag_avx512f=-mavx512f
+    flag_f16c=-mf16c
+    flag_fma=-mfma
+else
+    # With MSVC using -arch is in fact not necessary for being able
+    # to use CPU intrinsics, code using AVX512F intrinsics will compile
+    # even if compiled with -arch:AVX, the -arch option really only affects
+    # instructions generated for C/C++ code.
+    # So use the matching same (or lower) -arch options, but only in order
+    # to generate the best matching instructions for the C++ code surrounding
+    # the intrinsics.
+    # SSE2 is the default for x86/x64, so no need to specify the option.
+    flag_sse2=
+    # No specific options for these, use the next lower.
+    flag_ssse3="$flag_sse2"
+    flag_sse41="$flag_sse2"
+    flag_sse42="$flag_sse2"
+    flag_avx=-arch:AVX
+    flag_avx2=-arch:AVX2
+    flag_avx512=-arch:AVX512
+    # Using -arch:AVX512 would enable more than just AVX512F, so use only AVX2.
+    flag_avx512f=-arch:AVX2
+    # No MSVC options for these.
+    flag_f16c="$flag_sse2"
+    flag_fma="$flag_sse2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <emmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_xor_si128 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse2=yes],
+    [can_compile_sse2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse2}])
+if test "${can_compile_sse2}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE2="$flag_sse2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSSE3 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_ssse3"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <tmmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_maddubs_epi16 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_ssse3=yes],
+    [can_compile_ssse3=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_ssse3}])
+if test "${can_compile_ssse3}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSSE3="$flag_ssse3"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE4.1 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse41"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <smmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_cmpeq_epi64 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse41=yes],
+    [can_compile_sse41=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse41}])
+if test "${can_compile_sse41}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE41="$flag_sse41"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE4.2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse42"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <nmmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_cmpgt_epi64 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse42=yes],
+    [can_compile_sse42=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse42}])
+if test "${can_compile_sse42}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE42="$flag_sse42"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c;
+        c = _mm256_xor_ps(a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_avx=yes],
+    [can_compile_avx=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx}])
+if test "${can_compile_avx}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX="$flag_avx"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
+        c = _mm256_maddubs_epi16(a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_avx2=yes],
+    [can_compile_avx2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx2}])
+if test "${can_compile_avx2}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX2="$flag_avx2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX512 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx512"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m512i a = _mm512_loadu_si512(0);
+        __m512d v1 = _mm512_load_pd(0);
+        // https://gcc.gnu.org/git/?p=gcc.git;a=commit;f=gcc/config/i386/avx512fintrin.h;h=23bce99cbe7016a04e14c2163ed3fe6a5a64f4e2
+        __m512d v2 = _mm512_abs_pd(v1);
+        return 0;
+    }
+    ])],
+    [can_compile_avx512=yes],
+    [can_compile_avx512=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx512}])
+if test "${can_compile_avx512}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX512="$flag_avx512"
+    CXXFLAGS_INTRINSICS_AVX512F="$flag_avx512f"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile F16C intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_f16c"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0);
+        __m128 c;
+        c = _mm_cvtph_ps(a);
+        return 0;
+    }
+    ])],
+    [can_compile_f16c=yes],
+    [can_compile_f16c=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_f16c}])
+if test "${can_compile_f16c}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_F16C="$flag_f16c"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile FMA intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_fma"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c = _mm256_set1_ps (0.0f), d;
+        d = _mm256_fmadd_ps(a, b, c);
+        return 0;
+    }
+    ])],
+    [can_compile_fma=yes],
+    [can_compile_fma=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_fma}])
+if test "${can_compile_fma}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_FMA="$flag_fma"
+fi
+
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE2])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSSE3])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE41])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE42])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX2])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX512])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX512F])
+AC_SUBST([CXXFLAGS_INTRINSICS_F16C])
+AC_SUBST([CXXFLAGS_INTRINSICS_FMA])
+
+dnl ===================================================================
+dnl system stl sanity tests
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+
+    AC_LANG_PUSH([C++])
+
+    save_CPPFLAGS="$CPPFLAGS"
+    if test -n "$MACOSX_SDK_PATH"; then
+        CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
+    fi
+
+    # Assume visibility is not broken with libc++. The below test is very much designed for libstdc++
+    # only.
+    if test "$CPP_LIBRARY" = GLIBCXX; then
+        dnl gcc#19664, gcc#22482, rhbz#162935
+        AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
+        AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
+        AC_MSG_RESULT([$stlvisok])
+        if test "$stlvisok" = "no"; then
+            AC_MSG_ERROR([Your libstdc++ headers are not visibility safe. This is no longer supported.])
+        fi
+    fi
+
+    # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
+    # when we don't make any dynamic libraries?
+    if test "$DISABLE_DYNLOADING" = ""; then
+        AC_MSG_CHECKING([if $CXX_BASE is -fvisibility-inlines-hidden safe (Clang bug 11250)])
+        cat > conftestlib1.cc <<_ACEOF
+template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
+struct S2: S1<int> { virtual ~S2(); };
+S2::~S2() {}
+_ACEOF
+        cat > conftestlib2.cc <<_ACEOF
+template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
+struct S2: S1<int> { virtual ~S2(); };
+struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
+_ACEOF
+        gccvisinlineshiddenok=yes
+        if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
+            gccvisinlineshiddenok=no
+        else
+            dnl At least Clang -fsanitize=address and -fsanitize=undefined are
+            dnl known to not work with -z defs (unsetting which makes the test
+            dnl moot, though):
+            my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
+            if test "$COM_IS_CLANG" = TRUE; then
+                for i in $CXX $CXXFLAGS; do
+                    case $i in
+                    -fsanitize=*)
+                        my_linkflagsnoundefs=
+                        break
+                        ;;
+                    esac
+                done
+            fi
+            if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then
+                gccvisinlineshiddenok=no
+            fi
+        fi
+
+        rm -fr libconftest*
+        AC_MSG_RESULT([$gccvisinlineshiddenok])
+        if test "$gccvisinlineshiddenok" = "no"; then
+            AC_MSG_ERROR([Your gcc/clang is not -fvisibility-inlines-hidden safe. This is no longer supported.])
+        fi
+    fi
+
+   AC_MSG_CHECKING([if $CXX_BASE has a visibility bug with class-level attributes (GCC bug 26905)])
+    cat >visibility.cxx <<_ACEOF
+#pragma GCC visibility push(hidden)
+struct __attribute__ ((visibility ("default"))) TestStruct {
+  static void Init();
+};
+__attribute__ ((visibility ("default"))) void TestFunc() {
+  TestStruct::Init();
+}
+_ACEOF
+    if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx; then
+        gccvisbroken=yes
+    else
+        case "$host_cpu" in
+        i?86|x86_64)
+            if test "$_os" = "Darwin" -o "$_os" = "iOS"; then
+                gccvisbroken=no
+            else
+                if $EGREP -q '@PLT|@GOT' visibility.s || test "$ENABLE_LTO" = "TRUE"; then
+                    gccvisbroken=no
+                else
+                    gccvisbroken=yes
+                fi
+            fi
+            ;;
+        *)
+            gccvisbroken=no
+            ;;
+        esac
+    fi
+    rm -f visibility.s visibility.cxx
+
+    AC_MSG_RESULT([$gccvisbroken])
+    if test "$gccvisbroken" = "yes"; then
+        AC_MSG_ERROR([Your gcc is not -fvisibility=hidden safe. This is no longer supported.])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+
+    AC_MSG_CHECKING([if CET endbranch is recognized])
+cat > endbr.s <<_ACEOF
+endbr32
+_ACEOF
+    HAVE_ASM_END_BRANCH_INS_SUPPORT=
+    if $CXX -c endbr.s -o endbr.o >/dev/null 2>&5; then
+        AC_MSG_RESULT([yes])
+        HAVE_ASM_END_BRANCH_INS_SUPPORT=TRUE
+    else
+        AC_MSG_RESULT([no])
+    fi
+    rm -f endbr.s endbr.o
+    AC_SUBST(HAVE_ASM_END_BRANCH_INS_SUPPORT)
+
+    AC_LANG_POP([C++])
+fi
+
+dnl ===================================================================
+dnl  Clang++ tests
+dnl ===================================================================
+
+HAVE_GCC_FNO_ENFORCE_EH_SPECS=
+if test "$GCC" = "yes"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -fno-enforce-eh-specs])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
+
+dnl ===================================================================
+dnl Compiler plugins
+dnl ===================================================================
+
+COMPILER_PLUGINS=
+# currently only Clang
+
+if test "$COM_IS_CLANG" != "TRUE"; then
+    if test "$libo_fuzzed_enable_compiler_plugins" = yes -a "$enable_compiler_plugins" = yes; then
+        AC_MSG_NOTICE([Resetting --enable-compiler-plugins=no])
+        enable_compiler_plugins=no
+    fi
+fi
+
+COMPILER_PLUGINS_COM_IS_CLANG=
+if test "$COM_IS_CLANG" = "TRUE"; then
+    if test -n "$enable_compiler_plugins"; then
+        compiler_plugins="$enable_compiler_plugins"
+    elif test -n "$ENABLE_DBGUTIL"; then
+        compiler_plugins=test
+    else
+        compiler_plugins=no
+    fi
+    if test "$compiler_plugins" != no -a "$my_apple_clang" != yes; then
+        if test "$CLANGVER" -lt 120001; then
+            if test "$compiler_plugins" = yes; then
+                AC_MSG_ERROR(
+                    [Clang $CLANGVER is too old to build compiler plugins; need >= 12.0.1.])
+            else
+                compiler_plugins=no
+            fi
+        fi
+    fi
+    if test "$compiler_plugins" != "no"; then
+        dnl The prefix where Clang resides, override to where Clang resides if
+        dnl using a source build:
+        if test -z "$CLANGDIR"; then
+            CLANGDIR=$(dirname $(dirname $($CXX -print-prog-name=$(basename $(printf '%s\n' $CXX | grep clang | head -n 1)))))
+        fi
+        # Assume Clang is self-built, but allow overriding COMPILER_PLUGINS_CXX to the compiler Clang was built with.
+        if test -z "$COMPILER_PLUGINS_CXX"; then
+            COMPILER_PLUGINS_CXX=[$(echo $CXX | sed -e 's/-fsanitize=[^ ]*//g')]
+        fi
+        clangbindir=$CLANGDIR/bin
+        if test "$build_os" = "cygwin"; then
+            clangbindir=$(cygpath -u "$clangbindir")
+        fi
+        AC_PATH_PROG(LLVM_CONFIG, llvm-config,[],"$clangbindir" $PATH)
+        if test -n "$LLVM_CONFIG"; then
+            COMPILER_PLUGINS_CXXFLAGS=$($LLVM_CONFIG --cxxflags)
+            COMPILER_PLUGINS_LINKFLAGS=$($LLVM_CONFIG --ldflags --libs --system-libs | tr '\n' ' ')
+            if test -z "$CLANGLIBDIR"; then
+                CLANGLIBDIR=$($LLVM_CONFIG --libdir)
+            fi
+            # Try if clang is built from source (in which case its includes are not together with llvm includes).
+            # src-root is [llvm-toplevel-src-dir]/llvm, clang is [llvm-toplevel-src-dir]/clang
+            if $LLVM_CONFIG --src-root >/dev/null 2>&1; then
+                clangsrcdir=$(dirname $($LLVM_CONFIG --src-root))
+                if test -n "$clangsrcdir" -a -d "$clangsrcdir" -a -d "$clangsrcdir/clang/include"; then
+                    COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangsrcdir/clang/include"
+                fi
+            fi
+            # obj-root is [llvm-toplevel-obj-dir]/, clang is [llvm-toplevel-obj-dir]/tools/clang
+            clangobjdir=$($LLVM_CONFIG --obj-root)
+            if test -n "$clangobjdir" -a -d "$clangobjdir" -a -d "$clangobjdir/tools/clang/include"; then
+                COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangobjdir/tools/clang/include"
+            fi
+        fi
+        AC_MSG_NOTICE([compiler plugins compile flags: $COMPILER_PLUGINS_CXXFLAGS])
+        AC_LANG_PUSH([C++])
+        save_CXX=$CXX
+        save_CXXCPP=$CXXCPP
+        save_CPPFLAGS=$CPPFLAGS
+        save_CXXFLAGS=$CXXFLAGS
+        save_LDFLAGS=$LDFLAGS
+        save_LIBS=$LIBS
+        CXX=$COMPILER_PLUGINS_CXX
+        CXXCPP="$COMPILER_PLUGINS_CXX -E"
+        CPPFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
+        CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
+        AC_CHECK_HEADER(clang/Basic/SourceLocation.h,
+            [COMPILER_PLUGINS=TRUE],
+            [
+            if test "$compiler_plugins" = "yes"; then
+                AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
+            else
+                AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
+                add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
+            fi
+            ])
+        dnl TODO: Windows doesn't use LO_CLANG_SHARED_PLUGINS for now, see corresponding TODO
+        dnl comment in compilerplugins/Makefile-clang.mk:
+        if test -n "$COMPILER_PLUGINS" && test "$_os" != "WINNT"; then
+            LDFLAGS=""
+            AC_MSG_CHECKING([for clang libraries to use])
+            if test -z "$CLANGTOOLLIBS"; then
+                LIBS="-lclang-cpp $COMPILER_PLUGINS_LINKFLAGS"
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
+                        [[ clang::FullSourceLoc().dump(); ]])
+                ],[CLANGTOOLLIBS="$LIBS"],[])
+            fi
+            dnl If the above check for the combined -lclang-cpp failed, fall back to a hand-curated
+            dnl list of individual -lclang* (but note that that list can become outdated over time,
+            dnl see e.g. the since-reverted 5078591de9a0e65ca560a4f1913e90dfe95f66bf "CLANGTOOLLIBS
+            dnl needs to include -lclangSupport now"):
+            if test -z "$CLANGTOOLLIBS"; then
+                LIBS="-lclangTooling -lclangFrontend -lclangDriver -lclangParse -lclangSema -lclangEdit \
+ -lclangAnalysis -lclangAST -lclangLex -lclangSerialization -lclangBasic $COMPILER_PLUGINS_LINKFLAGS"
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
+                        [[ clang::FullSourceLoc().dump(); ]])
+                ],[CLANGTOOLLIBS="$LIBS"],[])
+            fi
+            AC_MSG_RESULT([$CLANGTOOLLIBS])
+            if test -z "$CLANGTOOLLIBS"; then
+                if test "$compiler_plugins" = "yes"; then
+                    AC_MSG_ERROR([Cannot find Clang libraries to build compiler plugins.])
+                else
+                    AC_MSG_WARN([Cannot find Clang libraries to build compiler plugins, plugins disabled])
+                    add_warning "Cannot find Clang libraries to build compiler plugins, plugins disabled."
+                fi
+                COMPILER_PLUGINS=
+            fi
+            if test -n "$COMPILER_PLUGINS"; then
+                if test -z "$CLANGSYSINCLUDE"; then
+                    if test -n "$LLVM_CONFIG"; then
+                        # Path to the clang system headers (no idea if there's a better way to get it).
+                        CLANGSYSINCLUDE=$($LLVM_CONFIG --libdir)/clang/$($LLVM_CONFIG --version | sed 's/git\|svn//')/include
+                    fi
+                fi
+            fi
+        fi
+        CXX=$save_CXX
+        CXXCPP=$save_CXXCPP
+        CPPFLAGS=$save_CPPFLAGS
+        CXXFLAGS=$save_CXXFLAGS
+        LDFLAGS=$save_LDFLAGS
+        LIBS="$save_LIBS"
+        AC_LANG_POP([C++])
+
+        AC_MSG_CHECKING([whether the compiler for building compilerplugins is actually Clang])
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            #ifndef __clang__
+            you lose
+            #endif
+            int foo=42;
+            ]])],
+            [AC_MSG_RESULT([yes])
+             COMPILER_PLUGINS_COM_IS_CLANG=TRUE],
+            [AC_MSG_RESULT([no])])
+        AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
+    fi
+else
+    if test "$enable_compiler_plugins" = "yes"; then
+        AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
+    fi
+fi
+COMPILER_PLUGINS_ANALYZER_PCH=
+if test "$enable_compiler_plugins_analyzer_pch" != no; then
+    COMPILER_PLUGINS_ANALYZER_PCH=TRUE
+fi
+AC_SUBST(COMPILER_PLUGINS)
+AC_SUBST(COMPILER_PLUGINS_ANALYZER_PCH)
+AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
+AC_SUBST(COMPILER_PLUGINS_CXX)
+AC_SUBST(COMPILER_PLUGINS_CXXFLAGS)
+AC_SUBST(COMPILER_PLUGINS_CXX_LINKFLAGS)
+AC_SUBST(COMPILER_PLUGINS_DEBUG)
+AC_SUBST(COMPILER_PLUGINS_TOOLING_ARGS)
+AC_SUBST(CLANGDIR)
+AC_SUBST(CLANGLIBDIR)
+AC_SUBST(CLANGTOOLLIBS)
+AC_SUBST(CLANGSYSINCLUDE)
+
+# Plugin to help linker.
+# Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
+# This makes --enable-lto build with clang work.
+AC_SUBST(LD_PLUGIN)
+
+AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
+AC_SUBST(HAVE_POSIX_FALLOCATE)
+
+JITC_PROCESSOR_TYPE=""
+if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
+    # IBMs JDK needs this...
+    JITC_PROCESSOR_TYPE=6
+    export JITC_PROCESSOR_TYPE
+fi
+AC_SUBST([JITC_PROCESSOR_TYPE])
+
+# Misc Windows Stuff
+AC_ARG_WITH(ucrt-dir,
+    AS_HELP_STRING([--with-ucrt-dir],
+        [path to the directory with the arch-specific MSU packages of the Windows Universal CRT redistributables
+        (MS KB 2999226) for packaging into the installsets (without those the target system needs to install
+        the UCRT or Visual C++ Runtimes manually). The directory must contain the following 6 files:
+            Windows6.1-KB2999226-x64.msu
+            Windows6.1-KB2999226-x86.msu
+            Windows8.1-KB2999226-x64.msu
+            Windows8.1-KB2999226-x86.msu
+            Windows8-RT-KB2999226-x64.msu
+            Windows8-RT-KB2999226-x86.msu
+        A zip archive including those files is available from Microsoft site:
+        https://www.microsoft.com/en-us/download/details.aspx?id=48234]),
+,)
+
+UCRT_REDISTDIR="$with_ucrt_dir"
+if test $_os = "WINNT"; then
+    find_msvc_x64_dlls
+    MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
+    MSVC_DLLS="$msvcdlls"
+    if echo "$msvcdllpath" | grep -q "VC143.CRT$"; then
+        with_redist=143
+    elif echo "$msvcdllpath" | grep -q "VC142.CRT$"; then
+        with_redist=142
+    elif echo "$msvcdllpath" | grep -q "VC141.CRT$"; then
+        with_redist=141
+    fi
+    for i in $PKGFORMAT; do
+        if test "$i" = msi; then
+            find_msms "$with_redist"
+            if test -n "$msmdir"; then
+                MSM_PATH=`win_short_path_for_make "$msmdir"`
+                SCPDEFS="$SCPDEFS -DWITH_VC_REDIST=$with_redist"
+            fi
+            break
+        fi
+    done
+
+    if test "$UCRT_REDISTDIR" = "no"; then
+        dnl explicitly disabled
+        UCRT_REDISTDIR=""
+    else
+        if ! test -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x86.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x86.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x86.msu"; then
+            UCRT_REDISTDIR=""
+            if test -n "$PKGFORMAT"; then
+               for i in $PKGFORMAT; do
+                   case "$i" in
+                   msi)
+                       AC_MSG_WARN([--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency])
+                       add_warning "--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency"
+                       ;;
+                   esac
+               done
+            fi
+        fi
+    fi
+fi
+
+AC_SUBST(UCRT_REDISTDIR)
+AC_SUBST(MSVC_DLL_PATH)
+AC_SUBST(MSVC_DLLS)
+AC_SUBST(MSM_PATH)
+
+
+dnl ===================================================================
+dnl Checks for Java
+dnl ===================================================================
+if test "$ENABLE_JAVA" != ""; then
+
+    # Windows-specific tests
+    if test "$build_os" = "cygwin"; then
+        if test -z "$with_jdk_home"; then
+            dnl See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-4D12-
+            dnl AB10-49F82F720027> section "Windows Registry Key Changes":
+            reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
+            if test -n "$regvalue"; then
+                ver=$regvalue
+                reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
+                with_jdk_home=$regvalue
+            fi
+            howfound="found automatically"
+        else
+            with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
+            howfound="you passed"
+        fi
+
+        if ! test -f "$with_jdk_home/lib/jvm.lib" -a -f "$with_jdk_home/bin/java.exe"; then
+            AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option (or fix the path) pointing to a $WIN_HOST_BITS-bit JDK >= 17])
+        fi
+    fi
+
+    # macOS: /usr/libexec/java_home helps to set the current JDK_HOME. Actually JDK_HOME should NOT be set where java (/usr/bin/java) is located.
+    # /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, but /usr does not contain the JDK libraries
+    if test -z "$with_jdk_home" -a "$_os" = "Darwin" -a -x /usr/libexec/java_home; then
+        with_jdk_home=`/usr/libexec/java_home`
+    fi
+
+    JAVA_HOME=; export JAVA_HOME
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVAINTERPRETER, $with_java)
+    else
+        _java_path="$with_jdk_home/bin/$with_java"
+        dnl Check if there is a Java interpreter at all.
+        if test -x "$_java_path"; then
+            JAVAINTERPRETER=$_java_path
+        else
+            AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
+        fi
+    fi
+
+    dnl Check that the JDK found is correct architecture (at least 2 reasons to
+    dnl check: officebean needs to link -ljawt, and libjpipe.so needs to be
+    dnl loaded by java to run JunitTests:
+    if test "$build_os" = "cygwin" -a "$cross_compiling" != "yes"; then
+        shortjdkhome=`cygpath -d "$with_jdk_home"`
+        if test $WIN_HOST_BITS -eq 64 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
+            AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
+            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+        elif test $WIN_HOST_BITS -eq 32 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != ""  >/dev/null; then
+            AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
+            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
+        fi
+
+        if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
+            JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
+        fi
+        JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
+    elif test "$cross_compiling" != "yes"; then
+        case $CPUNAME in
+            AARCH64|AXP|X86_64|IA64|POWERPC64|S390X|SPARC64|MIPS64|RISCV64|LOONGARCH64)
+                if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
+                    AC_MSG_WARN([You are building 64-bit binaries but the JDK $JAVAINTERPRETER is 32-bit])
+                    AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+                fi
+                ;;
+            *) # assumption: everything else 32-bit
+                if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" != ""  >/dev/null; then
+                    AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
+                    AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
+                fi
+                ;;
+        esac
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for JDK.
+dnl ===================================================================
+
+# Whether all the complexity here actually is needed any more or not, no idea.
+
+JDK_SECURITYMANAGER_DISALLOWED=
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    _gij_longver=0
+    AC_MSG_CHECKING([the installed JDK])
+    if test -n "$JAVAINTERPRETER"; then
+        dnl java -version sends output to stderr!
+        if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        else
+            JDK=sun
+
+            dnl Sun JDK specific tests
+            _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED '/^$/d' | $SED s/[[-A-Za-z]]*//`
+            _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+
+            if test "$_jdk_ver" -lt 170000; then
+                AC_MSG_ERROR([JDK is too old, you need at least 17 ($_jdk_ver < 170000)])
+            fi
+            dnl TODO: Presumably, the Security Manager will not merely be disallowed, but be
+            dnl completely removed in some Java version > 18 (see
+            dnl <https://openjdk.java.net/jeps/411> "Deprecate the Security Manager for Removal"):
+            if test "$_jdk_ver" -ge 180000; then
+                JDK_SECURITYMANAGER_DISALLOWED=TRUE
+            fi
+
+            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
+            if test "$_os" = "WINNT"; then
+                JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
+            fi
+            AC_MSG_RESULT([found $JAVA_HOME (JDK $_jdk)])
+
+            # set to limit VM usage for JunitTests
+            JAVAIFLAGS=-Xmx64M
+            # set to limit VM usage for javac
+            JAVACFLAGS=-J-Xmx128M
+        fi
+    else
+        AC_MSG_ERROR([Java not found. You need at least JDK 17])
+    fi
+else
+    if test -z "$ENABLE_JAVA"; then
+        dnl Java disabled
+        JAVA_HOME=
+        export JAVA_HOME
+    elif test "$cross_compiling" = "yes"; then
+        # Just assume compatibility of build and host JDK
+        JDK=$JDK_FOR_BUILD
+        JAVAIFLAGS=$JAVAIFLAGS_FOR_BUILD
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for javac
+dnl ===================================================================
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    javacompiler="javac"
+    : ${JAVA_SOURCE_VER=8}
+    : ${JAVA_TARGET_VER=8}
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVACOMPILER, $javacompiler)
+    else
+        _javac_path="$with_jdk_home/bin/$javacompiler"
+        dnl Check if there is a Java compiler at all.
+        if test -x "$_javac_path"; then
+            JAVACOMPILER=$_javac_path
+        fi
+    fi
+    if test -z "$JAVACOMPILER"; then
+        AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
+    fi
+    if test "$build_os" = "cygwin"; then
+        if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
+            JAVACOMPILER="${JAVACOMPILER}.exe"
+        fi
+        JAVACOMPILER=`win_short_path_for_make "$JAVACOMPILER"`
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for javadoc
+dnl ===================================================================
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVADOC, javadoc)
+    else
+        _javadoc_path="$with_jdk_home/bin/javadoc"
+        dnl Check if there is a javadoc at all.
+        if test -x "$_javadoc_path"; then
+            JAVADOC=$_javadoc_path
+        else
+            AC_PATH_PROG(JAVADOC, javadoc)
+        fi
+    fi
+    if test -z "$JAVADOC"; then
+        AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
+    fi
+    if test "$build_os" = "cygwin"; then
+        if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
+            JAVADOC="${JAVADOC}.exe"
+        fi
+        JAVADOC=`win_short_path_for_make "$JAVADOC"`
+    fi
+
+    if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
+    JAVADOCISGJDOC="yes"
+    fi
+fi
+AC_SUBST(JAVADOC)
+AC_SUBST(JAVADOCISGJDOC)
+
+if test "$ENABLE_JAVA" != "" -a \( "$cross_compiling" != "yes" -o -n "$with_jdk_home" \); then
+    # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
+    if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
+        if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
+           # try to recover first by looking whether we have an alternative
+           # system as in Debian or newer SuSEs where following /usr/bin/javac
+           # over /etc/alternatives/javac leads to the right bindir where we
+           # just need to strip a bit away to get a valid JAVA_HOME
+           JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
+        elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
+            # maybe only one level of symlink (e.g. on Mac)
+            JAVA_HOME=$(readlink $JAVACOMPILER)
+            if test "$(dirname $JAVA_HOME)" = "."; then
+                # we've got no path to trim back
+                JAVA_HOME=""
+            fi
+        else
+            # else warn
+            AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
+            AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
+            add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
+            add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
+        fi
+        dnl now that we probably have the path to the real javac, make a JAVA_HOME out of it...
+        if test "$JAVA_HOME" != "/usr"; then
+            if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
+                dnl Leopard returns a non-suitable path with readlink - points to "Current" only
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
+                dnl Tiger already returns a JDK path...
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
+            else
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
+                dnl check that we have a directory as certain distros eg gentoo substitute javac for a script
+                dnl that checks which version to run
+                if test -f "$JAVA_HOME"; then
+                    JAVA_HOME=""; # set JAVA_HOME to null if it's a file
+                fi
+            fi
+        fi
+    fi
+    # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
+
+    dnl now if JAVA_HOME has been set to empty, then call findhome to find it
+    if test -z "$JAVA_HOME"; then
+        if test "x$with_jdk_home" = "x"; then
+            cat > findhome.java <<_ACEOF
+[import java.io.File;
+
+class findhome
+{
+    public static void main(String args[])
+    {
+        String jrelocation = System.getProperty("java.home");
+        File jre = new File(jrelocation);
+        System.out.println(jre.getParent());
+    }
+}]
+_ACEOF
+            AC_MSG_CHECKING([if javac works])
+            javac_cmd="$JAVACOMPILER findhome.java 1>&2"
+            AC_TRY_EVAL(javac_cmd)
+            if test $? = 0 -a -f ./findhome.class; then
+                AC_MSG_RESULT([javac works])
+            else
+                echo "configure: javac test failed" >&5
+                cat findhome.java >&5
+                AC_MSG_ERROR([javac does not work - java projects will not build!])
+            fi
+            AC_MSG_CHECKING([if gij knows its java.home])
+            JAVA_HOME=`$JAVAINTERPRETER findhome`
+            if test $? = 0 -a "$JAVA_HOME" != ""; then
+                AC_MSG_RESULT([$JAVA_HOME])
+            else
+                echo "configure: java test failed" >&5
+                cat findhome.java >&5
+                AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
+            fi
+            # clean-up after ourselves
+            rm -f ./findhome.java ./findhome.class
+        else
+            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
+        fi
+    fi
+
+    # now check if $JAVA_HOME is really valid
+    if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
+        if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
+            AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
+            AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
+            AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects will not be built correctly])
+            add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
+            add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
+            add_warning "in case JAVA_HOME is incorrectly set, some projects will not be built correctly"
+        fi
+    fi
+    PathFormat "$JAVA_HOME"
+    JAVA_HOME="$formatted_path"
+fi
+
+if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
+    "$_os" != Darwin
+then
+    AC_MSG_CHECKING([for JAWT lib])
+    if test "$_os" = WINNT; then
+        # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
+        JAWTLIB=jawt.lib
+    else
+        case "$host_cpu" in
+        arm*)
+            AS_IF([test -e "$JAVA_HOME/jre/lib/aarch32/libjawt.so"], [my_java_arch=aarch32], [my_java_arch=arm])
+            JAVA_ARCH=$my_java_arch
+            ;;
+        i*86)
+            my_java_arch=i386
+            ;;
+        m68k)
+            my_java_arch=m68k
+            ;;
+        powerpc)
+            my_java_arch=ppc
+            ;;
+        powerpc64)
+            my_java_arch=ppc64
+            ;;
+        powerpc64le)
+            AS_IF([test -e "$JAVA_HOME/jre/lib/ppc64le/libjawt.so"], [my_java_arch=ppc64le], [my_java_arch=ppc64])
+            JAVA_ARCH=$my_java_arch
+            ;;
+        sparc64)
+            my_java_arch=sparcv9
+            ;;
+        x86_64)
+            my_java_arch=amd64
+            ;;
+        *)
+            my_java_arch=$host_cpu
+            ;;
+        esac
+        # This is where JDK9 puts the library
+        if test -e "$JAVA_HOME/lib/libjawt.so"; then
+            JAWTLIB="-L$JAVA_HOME/lib/ -ljawt"
+        else
+            JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
+        fi
+        AS_IF([test "$JAVA_ARCH" != ""], [AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$JAVA_ARCH"])])
+    fi
+    AC_MSG_RESULT([$JAWTLIB])
+fi
+AC_SUBST(JAWTLIB)
+
+if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
+    case "$host_os" in
+
+    cygwin*|wsl*)
+        JAVAINC="-I$JAVA_HOME/include/win32"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include"
+        ;;
+
+    darwin*)
+        if test -d "$JAVA_HOME/include/darwin"; then
+            JAVAINC="-I$JAVA_HOME/include  -I$JAVA_HOME/include/darwin"
+        else
+            JAVAINC=${ISYSTEM}$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers
+        fi
+        ;;
+
+    dragonfly*)
+        JAVAINC="-I$JAVA_HOME/include"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    freebsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/freebsd"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/bsd"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    k*bsd*-gnu*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    linux-gnu*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    *netbsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+       ;;
+
+    openbsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/openbsd"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    solaris*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/solaris"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+    esac
+fi
+SOLARINC="$SOLARINC $JAVAINC"
+
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    JAVA_HOME_FOR_BUILD=$JAVA_HOME
+    JAVAIFLAGS_FOR_BUILD=$JAVAIFLAGS
+    JDK_FOR_BUILD=$JDK
+    JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=$JDK_SECURITYMANAGER_DISALLOWED
+fi
+
+AC_SUBST(JAVACFLAGS)
+AC_SUBST(JAVACOMPILER)
+AC_SUBST(JAVAINTERPRETER)
+AC_SUBST(JAVAIFLAGS)
+AC_SUBST(JAVAIFLAGS_FOR_BUILD)
+AC_SUBST(JAVA_HOME)
+AC_SUBST(JAVA_HOME_FOR_BUILD)
+AC_SUBST(JDK)
+AC_SUBST(JDK_FOR_BUILD)
+AC_SUBST(JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD)
+AC_SUBST(JAVA_SOURCE_VER)
+AC_SUBST(JAVA_TARGET_VER)
+
+
+dnl ===================================================================
+dnl Export file validation
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable export file validation])
+if test "$with_export_validation" != "no"; then
+    if test -z "$ENABLE_JAVA"; then
+        if test "$with_export_validation" = "yes"; then
+            AC_MSG_ERROR([requested, but Java is disabled])
+        else
+            AC_MSG_RESULT([no, as Java is disabled])
+        fi
+    elif ! test -d "${SRC_ROOT}/schema"; then
+        if test "$with_export_validation" = "yes"; then
+            AC_MSG_ERROR([requested, but schema directory is missing (it is excluded from tarballs)])
+        else
+            AC_MSG_RESULT([no, schema directory is missing (it is excluded from tarballs)])
+        fi
+    else
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_EXPORT_VALIDATION)
+
+        AC_PATH_PROGS(ODFVALIDATOR, odfvalidator)
+        if test -z "$ODFVALIDATOR"; then
+            # remember to download the ODF toolkit with validator later
+            AC_MSG_NOTICE([no odfvalidator found, will download it])
+            BUILD_TYPE="$BUILD_TYPE ODFVALIDATOR"
+            ODFVALIDATOR="$BUILDDIR/bin/odfvalidator.sh"
+
+            # and fetch name of odfvalidator jar name from download.lst
+            ODFVALIDATOR_JAR=`$SED -n -e "s/^ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+            AC_SUBST(ODFVALIDATOR_JAR)
+
+            if test -z "$ODFVALIDATOR_JAR"; then
+                AC_MSG_ERROR([cannot determine odfvalidator jar location (--with-export-validation)])
+            fi
+        fi
+        if test "$build_os" = "cygwin"; then
+            # In case of Cygwin it will be executed from Windows,
+            # so we need to run bash and absolute path to validator
+            # so instead of "odfvalidator" it will be
+            # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+            ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
+        else
+            ODFVALIDATOR="sh $ODFVALIDATOR"
+        fi
+        AC_SUBST(ODFVALIDATOR)
+
+
+        AC_PATH_PROGS(OFFICEOTRON, officeotron)
+        if test -z "$OFFICEOTRON"; then
+            # remember to download the officeotron with validator later
+            AC_MSG_NOTICE([no officeotron found, will download it])
+            BUILD_TYPE="$BUILD_TYPE OFFICEOTRON"
+            OFFICEOTRON="$BUILDDIR/bin/officeotron.sh"
+
+            # and fetch name of officeotron jar name from download.lst
+            OFFICEOTRON_JAR=`$SED -n -e "s/^OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+            AC_SUBST(OFFICEOTRON_JAR)
+
+            if test -z "$OFFICEOTRON_JAR"; then
+                AC_MSG_ERROR([cannot determine officeotron jar location (--with-export-validation)])
+            fi
+        else
+            # check version of existing officeotron
+            OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+            if test 0"$OFFICEOTRON_VER" -lt 704; then
+                AC_MSG_ERROR([officeotron too old])
+            fi
+        fi
+        if test "$build_os" = "cygwin"; then
+            # In case of Cygwin it will be executed from Windows,
+            # so we need to run bash and absolute path to validator
+            # so instead of "odfvalidator" it will be
+            # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+            OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`"
+        else
+            OFFICEOTRON="sh $OFFICEOTRON"
+        fi
+    fi
+    AC_SUBST(OFFICEOTRON)
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([for Microsoft Binary File Format Validator])
+if test "$with_bffvalidator" != "no"; then
+    AC_DEFINE(HAVE_BFFVALIDATOR)
+
+    if test "$with_export_validation" = "no"; then
+        AC_MSG_ERROR([Please enable export validation (-with-export-validation)!])
+    fi
+
+    if test "$with_bffvalidator" = "yes"; then
+        BFFVALIDATOR=`win_short_path_for_make "$PROGRAMFILES/Microsoft Office/BFFValidator/BFFValidator.exe"`
+    else
+        BFFVALIDATOR="$with_bffvalidator"
+    fi
+
+    if test "$build_os" = "cygwin"; then
+        if test -n "$BFFVALIDATOR" -a -e "`cygpath $BFFVALIDATOR`"; then
+            AC_MSG_RESULT($BFFVALIDATOR)
+        else
+            AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+        fi
+    elif test -n "$BFFVALIDATOR"; then
+        # We are not in Cygwin but need to run Windows binary with wine
+        AC_PATH_PROGS(WINE, wine)
+
+        # so swap in a shell wrapper that converts paths transparently
+        BFFVALIDATOR_EXE="$BFFVALIDATOR"
+        BFFVALIDATOR="sh $BUILDDIR/bin/bffvalidator.sh"
+        AC_SUBST(BFFVALIDATOR_EXE)
+        AC_MSG_RESULT($BFFVALIDATOR)
+    else
+        AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+    fi
+    AC_SUBST(BFFVALIDATOR)
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Check for epm (not needed for Windows)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable EPM for packing])
+if test "$enable_epm" = "yes"; then
+    AC_MSG_RESULT([yes])
+    if test "$_os" != "WINNT"; then
+        if test $_os = Darwin; then
+            EPM=internal
+        elif test -n "$with_epm"; then
+            EPM=$with_epm
+        else
+            AC_PATH_PROG(EPM, epm, no)
+        fi
+        if test "$EPM" = "no" -o "$EPM" = "internal"; then
+            AC_MSG_NOTICE([EPM will be built.])
+            BUILD_TYPE="$BUILD_TYPE EPM"
+            EPM=${WORKDIR}/UnpackedTarball/epm/epm
+        else
+            # Gentoo has some epm which is something different...
+            AC_MSG_CHECKING([whether the found epm is the right epm])
+            if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
+                AC_MSG_RESULT([yes])
+            else
+                AC_MSG_ERROR([no. Install ESP Package Manager (https://jimjag.github.io/epm/) and/or specify the path to the right epm])
+            fi
+            AC_MSG_CHECKING([epm version])
+            EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
+            if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
+               test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
+                AC_MSG_RESULT([OK, >= 3.7])
+            else
+                AC_MSG_RESULT([too old. epm >= 3.7 is required.])
+                AC_MSG_ERROR([Install ESP Package Manager (https://jimjag.github.io/epm/) and/or specify the path to the right epm])
+            fi
+        fi
+    fi
+
+    if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
+        AC_MSG_CHECKING([for rpm])
+        for a in "$RPM" rpmbuild rpm; do
+            $a --usage >/dev/null 2> /dev/null
+            if test $? -eq 0; then
+                RPM=$a
+                break
+            else
+                $a --version >/dev/null 2> /dev/null
+                if test $? -eq 0; then
+                    RPM=$a
+                    break
+                fi
+            fi
+        done
+        if test -z "$RPM"; then
+            AC_MSG_ERROR([not found])
+        elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
+            RPM_PATH=`which $RPM`
+            AC_MSG_RESULT([$RPM_PATH])
+            SCPDEFS="$SCPDEFS -DWITH_RPM"
+        else
+            AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
+        AC_PATH_PROG(DPKG, dpkg, no)
+        if test "$DPKG" = "no"; then
+            AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
+       echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
+        if test "$with_epm" = "no" -a "$_os" != "Darwin"; then
+            if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
+                AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
+                if grep "Patched for .*Office" $EPM >/dev/null 2>/dev/null; then
+                    AC_MSG_RESULT([yes])
+                else
+                    AC_MSG_RESULT([no])
+                    if echo "$PKGFORMAT" | $GREP -q rpm; then
+                        _pt="rpm"
+                        AC_MSG_WARN([the rpms will need to be installed with --nodeps])
+                        add_warning "the rpms will need to be installed with --nodeps"
+                    else
+                        _pt="pkg"
+                    fi
+                    AC_MSG_WARN([the ${_pt}s will not be relocatable])
+                    add_warning "the ${_pt}s will not be relocatable"
+                    AC_MSG_WARN([if you want to make sure installation without --nodeps and
+                                 relocation will work, you need to patch your epm with the
+                                 patch in epm/epm-3.7.patch or build with
+                                 --with-epm=internal which will build a suitable epm])
+                fi
+            fi
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
+        AC_PATH_PROG(PKGMK, pkgmk, no)
+        if test "$PKGMK" = "no"; then
+            AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
+        fi
+    fi
+    AC_SUBST(RPM)
+    AC_SUBST(DPKG)
+    AC_SUBST(PKGMK)
+else
+    for i in $PKGFORMAT; do
+        case "$i" in
+        bsd | deb | pkg | rpm | native | portable)
+            AC_MSG_ERROR(
+                [--with-package-format='$PKGFORMAT' requires --enable-epm])
+            ;;
+        esac
+    done
+    AC_MSG_RESULT([no])
+    EPM=NO
+fi
+AC_SUBST(EPM)
+
+ENABLE_LWP=
+if test "$enable_lotuswordpro" = "yes"; then
+    ENABLE_LWP="TRUE"
+fi
+AC_SUBST(ENABLE_LWP)
+
+dnl ===================================================================
+dnl Check for building ODK
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build the ODK])
+if test "$enable_odk" = yes; then
+    if test "$DISABLE_DYNLOADING" = TRUE; then
+        AC_MSG_ERROR([can't build ODK for --disable-dynamic-loading builds])
+    fi
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE ODK"
+else
+    AC_MSG_RESULT([no])
+fi
+
+if test "$enable_odk" != yes; then
+    unset DOXYGEN
+else
+    if test "$with_doxygen" = no; then
+        AC_MSG_CHECKING([for doxygen])
+        unset DOXYGEN
+        AC_MSG_RESULT([no])
+    else
+        if test "$with_doxygen" = yes; then
+            AC_PATH_PROG([DOXYGEN], [doxygen])
+            if test -z "$DOXYGEN"; then
+                AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
+            fi
+            if $DOXYGEN -g - | grep -q "HAVE_DOT *= *YES"; then
+                if ! dot -V 2>/dev/null; then
+                    AC_MSG_ERROR([dot not found in \$PATH but doxygen defaults to HAVE_DOT=YES; install graphviz or disable its use via --without-doxygen])
+                fi
+            fi
+        else
+            AC_MSG_CHECKING([for doxygen])
+            DOXYGEN=$with_doxygen
+            AC_MSG_RESULT([$DOXYGEN])
+        fi
+        if test -n "$DOXYGEN"; then
+            DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
+            DOXYGEN_NUMVERSION=`echo $DOXYGEN_VERSION | $AWK -F. '{ print \$1*10000 + \$2*100 + \$3 }'`
+            if ! test "$DOXYGEN_NUMVERSION" -ge "10804" ; then
+                AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
+            fi
+        fi
+    fi
+fi
+AC_SUBST([DOXYGEN])
+
+dnl ==================================================================
+dnl libfuzzer
+dnl ==================================================================
+AC_MSG_CHECKING([whether to enable fuzzers])
+if test "$enable_fuzzers" != yes; then
+    AC_MSG_RESULT([no])
+else
+    if test -z $LIB_FUZZING_ENGINE; then
+      AC_MSG_ERROR(['LIB_FUZZING_ENGINE' must be set when using --enable-fuzzers. Examples include '-fsanitize=fuzzer'.])
+    fi
+    AC_MSG_RESULT([yes])
+    ENABLE_FUZZERS="TRUE"
+    AC_DEFINE([ENABLE_FUZZERS],1)
+    BUILD_TYPE="$BUILD_TYPE FUZZERS"
+fi
+AC_SUBST(LIB_FUZZING_ENGINE)
+
+dnl ===================================================================
+dnl Check for system zlib
+dnl ===================================================================
+if test "$with_system_zlib" = "auto"; then
+    case "$_os" in
+    WINNT)
+        with_system_zlib="$with_system_libs"
+        ;;
+    *)
+        if test "$enable_fuzzers" != "yes"; then
+            with_system_zlib=yes
+        else
+            with_system_zlib=no
+        fi
+        ;;
+    esac
+fi
+
+dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but macOS is too stupid
+dnl and has no pkg-config for it at least on some tinderboxes,
+dnl so leaving that out for now
+dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib])
+AC_MSG_CHECKING([which zlib to use])
+if test "$with_system_zlib" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_ZLIB=TRUE
+    AC_CHECK_HEADER(zlib.h, [],
+        [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
+    AC_CHECK_LIB(z, deflate, [ ZLIB_LIBS=-lz ],
+        [AC_MSG_ERROR(zlib not found or functional)], [])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_ZLIB=
+    BUILD_TYPE="$BUILD_TYPE ZLIB"
+    ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
+    if test "$COM" = "MSC"; then
+        ZLIB_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/zlib.lib"
+    else
+        ZLIB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lzlib"
+    fi
+fi
+AC_SUBST(ZLIB_CFLAGS)
+AC_SUBST(ZLIB_LIBS)
+AC_SUBST(SYSTEM_ZLIB)
+
+dnl ===================================================================
+dnl Check for system jpeg
+dnl ===================================================================
+AC_MSG_CHECKING([which libjpeg to use])
+if test "$with_system_jpeg" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBJPEG=TRUE
+    AC_CHECK_HEADER(jpeglib.h, [ LIBJPEG_CFLAGS= ],
+        [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
+    AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ LIBJPEG_LIBS="-ljpeg" ],
+        [AC_MSG_ERROR(jpeg library not found or functional)], [])
+else
+    SYSTEM_LIBJPEG=
+    AC_MSG_RESULT([internal, libjpeg-turbo])
+    BUILD_TYPE="$BUILD_TYPE LIBJPEG_TURBO"
+
+    case "$host_cpu" in
+    x86_64 | amd64 | i*86 | x86 | ia32)
+        AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
+        if test -z "$NASM" -a "$build_os" = "cygwin"; then
+            if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/nasm"; then
+                NASM="$LODE_HOME/opt/bin/nasm"
+            elif test -x "/opt/lo/bin/nasm"; then
+                NASM="/opt/lo/bin/nasm"
+            fi
+        fi
+
+        if test -n "$NASM"; then
+            AC_MSG_CHECKING([for object file format of host system])
+            case "$host_os" in
+              cygwin* | mingw* | pw32* | wsl*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='Win64-COFF'
+                    ;;
+                  *)
+                    objfmt='Win32-COFF'
+                    ;;
+                esac
+              ;;
+              msdosdjgpp* | go32*)
+                objfmt='COFF'
+              ;;
+              os2-emx*) # not tested
+                objfmt='MSOMF' # obj
+              ;;
+              linux*coff* | linux*oldld*)
+                objfmt='COFF' # ???
+              ;;
+              linux*aout*)
+                objfmt='a.out'
+              ;;
+              linux*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='ELF64'
+                    ;;
+                  *)
+                    objfmt='ELF'
+                    ;;
+                esac
+              ;;
+              kfreebsd* | freebsd* | netbsd* | openbsd*)
+                if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+                  objfmt='BSD-a.out'
+                else
+                  case "$host_cpu" in
+                    x86_64 | amd64)
+                      objfmt='ELF64'
+                      ;;
+                    *)
+                      objfmt='ELF'
+                      ;;
+                  esac
+                fi
+              ;;
+              solaris* | sunos* | sysv* | sco*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='ELF64'
+                    ;;
+                  *)
+                    objfmt='ELF'
+                    ;;
+                esac
+              ;;
+              darwin* | rhapsody* | nextstep* | openstep* | macos*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='Mach-O64'
+                    ;;
+                  *)
+                    objfmt='Mach-O'
+                    ;;
+                esac
+              ;;
+              *)
+                objfmt='ELF ?'
+              ;;
+            esac
+
+            AC_MSG_RESULT([$objfmt])
+            if test "$objfmt" = 'ELF ?'; then
+              objfmt='ELF'
+              AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
+            fi
+
+            AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
+            case "$objfmt" in
+              MSOMF)      NAFLAGS='-fobj -DOBJ32 -DPIC';;
+              Win32-COFF) NAFLAGS='-fwin32 -DWIN32 -DPIC';;
+              Win64-COFF) NAFLAGS='-fwin64 -DWIN64 -D__x86_64__ -DPIC';;
+              COFF)       NAFLAGS='-fcoff -DCOFF -DPIC';;
+              a.out)      NAFLAGS='-faout -DAOUT -DPIC';;
+              BSD-a.out)  NAFLAGS='-faoutb -DAOUT -DPIC';;
+              ELF)        NAFLAGS='-felf -DELF -DPIC';;
+              ELF64)      NAFLAGS='-felf64 -DELF -D__x86_64__ -DPIC';;
+              RDF)        NAFLAGS='-frdf -DRDF -DPIC';;
+              Mach-O)     NAFLAGS='-fmacho -DMACHO -DPIC';;
+              Mach-O64)   NAFLAGS='-fmacho64 -DMACHO -D__x86_64__ -DPIC';;
+            esac
+            AC_MSG_RESULT([$NAFLAGS])
+
+            AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
+            cat > conftest.asm << EOF
+            [%line __oline__ "configure"
+                    section .text
+                    global  _main,main
+            _main:
+            main:   xor     eax,eax
+                    ret
+            ]
+EOF
+            try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
+            if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
+              AC_MSG_RESULT(yes)
+            else
+              echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+              cat conftest.asm >&AS_MESSAGE_LOG_FD
+              rm -rf conftest*
+              AC_MSG_RESULT(no)
+              AC_MSG_WARN([installation or configuration problem: assembler cannot create object files.])
+              NASM=""
+            fi
+
+        fi
+
+        if test -z "$NASM"; then
+cat << _EOS
+****************************************************************************
+You need yasm or nasm (Netwide Assembler) to build the internal jpeg library optimally.
+To get one please:
+
+_EOS
+            if test "$build_os" = "cygwin"; then
+cat << _EOS
+install a pre-compiled binary for Win32
+
+mkdir -p /opt/lo/bin
+cd /opt/lo/bin
+wget https://dev-www.libreoffice.org/bin/cygwin/nasm.exe
+chmod +x nasm
+
+or get and install one from https://www.nasm.us/
+
+Then re-run autogen.sh
+
+Note: autogen.sh will try to use /opt/lo/bin/nasm if the environment variable NASM is not already defined.
+Alternatively, you can install the 'new' nasm where ever you want and make sure that \`which nasm\` finds it.
+
+_EOS
+            else
+cat << _EOS
+consult https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/BUILDING.md
+
+_EOS
+            fi
+            AC_MSG_WARN([no suitable nasm (Netwide Assembler) found])
+            add_warning "no suitable nasm (Netwide Assembler) found for internal libjpeg-turbo"
+        fi
+      ;;
+    esac
+fi
+
+AC_SUBST(NASM)
+AC_SUBST(NAFLAGS)
+AC_SUBST(LIBJPEG_CFLAGS)
+AC_SUBST(LIBJPEG_LIBS)
+AC_SUBST(SYSTEM_LIBJPEG)
+
+dnl ===================================================================
+dnl Check for system clucene
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([clucene],[CLUCENE],[libclucene-core])
+if test "$SYSTEM_CLUCENE" = TRUE; then
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    save_CPPFLAGS=$CPPFLAGS
+    CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
+    CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
+    dnl https://sourceforge.net/p/clucene/bugs/200/
+    dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
+    AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
+                 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
+    CXXFLAGS=$save_CXXFLAGS
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+    CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
+fi
+
+dnl ===================================================================
+dnl Check for system expat
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([expat], [EXPAT], [expat])
+
+dnl ===================================================================
+dnl Check for system xmlsec
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([xmlsec], [XMLSEC], [xmlsec1-nss >= 1.2.35])
+
+AC_MSG_CHECKING([whether to enable Embedded OpenType support])
+if test "$enable_eot" = "yes"; then
+    ENABLE_EOT="TRUE"
+    AC_DEFINE([ENABLE_EOT])
+    AC_MSG_RESULT([yes])
+
+    libo_CHECK_SYSTEM_MODULE([libeot],[LIBEOT],[libeot >= 0.01])
+else
+    ENABLE_EOT=
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_EOT])
+
+dnl ===================================================================
+dnl Check for DLP libs
+dnl ===================================================================
+REVENGE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/librevenge/inc"
+AS_IF([test "$COM" = "MSC"],
+      [librevenge_libdir="${WORKDIR}/LinkTarget/Library"],
+      [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"]
+)
+REVENGE_LIBS_internal="-L${librevenge_libdir} -lrevenge-0.0"
+libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1])
+
+libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libepubgen],[EPUBGEN],[libepubgen-0.1])
+
+WPD_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/libwpd/inc"
+AS_IF([test "$COM" = "MSC"],
+      [libwpd_libdir="${WORKDIR}/LinkTarget/Library"],
+      [libwpd_libdir="${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs"]
+)
+WPD_LIBS_internal="-L${libwpd_libdir} -lwpd-0.10"
+libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10])
+
+libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.3])
+
+libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.4])
+libo_PKG_VERSION([WPS], [libwps-0.4], [0.4.14])
+
+libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.21])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.21])
+
+libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
+libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
+
+libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1])
+libo_PKG_VERSION([EBOOK], [libe-book-0.1], [0.1.2])
+
+libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libqxp],[QXP],[libqxp-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libzmf],[ZMF],[libzmf-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libstaroffice],[STAROFFICE],[libstaroffice-0.0])
+libo_PKG_VERSION([STAROFFICE], [libstaroffice-0.0], [0.0.7])
+
+dnl ===================================================================
+dnl Check for system lcms2
+dnl ===================================================================
+if test "$with_system_lcms2" != "yes"; then
+    SYSTEM_LCMS2=
+fi
+LCMS2_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/lcms2/include"
+LCMS2_LIBS_internal="-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"
+libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2])
+if test "$GCC" = "yes"; then
+    LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
+fi
+if test "$COM" = "MSC"; then # override the above
+    LCMS2_LIBS=${WORKDIR}/UnpackedTarball/lcms2/bin/lcms2.lib
+fi
+
+dnl ===================================================================
+dnl Check for system cppunit
+dnl ===================================================================
+if test "$_os" != "Android" ; then
+    libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.14.0])
+fi
+
+dnl ===================================================================
+dnl Check whether freetype is available
+dnl
+dnl FreeType has 3 different kinds of versions
+dnl * release, like 2.4.10
+dnl * libtool, like 13.0.7 (this what pkg-config returns)
+dnl * soname
+dnl FreeType's docs/VERSION.DLL provides a table mapping between the three
+dnl
+dnl 9.9.3 is 2.2.0
+dnl When the minimal version is at least 2.8.1, remove Skia's check down below.
+dnl ===================================================================
+FREETYPE_CFLAGS_internal="${ISYSTEM}${WORKDIR}/UnpackedTarball/freetype/include"
+if test "x$ac_config_site_64bit_host" = xYES; then
+    FREETYPE_LIBS_internal="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib64 -lfreetype"
+else
+    FREETYPE_LIBS_internal="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib -lfreetype"
+fi
+libo_CHECK_SYSTEM_MODULE([freetype],[FREETYPE],[freetype2 >= 9.9.3],,system,TRUE)
+
+# ===================================================================
+# Check for system libxslt
+# to prevent incompatibilities between internal libxml2 and external libxslt,
+# or vice versa, use with_system_libxml here
+# ===================================================================
+if test "$with_system_libxml" = "auto"; then
+    case "$_os" in
+    WINNT|iOS|Android)
+        with_system_libxml="$with_system_libs"
+        ;;
+    Emscripten)
+        with_system_libxml=no
+        ;;
+    *)
+        if test "$enable_fuzzers" != "yes"; then
+            with_system_libxml=yes
+        else
+            with_system_libxml=no
+        fi
+        ;;
+    esac
+fi
+
+AC_MSG_CHECKING([which libxslt to use])
+if test "$with_system_libxml" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBXSLT=TRUE
+    if test "$_os" = "Darwin"; then
+        dnl make sure to use SDK path
+        LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
+        LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
+        dnl omit -L/usr/lib
+        LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
+        LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
+    else
+        PKG_CHECK_MODULES(LIBXSLT, libxslt)
+        LIBXSLT_CFLAGS=$(printf '%s' "$LIBXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBXSLT_LIBS}"
+        LIBXSLT_LIBS="${filteredlibs}"
+        PKG_CHECK_MODULES(LIBEXSLT, libexslt)
+        LIBEXSLT_CFLAGS=$(printf '%s' "$LIBEXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBEXSLT_LIBS}"
+        LIBEXSLT_LIBS=$(printf '%s' "${filteredlibs}" | sed -e "s/-lgpg-error//"  -e "s/-lgcrypt//")
+    fi
+
+    dnl Check for xsltproc
+    AC_PATH_PROG(XSLTPROC, xsltproc, no)
+    if test "$XSLTPROC" = "no"; then
+        AC_MSG_ERROR([xsltproc is required])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBXSLT=
+    BUILD_TYPE="$BUILD_TYPE LIBXSLT"
+fi
+AC_SUBST(SYSTEM_LIBXSLT)
+if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
+    SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
+fi
+AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
+
+AC_SUBST(LIBEXSLT_CFLAGS)
+AC_SUBST(LIBEXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(XSLTPROC)
+
+# ===================================================================
+# Check for system libxml
+# ===================================================================
+AC_MSG_CHECKING([which libxml to use])
+if test "$with_system_libxml" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBXML=TRUE
+    if test "$_os" = "Darwin"; then
+        dnl make sure to use SDK path
+        LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
+        dnl omit -L/usr/lib
+        LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
+    elif test $_os = iOS; then
+        dnl make sure to use SDK path
+        usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
+        LIBXML_CFLAGS="-I$usr/include/libxml2"
+        LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
+    else
+        PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
+        LIBXML_CFLAGS=$(printf '%s' "$LIBXML_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBXML_LIBS}"
+        LIBXML_LIBS="${filteredlibs}"
+    fi
+
+    dnl Check for xmllint
+    AC_PATH_PROG(XMLLINT, xmllint, no)
+    if test "$XMLLINT" = "no"; then
+        AC_MSG_ERROR([xmllint is required])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBXML=
+    LIBXML_CFLAGS="-I${WORKDIR}/UnpackedTarball/libxml2/include"
+    if test "$COM" = "MSC"; then
+        LIBXML_CFLAGS="${LIBXML_CFLAGS} -I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
+    fi
+    if test "$COM" = "MSC"; then
+        LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
+    else
+        LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
+        if test "$DISABLE_DYNLOADING" = TRUE; then
+            LIBXML_LIBS="$LIBXML_LIBS -lm"
+        fi
+    fi
+    BUILD_TYPE="$BUILD_TYPE LIBXML2"
+fi
+AC_SUBST(SYSTEM_LIBXML)
+if test -z "$SYSTEM_LIBXML_FOR_BUILD"; then
+    SYSTEM_LIBXML_FOR_BUILD="$SYSTEM_LIBXML"
+fi
+AC_SUBST(SYSTEM_LIBXML_FOR_BUILD)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(XMLLINT)
+
+# =====================================================================
+# Checking for a Python interpreter with version >= 3.3.
+# Optionally user can pass an option to configure, i. e.
+# ./configure PYTHON=/usr/bin/python
+# =====================================================================
+if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != fully-internal -a "$enable_python" != internal -a "$enable_python" != system; then
+    # Only allowed choices for macOS are 'no', 'internal' (default), and 'fully-internal'
+    # unless PYTHON is defined as above which allows 'system'
+    enable_python=internal
+fi
+if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
+    if test -n "$PYTHON"; then
+        PYTHON_FOR_BUILD=$PYTHON
+    else
+        # This allows a lack of system python with no error, we use internal one in that case.
+        AM_PATH_PYTHON([3.3],, [:])
+        # Clean PYTHON_VERSION checked below if cross-compiling
+        PYTHON_VERSION=""
+        if test "$PYTHON" != ":"; then
+            PYTHON_FOR_BUILD=$PYTHON
+        fi
+    fi
+fi
+
+# Checks for Python to use for Pyuno
+AC_MSG_CHECKING([which Python to use for Pyuno])
+case "$enable_python" in
+no|disable)
+    if test -z "$PYTHON_FOR_BUILD" -a "$cross_compiling" != yes; then
+        # Python is required to build LibreOffice. In theory we could separate the build-time Python
+        # requirement from the choice whether to include Python stuff in the installer, but why
+        # bother?
+        AC_MSG_ERROR([Python is required at build time.])
+    fi
+    enable_python=no
+    AC_MSG_RESULT([none])
+    ;;
+""|yes|auto)
+    if test "$DISABLE_SCRIPTING" = TRUE; then
+        if test -z "$PYTHON_FOR_BUILD" -a "$cross_compiling" != yes; then
+            AC_MSG_ERROR([Python support can't be disabled without cross-compiling or a system python.])
+        fi
+        AC_MSG_RESULT([none, overridden by --disable-scripting])
+        enable_python=no
+    elif test $build_os = cygwin -o $build_os = wsl; then
+        dnl When building on Windows we don't attempt to use any installed
+        dnl "system"  Python.
+        AC_MSG_RESULT([fully internal])
+        enable_python=internal
+    elif test "$cross_compiling" = yes; then
+        AC_MSG_RESULT([system])
+        enable_python=system
+    else
+        # Unset variables set by the above AM_PATH_PYTHON so that
+        # we actually do check anew.
+        AC_MSG_RESULT([])
+        unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
+        AM_PATH_PYTHON([3.3],, [:])
+        AC_MSG_CHECKING([which Python to use for Pyuno])
+        if test "$PYTHON" = ":"; then
+            if test -z "$PYTHON_FOR_BUILD"; then
+                AC_MSG_RESULT([fully internal])
+            else
+                AC_MSG_RESULT([internal])
+            fi
+            enable_python=internal
+        else
+            AC_MSG_RESULT([system])
+            enable_python=system
+        fi
+    fi
+    ;;
+internal)
+    AC_MSG_RESULT([internal])
+    ;;
+fully-internal)
+    AC_MSG_RESULT([fully internal])
+    enable_python=internal
+    ;;
+system)
+    AC_MSG_RESULT([system])
+    if test "$_os" = Darwin -a -z "$PYTHON"; then
+        AC_MSG_ERROR([--enable-python=system doesn't work on macOS because the version provided is obsolete])
+    fi
+    ;;
+*)
+    AC_MSG_ERROR([Incorrect --enable-python option])
+    ;;
+esac
+
+if test $enable_python != no; then
+    BUILD_TYPE="$BUILD_TYPE PYUNO"
+fi
+
+if test $enable_python = system; then
+    if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
+        # Fallback: Accept these in the environment, or as set above
+        # for MacOSX.
+        :
+    elif test "$cross_compiling" != yes; then
+        # Unset variables set by the above AM_PATH_PYTHON so that
+        # we actually do check anew.
+        unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
+        # This causes an error if no python command is found
+        AM_PATH_PYTHON([3.3])
+        python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
+        python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
+        python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
+        python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
+        if test -z "$PKG_CONFIG"; then
+            PYTHON_CFLAGS="-I$python_include"
+            PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+        elif $PKG_CONFIG --exists python-$python_version-embed; then
+            PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version-embed`"
+            PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version-embed` $python_libs"
+        elif $PKG_CONFIG --exists python-$python_version; then
+            PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
+            PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
+        else
+            PYTHON_CFLAGS="-I$python_include"
+            PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+        fi
+        FilterLibs "${PYTHON_LIBS}"
+        PYTHON_LIBS="${filteredlibs}"
+    else
+        dnl How to find out the cross-compilation Python installation path?
+        AC_MSG_CHECKING([for python version])
+        AS_IF([test -n "$PYTHON_VERSION"],
+              [AC_MSG_RESULT([$PYTHON_VERSION])],
+              [AC_MSG_RESULT([not found])
+               AC_MSG_ERROR([no usable python found])])
+        test -n "$PYTHON_CFLAGS" && break
+    fi
+
+    dnl Check if the headers really work
+    save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
+    AC_CHECK_HEADER(Python.h)
+    CPPFLAGS="$save_CPPFLAGS"
+
+    # let the PYTHON_FOR_BUILD match the same python installation that
+    # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
+    # better for PythonTests.
+    PYTHON_FOR_BUILD=$PYTHON
+fi
+
+if test "$with_lxml" != no; then
+    if test -z "$PYTHON_FOR_BUILD"; then
+        case $build_os in
+            cygwin)
+                AC_MSG_WARN([No system-provided python lxml, gla11y will only report widget classes and ids])
+                ;;
+            *)
+                if test "$cross_compiling" != yes ; then
+                    BUILD_TYPE="$BUILD_TYPE LXML"
+                fi
+                ;;
+        esac
+    else
+        AC_MSG_CHECKING([for python lxml])
+        if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" 2> /dev/null ; then
+            AC_MSG_RESULT([yes])
+        else
+            case $build_os in
+                cygwin)
+                    AC_MSG_RESULT([no, gla11y will only report widget classes and ids])
+                    ;;
+                *)
+                    if test "$cross_compiling" != yes -a "x$ac_cv_header_Python_h" = "xyes"; then
+                        if test -n ${SYSTEM_LIBXSLT} -o -n ${SYSTEM_LIBXML}; then
+                            AC_MSG_RESULT([no, and no system libxml/libxslt, gla11y will only report widget classes and ids])
+                        else
+                            BUILD_TYPE="$BUILD_TYPE LXML"
+                            AC_MSG_RESULT([no, using internal lxml])
+                        fi
+                    else
+                        AC_MSG_RESULT([no, and system does not provide python development headers, gla11y will only report widget classes and ids])
+                    fi
+                    ;;
+            esac
+        fi
+    fi
+fi
+
+if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_python" = internal; then
+    SYSTEM_PYTHON=
+    PYTHON_VERSION_MAJOR=3
+    PYTHON_VERSION_MINOR=8
+    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18
+    if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
+        AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
+    fi
+    AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
+
+    # Embedded Python dies without Home set
+    if test "$HOME" = ""; then
+        export HOME=""
+    fi
+fi
+
+dnl By now enable_python should be "system", "internal" or "no"
+case $enable_python in
+system)
+    SYSTEM_PYTHON=TRUE
+
+    if test "x$ac_cv_header_Python_h" != "xyes"; then
+       AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])
+    fi
+
+    AC_LANG_PUSH(C)
+    CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+    AC_MSG_CHECKING([for correct python library version])
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <Python.h>
+
+int main(int argc, char **argv) {
+   if ((PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
+   else return 1;
+}
+       ]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3])],[AC_MSG_RESULT([skipped; cross-compiling])])
+    AC_LANG_POP(C)
+
+    dnl FIXME Check if the Python library can be linked with, too?
+    ;;
+
+internal)
+    BUILD_TYPE="$BUILD_TYPE PYTHON"
+    if test "$OS" = LINUX -o "$OS" = WNT ; then
+        BUILD_TYPE="$BUILD_TYPE LIBFFI"
+    fi
+    ;;
+no)
+    DISABLE_PYTHON=TRUE
+    SYSTEM_PYTHON=
+    ;;
+*)
+    AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
+    ;;
+esac
+
+AC_SUBST(DISABLE_PYTHON)
+AC_SUBST(SYSTEM_PYTHON)
+AC_SUBST(PYTHON_CFLAGS)
+AC_SUBST(PYTHON_FOR_BUILD)
+AC_SUBST(PYTHON_LIBS)
+AC_SUBST(PYTHON_VERSION)
+AC_SUBST(PYTHON_VERSION_MAJOR)
+AC_SUBST(PYTHON_VERSION_MINOR)
+
+AC_MSG_CHECKING([whether to build LibreLogo])
+case "$enable_python" in
+no|disable)
+    AC_MSG_RESULT([no; Python disabled])
+    ;;
+*)
+    if test "${enable_librelogo}" = "no"; then
+        AC_MSG_RESULT([no])
+    else
+        AC_MSG_RESULT([yes])
+        BUILD_TYPE="${BUILD_TYPE} LIBRELOGO"
+        AC_DEFINE([ENABLE_LIBRELOGO],1)
+    fi
+    ;;
+esac
+AC_SUBST(ENABLE_LIBRELOGO)
+
+ENABLE_MARIADBC=
+MARIADBC_MAJOR=1
+MARIADBC_MINOR=0
+MARIADBC_MICRO=2
+AC_MSG_CHECKING([whether to build the MariaDB/MySQL SDBC driver])
+if test "x$enable_mariadb_sdbc" != "xno" -a "$enable_mpl_subset" != "yes"; then
+    ENABLE_MARIADBC=TRUE
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE MARIADBC"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_MARIADBC)
+AC_SUBST(MARIADBC_MAJOR)
+AC_SUBST(MARIADBC_MINOR)
+AC_SUBST(MARIADBC_MICRO)
+
+if test "$ENABLE_MARIADBC" = "TRUE"; then
+    dnl ===================================================================
+    dnl Check for system MariaDB
+    dnl ===================================================================
+    AC_MSG_CHECKING([which MariaDB to use])
+    if test "$with_system_mariadb" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_MARIADB_CONNECTOR_C=TRUE
+        #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config])
+        if test -z "$MARIADBCONFIG"; then
+            AC_PATH_PROG(MARIADBCONFIG, [mysql_config])
+            if test -z "$MARIADBCONFIG"; then
+                AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.])
+                #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL client library development package.])
+            fi
+        fi
+        AC_MSG_CHECKING([MariaDB version])
+        MARIADB_VERSION=`$MARIADBCONFIG --version`
+        MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
+        if test "$MARIADB_MAJOR" -ge "5"; then
+            AC_MSG_RESULT([OK])
+        else
+            AC_MSG_ERROR([too old, use 5.0.x or later])
+        fi
+        AC_MSG_CHECKING([for MariaDB Client library])
+        MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
+        if test "$COM_IS_CLANG" = TRUE; then
+            MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
+        fi
+        MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
+        dnl At least mariadb-5.5.34-3.fc20.x86_64 plus
+        dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under
+        dnl linux32:
+        if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then
+            MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//)
+            MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \
+                | sed -e 's|/lib64/|/lib/|')
+        fi
+        FilterLibs "${MARIADB_LIBS}"
+        MARIADB_LIBS="${filteredlibs}"
+        AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
+        AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
+        if test "$enable_bundle_mariadb" = "yes"; then
+            AC_MSG_RESULT([yes])
+            BUNDLE_MARIADB_CONNECTOR_C=TRUE
+            LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\{1,\}-l\([[^[:space:]]]\{1,\}\)/\
+\1\
+/g' -e 's/^-l\([[^[:space:]]]\{1,\}\)[[[:space:]]]*/\
+\1\
+/g' | grep -E '(mysqlclient|mariadb)')
+            if test "$_os" = "Darwin"; then
+                LIBMARIADB=${LIBMARIADB}.dylib
+            elif test "$_os" = "WINNT"; then
+                LIBMARIADB=${LIBMARIADB}.dll
+            else
+                LIBMARIADB=${LIBMARIADB}.so
+            fi
+            LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
+            AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
+            if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then
+                AC_MSG_RESULT([found.])
+                PathFormat "$LIBMARIADB_PATH"
+                LIBMARIADB_PATH="$formatted_path"
+            else
+                AC_MSG_ERROR([not found.])
+            fi
+        else
+            AC_MSG_RESULT([no])
+            BUNDLE_MARIADB_CONNECTOR_C=
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_MARIADB_CONNECTOR_C=
+        MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb-connector-c/include"
+        MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadb-connector-c"
+        BUILD_TYPE="$BUILD_TYPE MARIADB_CONNECTOR_C"
+    fi
+
+    AC_SUBST(SYSTEM_MARIADB_CONNECTOR_C)
+    AC_SUBST(MARIADB_CFLAGS)
+    AC_SUBST(MARIADB_LIBS)
+    AC_SUBST(LIBMARIADB)
+    AC_SUBST(LIBMARIADB_PATH)
+    AC_SUBST(BUNDLE_MARIADB_CONNECTOR_C)
+fi
+
+dnl ===================================================================
+dnl Check for system hsqldb
+dnl ===================================================================
+if test "$with_java" != "no" -a "$cross_compiling" != "yes"; then
+    AC_MSG_CHECKING([which hsqldb to use])
+    if test "$with_system_hsqldb" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_HSQLDB=TRUE
+        if test -z $HSQLDB_JAR; then
+            HSQLDB_JAR=/usr/share/java/hsqldb.jar
+        fi
+        if ! test -f $HSQLDB_JAR; then
+               AC_MSG_ERROR(hsqldb.jar not found.)
+        fi
+        AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
+        export HSQLDB_JAR
+        if $PERL -e \
+           'use Archive::Zip;
+            my $file = "$ENV{'HSQLDB_JAR'}";
+            my $zip = Archive::Zip->new( $file );
+            my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
+            if ( $mf =~ m/Specification-Version: 1.8.*/ )
+            {
+                push @l, split(/\n/, $mf);
+                foreach my $line (@l)
+                {
+                    if ($line =~ m/Specification-Version:/)
+                    {
+                        ($t, $version) = split (/:/,$line);
+                        $version =~ s/^\s//;
+                        ($a, $b, $c, $d) = split (/\./,$version);
+                        if ($c == "0" && $d > "8")
+                        {
+                            exit 0;
+                        }
+                        else
+                        {
+                            exit 1;
+                        }
+                    }
+                }
+            }
+            else
+            {
+                exit 1;
+            }'; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_HSQLDB=
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+        NEED_ANT=TRUE
+    fi
+else
+    if test "$with_java" != "no" -a -z "$HSQLDB_JAR"; then
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+    fi
+fi
+AC_SUBST(SYSTEM_HSQLDB)
+AC_SUBST(HSQLDB_JAR)
+
+dnl ===================================================================
+dnl Check for PostgreSQL stuff
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build the PostgreSQL SDBC driver])
+if test "x$enable_postgresql_sdbc" != "xno"; then
+    AC_MSG_RESULT([yes])
+    SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
+
+    if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
+    fi
+    if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
+    fi
+
+    postgres_interface=""
+    if test "$with_system_postgresql" = "yes"; then
+        postgres_interface="external PostgreSQL"
+        SYSTEM_POSTGRESQL=TRUE
+        if test "$_os" = Darwin; then
+            supp_path=''
+            for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
+                pg_supp_path="$P_SEP$d$pg_supp_path"
+            done
+        fi
+        AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
+        if test -n "$PGCONFIG"; then
+            POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+            POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+        else
+            PKG_CHECK_MODULES(POSTGRESQL, libpq, [
+              POSTGRESQL_INC=$POSTGRESQL_CFLAGS
+              POSTGRESQL_LIB=$POSTGRESQL_LIBS
+            ],[
+              AC_MSG_ERROR([pg_config or 'pkg-config libpq' needed; set PGCONFIG if not in PATH])
+            ])
+        fi
+        FilterLibs "${POSTGRESQL_LIB}"
+        POSTGRESQL_LIB="${filteredlibs}"
+    else
+        # if/when anything else than PostgreSQL uses Kerberos,
+        # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
+        WITH_KRB5=
+        WITH_GSSAPI=
+        case "$_os" in
+        Darwin)
+            # macOS has system MIT Kerberos 5 since 10.4
+            if test "$with_krb5" != "no"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                # Not sure whether it makes any sense here to search multiple potential libraries; it is not likely
+                # that the libraries where these functions are located on macOS will change, is it?
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" != "no"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                GSSAPI_LIBS=$LIBS
+                LIBS=$save_LIBS
+            fi
+            ;;
+        WINNT)
+            if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
+                AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
+            fi
+            ;;
+        Linux|GNU|*BSD|DragonFly)
+            if test "$with_krb5" != "no"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" != "no"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                GSSAPI_LIBS=$LIBS
+                LIBS=$save_LIBS
+            fi
+            ;;
+        *)
+            if test "$with_krb5" = "yes"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" = "yes"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                LIBS=$save_LIBS
+                GSSAPI_LIBS=$LIBS
+            fi
+        esac
+
+        if test -n "$with_libpq_path"; then
+            SYSTEM_POSTGRESQL=TRUE
+            postgres_interface="external libpq"
+            POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
+            POSTGRESQL_INC=-I"${with_libpq_path}/include/"
+        else
+            SYSTEM_POSTGRESQL=
+            postgres_interface="internal"
+            POSTGRESQL_LIB=""
+            POSTGRESQL_INC="%OVERRIDE_ME%"
+            BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
+        fi
+    fi
+
+    AC_MSG_CHECKING([PostgreSQL C interface])
+    AC_MSG_RESULT([$postgres_interface])
+
+    if test "${SYSTEM_POSTGRESQL}" = "TRUE"; then
+        AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
+        save_CFLAGS=$CFLAGS
+        save_CPPFLAGS=$CPPFLAGS
+        save_LIBS=$LIBS
+        CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
+        LIBS="${LIBS} ${POSTGRESQL_LIB}"
+        AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
+        AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
+            [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
+        CFLAGS=$save_CFLAGS
+        CPPFLAGS=$save_CPPFLAGS
+        LIBS=$save_LIBS
+    fi
+    BUILD_POSTGRESQL_SDBC=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(WITH_KRB5)
+AC_SUBST(WITH_GSSAPI)
+AC_SUBST(GSSAPI_LIBS)
+AC_SUBST(KRB5_LIBS)
+AC_SUBST(BUILD_POSTGRESQL_SDBC)
+AC_SUBST(SYSTEM_POSTGRESQL)
+AC_SUBST(POSTGRESQL_INC)
+AC_SUBST(POSTGRESQL_LIB)
+
+dnl ===================================================================
+dnl Check for Firebird stuff
+dnl ===================================================================
+ENABLE_FIREBIRD_SDBC=
+if test "$enable_firebird_sdbc" = "yes" ; then
+    SCPDEFS="$SCPDEFS -DWITH_FIREBIRD_SDBC"
+
+    dnl ===================================================================
+    dnl Check for system Firebird
+    dnl ===================================================================
+    AC_MSG_CHECKING([which Firebird to use])
+    if test "$with_system_firebird" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_FIREBIRD=TRUE
+        AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
+        if test -z "$FIREBIRDCONFIG"; then
+            AC_MSG_NOTICE([No fb_config -- using pkg-config])
+            PKG_CHECK_MODULES([FIREBIRD], [fbclient >= 3], [FIREBIRD_PKGNAME=fbclient], [
+                PKG_CHECK_MODULES([FIREBIRD], [fbembed], [FIREBIRD_PKGNAME=fbembed])
+            ])
+            FIREBIRD_VERSION=`pkg-config --modversion "$FIREBIRD_PKGNAME"`
+        else
+            AC_MSG_NOTICE([fb_config found])
+            FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
+            AC_MSG_CHECKING([for Firebird Client library])
+            FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
+            FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
+            FilterLibs "${FIREBIRD_LIBS}"
+            FIREBIRD_LIBS="${filteredlibs}"
+        fi
+        AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
+        AC_MSG_CHECKING([Firebird version])
+        if test -n "${FIREBIRD_VERSION}"; then
+            FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
+            if test "$FIREBIRD_MAJOR" -ge "3"; then
+                AC_MSG_RESULT([OK])
+            else
+                AC_MSG_ERROR([Ensure firebird >= 3 is installed])
+            fi
+        else
+            save_CFLAGS="${CFLAGS}"
+            CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
+            AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
+#if defined(FB_API_VER) && FB_API_VER == 30
+int fb_api_is_30(void) { return 0; }
+#else
+#error "Wrong Firebird API version"
+#endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 3.0.x is installed]))
+            CFLAGS="$save_CFLAGS"
+        fi
+        ENABLE_FIREBIRD_SDBC=TRUE
+        AC_DEFINE([ENABLE_FIREBIRD_SDBC],1)
+    elif test "$enable_database_connectivity" = no; then
+        AC_MSG_RESULT([none])
+    elif test "$cross_compiling" = "yes"; then
+        AC_MSG_RESULT([none])
+    else
+        dnl Embedded Firebird has version 3.0
+        dnl We need libatomic_ops for any non X86/X64 system
+        if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
+            dnl ===================================================================
+            dnl Check for system libatomic_ops
+            dnl ===================================================================
+            libo_CHECK_SYSTEM_MODULE([libatomic_ops],[LIBATOMIC_OPS],[atomic_ops >= 0.7.2])
+            if test "$with_system_libatomic_ops" = "yes"; then
+                SYSTEM_LIBATOMIC_OPS=TRUE
+                AC_CHECK_HEADERS(atomic_ops.h, [],
+                [AC_MSG_ERROR(atomic_ops.h not found. install libatomic_ops)], [])
+            else
+                SYSTEM_LIBATOMIC_OPS=
+                LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
+                LIBATOMIC_OPS_LIBS="-latomic_ops"
+                BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
+            fi
+        fi
+
+        AC_MSG_RESULT([internal])
+        SYSTEM_FIREBIRD=
+        FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/gen/Release/firebird/include"
+        FIREBIRD_LIBS="-lfbclient"
+
+        if test "$with_system_libtommath" = "yes"; then
+            SYSTEM_LIBTOMMATH=TRUE
+            dnl check for tommath presence
+            save_LIBS=$LIBS
+            AC_CHECK_HEADER(tommath.h,,AC_MSG_ERROR(Include file for tommath not found - please install development tommath package))
+            AC_CHECK_LIB(tommath, mp_init, LIBTOMMATH_LIBS=-ltommath, AC_MSG_ERROR(Library tommath not found - please install development tommath package))
+            LIBS=$save_LIBS
+        else
+            SYSTEM_LIBTOMMATH=
+            LIBTOMMATH_CFLAGS="-I${WORKDIR}/UnpackedTarball/libtommath"
+            LIBTOMMATH_LIBS="-ltommath"
+            BUILD_TYPE="$BUILD_TYPE LIBTOMMATH"
+        fi
+
+        BUILD_TYPE="$BUILD_TYPE FIREBIRD"
+        ENABLE_FIREBIRD_SDBC=TRUE
+        AC_DEFINE([ENABLE_FIREBIRD_SDBC],1)
+    fi
+fi
+AC_SUBST(ENABLE_FIREBIRD_SDBC)
+AC_SUBST(SYSTEM_LIBATOMIC_OPS)
+AC_SUBST(LIBATOMIC_OPS_CFLAGS)
+AC_SUBST(LIBATOMIC_OPS_LIBS)
+AC_SUBST(SYSTEM_FIREBIRD)
+AC_SUBST(FIREBIRD_CFLAGS)
+AC_SUBST(FIREBIRD_LIBS)
+AC_SUBST(SYSTEM_LIBTOMMATH)
+AC_SUBST(LIBTOMMATH_CFLAGS)
+AC_SUBST(LIBTOMMATH_LIBS)
+
+dnl ===================================================================
+dnl Check for system curl
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([curl],[CURL],[libcurl >= 7.68.0],enabled)
+
+dnl ===================================================================
+dnl Check for system boost
+dnl ===================================================================
+AC_MSG_CHECKING([which boost to use])
+if test "$with_system_boost" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_BOOST=TRUE
+    AX_BOOST_BASE([1.66],,[AC_MSG_ERROR([no suitable Boost found])])
+    AX_BOOST_DATE_TIME
+    AX_BOOST_FILESYSTEM
+    AX_BOOST_IOSTREAMS
+    AX_BOOST_LOCALE
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS $CXXFLAGS_CXX11"
+    AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
+       [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
+    AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
+       [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    # this is in m4/ax_boost_base.m4
+    FilterLibs "${BOOST_LDFLAGS}"
+    BOOST_LDFLAGS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE BOOST"
+    SYSTEM_BOOST=
+    if test "${COM}" = "GCC" -o "${COM_IS_CLANG}" = "TRUE"; then
+        # use warning-suppressing wrapper headers
+        BOOST_CPPFLAGS="-I${SRC_ROOT}/external/boost/include -I${WORKDIR}/UnpackedTarball/boost"
+    else
+        BOOST_CPPFLAGS="-I${WORKDIR}/UnpackedTarball/boost"
+    fi
+fi
+AC_SUBST(SYSTEM_BOOST)
+
+dnl ===================================================================
+dnl Check for system mdds
+dnl ===================================================================
+MDDS_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/mdds/include"
+libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.1 >= 2.1.0])
+
+dnl ===================================================================
+dnl Check for system dragonbox
+dnl ===================================================================
+AC_MSG_CHECKING([which dragonbox to use])
+if test "$with_system_dragonbox" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_DRAGONBOX=TRUE
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    # This is where upstream installs to, unfortunately no .pc or so...
+    DRAGONBOX_CFLAGS=-I/usr/include/dragonbox-1.1.3
+    CPPFLAGS="$CPPFLAGS $DRAGONBOX_CFLAGS"
+    AC_CHECK_HEADER([dragonbox/dragonbox.h], [],
+       [AC_MSG_ERROR([dragonbox/dragonbox.h not found. install dragonbox])], [])
+    AC_LANG_POP([C++])
+    CPPFLAGS=$save_CPPFLAGS
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE DRAGONBOX"
+    SYSTEM_DRAGONBOX=
+fi
+AC_SUBST([SYSTEM_DRAGONBOX])
+AC_SUBST([DRAGONBOX_CFLAGS])
+
+dnl ===================================================================
+dnl Check for system frozen
+dnl ===================================================================
+AC_MSG_CHECKING([which frozen to use])
+if test "$with_system_frozen" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_FROZEN=TRUE
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    AC_CHECK_HEADER([frozen/unordered_map.h], [],
+       [AC_MSG_ERROR([frozen/unordered_map.h not found. install frozen headers])], [])
+    AC_LANG_POP([C++])
+    CPPFLAGS=$save_CPPFLAGS
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE FROZEN"
+    SYSTEM_FROZEN=
+fi
+AC_SUBST([SYSTEM_FROZEN])
+AC_SUBST([FROZEN_CFLAGS])
+
+dnl ===================================================================
+dnl Check for system libfixmath
+dnl ===================================================================
+AC_MSG_CHECKING([which libfixmath to use])
+if test "$with_system_libfixmath" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBFIXMATH=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER([libfixmath/fix16.hpp], [],
+       [AC_MSG_ERROR([libfixmath/fix16.hpp not found. install libfixmath])], [])
+    AC_CHECK_LIB([libfixmath], [fix16_mul], [:], [AC_MSG_ERROR(libfixmath lib not found or functional)], [])
+    AC_LANG_POP([C++])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBFIXMATH=
+fi
+AC_SUBST([SYSTEM_LIBFIXMATH])
+
+dnl ===================================================================
+dnl Check for system glm
+dnl ===================================================================
+AC_MSG_CHECKING([which glm to use])
+if test "$with_system_glm" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_GLM=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER([glm/glm.hpp], [],
+       [AC_MSG_ERROR([glm/glm.hpp not found. install glm])], [])
+    AC_LANG_POP([C++])
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE GLM"
+    SYSTEM_GLM=
+    GLM_CFLAGS="${ISYSTEM}${WORKDIR}/UnpackedTarball/glm"
+fi
+AC_SUBST([GLM_CFLAGS])
+AC_SUBST([SYSTEM_GLM])
+
+dnl ===================================================================
+dnl Check for system odbc
+dnl ===================================================================
+AC_MSG_CHECKING([which odbc headers to use])
+if test "$with_system_odbc" = "yes" -o '(' "$with_system_headers" = "yes" -a "$with_system_odbc" = "auto" ')' -o '(' "$_os" = "WINNT" -a  "$with_system_odbc" != "no" ')'; then
+    AC_MSG_RESULT([external])
+    SYSTEM_ODBC_HEADERS=TRUE
+
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        save_CPPFLAGS=$CPPFLAGS
+        find_winsdk
+        PathFormat "$winsdktest"
+        CPPFLAGS="$CPPFLAGS -I$formatted_path/include/um -I$formatted_path/Include/$winsdklibsubdir/um -I$formatted_path/include -I$formatted_path/include/shared -I$formatted_path/include/$winsdklibsubdir/shared"
+        AC_CHECK_HEADER(sqlext.h, [],
+            [AC_MSG_ERROR(odbc not found. install odbc)],
+            [#include <windows.h>])
+        CPPFLAGS=$save_CPPFLAGS
+    else
+        AC_CHECK_HEADER(sqlext.h, [],
+            [AC_MSG_ERROR(odbc not found. install odbc)],[])
+    fi
+elif test "$enable_database_connectivity" = no; then
+    AC_MSG_RESULT([none])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_ODBC_HEADERS=
+fi
+AC_SUBST(SYSTEM_ODBC_HEADERS)
+
+dnl ===================================================================
+dnl Check for system NSS
+dnl ===================================================================
+if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
+    libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8],,system-if-linux)
+    AC_DEFINE(HAVE_FEATURE_NSS)
+    ENABLE_NSS=TRUE
+elif test $_os != iOS -a "$enable_openssl" != "no"; then
+    with_tls=openssl
+fi
+AC_SUBST(ENABLE_NSS)
+
+dnl ===================================================================
+dnl Enable LDAP support
+dnl ===================================================================
+
+if test "$test_openldap" = yes; then
+    AC_MSG_CHECKING([whether to enable LDAP support])
+    if test "$enable_ldap" = yes -a \( "$enable_openssl" = yes -o "$with_system_openldap" = yes \); then
+        AC_MSG_RESULT([yes])
+        ENABLE_LDAP=TRUE
+    else
+        if test "$enable_ldap" != "yes"; then
+            AC_MSG_RESULT([no])
+        else
+            AC_MSG_RESULT([no (needs OPENSSL or system openldap)])
+        fi
+    fi
+
+dnl ===================================================================
+dnl Check for system openldap
+dnl ===================================================================
+
+    if test "$ENABLE_LDAP" = TRUE; then
+        AC_MSG_CHECKING([which openldap library to use])
+        if test "$with_system_openldap" = yes; then
+            AC_MSG_RESULT([external])
+            SYSTEM_OPENLDAP=TRUE
+            AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
+            AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+            AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+        else
+            AC_MSG_RESULT([internal])
+            BUILD_TYPE="$BUILD_TYPE OPENLDAP"
+        fi
+    fi
+fi
+
+AC_SUBST(ENABLE_LDAP)
+AC_SUBST(SYSTEM_OPENLDAP)
+
+dnl ===================================================================
+dnl Check for TLS/SSL and cryptographic implementation to use
+dnl ===================================================================
+AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
+if test -n "$with_tls"; then
+    case $with_tls in
+    openssl)
+        AC_DEFINE(USE_TLS_OPENSSL)
+        TLS=OPENSSL
+        AC_MSG_RESULT([$TLS])
+
+        if test "$enable_openssl" != "yes"; then
+            AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
+        fi
+
+        # warn that OpenSSL has been selected but not all TLS code has this option
+        AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still depend on NSS])
+        add_warning "TLS/SSL implementation to use is OpenSSL but some code may still depend on NSS"
+        ;;
+    nss)
+        AC_DEFINE(USE_TLS_NSS)
+        TLS=NSS
+        AC_MSG_RESULT([$TLS])
+        ;;
+    no)
+        AC_MSG_RESULT([none])
+        AC_MSG_WARN([Skipping TLS/SSL])
+        ;;
+    *)
+        AC_MSG_RESULT([])
+        AC_MSG_ERROR([unsupported implementation $with_tls. Supported are:
+openssl - OpenSSL
+nss - Mozilla's Network Security Services (NSS)
+    ])
+        ;;
+    esac
+else
+    # default to using NSS, it results in smaller oox lib
+    AC_DEFINE(USE_TLS_NSS)
+    TLS=NSS
+    AC_MSG_RESULT([$TLS])
+fi
+AC_SUBST(TLS)
+
+dnl ===================================================================
+dnl Check for system sane
+dnl ===================================================================
+AC_MSG_CHECKING([which sane header to use])
+if test "$with_system_sane" = "yes"; then
+    AC_MSG_RESULT([external])
+    AC_CHECK_HEADER(sane/sane.h, [],
+      [AC_MSG_ERROR(sane not found. install sane)], [])
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE SANE"
+fi
+
+dnl ===================================================================
+dnl Check for system icu
+dnl ===================================================================
+ICU_MAJOR=73
+ICU_MINOR=2
+ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
+ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
+libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66])
+if test "$SYSTEM_ICU" = TRUE; then
+    AC_LANG_PUSH([C++])
+    AC_MSG_CHECKING([for unicode/rbbi.h])
+    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([icu headers not found])])
+    AC_LANG_POP([C++])
+
+    ICU_VERSION=`$PKG_CONFIG --modversion icu-i18n 2>/dev/null`
+    ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
+    ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
+
+    if test "$CROSS_COMPILING" != TRUE; then
+        # using the system icu tools can lead to version confusion, use the
+        # ones from the build environment when cross-compiling
+        AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
+        if test -z "$SYSTEM_GENBRK"; then
+            AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCCODE"; then
+            AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCMN"; then
+            AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
+        fi
+    fi
+fi
+
+AC_SUBST(SYSTEM_GENBRK)
+AC_SUBST(SYSTEM_GENCCODE)
+AC_SUBST(SYSTEM_GENCMN)
+AC_SUBST(ICU_MAJOR)
+AC_SUBST(ICU_MINOR)
+
+dnl ==================================================================
+dnl CURL
+dnl ==================================================================
+if test "$enable_curl" == "yes"; then
+    AC_DEFINE([HAVE_FEATURE_CURL])
+fi
+
+dnl ==================================================================
+dnl Breakpad
+dnl ==================================================================
+DEFAULT_CRASHDUMP_VALUE="true"
+AC_MSG_CHECKING([whether to enable breakpad])
+if test "$enable_breakpad" != yes; then
+    AC_MSG_RESULT([no])
+else
+    if test "$enable_curl" != "yes"; then
+        AC_MSG_ERROR([--disable-breakpad must be used when --disable-curl is used])
+    fi
+    AC_MSG_RESULT([yes])
+    ENABLE_BREAKPAD="TRUE"
+    AC_DEFINE(ENABLE_BREAKPAD)
+    AC_DEFINE(HAVE_FEATURE_BREAKPAD, 1)
+    BUILD_TYPE="$BUILD_TYPE BREAKPAD"
+
+    AC_MSG_CHECKING([for disable crash dump])
+    if test "$enable_crashdump" = no; then
+        DEFAULT_CRASHDUMP_VALUE="false"
+        AC_MSG_RESULT([yes])
+    else
+       AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([for crashreport config])
+    if test "$with_symbol_config" = "no"; then
+        BREAKPAD_SYMBOL_CONFIG="invalid"
+        AC_MSG_RESULT([no])
+    else
+        BREAKPAD_SYMBOL_CONFIG="$with_symbol_config"
+        AC_DEFINE(BREAKPAD_SYMBOL_CONFIG)
+        AC_MSG_RESULT([yes])
+    fi
+    AC_SUBST(BREAKPAD_SYMBOL_CONFIG)
+fi
+AC_SUBST(ENABLE_BREAKPAD)
+AC_SUBST(DEFAULT_CRASHDUMP_VALUE)
+
+dnl ==================================================================
+dnl libcmis
+dnl ==================================================================
+if test "$enable_libcmis" == "yes"; then
+    if test "$enable_curl" != "yes"; then
+        AC_MSG_ERROR([--disable-libcmis must be used when --disable-curl is used])
+    fi
+fi
+
+dnl ===================================================================
+dnl Orcus
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.19.1])
+if test "$with_system_orcus" != "yes"; then
+    if test "$SYSTEM_BOOST" = "TRUE"; then
+        dnl Link with Boost.System
+        dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
+        dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
+        dnl in documentation has no effect.
+        AX_BOOST_SYSTEM
+    fi
+fi
+dnl FIXME by renaming SYSTEM_LIBORCUS to SYSTEM_ORCUS in the build system world
+SYSTEM_LIBORCUS=$SYSTEM_ORCUS
+AC_SUBST([BOOST_SYSTEM_LIB])
+AC_SUBST(SYSTEM_LIBORCUS)
+
+dnl ===================================================================
+dnl HarfBuzz
+dnl ===================================================================
+harfbuzz_required_version=5.1.0
+
+GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC"
+HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
+case "$_os" in
+    Linux)
+        GRAPHITE_LIBS_internal="${WORKDIR}/LinkTarget/StaticLibrary/libgraphite.a"
+        HARFBUZZ_LIBS_internal="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.a"
+        ;;
+    *)
+        GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"
+        HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz"
+        ;;
+esac
+libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
+libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= $harfbuzz_required_version])
+
+if test "$COM" = "MSC"; then # override the above
+    GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib"
+    HARFBUZZ_LIBS="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.lib"
+fi
+
+if test "$with_system_harfbuzz" = "yes"; then
+    if test "$with_system_graphite" = "no"; then
+        AC_MSG_ERROR([--with-system-graphite must be used when --with-system-harfbuzz is used])
+    fi
+    AC_MSG_CHECKING([whether system Harfbuzz is built with Graphite support])
+    save_LIBS="$LIBS"
+    save_CFLAGS="$CFLAGS"
+    LIBS="$LIBS $HARFBUZZ_LIBS"
+    CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
+    AC_CHECK_FUNC(hb_graphite2_face_get_gr_face,,[AC_MSG_ERROR([Harfbuzz needs to be built with Graphite support.])])
+    LIBS="$save_LIBS"
+    CFLAGS="$save_CFLAGS"
+else
+    if test "$with_system_graphite" = "yes"; then
+        AC_MSG_ERROR([--without-system-graphite must be used when --without-system-harfbuzz is used])
+    fi
+fi
+
+if test "$USING_X11" = TRUE; then
+    AC_PATH_X
+    AC_PATH_XTRA
+    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+    if test -z "$x_includes"; then
+        x_includes="default_x_includes"
+    fi
+    if test -z "$x_libraries"; then
+        x_libraries="default_x_libraries"
+    fi
+    CFLAGS="$CFLAGS $X_CFLAGS"
+    LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
+    AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
+else
+    x_includes="no_x_includes"
+    x_libraries="no_x_libraries"
+fi
+
+if test "$USING_X11" = TRUE; then
+    dnl ===================================================================
+    dnl Check for extension headers
+    dnl ===================================================================
+    AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
+     [#include <X11/extensions/shape.h>])
+
+    # vcl needs ICE and SM
+    AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
+    AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
+        [AC_MSG_ERROR(ICE library not found)])
+    AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
+    AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
+        [AC_MSG_ERROR(SM library not found)])
+fi
+
+if test "$USING_X11" = TRUE -a "$ENABLE_JAVA" != ""; then
+    # bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c needs Xt
+    AC_CHECK_HEADERS(X11/Intrinsic.h,[],[AC_MSG_ERROR([libXt headers not found])])
+fi
+
+dnl ===================================================================
+dnl Check for system Xrender
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use Xrender])
+if test "$USING_X11" = TRUE -a  "$test_xrender" = "yes"; then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(XRENDER, xrender)
+    XRENDER_CFLAGS=$(printf '%s' "$XRENDER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${XRENDER_LIBS}"
+    XRENDER_LIBS="${filteredlibs}"
+    AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
+      [AC_MSG_ERROR(libXrender not found or functional)], [])
+    AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
+      [AC_MSG_ERROR(Xrender not found. install X)], [])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(XRENDER_CFLAGS)
+AC_SUBST(XRENDER_LIBS)
+
+dnl ===================================================================
+dnl Check for XRandr
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable RandR support])
+if test "$USING_X11" = TRUE -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
+    if test "$ENABLE_RANDR" != "TRUE"; then
+        AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
+                    [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
+        XRANDR_CFLAGS=" "
+        AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
+          [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
+        XRANDR_LIBS="-lXrandr "
+        ENABLE_RANDR="TRUE"
+    fi
+    XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${XRANDR_LIBS}"
+    XRANDR_LIBS="${filteredlibs}"
+else
+    ENABLE_RANDR=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(XRANDR_CFLAGS)
+AC_SUBST(XRANDR_LIBS)
+AC_SUBST(ENABLE_RANDR)
+
+if test -z "$with_webdav"; then
+    with_webdav=$test_webdav
+fi
+
+AC_MSG_CHECKING([for WebDAV support])
+case "$with_webdav" in
+no)
+    AC_MSG_RESULT([no])
+    WITH_WEBDAV=""
+    ;;
+*)
+    AC_MSG_RESULT([yes])
+    # curl is already mandatory (almost) and checked elsewhere
+    if test "$enable_curl" = "no"; then
+        AC_MSG_ERROR(["--without-webdav must be used when --disable-curl is used"])
+    fi
+    WITH_WEBDAV=TRUE
+    ;;
+esac
+AC_SUBST(WITH_WEBDAV)
+
+dnl ===================================================================
+dnl Check for disabling cve_tests
+dnl ===================================================================
+AC_MSG_CHECKING([whether to execute CVE tests])
+# If not explicitly enabled or disabled, default
+if test -z "$enable_cve_tests"; then
+    case "$OS" in
+    WNT)
+        # Default cves off for Windows with its wild and wonderful
+        # variety of AV software kicking in and panicking
+        enable_cve_tests=no
+        ;;
+    *)
+        # otherwise yes
+        enable_cve_tests=yes
+        ;;
+    esac
+fi
+if test "$enable_cve_tests" = "no"; then
+    AC_MSG_RESULT([no])
+    DISABLE_CVE_TESTS=TRUE
+    AC_SUBST(DISABLE_CVE_TESTS)
+else
+    AC_MSG_RESULT([yes])
+fi
+
+dnl ===================================================================
+dnl Check for system openssl
+dnl ===================================================================
+ENABLE_OPENSSL=
+AC_MSG_CHECKING([whether to disable OpenSSL usage])
+if test "$enable_openssl" = "yes"; then
+    AC_MSG_RESULT([no])
+    ENABLE_OPENSSL=TRUE
+    if test "$_os" = Darwin ; then
+        # OpenSSL is deprecated when building for 10.7 or later.
+        #
+        # https://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion
+        # https://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion
+
+        with_system_openssl=no
+        libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
+    elif test "$_os" = "FreeBSD" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
+            && test "$with_system_openssl" != "no"; then
+        with_system_openssl=yes
+        SYSTEM_OPENSSL=TRUE
+        OPENSSL_CFLAGS=
+        OPENSSL_LIBS="-lssl -lcrypto"
+    else
+        libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
+        if test -n "${SYSTEM_OPENSSL}"; then
+            AC_DEFINE([SYSTEM_OPENSSL])
+        fi
+    fi
+    if test "$with_system_openssl" = "yes"; then
+        AC_MSG_CHECKING([whether openssl supports SHA512])
+        AC_LANG_PUSH([C])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
+            SHA512_CTX context;
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])])
+        AC_LANG_POP(C)
+    fi
+else
+    AC_MSG_RESULT([yes])
+
+    # warn that although OpenSSL is disabled, system libraries may depend on it
+    AC_MSG_WARN([OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies])
+    add_warning "OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies"
+fi
+
+AC_SUBST([ENABLE_OPENSSL])
+
+if test "$enable_cipher_openssl_backend" = yes && test "$ENABLE_OPENSSL" != TRUE; then
+    if test "$libo_fuzzed_enable_cipher_openssl_backend" = yes; then
+        AC_MSG_NOTICE([Resetting --enable-cipher-openssl-backend=no])
+        enable_cipher_openssl_backend=no
+    else
+        AC_MSG_ERROR([--enable-cipher-openssl-backend needs OpenSSL, but --disable-openssl was given.])
+    fi
+fi
+AC_MSG_CHECKING([whether to enable the OpenSSL backend for rtl/cipher.h])
+ENABLE_CIPHER_OPENSSL_BACKEND=
+if test "$enable_cipher_openssl_backend" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_CIPHER_OPENSSL_BACKEND=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_CIPHER_OPENSSL_BACKEND])
+
+dnl ===================================================================
+dnl Select the crypto backends used by LO
+dnl ===================================================================
+
+if test "$build_crypto" = yes; then
+    if test "$OS" = WNT; then
+        BUILD_TYPE="$BUILD_TYPE CRYPTO_MSCAPI"
+        AC_DEFINE([USE_CRYPTO_MSCAPI])
+    elif test "$ENABLE_NSS" = TRUE; then
+        BUILD_TYPE="$BUILD_TYPE CRYPTO_NSS"
+        AC_DEFINE([USE_CRYPTO_NSS])
+    fi
+fi
+
+ARGON2_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/argon2/include"
+if test "$COM" = "MSC"; then
+    ARGON2_LIBS_internal="${WORKDIR}/UnpackedTarball/argon2/vs2015/build/Argon2OptDll.lib"
+else
+    ARGON2_LIBS_internal="${WORKDIR}/UnpackedTarball/argon2/libargon2.a"
+fi
+libo_CHECK_SYSTEM_MODULE([argon2],[ARGON2],[libargon2])
+
+dnl ===================================================================
+dnl Check for system redland
+dnl ===================================================================
+dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
+dnl raptor2: need at least 2.0.7 for CVE-2012-0037
+libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
+if test "$with_system_redland" = "yes"; then
+    AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
+            [AC_MSG_ERROR(librdf too old. Need >= 1.0.16)], [])
+else
+    RAPTOR_MAJOR="0"
+    RASQAL_MAJOR="3"
+    REDLAND_MAJOR="0"
+fi
+AC_SUBST(RAPTOR_MAJOR)
+AC_SUBST(RASQAL_MAJOR)
+AC_SUBST(REDLAND_MAJOR)
+
+dnl ===================================================================
+dnl Check for system hunspell
+dnl ===================================================================
+AC_MSG_CHECKING([which libhunspell to use])
+if test "$with_system_hunspell" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_HUNSPELL=TRUE
+    AC_LANG_PUSH([C++])
+    PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
+    if test "$HUNSPELL_PC" != "TRUE"; then
+        AC_CHECK_HEADER(hunspell.hxx, [],
+            [
+            AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
+            [AC_MSG_ERROR(hunspell headers not found.)], [])
+            ], [])
+        AC_CHECK_LIB([hunspell], [main], [:],
+           [ AC_MSG_ERROR(hunspell library not found.) ], [])
+        HUNSPELL_LIBS=-lhunspell
+    fi
+    AC_LANG_POP([C++])
+    HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${HUNSPELL_LIBS}"
+    HUNSPELL_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_HUNSPELL=
+    HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
+    if test "$COM" = "MSC"; then
+        HUNSPELL_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/hunspell.lib"
+    else
+        HUNSPELL_LIBS="-L${WORKDIR}/UnpackedTarball/hunspell/src/hunspell/.libs -lhunspell-1.7"
+    fi
+    BUILD_TYPE="$BUILD_TYPE HUNSPELL"
+fi
+AC_SUBST(SYSTEM_HUNSPELL)
+AC_SUBST(HUNSPELL_CFLAGS)
+AC_SUBST(HUNSPELL_LIBS)
+
+dnl ===================================================================
+dnl Check for system zxcvbn
+dnl ===================================================================
+AC_MSG_CHECKING([which zxcvbn to use])
+if test "$with_system_zxcvbn" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_ZXCVBN=TRUE
+    AC_CHECK_HEADER(zxcvbn.h, [],
+       [ AC_MSG_ERROR(zxcvbn headers not found.)], [])
+    AC_CHECK_LIB(zxcvbn, ZxcvbnMatch, [],
+        [ AC_MSG_ERROR(zxcvbn library not found.)], [])
+else
+   AC_MSG_RESULT([internal])
+   BUILD_TYPE="$BUILD_TYPE ZXCVBN"
+   SYSTEM_ZXCVBN=
+fi
+AC_SUBST(SYSTEM_ZXCVBN)
+
+dnl ===================================================================
+dnl Check for system zxing
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use zxing])
+if test "$enable_zxing" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_ZXING=
+    SYSTEM_ZXING=
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_ZXING=TRUE
+    AC_MSG_CHECKING([which libzxing to use])
+    if test "$with_system_zxing" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_ZXING=TRUE
+        ZXING_CFLAGS=
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        save_IFS=$IFS
+        IFS=$P_SEP
+        for i in $CPLUS_INCLUDE_PATH /usr/include; do
+            dnl Reset IFS as soon as possible, to avoid unexpected side effects (and the
+            dnl "/usr/include" fallback makes sure we get here at least once; resetting rather than
+            dnl unsetting follows the advice at <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;
+            dnl a=commitdiff;h=e51c9919f2cf70185b7916ac040bc0bbfd0f743b> "Add recommendation on (not)
+            dnl unsetting IFS."):
+            IFS=$save_IFS
+            dnl TODO: GCC and Clang treat empty paths in CPLUS_INCLUDE_PATH like ".", but we simply
+            dnl ignore them here:
+            if test -z "$i"; then
+                continue
+            fi
+            dnl TODO: White space in $i would cause problems:
+            CXXFLAGS="$save_CXXFLAGS ${CXXFLAGS_CXX11} -I$i/ZXing"
+            AC_CHECK_HEADER(MultiFormatWriter.h, [ZXING_CFLAGS=-I$i/ZXing; break],
+                [unset ac_cv_header_MultiFormatWriter_h], [#include <stdexcept>])
+        done
+        CXXFLAGS=$save_CXXFLAGS
+        if test -z "$ZXING_CFLAGS"; then
+            AC_MSG_ERROR(zxing headers not found.)
+        fi
+        AC_CHECK_LIB([ZXing], [main], [ZXING_LIBS=-lZXing],
+            [ AC_CHECK_LIB([ZXingCore], [main], [ZXING_LIBS=-lZXingCore],
+            [ AC_MSG_ERROR(zxing C++ library not found.) ])], [])
+        AC_LANG_POP([C++])
+        ZXING_CFLAGS=$(printf '%s' "$ZXING_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${ZXING_LIBS}"
+        ZXING_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_ZXING=
+        BUILD_TYPE="$BUILD_TYPE ZXING"
+        ZXING_CFLAGS="-I${WORKDIR}/UnpackedTarball/zxing/core/src"
+    fi
+    if test "$ENABLE_ZXING" = TRUE; then
+        AC_DEFINE(ENABLE_ZXING)
+    fi
+    AC_MSG_CHECKING([whether zxing::tosvg function is available])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 $ZXING_CFLAGS"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <BitMatrix.h>
+            #include <BitMatrixIO.h>
+            int main(){
+                ZXing::BitMatrix matrix(1, 1);
+                matrix.set(0, 0, true);
+                ZXing::ToSVG(matrix);
+                return 0;
+            }
+        ])], [
+            AC_DEFINE([HAVE_ZXING_TOSVG],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    AC_SUBST(HAVE_ZXING_TOSVG)
+fi
+AC_SUBST(SYSTEM_ZXING)
+AC_SUBST(ENABLE_ZXING)
+AC_SUBST(ZXING_CFLAGS)
+AC_SUBST(ZXING_LIBS)
+
+dnl ===================================================================
+dnl Check for system box2d
+dnl ===================================================================
+AC_MSG_CHECKING([which box2d to use])
+if test "$with_system_box2d" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_BOX2D=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER(box2d/box2d.h, [BOX2D_H_FOUND='TRUE'],
+        [BOX2D_H_FOUND='FALSE'])
+    if test "$BOX2D_H_FOUND" = "TRUE"; then # 2.4.0+
+        _BOX2D_LIB=box2d
+        AC_DEFINE(BOX2D_HEADER,<box2d/box2d.h>)
+    else
+        # fail this. there's no other alternative to check when we are here.
+        AC_CHECK_HEADER([Box2D/Box2D.h], [],
+            [AC_MSG_ERROR(box2d headers not found.)])
+        _BOX2D_LIB=Box2D
+        AC_DEFINE(BOX2D_HEADER,<Box2D/Box2D.h>)
+    fi
+    AC_CHECK_LIB([$_BOX2D_LIB], [main], [:],
+        [ AC_MSG_ERROR(box2d library not found.) ], [])
+    BOX2D_LIBS=-l$_BOX2D_LIB
+    AC_LANG_POP([C++])
+    BOX2D_CFLAGS=$(printf '%s' "$BOX2D_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${BOX2D_LIBS}"
+    BOX2D_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_BOX2D=
+    BUILD_TYPE="$BUILD_TYPE BOX2D"
+fi
+AC_SUBST(SYSTEM_BOX2D)
+AC_SUBST(BOX2D_CFLAGS)
+AC_SUBST(BOX2D_LIBS)
+
+dnl ===================================================================
+dnl Checking for altlinuxhyph
+dnl ===================================================================
+AC_MSG_CHECKING([which altlinuxhyph to use])
+if test "$with_system_altlinuxhyph" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_HYPH=TRUE
+    AC_CHECK_HEADER(hyphen.h, [],
+       [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
+    AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
+       [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
+       [#include <hyphen.h>])
+    AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
+        [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    if test -z "$HYPHEN_LIB"; then
+        AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
+    if test -z "$HYPHEN_LIB"; then
+        AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_HYPH=
+    BUILD_TYPE="$BUILD_TYPE HYPHEN"
+    if test "$COM" = "MSC"; then
+        HYPHEN_LIB="${WORKDIR}/LinkTarget/StaticLibrary/hyphen.lib"
+    else
+        HYPHEN_LIB="-L${WORKDIR}/UnpackedTarball/hyphen/.libs -lhyphen"
+    fi
+fi
+AC_SUBST(SYSTEM_HYPH)
+AC_SUBST(HYPHEN_LIB)
+
+dnl ===================================================================
+dnl Checking for mythes
+dnl ===================================================================
+AC_MSG_CHECKING([which mythes to use])
+if test "$with_system_mythes" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_MYTHES=TRUE
+    AC_LANG_PUSH([C++])
+    PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
+    if test "$MYTHES_PKGCONFIG" = "no"; then
+        AC_CHECK_HEADER(mythes.hxx, [],
+            [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
+        AC_CHECK_LIB([mythes-1.2], [main], [:],
+            [ MYTHES_FOUND=no], [])
+    if test "$MYTHES_FOUND" = "no"; then
+        AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
+                [ MYTHES_FOUND=no], [])
+    fi
+    if test "$MYTHES_FOUND" = "no"; then
+        AC_MSG_ERROR([mythes library not found!.])
+    fi
+    fi
+    AC_LANG_POP([C++])
+    MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${MYTHES_LIBS}"
+    MYTHES_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_MYTHES=
+    BUILD_TYPE="$BUILD_TYPE MYTHES"
+    if test "$COM" = "MSC"; then
+        MYTHES_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/mythes.lib"
+    else
+        MYTHES_LIBS="-L${WORKDIR}/UnpackedTarball/mythes/.libs -lmythes-1.2"
+    fi
+fi
+AC_SUBST(SYSTEM_MYTHES)
+AC_SUBST(MYTHES_CFLAGS)
+AC_SUBST(MYTHES_LIBS)
+
+dnl ===================================================================
+dnl How should we build the linear programming solver ?
+dnl ===================================================================
+
+ENABLE_COINMP=
+AC_MSG_CHECKING([whether to build with CoinMP])
+if test "$enable_coinmp" != "no"; then
+    ENABLE_COINMP=TRUE
+    AC_MSG_RESULT([yes])
+    if test "$with_system_coinmp" = "yes"; then
+        SYSTEM_COINMP=TRUE
+        PKG_CHECK_MODULES(COINMP, coinmp coinutils)
+        FilterLibs "${COINMP_LIBS}"
+        COINMP_LIBS="${filteredlibs}"
+    else
+        BUILD_TYPE="$BUILD_TYPE COINMP"
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_COINMP)
+AC_SUBST(SYSTEM_COINMP)
+AC_SUBST(COINMP_CFLAGS)
+AC_SUBST(COINMP_LIBS)
+
+ENABLE_LPSOLVE=
+AC_MSG_CHECKING([whether to build with lpsolve])
+if test "$enable_lpsolve" != "no"; then
+    ENABLE_LPSOLVE=TRUE
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_LPSOLVE)
+
+if test "$ENABLE_LPSOLVE" = TRUE; then
+    AC_MSG_CHECKING([which lpsolve to use])
+    if test "$with_system_lpsolve" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_LPSOLVE=TRUE
+        AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
+           [ AC_MSG_ERROR(lpsolve headers not found.)], [])
+        save_LIBS=$LIBS
+        # some systems need this. Like Ubuntu...
+        AC_CHECK_LIB(m, floor)
+        AC_CHECK_LIB(dl, dlopen)
+        AC_CHECK_LIB([lpsolve55], [make_lp], [:],
+            [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
+        LIBS=$save_LIBS
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_LPSOLVE=
+        BUILD_TYPE="$BUILD_TYPE LPSOLVE"
+    fi
+fi
+AC_SUBST(SYSTEM_LPSOLVE)
+
+dnl ===================================================================
+dnl Checking for libexttextcat
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.4.1])
+if test "$with_system_libexttextcat" = "yes"; then
+    SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
+fi
+AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
+
+dnl ===================================================================
+dnl Checking for libnumbertext
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libnumbertext],[LIBNUMBERTEXT],[libnumbertext >= 1.0.6])
+if test "$with_system_libnumbertext" = "yes"; then
+    SYSTEM_LIBNUMBERTEXT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libnumbertext`
+    SYSTEM_LIBNUMBERTEXT=YES
+else
+    SYSTEM_LIBNUMBERTEXT=
+fi
+AC_SUBST(SYSTEM_LIBNUMBERTEXT)
+AC_SUBST(SYSTEM_LIBNUMBERTEXT_DATA)
+
+dnl ***************************************
+dnl testing libc version for Linux...
+dnl ***************************************
+if test "$_os" = "Linux"; then
+    AC_MSG_CHECKING([whether the libc is recent enough])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    #include <features.h>
+    #if defined(__GNU_LIBRARY__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
+    #error glibc >= 2.1 is required
+    #endif
+    ]])],, [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, upgrade libc])])
+fi
+
+dnl =========================================
+dnl Check for uuidgen
+dnl =========================================
+if test "$_os" = "WINNT"; then
+    # we must use the uuidgen from the Windows SDK, which will be in the LO_PATH, but isn't in
+    # the PATH for AC_PATH_PROG. It is already tested above in the WINDOWS_SDK_HOME check.
+    UUIDGEN=uuidgen.exe
+    AC_SUBST(UUIDGEN)
+else
+    AC_PATH_PROG([UUIDGEN], [uuidgen])
+    if test -z "$UUIDGEN"; then
+        AC_MSG_WARN([uuid is needed for building installation sets])
+    fi
+fi
+
+dnl ***************************************
+dnl Checking for bison and flex
+dnl ***************************************
+AC_PATH_PROG(BISON, bison)
+if test -z "$BISON"; then
+    AC_MSG_ERROR([no bison found in \$PATH, install it])
+else
+    AC_MSG_CHECKING([the bison version])
+    _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
+    _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
+    dnl Accept newer than 2.0; for --enable-compiler-plugins at least 2.3 is known to be bad and
+    dnl cause
+    dnl
+    dnl   idlc/source/parser.y:222:15: error: externally available entity 'YYSTYPE' is not previously declared in an included file (if it is only used in this translation unit, put it in an unnamed namespace; otherwise, provide a declaration of it in an included file) [loplugin:external]
+    dnl   typedef union YYSTYPE
+    dnl           ~~~~~~^~~~~~~
+    dnl
+    dnl while at least 3.4.1 is know to be good:
+    if test "$COMPILER_PLUGINS" = TRUE; then
+        if test "$_bison_longver" -lt 2004; then
+            AC_MSG_ERROR([failed ($BISON $_bison_version need 2.4+ for --enable-compiler-plugins)])
+        fi
+    else
+        if test "$_bison_longver" -lt 2000; then
+            AC_MSG_ERROR([failed ($BISON $_bison_version need 2.0+)])
+        fi
+    fi
+fi
+AC_SUBST([BISON])
+
+AC_PATH_PROG(FLEX, flex)
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    FLEX=`cygpath -m $FLEX`
+fi
+if test -z "$FLEX"; then
+    AC_MSG_ERROR([no flex found in \$PATH, install it])
+else
+    AC_MSG_CHECKING([the flex version])
+    _flex_version=$($FLEX --version | $SED -e 's/^.*\([[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\).*$/\1/')
+    if test $(echo $_flex_version | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}') -lt 2006000; then
+        AC_MSG_ERROR([failed ($FLEX $_flex_version found, but need at least 2.6.0)])
+    fi
+fi
+AC_SUBST([FLEX])
+
+AC_PATH_PROG(DIFF, diff)
+if test -z "$DIFF"; then
+    AC_MSG_ERROR(["diff" not found in \$PATH, install it])
+fi
+AC_SUBST([DIFF])
+
+AC_PATH_PROG(UNIQ, uniq)
+if test -z "$UNIQ"; then
+    AC_MSG_ERROR(["uniq" not found in \$PATH, install it])
+fi
+AC_SUBST([UNIQ])
+
+dnl ***************************************
+dnl Checking for patch
+dnl ***************************************
+AC_PATH_PROG(PATCH, patch)
+if test -z "$PATCH"; then
+    AC_MSG_ERROR(["patch" not found in \$PATH, install it])
+fi
+
+dnl On Solaris or macOS, check if --with-gnu-patch was used
+if test "$_os" = "SunOS" -o "$_os" = "Darwin"; then
+    if test -z "$with_gnu_patch"; then
+        GNUPATCH=$PATCH
+    else
+        if test -x "$with_gnu_patch"; then
+            GNUPATCH=$with_gnu_patch
+        else
+            AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
+        fi
+    fi
+
+    AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
+    if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
+        AC_MSG_RESULT([yes])
+    else
+        if $GNUPATCH --version | grep "2\.0-.*-Apple" >/dev/null 2>/dev/null; then
+            AC_MSG_RESULT([no, but accepted (Apple patch)])
+            add_warning "patch utility is not GNU patch. Apple's patch should work OK, but it might experience issues where GNU patch doesn't."
+        else
+            AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
+        fi
+    fi
+else
+    GNUPATCH=$PATCH
+fi
+
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GNUPATCH=`cygpath -m $GNUPATCH`
+fi
+
+dnl We also need to check for --with-gnu-cp
+
+if test -z "$with_gnu_cp"; then
+    # check the place where the good stuff is hidden on Solaris...
+    if test -x /usr/gnu/bin/cp; then
+        GNUCP=/usr/gnu/bin/cp
+    else
+        AC_PATH_PROGS(GNUCP, gnucp cp)
+    fi
+    if test -z $GNUCP; then
+        AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
+    fi
+else
+    if test -x "$with_gnu_cp"; then
+        GNUCP=$with_gnu_cp
+    else
+        AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
+    fi
+fi
+
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GNUCP=`cygpath -m $GNUCP`
+fi
+
+AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
+if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
+    AC_MSG_RESULT([yes])
+elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
+    AC_MSG_RESULT([yes])
+else
+    case "$build_os" in
+    darwin*|netbsd*|openbsd*|freebsd*|dragonfly*)
+        x_GNUCP=[\#]
+        GNUCP=''
+        AC_MSG_RESULT([no gnucp found - using the system's cp command])
+        ;;
+    *)
+        AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
+        ;;
+    esac
+fi
+
+AC_SUBST(GNUPATCH)
+AC_SUBST(GNUCP)
+AC_SUBST(x_GNUCP)
+
+dnl ***************************************
+dnl testing assembler path
+dnl ***************************************
+ML_EXE=""
+if test "$_os" = "WINNT"; then
+    case "$WIN_HOST_ARCH" in
+    x86) assembler=ml.exe ;;
+    x64) assembler=ml64.exe ;;
+    arm64) assembler=armasm64.exe ;;
+    esac
+
+    AC_MSG_CHECKING([for the MSVC assembler ($assembler)])
+    if test -f "$MSVC_HOST_PATH/$assembler"; then
+        ML_EXE=`win_short_path_for_make "$MSVC_HOST_PATH/$assembler"`
+        AC_MSG_RESULT([$ML_EXE])
+    else
+        AC_MSG_ERROR([not found in $MSVC_HOST_PATH])
+    fi
+fi
+
+AC_SUBST(ML_EXE)
+
+dnl ===================================================================
+dnl We need zip and unzip
+dnl ===================================================================
+AC_PATH_PROG(ZIP, zip)
+test -z "$ZIP" && AC_MSG_ERROR([zip is required])
+if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
+    AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install it and make sure it is the one found first in PATH],,)
+fi
+
+AC_PATH_PROG(UNZIP, unzip)
+test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
+
+dnl ===================================================================
+dnl Zip must be a specific type for different build types.
+dnl ===================================================================
+if test $build_os = cygwin; then
+    if test -n "`$ZIP -h | $GREP -i WinNT`"; then
+        AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
+    fi
+fi
+
+dnl ===================================================================
+dnl We need touch with -h option support.
+dnl ===================================================================
+AC_PATH_PROG(TOUCH, touch)
+test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
+touch "$WARNINGS_FILE"
+if ! "$TOUCH" -h "$WARNINGS_FILE" 2>/dev/null > /dev/null; then
+    AC_MSG_ERROR([touch version with -h option support is required to build, please install it and make sure it is the one found first in PATH],,)
+fi
+
+dnl ===================================================================
+dnl Check for system epoxy
+dnl ===================================================================
+EPOXY_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/epoxy/include"
+libo_CHECK_SYSTEM_MODULE([epoxy], [EPOXY], [epoxy >= 1.2])
+
+dnl ===================================================================
+dnl Show which vclplugs will be built.
+dnl ===================================================================
+R=""
+
+libo_ENABLE_VCLPLUG([gen])
+libo_ENABLE_VCLPLUG([gtk3])
+libo_ENABLE_VCLPLUG([gtk3_kde5])
+libo_ENABLE_VCLPLUG([gtk4])
+libo_ENABLE_VCLPLUG([kf5])
+libo_ENABLE_VCLPLUG([kf6])
+libo_ENABLE_VCLPLUG([qt5])
+libo_ENABLE_VCLPLUG([qt6])
+
+if test "$_os" = "WINNT"; then
+    R="$R win"
+elif test "$_os" = "Darwin"; then
+    R="$R osx"
+elif test "$_os" = "iOS"; then
+    R="ios"
+elif test "$_os" = Android; then
+    R="android"
+fi
+
+build_vcl_plugins="$R"
+if test -z "$build_vcl_plugins"; then
+    build_vcl_plugins=" none"
+fi
+AC_MSG_NOTICE([VCLplugs to be built:${build_vcl_plugins}])
+VCL_PLUGIN_INFO=$R
+AC_SUBST([VCL_PLUGIN_INFO])
+
+if test "$DISABLE_DYNLOADING" = TRUE -a -z "$DISABLE_GUI" -a \( -z "$R" -o $(echo "$R" | wc -w) -ne 1 \); then
+    AC_MSG_ERROR([Can't build --disable-dynamic-loading without --disable-gui and a single VCL plugin"])
+fi
+
+dnl ===================================================================
+dnl Check for GTK libraries
+dnl ===================================================================
+
+GTK3_CFLAGS=""
+GTK3_LIBS=""
+ENABLE_GTKTILEDVIEWER=""
+if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = "xyes"; then
+    if test "$with_system_cairo" = no; then
+        add_warning 'Non-system cairo combined with gtk3 is known to cause trouble (eg. broken image in the splashscreen). Use --with-system-cairo unless you know what you are doing.'
+    fi
+    : ${with_system_cairo:=yes}
+    PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.20 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 atk >= 2.28.1 cairo)
+    GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK3_LIBS}"
+    GTK3_LIBS="${filteredlibs}"
+
+    dnl We require egl only for the gtk3 plugin. Otherwise we use glx.
+    if test "$with_system_epoxy" != "yes"; then
+        AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.]))
+        AC_CHECK_HEADER(EGL/eglplatform.h, [],
+                        [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
+    fi
+elif test -n "$with_gtk3_build" -a "$OS" = "WNT"; then
+    PathFormat "${with_gtk3_build}/lib/pkgconfig"
+    if test "$build_os" = "cygwin"; then
+        dnl cygwin's pkg-config does not recognize "C:/..."-style paths, only "/cygdrive/c/..."
+        formatted_path_unix=`cygpath -au "$formatted_path_unix"`
+    fi
+
+    PKG_CONFIG_PATH="$formatted_path_unix"; export PKG_CONFIG_PATH
+    PKG_CHECK_MODULES(GTK3, cairo gdk-3.0 gio-2.0 glib-2.0 gobject-2.0 gtk+-3.0)
+    GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK3_LIBS}"
+    GTK3_LIBS="${filteredlibs}"
+    ENABLE_GTKTILEDVIEWER="yes"
+fi
+AC_SUBST(GTK3_LIBS)
+AC_SUBST(GTK3_CFLAGS)
+AC_SUBST(ENABLE_GTKTILEDVIEWER)
+
+GTK4_CFLAGS=""
+GTK4_LIBS=""
+if test "$test_gtk4" = yes -a "x$enable_gtk4" = "xyes"; then
+    if test "$with_system_cairo" = no; then
+        add_warning 'Non-system cairo combined with gtk4 is assumed to cause trouble; proceed at your own risk.'
+    fi
+    : ${with_system_cairo:=yes}
+    PKG_CHECK_MODULES(GTK4, gtk4 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo atk)
+    GTK4_CFLAGS=$(printf '%s' "$GTK4_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK4_LIBS}"
+    GTK4_LIBS="${filteredlibs}"
+
+    dnl We require egl only for the gtk4 plugin. Otherwise we use glx.
+    if test "$with_system_epoxy" != "yes"; then
+        AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.]))
+        AC_CHECK_HEADER(EGL/eglplatform.h, [],
+                        [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
+    fi
+fi
+AC_SUBST(GTK4_LIBS)
+AC_SUBST(GTK4_CFLAGS)
+
+if test "$enable_introspection" = yes; then
+    if test "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
+        GOBJECT_INTROSPECTION_REQUIRE(INTROSPECTION_REQUIRED_VERSION)
+    else
+        AC_MSG_ERROR([--enable-introspection requires --enable-gtk3])
+    fi
+fi
+
+# AT-SPI2 tests require gtk3, xvfb-run, dbus-launch and atspi-2
+if ! test "$ENABLE_GTK3" = TRUE; then
+    if test "$enable_atspi_tests" = yes; then
+        AC_MSG_ERROR([--enable-atspi-tests requires --enable-gtk3])
+    fi
+    enable_atspi_tests=no
+fi
+if ! test "$enable_atspi_tests" = no; then
+    AC_PATH_PROGS([XVFB_RUN], [xvfb-run], no)
+    if ! test "$XVFB_RUN" = no; then
+        dnl make sure the found xvfb-run actually works
+        AC_MSG_CHECKING([whether $XVFB_RUN works...])
+        if $XVFB_RUN --auto-servernum true >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no])
+            XVFB_RUN=no
+        fi
+    fi
+    if test "$XVFB_RUN" = no; then
+        if test "$enable_atspi_tests" = yes; then
+            AC_MSG_ERROR([xvfb-run required by --enable-atspi-tests not found])
+        fi
+        enable_atspi_tests=no
+    fi
+fi
+if ! test "$enable_atspi_tests" = no; then
+    AC_PATH_PROGS([DBUS_LAUNCH], [dbus-launch], no)
+    if test "$DBUS_LAUNCH" = no; then
+        if test "$enable_atspi_tests" = yes; then
+            AC_MSG_ERROR([dbus-launch required by --enable-atspi-tests not found])
+        fi
+        enable_atspi_tests=no
+    fi
+fi
+if ! test "$enable_atspi_tests" = no; then
+    PKG_CHECK_MODULES([ATSPI2], [atspi-2 gobject-2.0],,
+                      [if test "$enable_atspi_tests" = yes; then
+                           AC_MSG_ERROR([$ATSPI2_PKG_ERRORS])
+                       else
+                           enable_atspi_tests=no
+                       fi])
+fi
+if ! test "x$enable_atspi_tests" = xno; then
+    PKG_CHECK_MODULES([ATSPI2_2_32], [atspi-2 >= 2.32],
+                      [have_atspi_scroll_to=1],
+                      [have_atspi_scroll_to=0])
+    AC_DEFINE_UNQUOTED([HAVE_ATSPI2_SCROLL_TO], [$have_atspi_scroll_to],
+                       [Whether AT-SPI2 has the scrollTo API])
+fi
+ENABLE_ATSPI_TESTS=
+test "$enable_atspi_tests" = no || ENABLE_ATSPI_TESTS=TRUE
+AC_SUBST([ENABLE_ATSPI_TESTS])
+
+dnl ===================================================================
+dnl check for dbus support
+dnl ===================================================================
+ENABLE_DBUS=""
+DBUS_CFLAGS=""
+DBUS_LIBS=""
+DBUS_GLIB_CFLAGS=""
+DBUS_GLIB_LIBS=""
+DBUS_HAVE_GLIB=""
+
+if test "$enable_dbus" = "no"; then
+    test_dbus=no
+fi
+
+AC_MSG_CHECKING([whether to enable DBUS support])
+if test "$test_dbus" = "yes"; then
+    ENABLE_DBUS="TRUE"
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.60)
+    AC_DEFINE(ENABLE_DBUS)
+    DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${DBUS_LIBS}"
+    DBUS_LIBS="${filteredlibs}"
+
+    # Glib is needed for BluetoothServer
+    # Sets also DBUS_GLIB_CFLAGS/DBUS_GLIB_LIBS if successful.
+    PKG_CHECK_MODULES(DBUS_GLIB,[glib-2.0 >= 2.4],
+        [
+            DBUS_HAVE_GLIB="TRUE"
+            AC_DEFINE(DBUS_HAVE_GLIB,1)
+        ],
+        AC_MSG_WARN([[No Glib found, Bluetooth support will be disabled]])
+    )
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_DBUS)
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+AC_SUBST(DBUS_HAVE_GLIB)
+
+AC_MSG_CHECKING([whether to enable Impress remote control])
+if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SDREMOTE=TRUE
+    SDREMOTE_ENTITLEMENT="	<key>com.apple.security.network.server</key>
+	<true/>"
+    AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
+
+    if test $OS = MACOSX && test "$MACOSX_SDK_VERSION" -ge 101500; then
+        # The Bluetooth code doesn't compile with macOS SDK 10.15
+        if test "$enable_sdremote_bluetooth" = yes; then
+            AC_MSG_ERROR([macOS SDK $macosx_sdk does not currently support --enable-sdremote-bluetooth])
+        fi
+        add_warning "not building the bluetooth part of the sdremote - used api was removed from macOS SDK 10.15"
+        enable_sdremote_bluetooth=no
+    fi
+    # If not explicitly enabled or disabled, default
+    if test -z "$enable_sdremote_bluetooth"; then
+        case "$OS" in
+        LINUX|MACOSX|WNT)
+            # Default to yes for these
+            enable_sdremote_bluetooth=yes
+            ;;
+        *)
+            # otherwise no
+            enable_sdremote_bluetooth=no
+            ;;
+        esac
+    fi
+    # $enable_sdremote_bluetooth is guaranteed non-empty now
+
+    if test "$enable_sdremote_bluetooth" != "no"; then
+        if test "$OS" = "LINUX"; then
+            if test "$ENABLE_DBUS" = "TRUE" -a "$DBUS_HAVE_GLIB" = "TRUE"; then
+                AC_MSG_RESULT([yes])
+                ENABLE_SDREMOTE_BLUETOOTH=TRUE
+                dnl ===================================================================
+                dnl Check for system bluez
+                dnl ===================================================================
+                AC_MSG_CHECKING([which Bluetooth header to use])
+                if test "$with_system_bluez" = "yes"; then
+                    AC_MSG_RESULT([external])
+                    AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
+                        [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
+                    SYSTEM_BLUEZ=TRUE
+                else
+                    AC_MSG_RESULT([internal])
+                    SYSTEM_BLUEZ=
+                fi
+            else
+                AC_MSG_RESULT([no, dbus disabled])
+                ENABLE_SDREMOTE_BLUETOOTH=
+                SYSTEM_BLUEZ=
+            fi
+        else
+            AC_MSG_RESULT([yes])
+            ENABLE_SDREMOTE_BLUETOOTH=TRUE
+            SYSTEM_BLUEZ=
+            SDREMOTE_ENTITLEMENT="$SDREMOTE_ENTITLEMENT
+	<key>com.apple.security.device.bluetooth</key>
+	<true/>"
+        fi
+    else
+        AC_MSG_RESULT([no])
+        ENABLE_SDREMOTE_BLUETOOTH=
+        SYSTEM_BLUEZ=
+    fi
+else
+    ENABLE_SDREMOTE=
+    SYSTEM_BLUEZ=
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_SDREMOTE)
+AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
+AC_SUBST(SDREMOTE_ENTITLEMENT)
+AC_SUBST(SYSTEM_BLUEZ)
+
+dnl ===================================================================
+dnl Check whether to enable GIO support
+dnl ===================================================================
+if test "$ENABLE_GTK4" = "TRUE" -o "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
+    AC_MSG_CHECKING([whether to enable GIO support])
+    if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
+        dnl Need at least 2.26 for the dbus support.
+        PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26],
+                          [ENABLE_GIO="TRUE"], [ENABLE_GIO=""])
+        if test "$ENABLE_GIO" = "TRUE"; then
+            AC_DEFINE(ENABLE_GIO)
+            GIO_CFLAGS=$(printf '%s' "$GIO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+            FilterLibs "${GIO_LIBS}"
+            GIO_LIBS="${filteredlibs}"
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_GIO)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+
+dnl ===================================================================
+
+SPLIT_APP_MODULES=""
+if test "$enable_split_app_modules" = "yes"; then
+    SPLIT_APP_MODULES="TRUE"
+fi
+AC_SUBST(SPLIT_APP_MODULES)
+
+SPLIT_OPT_FEATURES=""
+if test "$enable_split_opt_features" = "yes"; then
+    SPLIT_OPT_FEATURES="TRUE"
+fi
+AC_SUBST(SPLIT_OPT_FEATURES)
+
+dnl ===================================================================
+dnl Check whether the GStreamer libraries are available.
+dnl ===================================================================
+
+ENABLE_GSTREAMER_1_0=""
+
+if test "$test_gstreamer_1_0" = yes; then
+
+    AC_MSG_CHECKING([whether to enable the GStreamer 1.0 avmedia backend])
+    if test "$enable_avmedia" = yes -a "$enable_gstreamer_1_0" != no; then
+        ENABLE_GSTREAMER_1_0="TRUE"
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_MODULES( [GSTREAMER_1_0], [gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0] )
+        GSTREAMER_1_0_CFLAGS=$(printf '%s' "$GSTREAMER_1_0_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${GSTREAMER_1_0_LIBS}"
+        GSTREAMER_1_0_LIBS="${filteredlibs}"
+        AC_DEFINE(ENABLE_GSTREAMER_1_0)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(GSTREAMER_1_0_CFLAGS)
+AC_SUBST(GSTREAMER_1_0_LIBS)
+AC_SUBST(ENABLE_GSTREAMER_1_0)
+
+ENABLE_OPENGL_TRANSITIONS=
+ENABLE_OPENGL_CANVAS=
+if test $_os = iOS -o $_os = Android -o "$ENABLE_FUZZERS" = "TRUE"; then
+   : # disable
+elif test "$_os" = "Darwin"; then
+    # We use frameworks on macOS, no need for detail checks
+    ENABLE_OPENGL_TRANSITIONS=TRUE
+    AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+    ENABLE_OPENGL_CANVAS=TRUE
+elif test $_os = WINNT; then
+    ENABLE_OPENGL_TRANSITIONS=TRUE
+    AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+    ENABLE_OPENGL_CANVAS=TRUE
+else
+    if test "$USING_X11" = TRUE; then
+        AC_CHECK_LIB(GL, glBegin, [:], AC_MSG_ERROR([libGL required.]))
+        ENABLE_OPENGL_TRANSITIONS=TRUE
+        AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+        ENABLE_OPENGL_CANVAS=TRUE
+    fi
+fi
+
+AC_SUBST(ENABLE_OPENGL_TRANSITIONS)
+AC_SUBST(ENABLE_OPENGL_CANVAS)
+
+dnl =================================================
+dnl Check whether to build with OpenCL support.
+dnl =================================================
+
+if test $_os != iOS -a $_os != Android -a "$ENABLE_FUZZERS" != "TRUE" -a "$enable_opencl" = "yes"; then
+    # OPENCL in BUILD_TYPE and HAVE_FEATURE_OPENCL tell that OpenCL is potentially available on the
+    # platform (optional at run-time, used through clew).
+    BUILD_TYPE="$BUILD_TYPE OPENCL"
+    AC_DEFINE(HAVE_FEATURE_OPENCL)
+fi
+
+dnl =================================================
+dnl Check whether to build with dconf support.
+dnl =================================================
+
+if test $_os != Android -a $_os != iOS -a "$enable_dconf" != no; then
+    PKG_CHECK_MODULES([DCONF], [dconf >= 0.40.0], [], [
+        if test "$enable_dconf" = yes; then
+            AC_MSG_ERROR([dconf not found])
+        else
+            enable_dconf=no
+        fi])
+fi
+AC_MSG_CHECKING([whether to enable dconf])
+if test $_os = Android -o $_os = iOS -o "$enable_dconf" = no; then
+    DCONF_CFLAGS=
+    DCONF_LIBS=
+    ENABLE_DCONF=
+    AC_MSG_RESULT([no])
+else
+    ENABLE_DCONF=TRUE
+    AC_DEFINE(ENABLE_DCONF)
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST([DCONF_CFLAGS])
+AC_SUBST([DCONF_LIBS])
+AC_SUBST([ENABLE_DCONF])
+
+# pdf import?
+AC_MSG_CHECKING([whether to build the PDF import feature])
+ENABLE_PDFIMPORT=
+if test -z "$enable_pdfimport" -o "$enable_pdfimport" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PDFIMPORT=TRUE
+    AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
+else
+    AC_MSG_RESULT([no])
+fi
+
+# Pdfium?
+AC_MSG_CHECKING([whether to build PDFium])
+ENABLE_PDFIUM=
+if test \( -z "$enable_pdfium" -a "$ENABLE_PDFIMPORT" = "TRUE" \) -o "$enable_pdfium" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PDFIUM=TRUE
+    BUILD_TYPE="$BUILD_TYPE PDFIUM"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_PDFIUM)
+
+if test "$ENABLE_PDFIUM" = "TRUE"; then
+    AC_MSG_CHECKING([which OpenJPEG library to use])
+    if test "$with_system_openjpeg" = "yes"; then
+        SYSTEM_OPENJPEG2=TRUE
+        AC_MSG_RESULT([external])
+        PKG_CHECK_MODULES( OPENJPEG2, libopenjp2 )
+        OPENJPEG2_CFLAGS=$(printf '%s' "$OPENJPEG2_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${OPENJPEG2_LIBS}"
+        OPENJPEG2_LIBS="${filteredlibs}"
+    else
+        SYSTEM_OPENJPEG2=FALSE
+        AC_MSG_RESULT([internal])
+    fi
+
+    AC_MSG_CHECKING([which Abseil library to use])
+    if test "$with_system_abseil" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_ABSEIL=TRUE
+        AC_LANG_PUSH([C++])
+        AC_CHECK_HEADER(absl/types/bad_optional_access.h, [],
+                        [AC_MSG_ERROR(abseil headers not found.)], [])
+        AC_CHECK_HEADER(absl/types/bad_variant_access.h, [],
+                        [AC_MSG_ERROR(abseil headers not found.)], [])
+        AC_CHECK_LIB([absl_bad_optional_access], [main], [],
+                     [AC_MSG_ERROR([libabsl_bad_optional_access library not found.])])
+        AC_CHECK_LIB([absl_bad_variant_access], [main], [],
+                     [AC_MSG_ERROR([libabsl_bad_variant_access library not found.])])
+        ABSEIL_LIBS="-labsl_bad_optional_access -labsl_bad_variant_access"
+        AC_LANG_POP([C++])
+        ABSEIL_CFLAGS=$(printf '%s' "$ABSEIL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${ABSEIL_LIBS}"
+        ABSEIL_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+    fi
+fi
+AC_SUBST(SYSTEM_OPENJPEG2)
+AC_SUBST(SYSTEM_ABSEIL)
+AC_SUBST(ABSEIL_CFLAGS)
+AC_SUBST(ABSEIL_LIBS)
+
+dnl ===================================================================
+dnl Check for poppler
+dnl ===================================================================
+ENABLE_POPPLER=
+AC_MSG_CHECKING([whether to build Poppler])
+if test \( -z "$enable_poppler" -a "$ENABLE_PDFIMPORT" = "TRUE" -a $_os != Android \) -o "$enable_poppler" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_POPPLER=TRUE
+    AC_DEFINE(HAVE_FEATURE_POPPLER)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_POPPLER)
+
+if test "$ENABLE_PDFIMPORT" = "TRUE" -a "$ENABLE_POPPLER" != "TRUE" -a "$ENABLE_PDFIUM" != "TRUE"; then
+    AC_MSG_ERROR([Cannot import PDF without either Pdfium or Poppler; please enable either of them.])
+fi
+
+if test "$ENABLE_PDFIMPORT" != "TRUE" -a \( "$ENABLE_POPPLER" = "TRUE" -o "$ENABLE_PDFIUM" = "TRUE" \); then
+    AC_MSG_ERROR([Cannot enable Pdfium or Poppler when PDF importing is disabled; please enable PDF import first.])
+fi
+
+if test "$ENABLE_PDFIMPORT" = "TRUE" -a "$ENABLE_POPPLER" = "TRUE"; then
+    dnl ===================================================================
+    dnl Check for system poppler
+    dnl ===================================================================
+    AC_MSG_CHECKING([which PDF import poppler to use])
+    if test "$with_system_poppler" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_POPPLER=TRUE
+        PKG_CHECK_MODULES(POPPLER,[poppler >= 0.14 poppler-cpp])
+        POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${POPPLER_LIBS}"
+        POPPLER_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_POPPLER=
+        BUILD_TYPE="$BUILD_TYPE POPPLER"
+    fi
+    AC_DEFINE([ENABLE_PDFIMPORT],1)
+fi
+AC_SUBST(ENABLE_PDFIMPORT)
+AC_SUBST(SYSTEM_POPPLER)
+AC_SUBST(POPPLER_CFLAGS)
+AC_SUBST(POPPLER_LIBS)
+
+# Skia?
+ENABLE_SKIA=
+if test "$enable_skia" != "no" -a "$build_skia" = "yes" -a -z "$DISABLE_GUI"; then
+    # Skia now requires at least freetype2 >= 2.8.1, which is less that what LO requires as system freetype.
+    if test "$SYSTEM_FREETYPE" = TRUE; then
+        PKG_CHECK_EXISTS(freetype2 >= 21.0.15, # 21.0.15 = 2.8.1
+            [skia_freetype_ok=yes],
+            [skia_freetype_ok=no])
+    else # internal is ok
+        skia_freetype_ok=yes
+    fi
+    AC_MSG_CHECKING([whether to build Skia])
+    if test "$skia_freetype_ok" = "yes"; then
+        if test "$enable_skia" = "debug"; then
+            AC_MSG_RESULT([yes (debug)])
+            ENABLE_SKIA_DEBUG=TRUE
+        else
+            AC_MSG_RESULT([yes])
+            ENABLE_SKIA_DEBUG=
+        fi
+        ENABLE_SKIA=TRUE
+        if test "$ENDIANNESS" = "big" && test "$ENABLE_SKIA" = "TRUE"; then
+            AC_MSG_ERROR([skia doesn't work/isn't supported upstream on big-endian. Use --disable-skia])
+        fi
+
+        AC_DEFINE(HAVE_FEATURE_SKIA)
+        BUILD_TYPE="$BUILD_TYPE SKIA"
+
+        if test "$OS" = "MACOSX"; then
+            AC_DEFINE(SK_GANESH,1)
+            AC_DEFINE(SK_METAL,1)
+            SKIA_GPU=METAL
+            AC_SUBST(SKIA_GPU)
+        else
+            AC_DEFINE(SK_GANESH,1)
+            AC_DEFINE(SK_VULKAN,1)
+            SKIA_GPU=VULKAN
+            AC_SUBST(SKIA_GPU)
+        fi
+    else
+        AC_MSG_RESULT([no (freetype too old)])
+        add_warning "freetype version is too old for Skia library, at least 2.8.1 required, Skia support disabled"
+    fi
+
+else
+    AC_MSG_CHECKING([whether to build Skia])
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_SKIA)
+AC_SUBST(ENABLE_SKIA_DEBUG)
+
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE2=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE41=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE42=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX2=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX512=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F=
+LO_CLANG_CXXFLAGS_INTRINSICS_F16C=
+LO_CLANG_CXXFLAGS_INTRINSICS_FMA=
+LO_CLANG_VERSION=
+HAVE_LO_CLANG_DLLEXPORTINLINES=
+
+if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != TRUE; then
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+        AC_MSG_CHECKING([for Clang])
+        AC_MSG_RESULT([$LO_CLANG_CC / $LO_CLANG_CXX])
+    else
+        if test "$_os" = "WINNT"; then
+            AC_MSG_CHECKING([for clang-cl])
+            if test -x "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"; then
+                LO_CLANG_CC=`win_short_path_for_make "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"`
+            elif test -n "$PROGRAMFILES" -a -x "$(cygpath -u "$PROGRAMFILES/LLVM/bin/clang-cl.exe")"; then
+                LO_CLANG_CC=`win_short_path_for_make "$PROGRAMFILES/LLVM/bin/clang-cl.exe"`
+            elif test -x "$(cygpath -u "c:/Program Files/LLVM/bin/clang-cl.exe")"; then
+                LO_CLANG_CC=`win_short_path_for_make "c:/Program Files/LLVM/bin/clang-cl.exe"`
+            fi
+            if test -n "$LO_CLANG_CC"; then
+                dnl explicitly set -m32/-m64
+                LO_CLANG_CC="$LO_CLANG_CC -m$WIN_HOST_BITS"
+                LO_CLANG_CXX="$LO_CLANG_CC"
+                AC_MSG_RESULT([$LO_CLANG_CC])
+            else
+                AC_MSG_RESULT([no])
+            fi
+
+            AC_MSG_CHECKING([the dependency generation prefix (clang.exe -showIncludes)])
+            echo "#include <stdlib.h>" > conftest.c
+            LO_CLANG_SHOWINCLUDES_PREFIX=`VSLANG=1033 $LO_CLANG_CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
+                grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+            rm -f conftest.c conftest.obj
+            if test -z "$LO_CLANG_SHOWINCLUDES_PREFIX"; then
+                AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+            else
+                AC_MSG_RESULT(["$LO_CLANG_SHOWINCLUDES_PREFIX"])
+            fi
+        else
+            AC_CHECK_PROG(LO_CLANG_CC,clang,clang,[])
+            AC_CHECK_PROG(LO_CLANG_CXX,clang++,clang++,[])
+        fi
+    fi
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+        clang2_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $LO_CLANG_CC -E - | tail -1 | sed 's/ //g'`
+        LO_CLANG_VERSION=`echo "$clang2_version" | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
+        if test "$LO_CLANG_VERSION" -lt 50002; then
+            AC_MSG_WARN(["$clang2_version" is too old or unrecognized, must be at least Clang 5.0.2])
+            LO_CLANG_CC=
+            LO_CLANG_CXX=
+        fi
+    fi
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX" -a "$_os" = "WINNT"; then
+        save_CXX="$CXX"
+        CXX="$LO_CLANG_CXX"
+        AC_MSG_CHECKING([whether $CXX supports -Zc:dllexportInlines-])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS -Werror -Zc:dllexportInlines-"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+                HAVE_LO_CLANG_DLLEXPORTINLINES=TRUE
+                AC_MSG_RESULT([yes])
+            ], [AC_MSG_RESULT([no])])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_LANG_POP([C++])
+        CXX="$save_CXX"
+        if test -z "$HAVE_LO_CLANG_DLLEXPORTINLINES"; then
+            AC_MSG_ERROR([Clang compiler does not support -Zc:dllexportInlines-. The Skia library needs to be built using a newer Clang version, or use --disable-skia.])
+        fi
+    fi
+    if test -z "$LO_CLANG_CC" -o -z "$LO_CLANG_CXX"; then
+        # Skia is the default on Windows and Mac, so hard-require Clang.
+        # Elsewhere it's used just by the 'gen' VCL backend which is rarely used.
+        if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
+            AC_MSG_ERROR([Clang compiler not found. The Skia library needs to be built using Clang, or use --disable-skia.])
+        else
+            AC_MSG_WARN([Clang compiler not found.])
+        fi
+    else
+
+        save_CXX="$CXX"
+        CXX="$LO_CLANG_CXX"
+        # copy&paste (and adjust) of intrinsics checks, since MSVC's -arch doesn't work well for Clang-cl
+        flag_sse2=-msse2
+        flag_ssse3=-mssse3
+        flag_sse41=-msse4.1
+        flag_sse42=-msse4.2
+        flag_avx=-mavx
+        flag_avx2=-mavx2
+        flag_avx512="-mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd"
+        flag_avx512f=-mavx512f
+        flag_f16c=-mf16c
+        flag_fma=-mfma
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse2"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <emmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_xor_si128 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse2=yes],
+            [can_compile_sse2=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse2}])
+        if test "${can_compile_sse2}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE2="$flag_sse2"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSSE3 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_ssse3"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <tmmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_maddubs_epi16 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_ssse3=yes],
+            [can_compile_ssse3=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_ssse3}])
+        if test "${can_compile_ssse3}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3="$flag_ssse3"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE4.1 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse41"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <smmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_cmpeq_epi64 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse41=yes],
+            [can_compile_sse41=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse41}])
+        if test "${can_compile_sse41}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE41="$flag_sse41"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE4.2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse42"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <nmmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_cmpgt_epi64 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse42=yes],
+            [can_compile_sse42=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse42}])
+        if test "${can_compile_sse42}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE42="$flag_sse42"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c;
+                c = _mm256_xor_ps(a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_avx=yes],
+            [can_compile_avx=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx}])
+        if test "${can_compile_avx}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX="$flag_avx"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx2"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
+                c = _mm256_maddubs_epi16(a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_avx2=yes],
+            [can_compile_avx2=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx2}])
+        if test "${can_compile_avx2}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX2="$flag_avx2"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX512 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx512"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m512i a = _mm512_loadu_si512(0);
+                __m512d v1 = _mm512_load_pd(0);
+                // https://gcc.gnu.org/git/?p=gcc.git;a=commit;f=gcc/config/i386/avx512fintrin.h;h=23bce99cbe7016a04e14c2163ed3fe6a5a64f4e2
+                __m512d v2 = _mm512_abs_pd(v1);
+                return 0;
+            }
+            ])],
+            [can_compile_avx512=yes],
+            [can_compile_avx512=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx512}])
+        if test "${can_compile_avx512}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX512="$flag_avx512"
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F="$flag_avx512f"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile F16C intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_f16c"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0);
+                __m128 c;
+                c = _mm_cvtph_ps(a);
+                return 0;
+            }
+            ])],
+            [can_compile_f16c=yes],
+            [can_compile_f16c=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_f16c}])
+        if test "${can_compile_f16c}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_F16C="$flag_f16c"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile FMA intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_fma"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c = _mm256_set1_ps (0.0f), d;
+                d = _mm256_fmadd_ps(a, b, c);
+                return 0;
+            }
+            ])],
+            [can_compile_fma=yes],
+            [can_compile_fma=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_fma}])
+        if test "${can_compile_fma}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_FMA="$flag_fma"
+        fi
+
+        CXX="$save_CXX"
+    fi
+fi
+#
+# prefix LO_CLANG_CC/LO_CLANG_CXX with ccache if needed
+#
+if test "$CCACHE" != "" -a -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+    AC_MSG_CHECKING([whether $LO_CLANG_CC is already ccached])
+    AC_LANG_PUSH([C])
+    save_CC="$CC"
+    CC="$LO_CLANG_CC"
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS --ccache-skip -O2 -Werror"
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    CFLAGS=$save_CFLAGS
+    CC=$save_CC
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        LO_CLANG_CC="$CCACHE $LO_CLANG_CC"
+        AC_MSG_RESULT([no])
+    fi
+    AC_LANG_POP([C])
+
+    AC_MSG_CHECKING([whether $LO_CLANG_CXX is already ccached])
+    AC_LANG_PUSH([C++])
+    save_CXX="$CXX"
+    CXX="$LO_CLANG_CXX"
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS --ccache-skip -O2 -Werror"
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        LO_CLANG_CXX="$CCACHE $LO_CLANG_CXX"
+        AC_MSG_RESULT([no])
+    fi
+    CXXFLAGS=$save_CXXFLAGS
+    CXX=$save_CXX
+    AC_LANG_POP([C++])
+fi
+
+AC_SUBST(LO_CLANG_CC)
+AC_SUBST(LO_CLANG_CXX)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE2)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE41)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE42)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX2)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_F16C)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_FMA)
+AC_SUBST(LO_CLANG_SHOWINCLUDES_PREFIX)
+AC_SUBST(LO_CLANG_VERSION)
+AC_SUBST(CLANG_USE_LD)
+AC_SUBST([HAVE_LO_CLANG_DLLEXPORTINLINES])
+
+SYSTEM_GPGMEPP=
+
+AC_MSG_CHECKING([whether to enable gpgmepp])
+if test "$enable_gpgmepp" = no; then
+    AC_MSG_RESULT([no])
+elif test "$enable_mpl_subset" = "yes"; then
+    AC_MSG_RESULT([no (MPL only)])
+elif test "$enable_fuzzers" = "yes"; then
+    AC_MSG_RESULT([no (oss-fuzz)])
+elif test \( \( "$_os" = "Linux" -o "$_os" = "Darwin" \) -a "$ENABLE_NSS" = TRUE \) -o "$_os" = "WINNT" ; then
+    AC_MSG_RESULT([yes])
+    dnl ===================================================================
+    dnl Check for system gpgme
+    dnl ===================================================================
+    AC_MSG_CHECKING([which gpgmepp to use])
+    if test "$with_system_gpgmepp" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_GPGMEPP=TRUE
+
+        # C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way
+        AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
+            [AC_MSG_ERROR([gpgmepp headers not found, install gpgmepp >= 1.14 development package])], [])
+        AC_CHECK_HEADER(gpgme.h, [],
+            [AC_MSG_ERROR([gpgme headers not found, install gpgme development package])], [])
+        AC_CHECK_LIB(gpgmepp, main, [],
+            [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
+        GPGMEPP_LIBS=-lgpgmepp
+    else
+        AC_MSG_RESULT([internal])
+        BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGMEPP"
+
+        GPG_ERROR_CFLAGS="-I${WORKDIR}/UnpackedTarball/libgpg-error/src"
+        LIBASSUAN_CFLAGS="-I${WORKDIR}/UnpackedTarball/libassuan/src"
+        if test "$_os" != "WINNT"; then
+            GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
+            LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
+        fi
+    fi
+    ENABLE_GPGMEPP=TRUE
+    AC_DEFINE([HAVE_FEATURE_GPGME])
+    AC_PATH_PROG(GPG, gpg)
+    # TODO: Windows's cygwin gpg does not seem to work with our gpgme,
+    # so let's exclude that manually for the moment
+    if test -n "$GPG" -a "$_os" != "WINNT"; then
+        # make sure we not only have a working gpgme, but a full working
+        # gpg installation to run OpenPGP signature verification
+        AC_DEFINE([HAVE_FEATURE_GPGVERIFY])
+    fi
+    if test "$_os" = "Linux"; then
+      uid=`id -u`
+      AC_MSG_CHECKING([for /run/user/$uid])
+      if test -d /run/user/$uid; then
+        AC_MSG_RESULT([yes])
+        AC_PATH_PROG(GPGCONF, gpgconf)
+
+        # Older versions of gpgconf are not working as expected, since
+        # `gpgconf --remove-socketdir` fails to exit any gpg-agent daemon operating
+        # on that socket dir that has (indirectly) been started by the tests in xmlsecurity/qa/unit/signing/signing.cxx
+        # (see commit message of f0305ec0a7d199e605511844d9d6af98b66d4bfd%5E )
+        AC_MSG_CHECKING([whether version of gpgconf is suitable ... ])
+        GPGCONF_VERSION=`"$GPGCONF" --version | "$AWK" '/^gpgconf \(GnuPG\)/{print $3}'`
+        GPGCONF_NUMVER=`echo $GPGCONF_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+        if test "$GPGCONF_VERSION" = "2.2_OOo" -o "$GPGCONF_NUMVER" -ge "020200"; then
+          AC_MSG_RESULT([yes, $GPGCONF_VERSION])
+          AC_MSG_CHECKING([for gpgconf --create-socketdir... ])
+          if $GPGCONF --dump-options > /dev/null ; then
+            if $GPGCONF --dump-options | grep -q create-socketdir ; then
+              AC_MSG_RESULT([yes])
+              AC_DEFINE([HAVE_GPGCONF_SOCKETDIR])
+              AC_DEFINE_UNQUOTED([GPGME_GPGCONF], ["$GPGCONF"])
+            else
+              AC_MSG_RESULT([no])
+            fi
+          else
+            AC_MSG_RESULT([no. missing or broken gpgconf?])
+          fi
+        else
+          AC_MSG_RESULT([no, $GPGCONF_VERSION])
+        fi
+      else
+        AC_MSG_RESULT([no])
+     fi
+   fi
+else
+    AC_MSG_RESULT([no (unsupported OS or missing NSS)])
+fi
+AC_SUBST(ENABLE_GPGMEPP)
+AC_SUBST(SYSTEM_GPGMEPP)
+AC_SUBST(GPG_ERROR_CFLAGS)
+AC_SUBST(GPG_ERROR_LIBS)
+AC_SUBST(LIBASSUAN_CFLAGS)
+AC_SUBST(LIBASSUAN_LIBS)
+AC_SUBST(GPGMEPP_CFLAGS)
+AC_SUBST(GPGMEPP_LIBS)
+
+AC_MSG_CHECKING([whether to build Java Websocket for the UNO remote websocket client])
+if test "$with_java" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_JAVA_WEBSOCKET=TRUE
+    BUILD_TYPE="$BUILD_TYPE JAVA_WEBSOCKET"
+    NEED_ANT=TRUE
+else
+    AC_MSG_RESULT([no])
+    ENABLE_JAVA_WEBSOCKET=
+fi
+AC_SUBST(ENABLE_JAVA_WEBSOCKET)
+
+AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
+if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_MEDIAWIKI=TRUE
+    BUILD_TYPE="$BUILD_TYPE XSLTML"
+    if test  "x$with_java" = "xno"; then
+        AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_MEDIAWIKI=
+    SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
+fi
+AC_SUBST(ENABLE_MEDIAWIKI)
+
+AC_MSG_CHECKING([whether to build the Report Builder])
+if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_REPORTBUILDER=TRUE
+    AC_MSG_CHECKING([which jfreereport libs to use])
+    if test "$with_system_jfreereport" = "yes"; then
+        SYSTEM_JFREEREPORT=TRUE
+        AC_MSG_RESULT([external])
+        if test -z $SAC_JAR; then
+            SAC_JAR=/usr/share/java/sac.jar
+        fi
+        if ! test -f $SAC_JAR; then
+             AC_MSG_ERROR(sac.jar not found.)
+        fi
+
+        if test -z $LIBXML_JAR; then
+            if test -f /usr/share/java/libxml-1.0.0.jar; then
+                LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar
+            elif test -f /usr/share/java/libxml.jar; then
+                LIBXML_JAR=/usr/share/java/libxml.jar
+            else
+                AC_MSG_ERROR(libxml.jar replacement not found.)
+            fi
+        elif ! test -f $LIBXML_JAR; then
+            AC_MSG_ERROR(libxml.jar not found.)
+        fi
+
+        if test -z $FLUTE_JAR; then
+            if test -f /usr/share/java/flute-1.3.0.jar; then
+                FLUTE_JAR=/usr/share/java/flute-1.3.0.jar
+            elif test -f /usr/share/java/flute.jar; then
+                FLUTE_JAR=/usr/share/java/flute.jar
+            else
+                AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)
+            fi
+        elif ! test -f $FLUTE_JAR; then
+            AC_MSG_ERROR(flute-1.3.0.jar not found.)
+        fi
+
+        if test -z $JFREEREPORT_JAR; then
+            if test -f /usr/share/java/flow-engine-0.9.2.jar; then
+                JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar
+            elif test -f /usr/share/java/flow-engine.jar; then
+                JFREEREPORT_JAR=/usr/share/java/flow-engine.jar
+            else
+                AC_MSG_ERROR(jfreereport.jar replacement not found.)
+            fi
+        elif ! test -f  $JFREEREPORT_JAR; then
+                AC_MSG_ERROR(jfreereport.jar not found.)
+        fi
+
+        if test -z $LIBLAYOUT_JAR; then
+            if test -f /usr/share/java/liblayout-0.2.9.jar; then
+                LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar
+            elif test -f /usr/share/java/liblayout.jar; then
+                LIBLAYOUT_JAR=/usr/share/java/liblayout.jar
+            else
+                AC_MSG_ERROR(liblayout.jar replacement not found.)
+            fi
+        elif ! test -f $LIBLAYOUT_JAR; then
+                AC_MSG_ERROR(liblayout.jar not found.)
+        fi
+
+        if test -z $LIBLOADER_JAR; then
+            if test -f /usr/share/java/libloader-1.0.0.jar; then
+                LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar
+            elif test -f /usr/share/java/libloader.jar; then
+                LIBLOADER_JAR=/usr/share/java/libloader.jar
+            else
+                AC_MSG_ERROR(libloader.jar replacement not found.)
+            fi
+        elif ! test -f  $LIBLOADER_JAR; then
+            AC_MSG_ERROR(libloader.jar not found.)
+        fi
+
+        if test -z $LIBFORMULA_JAR; then
+            if test -f /usr/share/java/libformula-0.2.0.jar; then
+                LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar
+            elif test -f /usr/share/java/libformula.jar; then
+                LIBFORMULA_JAR=/usr/share/java/libformula.jar
+            else
+                AC_MSG_ERROR(libformula.jar replacement not found.)
+            fi
+        elif ! test -f $LIBFORMULA_JAR; then
+                AC_MSG_ERROR(libformula.jar not found.)
+        fi
+
+        if test -z $LIBREPOSITORY_JAR; then
+            if test -f /usr/share/java/librepository-1.0.0.jar; then
+                LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar
+            elif test -f /usr/share/java/librepository.jar; then
+                LIBREPOSITORY_JAR=/usr/share/java/librepository.jar
+            else
+                AC_MSG_ERROR(librepository.jar replacement not found.)
+            fi
+        elif ! test -f $LIBREPOSITORY_JAR; then
+            AC_MSG_ERROR(librepository.jar not found.)
+        fi
+
+        if test -z $LIBFONTS_JAR; then
+            if test -f /usr/share/java/libfonts-1.0.0.jar; then
+                LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar
+            elif test -f /usr/share/java/libfonts.jar; then
+                LIBFONTS_JAR=/usr/share/java/libfonts.jar
+            else
+                AC_MSG_ERROR(libfonts.jar replacement not found.)
+            fi
+        elif ! test -f $LIBFONTS_JAR; then
+                AC_MSG_ERROR(libfonts.jar not found.)
+        fi
+
+        if test -z $LIBSERIALIZER_JAR; then
+            if test -f /usr/share/java/libserializer-1.0.0.jar; then
+                LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar
+            elif test -f /usr/share/java/libserializer.jar; then
+                LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar
+            else
+                AC_MSG_ERROR(libserializer.jar replacement not found.)
+            fi
+        elif ! test -f $LIBSERIALIZER_JAR; then
+                AC_MSG_ERROR(libserializer.jar not found.)
+        fi
+
+        if test -z $LIBBASE_JAR; then
+            if test -f /usr/share/java/libbase-1.0.0.jar; then
+                LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar
+            elif test -f /usr/share/java/libbase.jar; then
+                LIBBASE_JAR=/usr/share/java/libbase.jar
+            else
+                AC_MSG_ERROR(libbase.jar replacement not found.)
+            fi
+        elif ! test -f $LIBBASE_JAR; then
+            AC_MSG_ERROR(libbase.jar not found.)
+        fi
+
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_JFREEREPORT=
+        BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
+        NEED_ANT=TRUE
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_REPORTBUILDER=
+    SYSTEM_JFREEREPORT=
+fi
+AC_SUBST(ENABLE_REPORTBUILDER)
+AC_SUBST(SYSTEM_JFREEREPORT)
+AC_SUBST(SAC_JAR)
+AC_SUBST(LIBXML_JAR)
+AC_SUBST(FLUTE_JAR)
+AC_SUBST(JFREEREPORT_JAR)
+AC_SUBST(LIBBASE_JAR)
+AC_SUBST(LIBLAYOUT_JAR)
+AC_SUBST(LIBLOADER_JAR)
+AC_SUBST(LIBFORMULA_JAR)
+AC_SUBST(LIBREPOSITORY_JAR)
+AC_SUBST(LIBFONTS_JAR)
+AC_SUBST(LIBSERIALIZER_JAR)
+
+# scripting provider for BeanShell?
+AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
+if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SCRIPTING_BEANSHELL=TRUE
+
+    dnl ===================================================================
+    dnl Check for system beanshell
+    dnl ===================================================================
+    AC_MSG_CHECKING([which beanshell to use])
+    if test "$with_system_beanshell" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_BSH=TRUE
+        if test -z $BSH_JAR; then
+            BSH_JAR=/usr/share/java/bsh.jar
+        fi
+        if ! test -f $BSH_JAR; then
+            AC_MSG_ERROR(bsh.jar not found.)
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_BSH=
+        BUILD_TYPE="$BUILD_TYPE BSH"
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_SCRIPTING_BEANSHELL=
+    SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
+fi
+AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
+AC_SUBST(SYSTEM_BSH)
+AC_SUBST(BSH_JAR)
+
+# scripting provider for JavaScript?
+AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
+if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SCRIPTING_JAVASCRIPT=TRUE
+
+    dnl ===================================================================
+    dnl Check for system rhino
+    dnl ===================================================================
+    AC_MSG_CHECKING([which rhino to use])
+    if test "$with_system_rhino" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_RHINO=TRUE
+        if test -z $RHINO_JAR; then
+            RHINO_JAR=/usr/share/java/js.jar
+        fi
+        if ! test -f $RHINO_JAR; then
+            AC_MSG_ERROR(js.jar not found.)
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_RHINO=
+        BUILD_TYPE="$BUILD_TYPE RHINO"
+        NEED_ANT=TRUE
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_SCRIPTING_JAVASCRIPT=
+    SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
+fi
+AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
+AC_SUBST(SYSTEM_RHINO)
+AC_SUBST(RHINO_JAR)
+
+# This is only used in Qt5/Qt6/KF5/KF6 checks to determine if /usr/lib64
+# paths should be added to library search path. So lets put all 64-bit
+# platforms there.
+supports_multilib=
+case "$host_cpu" in
+x86_64 | powerpc64 | powerpc64le | s390x | aarch64 | mips64 | mips64el | loongarch64 | riscv64)
+    if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
+        supports_multilib="yes"
+    fi
+    ;;
+*)
+    ;;
+esac
+
+dnl ===================================================================
+dnl QT5 Integration
+dnl ===================================================================
+
+QT5_CFLAGS=""
+QT5_LIBS=""
+QMAKE5="qmake"
+MOC5="moc"
+QT5_GOBJECT_CFLAGS=""
+QT5_GOBJECT_LIBS=""
+QT5_HAVE_GOBJECT=""
+QT5_PLATFORMS_SRCDIR=""
+if test \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) -o \
+        \( "$test_qt5" = "yes" -a "$ENABLE_QT5" = "TRUE" \) -o \
+        \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \)
+then
+    qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes"
+    qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries"
+
+    if test -n "$supports_multilib"; then
+        qt5_libdirs="$qt5_libdirs /usr/lib64/qt5 /usr/lib64/qt /usr/lib64"
+    fi
+
+    qt5_test_include="QtWidgets/qapplication.h"
+    if test "$_os" = "Emscripten"; then
+        qt5_test_library="libQt5Widgets.a"
+    else
+        qt5_test_library="libQt5Widgets.so"
+    fi
+
+    dnl Check for qmake5
+    if test -n "$QT5DIR"; then
+        AC_PATH_PROG(QMAKE5, [qmake], no, [$QT5DIR/bin])
+    else
+        AC_PATH_PROGS(QMAKE5, [qmake-qt5 qmake], no)
+    fi
+    if test "$QMAKE5" = "no"; then
+        AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    else
+        qmake5_test_ver="`$QMAKE5 -v 2>&1 | $SED -n -e 's/^Using Qt version \(5\.[[0-9.]]\+\).*$/\1/p'`"
+        if test -z "$qmake5_test_ver"; then
+            AC_MSG_ERROR([Wrong qmake for Qt5 found. Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+        fi
+        qmake5_minor_version="`echo $qmake5_test_ver | cut -d. -f2`"
+        qt5_minimal_minor="15"
+        if test "$qmake5_minor_version" -lt "$qt5_minimal_minor"; then
+            AC_MSG_ERROR([The minimal supported Qt5 version is 5.${qt5_minimal_minor}, but your 'qmake -v' reports Qt5 version $qmake5_test_ver.])
+        else
+            AC_MSG_NOTICE([Detected Qt5 version: $qmake5_test_ver])
+        fi
+    fi
+
+    qt5_incdirs="`$QMAKE5 -query QT_INSTALL_HEADERS` $qt5_incdirs"
+    qt5_libdirs="`$QMAKE5 -query QT_INSTALL_LIBS` $qt5_libdirs"
+    qt5_platformsdir="`$QMAKE5 -query QT_INSTALL_PLUGINS`/platforms"
+    QT5_PLATFORMS_SRCDIR="$qt5_platformsdir"
+
+    AC_MSG_CHECKING([for Qt5 headers])
+    qt5_incdir="no"
+    for inc_dir in $qt5_incdirs; do
+        if test -r "$inc_dir/$qt5_test_include"; then
+            qt5_incdir="$inc_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt5_incdir])
+    if test "x$qt5_incdir" = "xno"; then
+        AC_MSG_ERROR([Qt5 headers not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    fi
+    # check for scenario: qt5-qtbase-devel-*.86_64 installed but host is i686
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} -I${qt5_incdir}"
+    AC_CHECK_HEADER(QtCore/qconfig.h, [],
+        [AC_MSG_ERROR(qconfig.h header not found.)], [])
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([for Qt5 libraries])
+    qt5_libdir="no"
+    for lib_dir in $qt5_libdirs; do
+        if test -r "$lib_dir/$qt5_test_library"; then
+            qt5_libdir="$lib_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt5_libdir])
+    if test "x$qt5_libdir" = "xno"; then
+        AC_MSG_ERROR([Qt5 libraries not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    fi
+
+    if test "$_os" = "Emscripten"; then
+        if test ! -f "$QT5_PLATFORMS_SRCDIR"/wasm_shell.html ; then
+            QT5_PLATFORMS_SRCDIR="${QT5_PLATFORMS_SRCDIR/plugins/src\/plugins}/wasm"
+        fi
+        if test ! -f "${qt5_platformsdir}"/libqwasm.a -o ! -f "$QT5_PLATFORMS_SRCDIR"/wasm_shell.html; then
+            AC_MSG_ERROR([No Qt5 WASM QPA plugin found in ${qt5_platformsdir} or ${QT5_PLATFORMS_SRCDIR}])
+        fi
+
+        EMSDK_LLVM_NM="$(em-config LLVM_ROOT)"/llvm-nm
+        if ! test -x "$EMSDK_LLVM_NM"; then
+            AC_MSG_ERROR([Missing llvm-nm expected to be found at "$EMSDK_LLVM_NM".])
+        fi
+        if test ! -f "${qt5_libdir}"/libQt5Gui.a; then
+            AC_MSG_ERROR([No Qt5 WASM libQt5Gui.a in ${qt5_libdir}])
+        fi
+        QT5_WASM_SJLJ="`${EMSDK_LLVM_NM} "${qt5_libdir}"/libQt5Gui.a 2>/dev/null | $GREP emscripten_longjmp`"
+        if test "$ENABLE_WASM_EXCEPTIONS" = TRUE -a -n "$QT5_WASM_SJLJ"; then
+            AC_MSG_ERROR(['emscripten_longjmp' symbol found in libQt5Gui.a (missing '-s SUPPORT_LONGJMP=wasm'). See static/README.wasm.md.])
+        fi
+        if test "$ENABLE_WASM_EXCEPTIONS" != TRUE -a -z "$QT5_WASM_SJLJ"; then
+            AC_MSG_ERROR(['emscripten_longjmp' symbol not found in libQt5Gui.a. You probably use an incompatible Qt build with '-s SUPPORT_LONGJMP=wasm'.])
+        fi
+    fi
+
+    QT5_CFLAGS="-I$qt5_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    QT5_CFLAGS=$(printf '%s' "$QT5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    QT5_LIBS="-L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
+    if test "$_os" = "Emscripten"; then
+        QT5_LIBS="$QT5_LIBS -lqtpcre2 -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -L${qt5_platformsdir} -lqwasm"
+    fi
+
+    if test "$USING_X11" = TRUE; then
+        PKG_CHECK_MODULES(QT5_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which is needed for correct app grouping in X11.])])
+        QT5_CFLAGS="$QT5_CFLAGS $QT5_XCB_CFLAGS $QT5_XCB_ICCCM_CFLAGS"
+        QT5_LIBS="$QT5_LIBS $QT5_XCB_LIBS $QT5_XCB_ICCCM_LIBS -lQt5X11Extras"
+        QT5_USING_X11=1
+        AC_DEFINE(QT5_USING_X11)
+    fi
+
+    dnl Check for Meta Object Compiler
+
+    AC_PATH_PROGS( MOC5, [moc-qt5 moc], no, [`dirname $qt5_libdir`/bin:$QT5DIR/bin:$PATH])
+    if test "$MOC5" = "no"; then
+        AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
+the root of your Qt installation by exporting QT5DIR before running "configure".])
+    fi
+
+    if test "$test_gstreamer_1_0" = yes; then
+        PKG_CHECK_MODULES(QT5_GOBJECT,[gobject-2.0], [
+                QT5_HAVE_GOBJECT=1
+                AC_DEFINE(QT5_HAVE_GOBJECT)
+            ],
+            AC_MSG_WARN([[No GObject found, can't use QWidget GStreamer sink on wayland!]])
+        )
+    fi
+fi
+AC_SUBST(QT5_CFLAGS)
+AC_SUBST(QT5_LIBS)
+AC_SUBST(MOC5)
+AC_SUBST(QT5_GOBJECT_CFLAGS)
+AC_SUBST(QT5_GOBJECT_LIBS)
+AC_SUBST(QT5_HAVE_GOBJECT)
+AC_SUBST(QT5_PLATFORMS_SRCDIR)
+
+dnl ===================================================================
+dnl QT6 Integration
+dnl ===================================================================
+
+QT6_CFLAGS=""
+QT6_LIBS=""
+QMAKE6="qmake"
+MOC6="moc"
+QT6_PLATFORMS_SRCDIR=""
+if test \( "$test_kf6" = "yes" -a "$ENABLE_KF6" = "TRUE" \) -o \
+        \( "$test_qt6" = "yes" -a "$ENABLE_QT6" = "TRUE" \)
+then
+    qt6_incdirs="$QT6INC /usr/include/qt6 /usr/include $x_includes"
+    qt6_libdirs="$QT6LIB /usr/lib/qt6 /usr/lib $x_libraries"
+
+    if test -n "$supports_multilib"; then
+        qt6_libdirs="$qt6_libdirs /usr/lib64/qt6 /usr/lib64/qt /usr/lib64"
+    fi
+
+    qt6_test_include="QtWidgets/qapplication.h"
+    if test "$_os" = "Emscripten"; then
+        qt6_test_library="libQt6Widgets.a"
+    else
+        qt6_test_library="libQt6Widgets.so"
+    fi
+
+    dnl Check for qmake6
+    if test -n "$QT6DIR"; then
+        AC_PATH_PROG(QMAKE6, [qmake], no, [$QT6DIR/bin])
+    else
+        AC_PATH_PROGS(QMAKE6, [qmake-qt6 qmake6 qmake], no)
+    fi
+    if test "$QMAKE6" = "no"; then
+        AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    else
+        qmake6_test_ver="`$QMAKE6 -v 2>&1 | $SED -n -e 's/^Using Qt version \(6\.[[0-9.]]\+\).*$/\1/p'`"
+        if test -z "$qmake6_test_ver"; then
+            AC_MSG_ERROR([Wrong qmake for Qt6 found. Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+        fi
+        AC_MSG_NOTICE([Detected Qt6 version: $qmake6_test_ver])
+    fi
+
+    qt6_incdirs="`$QMAKE6 -query QT_INSTALL_HEADERS` $qt6_incdirs"
+    qt6_libdirs="`$QMAKE6 -query QT_INSTALL_LIBS` $qt6_libdirs"
+    qt6_platformsdir="`$QMAKE6 -query QT_INSTALL_PLUGINS`/platforms"
+    QT6_PLATFORMS_SRCDIR="$qt6_platformsdir"
+
+    AC_MSG_CHECKING([for Qt6 headers])
+    qt6_incdir="no"
+    for inc_dir in $qt6_incdirs; do
+        if test -r "$inc_dir/$qt6_test_include"; then
+            qt6_incdir="$inc_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt6_incdir])
+    if test "x$qt6_incdir" = "xno"; then
+        AC_MSG_ERROR([Qt6 headers not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    fi
+    # check for scenario: qt6-qtbase-devel-*.86_64 installed but host is i686
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} -I${qt6_incdir}"
+    AC_CHECK_HEADER(QtCore/qconfig.h, [],
+        [AC_MSG_ERROR(qconfig.h header not found.)], [])
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([for Qt6 libraries])
+    qt6_libdir="no"
+    for lib_dir in $qt6_libdirs; do
+        if test -r "$lib_dir/$qt6_test_library"; then
+            qt6_libdir="$lib_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt6_libdir])
+    if test "x$qt6_libdir" = "xno"; then
+        AC_MSG_ERROR([Qt6 libraries not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    fi
+
+    if test "$_os" = "Emscripten"; then
+        if test ! -f "$QT6_PLATFORMS_SRCDIR"/wasm_shell.html ; then
+            QT6_PLATFORMS_SRCDIR="${QT6_PLATFORMS_SRCDIR/plugins/src\/plugins}/wasm"
+        fi
+        if test ! -f "${qt6_platformsdir}"/libqwasm.a -o ! -f "$QT6_PLATFORMS_SRCDIR"/wasm_shell.html; then
+            AC_MSG_ERROR([No Qt6 WASM QPA plugin found in ${qt6_platformsdir} or ${QT6_PLATFORMS_SRCDIR}])
+        fi
+    fi
+
+    QT6_CFLAGS="-I$qt6_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    QT6_CFLAGS=$(printf '%s' "$QT6_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    QT6_LIBS="-L$qt6_libdir -lQt6Core -lQt6Gui -lQt6Widgets -lQt6Network"
+    if test "$_os" = "Emscripten"; then
+        QT6_LIBS="$QT6_LIBS -lqtpcre2 -lQt6EventDispatcherSupport -lQt6FontDatabaseSupport -L${qt6_platformsdir} -lqwasm"
+    fi
+
+    if test "$USING_X11" = TRUE; then
+        PKG_CHECK_MODULES(QT6_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which is needed for key modifier handling in X11.])])
+        QT6_CFLAGS="$QT6_CFLAGS $QT6_XCB_CFLAGS"
+        QT6_LIBS="$QT6_LIBS $QT6_XCB_LIBS"
+        QT6_USING_X11=1
+        AC_DEFINE(QT6_USING_X11)
+    fi
+
+    dnl Check for Meta Object Compiler
+
+    for lib_dir in $qt6_libdirs; do
+        if test -z "$qt6_libexec_dirs"; then
+            qt6_libexec_dirs="$lib_dir/libexec"
+        else
+            qt6_libexec_dirs="$qt6_libexec_dirs:$lib_dir/libexec"
+        fi
+    done
+    AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$qt6_libexec_dirs:`echo $qt6_libdirs | $SED -e 's/ /:/g'`:$PATH])
+    if test "$MOC6" = "no"; then
+        AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
+the root of your Qt installation by exporting QT6DIR before running "configure".])
+    else
+        moc6_test_ver="`$MOC6 -v 2>&1 | $SED -n -e 's/^moc \(6.*\)/\1/p'`"
+        if test -z "$moc6_test_ver"; then
+            AC_MSG_ERROR([Wrong moc for Qt6 found.])
+        fi
+        AC_MSG_NOTICE([Detected moc version: $moc_test_ver])
+    fi
+fi
+AC_SUBST(QT6_CFLAGS)
+AC_SUBST(QT6_LIBS)
+AC_SUBST(MOC6)
+AC_SUBST(QT6_PLATFORMS_SRCDIR)
+
+dnl ===================================================================
+dnl KF5 Integration
+dnl ===================================================================
+
+KF5_CFLAGS=""
+KF5_LIBS=""
+KF5_CONFIG="kf5-config"
+if test \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) -o \
+        \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \)
+then
+    if test "$OS" = "HAIKU"; then
+        haiku_arch="`echo $RTL_ARCH | tr X x`"
+        kf5_haiku_incdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_HEADERS_DIRECTORY`"
+        kf5_haiku_libdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_DEVELOP_LIB_DIRECTORY`"
+    fi
+
+    kf5_incdirs="$KF5INC /usr/include $kf5_haiku_incdirs $x_includes"
+    kf5_libdirs="$KF5LIB /usr/lib /usr/lib/kf5 /usr/lib/kf5/devel $kf5_haiku_libdirs $x_libraries"
+    if test -n "$supports_multilib"; then
+        kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel"
+    fi
+
+    kf5_test_include="KF5/KIOFileWidgets/KFileWidget"
+    kf5_test_library="libKF5KIOFileWidgets.so"
+    kf5_libdirs="$qt5_libdir $kf5_libdirs"
+
+    dnl kf5 KDE4 support compatibility installed
+    AC_PATH_PROG( KF5_CONFIG, $KF5_CONFIG, no, )
+    if test "$KF5_CONFIG" != "no"; then
+        kf5_incdirs="`$KF5_CONFIG --path include` $kf5_incdirs"
+        kf5_libdirs="`$KF5_CONFIG --path lib` $kf5_libdirs"
+    fi
+
+    dnl Check for KF5 headers
+    AC_MSG_CHECKING([for KF5 headers])
+    kf5_incdir="no"
+    for kf5_check in $kf5_incdirs; do
+        if test -r "$kf5_check/$kf5_test_include"; then
+            kf5_incdir="$kf5_check/KF5"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$kf5_incdir])
+    if test "x$kf5_incdir" = "xno"; then
+        AC_MSG_ERROR([KF5 headers not found.  Please specify the root of your KF5 installation by exporting KF5DIR before running "configure".])
+    fi
+
+    dnl Check for KF5 libraries
+    AC_MSG_CHECKING([for KF5 libraries])
+    kf5_libdir="no"
+    for kf5_check in $kf5_libdirs; do
+        if test -r "$kf5_check/$kf5_test_library"; then
+            kf5_libdir="$kf5_check"
+            break
+        fi
+    done
+
+    AC_MSG_RESULT([$kf5_libdir])
+    if test "x$kf5_libdir" = "xno"; then
+        AC_MSG_ERROR([KF5 libraries not found.  Please specify the root of your KF5 installation by exporting KF5DIR before running "configure".])
+    fi
+
+    KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
+    KF5_CFLAGS=$(printf '%s' "$KF5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+
+    if test "$USING_X11" = TRUE; then
+        KF5_LIBS="$KF5_LIBS -lQt5X11Extras"
+    fi
+
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $KF5_CFLAGS"
+    AC_MSG_CHECKING([whether KDE is >= 5.0])
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <kcoreaddons_version.h>
+
+int main(int argc, char **argv) {
+       if (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) return 0;
+       else return 1;
+}
+       ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST(KF5_CFLAGS)
+AC_SUBST(KF5_LIBS)
+
+dnl ===================================================================
+dnl KF6 Integration
+dnl ===================================================================
+
+KF6_CFLAGS=""
+KF6_LIBS=""
+if test \( "$test_kf6" = "yes" -a "$ENABLE_KF6" = "TRUE" \)
+then
+    if test "$OS" = "HAIKU"; then
+        haiku_arch="`echo $RTL_ARCH | tr X x`"
+        kf6_haiku_incdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_HEADERS_DIRECTORY`"
+        kf6_haiku_libdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_DEVELOP_LIB_DIRECTORY`"
+    fi
+
+    kf6_incdirs="$KF6INC /usr/include $kf6_haiku_incdirs $x_includes"
+    kf6_libdirs="$KF6LIB /usr/lib /usr/lib/kf6 /usr/lib/kf6/devel $kf6_haiku_libdirs $x_libraries"
+    if test -n "$supports_multilib"; then
+        kf6_libdirs="$kf6_libdirs /usr/lib64 /usr/lib64/kf6 /usr/lib64/kf6/devel"
+    fi
+
+    kf6_test_include="KF6/KIOFileWidgets/KFileWidget"
+    kf6_test_library="libKF6KIOFileWidgets.so"
+    kf6_libdirs="$qt6_libdir $kf6_libdirs"
+
+    dnl Check for KF6 headers
+    AC_MSG_CHECKING([for KF6 headers])
+    kf6_incdir="no"
+    for kf6_check in $kf6_incdirs; do
+        if test -r "$kf6_check/$kf6_test_include"; then
+            kf6_incdir="$kf6_check/KF6"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$kf6_incdir])
+    if test "x$kf6_incdir" = "xno"; then
+        AC_MSG_ERROR([KF6 headers not found.  Please specify the root of your KF6 installation by exporting KF6DIR before running "configure".])
+    fi
+
+    dnl Check for KF6 libraries
+    AC_MSG_CHECKING([for KF6 libraries])
+    kf6_libdir="no"
+    for kf6_check in $kf6_libdirs; do
+        if test -r "$kf6_check/$kf6_test_library"; then
+            kf6_libdir="$kf6_check"
+            break
+        fi
+    done
+
+    AC_MSG_RESULT([$kf6_libdir])
+    if test "x$kf6_libdir" = "xno"; then
+        AC_MSG_ERROR([KF6 libraries not found.  Please specify the root of your KF6 installation by exporting KF6DIR before running "configure".])
+    fi
+
+    KF6_CFLAGS="-I$kf6_incdir -I$kf6_incdir/KCoreAddons -I$kf6_incdir/KI18n -I$kf6_incdir/KConfigCore -I$kf6_incdir/KWindowSystem -I$kf6_incdir/KIO -I$kf6_incdir/KIOCore -I$kf6_incdir/KIOWidgets -I$kf6_incdir/KIOFileWidgets -I$qt6_incdir -I$qt6_incdir/QtCore -I$qt6_incdir/QtGui -I$qt6_incdir/QtWidgets -I$qt6_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    KF6_LIBS="-L$kf6_libdir -lKF6CoreAddons -lKF6I18n -lKF6ConfigCore -lKF6WindowSystem -lKF6KIOCore -lKF6KIOWidgets -lKF6KIOFileWidgets -L$qt6_libdir -lQt6Core -lQt6Gui -lQt6Widgets -lQt6Network"
+    KF6_CFLAGS=$(printf '%s' "$KF6_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $KF6_CFLAGS"
+    dnl KF6 development version as of 2023-06 uses version number 5.240
+    AC_MSG_CHECKING([whether KDE is >= 5.240])
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <kcoreaddons_version.h>
+
+int main(int argc, char **argv) {
+       if (KCOREADDONS_VERSION_MAJOR == 6 || (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 240)) return 0;
+       else return 1;
+}
+       ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST(KF6_CFLAGS)
+AC_SUBST(KF6_LIBS)
+
+dnl ===================================================================
+dnl Test whether to include Evolution 2 support
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable evolution 2 support])
+if test "$enable_evolution2" = yes; then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
+    GOBJECT_CFLAGS=$(printf '%s' "$GOBJECT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${GOBJECT_LIBS}"
+    GOBJECT_LIBS="${filteredlibs}"
+    ENABLE_EVOAB2="TRUE"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_EVOAB2)
+AC_SUBST(GOBJECT_CFLAGS)
+AC_SUBST(GOBJECT_LIBS)
+
+dnl ===================================================================
+dnl Test which themes to include
+dnl ===================================================================
+AC_MSG_CHECKING([which themes to include])
+# if none given use default subset of available themes
+if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
+    with_theme="breeze breeze_dark breeze_dark_svg breeze_svg colibre colibre_svg colibre_dark colibre_dark_svg elementary elementary_svg karasa_jaga karasa_jaga_svg sifr sifr_svg sifr_dark sifr_dark_svg sukapura sukapura_dark sukapura_dark_svg sukapura_svg"
+fi
+
+WITH_THEMES=""
+if test "x$with_theme" != "xno"; then
+    for theme in $with_theme; do
+        case $theme in
+        breeze|breeze_dark|breeze_dark_svg|breeze_svg|colibre|colibre_svg|colibre_dark|colibre_dark_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg|sifr|sifr_svg|sifr_dark|sifr_dark_svg|sukapura|sukapura_dark|sukapura_dark_svg|sukapura_svg) WITH_THEMES="${WITH_THEMES:+$WITH_THEMES }$theme" ;;
+        *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
+        esac
+    done
+fi
+AC_MSG_RESULT([$WITH_THEMES])
+AC_SUBST([WITH_THEMES])
+
+###############################################################################
+# Extensions checking
+###############################################################################
+AC_MSG_CHECKING([for extensions integration])
+if test "x$enable_extension_integration" != "xno"; then
+    WITH_EXTENSION_INTEGRATION=TRUE
+    SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
+    AC_MSG_RESULT([yes, use integration])
+else
+    WITH_EXTENSION_INTEGRATION=
+    AC_MSG_RESULT([no, do not integrate])
+fi
+AC_SUBST(WITH_EXTENSION_INTEGRATION)
+
+dnl Should any extra extensions be included?
+dnl There are standalone tests for each of these below.
+WITH_EXTRA_EXTENSIONS=
+AC_SUBST([WITH_EXTRA_EXTENSIONS])
+
+libo_CHECK_EXTENSION([Numbertext],[NUMBERTEXT],[numbertext],[numbertext],[b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt])
+if test "x$with_java" != "xno"; then
+    libo_CHECK_EXTENSION([NLPSolver],[NLPSOLVER],[nlpsolver],[nlpsolver],[])
+fi
+
+AC_MSG_CHECKING([whether to build opens___.ttf])
+if test "$enable_build_opensymbol" = "yes"; then
+    AC_MSG_RESULT([yes])
+    AC_PATH_PROG(FONTFORGE, fontforge)
+    if test -z "$FONTFORGE"; then
+        AC_MSG_ERROR([fontforge not installed])
+    fi
+else
+    AC_MSG_RESULT([no])
+    BUILD_TYPE="$BUILD_TYPE OPENSYMBOL"
+fi
+AC_SUBST(FONTFORGE)
+
+dnl ===================================================================
+dnl Test whether to include fonts
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include third-party fonts])
+if test "$with_fonts" != "no"; then
+    AC_MSG_RESULT([yes])
+    WITH_FONTS=TRUE
+    BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
+    AC_DEFINE(HAVE_MORE_FONTS)
+else
+    AC_MSG_RESULT([no])
+    WITH_FONTS=
+    SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
+fi
+AC_SUBST(WITH_FONTS)
+
+
+dnl ===================================================================
+dnl Test whether to enable online update service
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable online update])
+ENABLE_ONLINE_UPDATE=
+if test "$enable_online_update" = ""; then
+    AC_MSG_RESULT([no])
+else
+    if test "$enable_online_update" = "mar"; then
+        AC_MSG_ERROR([--enable-online-update=mar is deprecated, use --enable-online-update-mar instead])
+    elif test "$enable_online_update" = "yes"; then
+        if test "$enable_curl" != "yes"; then
+            AC_MSG_ERROR([--disable-online-update must be used when --disable-curl is used])
+        fi
+        AC_MSG_RESULT([yes])
+        ENABLE_ONLINE_UPDATE="TRUE"
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_ONLINE_UPDATE)
+
+
+dnl ===================================================================
+dnl Test whether to enable mar online update service
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable mar online update])
+ENABLE_ONLINE_UPDATE_MAR=
+if test "$enable_online_update_mar" = yes; then
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE ONLINEUPDATE"
+    ENABLE_ONLINE_UPDATE_MAR="TRUE"
+    AC_DEFINE(HAVE_FEATURE_UPDATE_MAR)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_ONLINE_UPDATE_MAR)
+
+AC_MSG_CHECKING([for mar online update baseurl])
+ONLINEUPDATE_MAR_BASEURL=$with_online_update_mar_baseurl
+if test -n "$ONLINEUPDATE_MAR_BASEURL"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_BASEURL)
+
+AC_MSG_CHECKING([for mar online update certificateder])
+ONLINEUPDATE_MAR_CERTIFICATEDER=$with_online_update_mar_certificateder
+if test -n "$ONLINEUPDATE_MAR_CERTIFICATEDER"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_CERTIFICATEDER)
+
+AC_MSG_CHECKING([for mar online update certificatename])
+ONLINEUPDATE_MAR_CERTIFICATENAME=$with_online_update_mar_certificatename
+if test -n "$ONLINEUPDATE_MAR_CERTIFICATENAME"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_CERTIFICATENAME)
+
+AC_MSG_CHECKING([for mar online update certificatepath])
+ONLINEUPDATE_MAR_CERTIFICATEPATH=$with_online_update_mar_certificatepath
+if test -n "$ONLINEUPDATE_MAR_CERTIFICATEPATH"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_CERTIFICATEPATH)
+
+AC_MSG_CHECKING([for mar online update serverurl])
+ONLINEUPDATE_MAR_SERVERURL=$with_online_update_mar_serverurl
+if test -n "$ONLINEUPDATE_MAR_SERVERURL"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_SERVERURL)
+
+AC_MSG_CHECKING([for mar online update uploadurl])
+ONLINEUPDATE_MAR_UPLOADURL=$with_online_update_mar_uploadurl
+if test -n "$ONLINEUPDATE_MAR_UPLOADURL"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ONLINEUPDATE_MAR_UPLOADURL)
+
+
+PRIVACY_POLICY_URL="$with_privacy_policy_url"
+if test "$ENABLE_ONLINE_UPDATE" = TRUE -o "$ENABLE_BREAKPAD" = "TRUE"; then
+    if test "x$with_privacy_policy_url" = "xundefined"; then
+        AC_MSG_FAILURE([online update or breakpad/crashreporting are enabled, but no --with-privacy-policy-url=... was provided])
+    fi
+fi
+AC_SUBST(PRIVACY_POLICY_URL)
+dnl ===================================================================
+dnl Test whether we need bzip2
+dnl ===================================================================
+SYSTEM_BZIP2=
+if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE" -o "$enable_python" = internal; then
+    AC_MSG_CHECKING([whether to use system bzip2])
+    if test "$with_system_bzip2" = yes; then
+        SYSTEM_BZIP2=TRUE
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_MODULES(BZIP2, bzip2)
+        FilterLibs "${BZIP2_LIBS}"
+        BZIP2_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([no])
+        BUILD_TYPE="$BUILD_TYPE BZIP2"
+    fi
+fi
+AC_SUBST(SYSTEM_BZIP2)
+AC_SUBST(BZIP2_CFLAGS)
+AC_SUBST(BZIP2_LIBS)
+
+dnl ===================================================================
+dnl Test whether to enable extension update
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable extension update])
+ENABLE_EXTENSION_UPDATE=
+if test "x$enable_extension_update" = "xno"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_EXTENSION_UPDATE="TRUE"
+    AC_DEFINE(ENABLE_EXTENSION_UPDATE)
+    SCPDEFS="$SCPDEFS -DENABLE_EXTENSION_UPDATE"
+fi
+AC_SUBST(ENABLE_EXTENSION_UPDATE)
+
+
+dnl ===================================================================
+dnl Test whether to create MSI with LIMITUI=1 (silent install)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
+if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_SILENT_MSI=
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_SILENT_MSI=TRUE
+    SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
+fi
+AC_SUBST(ENABLE_SILENT_MSI)
+
+dnl ===================================================================
+dnl Check for WiX tools.
+dnl ===================================================================
+if test "$enable_wix" = "" -o "enable_wix" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_WIX=
+else
+    AC_MSG_RESULT([yes])
+    # FIXME: this should do proper detection, but the path is currently
+    # hardcoded in msicreator/createmsi.py
+    if ! test -x "/cygdrive/c/Program Files (x86)/WiX Toolset v3.11/bin/candle"; then
+      AC_MSG_ERROR([WiX requested but WiX toolset v3.11 not found at the expected location])
+    fi
+    ENABLE_WIX=TRUE
+fi
+AC_SUBST(ENABLE_WIX)
+
+AC_MSG_CHECKING([whether and how to use Xinerama])
+if test "$USING_X11" = TRUE; then
+    if test "$x_libraries" = "default_x_libraries"; then
+        XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
+        if test "x$XINERAMALIB" = x; then
+           XINERAMALIB="/usr/lib"
+        fi
+    else
+        XINERAMALIB="$x_libraries"
+    fi
+    if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
+        # we have both versions, let the user decide but use the dynamic one
+        # per default
+        USE_XINERAMA=TRUE
+        if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
+            XINERAMA_LINK=dynamic
+        else
+            XINERAMA_LINK=static
+        fi
+    elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
+        # we have only the dynamic version
+        USE_XINERAMA=TRUE
+        XINERAMA_LINK=dynamic
+    elif test -e "$XINERAMALIB/libXinerama.a"; then
+        # static version
+        if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+            USE_XINERAMA=TRUE
+            XINERAMA_LINK=static
+        else
+            USE_XINERAMA=
+            XINERAMA_LINK=none
+        fi
+    else
+        # no Xinerama
+        USE_XINERAMA=
+        XINERAMA_LINK=none
+    fi
+    if test "$USE_XINERAMA" = "TRUE"; then
+        AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
+        AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
+            [AC_MSG_ERROR(Xinerama header not found.)], [])
+        XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
+        if test "x$XEXTLIB" = x; then
+           XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
+        fi
+        XINERAMA_EXTRA_LIBS="$XEXTLIBS"
+        if test "$_os" = "FreeBSD"; then
+            XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
+        fi
+        if test "$_os" = "Linux"; then
+            XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
+        fi
+        AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
+            [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
+    else
+        AC_MSG_ERROR([libXinerama not found or wrong architecture.])
+    fi
+else
+    USE_XINERAMA=
+    XINERAMA_LINK=none
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(XINERAMA_LINK)
+
+AC_MSG_CHECKING([whether to use non-standard RGBA32 cairo pixel order])
+if test -z "$enable_cairo_rgba" -a "$_os" = "Android"; then
+    enable_cairo_rgba=yes
+fi
+if test "$enable_cairo_rgba" = yes; then
+    AC_DEFINE(ENABLE_CAIRO_RGBA)
+    ENABLE_CAIRO_RGBA=TRUE
+    AC_MSG_RESULT([yes])
+else
+    ENABLE_CAIRO_RGBA=
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_CAIRO_RGBA)
+
+dnl ===================================================================
+dnl Test whether to build cairo or rely on the system version
+dnl ===================================================================
+
+if test "$test_cairo" = "yes"; then
+    AC_MSG_CHECKING([whether to use the system cairo])
+
+    : ${with_system_cairo:=$with_system_libs}
+    if test "$with_system_cairo" = "yes" -a "$enable_cairo_rgba" != "yes"; then
+        SYSTEM_CAIRO=TRUE
+        AC_MSG_RESULT([yes])
+
+        PKG_CHECK_MODULES( CAIRO, cairo >= 1.12.0 )
+        CAIRO_CFLAGS=$(printf '%s' "$CAIRO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${CAIRO_LIBS}"
+        CAIRO_LIBS="${filteredlibs}"
+
+        if test "$test_xrender" = "yes"; then
+            AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
+            AC_LANG_PUSH([C])
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
+#ifdef PictStandardA8
+#else
+      return fail;
+#endif
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
+
+            AC_LANG_POP([C])
+        fi
+    else
+        AC_MSG_RESULT([no])
+        BUILD_TYPE="$BUILD_TYPE CAIRO"
+    fi
+
+    if test "$enable_cairo_canvas" != no; then
+        AC_DEFINE(ENABLE_CAIRO_CANVAS)
+        ENABLE_CAIRO_CANVAS=TRUE
+    fi
+fi
+
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(CAIRO_LIBS)
+AC_SUBST(ENABLE_CAIRO_CANVAS)
+AC_SUBST(SYSTEM_CAIRO)
+
+dnl ===================================================================
+dnl Test whether to use avahi
+dnl ===================================================================
+if test "$_os" = "WINNT"; then
+    # Windows uses bundled mDNSResponder
+    BUILD_TYPE="$BUILD_TYPE MDNSRESPONDER"
+elif test "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
+    PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6.10],
+                      [ENABLE_AVAHI="TRUE"])
+    AC_DEFINE(HAVE_FEATURE_AVAHI)
+    AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${AVAHI_LIBS}"
+    AVAHI_LIBS="${filteredlibs}"
+fi
+
+AC_SUBST(ENABLE_AVAHI)
+AC_SUBST(AVAHI_CFLAGS)
+AC_SUBST(AVAHI_LIBS)
+
+dnl ===================================================================
+dnl Test whether to use liblangtag
+dnl ===================================================================
+SYSTEM_LIBLANGTAG=
+AC_MSG_CHECKING([whether to use system liblangtag])
+if test "$with_system_liblangtag" = yes; then
+    SYSTEM_LIBLANGTAG=TRUE
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
+    dnl cf. <https://bitbucket.org/tagoh/liblangtag/commits/9324836a0d1c> "Fix a build issue with inline keyword"
+    PKG_CHECK_EXISTS([liblangtag >= 0.5.5], [], [AC_DEFINE([LIBLANGTAG_INLINE_FIX])])
+    LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${LIBLANGTAG_LIBS}"
+    LIBLANGTAG_LIBS="${filteredlibs}"
+else
+    SYSTEM_LIBLANGTAG=
+    AC_MSG_RESULT([no])
+    BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
+    LIBLANGTAG_CFLAGS="-I${WORKDIR}/UnpackedTarball/liblangtag"
+    if test "$COM" = "MSC"; then
+        LIBLANGTAG_LIBS="${WORKDIR}/UnpackedTarball/liblangtag/liblangtag/.libs/liblangtag.lib"
+    else
+        LIBLANGTAG_LIBS="-L${WORKDIR}/UnpackedTarball/liblangtag/liblangtag/.libs -llangtag"
+    fi
+fi
+AC_SUBST(SYSTEM_LIBLANGTAG)
+AC_SUBST(LIBLANGTAG_CFLAGS)
+AC_SUBST(LIBLANGTAG_LIBS)
+
+dnl ===================================================================
+dnl Test whether to build libpng or rely on the system version
+dnl ===================================================================
+
+LIBPNG_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/libpng"
+LIBPNG_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -llibpng"
+libo_CHECK_SYSTEM_MODULE([libpng],[LIBPNG],[libpng])
+
+dnl ===================================================================
+dnl Test whether to build libtiff or rely on the system version
+dnl ===================================================================
+
+libo_CHECK_SYSTEM_MODULE([libtiff],[LIBTIFF],[libtiff-4])
+
+dnl ===================================================================
+dnl Test whether to build libwebp or rely on the system version
+dnl ===================================================================
+
+libo_CHECK_SYSTEM_MODULE([libwebp],[LIBWEBP],[libwebp])
+
+dnl ===================================================================
+dnl Check for runtime JVM search path
+dnl ===================================================================
+if test "$ENABLE_JAVA" != ""; then
+    AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
+    if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
+        AC_MSG_RESULT([yes])
+        if ! test -d "$with_jvm_path"; then
+            AC_MSG_ERROR(["$with_jvm_path" not a directory])
+        fi
+        if ! test -d "$with_jvm_path"jvm; then
+            AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
+        fi
+        JVM_ONE_PATH_CHECK="$with_jvm_path"
+        AC_SUBST(JVM_ONE_PATH_CHECK)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+dnl ===================================================================
+dnl Test for the presence of Ant and that it works
+dnl ===================================================================
+
+# java takes the encoding from LC_ALL, and since autoconf forces it to C it
+# breaks filename decoding, so for the ant section, set it to LANG
+LC_ALL=$LANG
+if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "yes"; then
+    ANT_HOME=; export ANT_HOME
+    WITH_ANT_HOME=; export WITH_ANT_HOME
+    if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
+        if test -x "$LODE_HOME/opt/ant/bin/ant" ; then
+            if test "$_os" = "WINNT"; then
+                with_ant_home="`cygpath -m $LODE_HOME/opt/ant`"
+            else
+                with_ant_home="$LODE_HOME/opt/ant"
+            fi
+        elif test -x  "$LODE_HOME/opt/bin/ant" ; then
+            with_ant_home="$LODE_HOME/opt/ant"
+        fi
+    fi
+    if test -z "$with_ant_home"; then
+        AC_PATH_PROGS(ANT, [ant ant.sh ant.bat ant.cmd])
+    else
+        if test "$_os" = "WINNT"; then
+            # AC_PATH_PROGS needs unix path
+            with_ant_home=`cygpath -u "$with_ant_home"`
+        fi
+        AbsolutePath "$with_ant_home"
+        with_ant_home=$absolute_path
+        AC_PATH_PROGS(ANT, [ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
+        WITH_ANT_HOME=$with_ant_home
+        ANT_HOME=$with_ant_home
+    fi
+
+    if test -z "$ANT"; then
+        AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
+    else
+        # resolve relative or absolute symlink
+        while test -h "$ANT"; do
+            a_cwd=`pwd`
+            a_basename=`basename "$ANT"`
+            a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
+            cd "`dirname "$ANT"`"
+            cd "`dirname "$a_script"`"
+            ANT="`pwd`"/"`basename "$a_script"`"
+            cd "$a_cwd"
+        done
+
+        AC_MSG_CHECKING([if $ANT works])
+        mkdir -p conftest.dir
+        a_cwd=$(pwd)
+        cd conftest.dir
+        cat > conftest.java << EOF
+        public class conftest {
+            int testmethod(int a, int b) {
+                    return a + b;
+            }
+        }
+EOF
+
+        cat > conftest.xml << EOF
+        <project name="conftest" default="conftest">
+        <target name="conftest">
+            <javac srcdir="." includes="conftest.java">
+            </javac>
+        </target>
+        </project>
+EOF
+
+        AC_TRY_COMMAND("$ANT" -buildfile conftest.xml 1>&2)
+        if test $? = 0 -a -f ./conftest.class; then
+            AC_MSG_RESULT([Ant works])
+            if test -z "$WITH_ANT_HOME"; then
+                ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
+                if test -z "$ANT_HOME"; then
+                    ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
+                fi
+            else
+                ANT_HOME="$WITH_ANT_HOME"
+            fi
+        else
+            echo "configure: Ant test failed" >&5
+            cat conftest.java >&5
+            cat conftest.xml >&5
+            AC_MSG_ERROR([Ant does not work - Some Java projects will not build!])
+        fi
+        cd "$a_cwd"
+        rm -fr conftest.dir
+    fi
+    if test -z "$ANT_HOME"; then
+        ANT_HOME="NO_ANT_HOME"
+    else
+        PathFormat "$ANT_HOME"
+        ANT_HOME="$formatted_path"
+        PathFormat "$ANT"
+        ANT="$formatted_path"
+    fi
+
+    dnl Checking for ant.jar
+    if test "$ANT_HOME" != "NO_ANT_HOME"; then
+        AC_MSG_CHECKING([Ant lib directory])
+        if test -f $ANT_HOME/lib/ant.jar; then
+            ANT_LIB="$ANT_HOME/lib"
+        else
+            if test -f $ANT_HOME/ant.jar; then
+                ANT_LIB="$ANT_HOME"
+            else
+                if test -f /usr/share/java/ant.jar; then
+                    ANT_LIB=/usr/share/java
+                else
+                    if test -f /usr/share/ant-core/lib/ant.jar; then
+                        ANT_LIB=/usr/share/ant-core/lib
+                    else
+                        if test -f $ANT_HOME/lib/ant/ant.jar; then
+                            ANT_LIB="$ANT_HOME/lib/ant"
+                        else
+                            if test -f /usr/share/lib/ant/ant.jar; then
+                                ANT_LIB=/usr/share/lib/ant
+                            else
+                                AC_MSG_ERROR([Ant libraries not found!])
+                            fi
+                        fi
+                    fi
+                fi
+            fi
+        fi
+        PathFormat "$ANT_LIB"
+        ANT_LIB="$formatted_path"
+        AC_MSG_RESULT([Ant lib directory found.])
+    fi
+
+    ant_minver=1.6.0
+    ant_minminor1=`echo $ant_minver | cut -d"." -f2`
+
+    AC_MSG_CHECKING([whether Ant is >= $ant_minver])
+    ant_version=`"$ANT" -version | $AWK '$3 == "version" { print $4; }'`
+    ant_version_major=`echo $ant_version | cut -d. -f1`
+    ant_version_minor=`echo $ant_version | cut -d. -f2`
+    echo "configure: ant_version $ant_version " >&5
+    echo "configure: ant_version_major $ant_version_major " >&5
+    echo "configure: ant_version_minor $ant_version_minor " >&5
+    if test "$ant_version_major" -ge "2"; then
+        AC_MSG_RESULT([yes, $ant_version])
+    elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
+        AC_MSG_RESULT([yes, $ant_version])
+    else
+        AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
+    fi
+
+    rm -f conftest* core core.* *.core
+fi
+AC_SUBST(ANT)
+AC_SUBST(ANT_HOME)
+AC_SUBST(ANT_LIB)
+
+OOO_JUNIT_JAR=
+HAMCREST_JAR=
+if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != "yes"; then
+    AC_MSG_CHECKING([for JUnit 4])
+    if test "$with_junit" = "yes"; then
+        if test -n "$LODE_HOME" -a -e "$LODE_HOME/opt/share/java/junit.jar" ; then
+            OOO_JUNIT_JAR="$LODE_HOME/opt/share/java/junit.jar"
+        elif test -e /usr/share/java/junit4.jar; then
+            OOO_JUNIT_JAR=/usr/share/java/junit4.jar
+        else
+           if test -e /usr/share/lib/java/junit.jar; then
+              OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
+           else
+              OOO_JUNIT_JAR=/usr/share/java/junit.jar
+           fi
+        fi
+    else
+        OOO_JUNIT_JAR=$with_junit
+    fi
+    if test "$_os" = "WINNT"; then
+        OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
+    fi
+    printf 'import org.junit.Before;' > conftest.java
+    if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+        AC_MSG_RESULT([$OOO_JUNIT_JAR])
+    else
+        AC_MSG_ERROR(
+[cannot find JUnit 4 jar; please install one in the default location (/usr/share/java),
+ specify its pathname via --with-junit=..., or disable it via --without-junit])
+    fi
+    rm -f conftest.class conftest.java
+    if test $OOO_JUNIT_JAR != ""; then
+        BUILD_TYPE="$BUILD_TYPE QADEVOOO"
+    fi
+
+    AC_MSG_CHECKING([for included Hamcrest])
+    printf 'import org.hamcrest.BaseDescription;' > conftest.java
+    if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+        AC_MSG_RESULT([Included in $OOO_JUNIT_JAR])
+    else
+        AC_MSG_RESULT([Not included])
+        AC_MSG_CHECKING([for standalone hamcrest jar.])
+        if test "$with_hamcrest" = "yes"; then
+            if test -e /usr/share/lib/java/hamcrest.jar; then
+                HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
+            elif test -e /usr/share/java/hamcrest/core.jar; then
+                HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
+            elif test -e /usr/share/java/hamcrest/hamcrest.jar; then
+                HAMCREST_JAR=/usr/share/java/hamcrest/hamcrest.jar
+            else
+                HAMCREST_JAR=/usr/share/java/hamcrest.jar
+            fi
+        else
+            HAMCREST_JAR=$with_hamcrest
+        fi
+        if test "$_os" = "WINNT"; then
+            HAMCREST_JAR=`cygpath -m "$HAMCREST_JAR"`
+        fi
+        if "$JAVACOMPILER" -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; then
+            AC_MSG_RESULT([$HAMCREST_JAR])
+        else
+            AC_MSG_ERROR([junit does not contain hamcrest; please use a junit jar that includes hamcrest, install a hamcrest jar in the default location (/usr/share/java),
+                          specify its path with --with-hamcrest=..., or disable junit with --without-junit])
+        fi
+    fi
+    rm -f conftest.class conftest.java
+fi
+AC_SUBST(OOO_JUNIT_JAR)
+AC_SUBST(HAMCREST_JAR)
+# set back LC_ALL to C after the java related tests...
+LC_ALL=C
+
+AC_SUBST(SCPDEFS)
+
+#
+# check for wget and curl
+#
+WGET=
+CURL=
+
+if test "$enable_fetch_external" != "no"; then
+
+CURL=`which curl 2>/dev/null`
+
+for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
+    # wget new enough?
+    $i --help 2> /dev/null | $GREP no-use-server-timestamps 2>&1 > /dev/null
+    if test $? -eq 0; then
+        WGET=$i
+        break
+    fi
+done
+
+if test -z "$WGET" -a -z "$CURL"; then
+    AC_MSG_ERROR([neither wget nor curl found!])
+fi
+
+fi
+
+AC_SUBST(WGET)
+AC_SUBST(CURL)
+
+#
+# check for sha256sum
+#
+SHA256SUM=
+
+for i in shasum /usr/local/bin/shasum /usr/sfw/bin/shasum /opt/sfw/bin/shasum /opt/local/bin/shasum; do
+    eval "$i -a 256 --version" > /dev/null 2>&1
+    ret=$?
+    if test $ret -eq 0; then
+        SHA256SUM="$i -a 256"
+        break
+    fi
+done
+
+if test -z "$SHA256SUM"; then
+    for i in sha256sum /usr/local/bin/sha256sum /usr/sfw/bin/sha256sum /opt/sfw/bin/sha256sum /opt/local/bin/sha256sum; do
+        eval "$i --version" > /dev/null 2>&1
+        ret=$?
+        if test $ret -eq 0; then
+            SHA256SUM=$i
+            break
+        fi
+    done
+fi
+
+if test -z "$SHA256SUM"; then
+    AC_MSG_ERROR([no sha256sum found!])
+fi
+
+AC_SUBST(SHA256SUM)
+
+dnl ===================================================================
+dnl Dealing with l10n options
+dnl ===================================================================
+AC_MSG_CHECKING([which languages to be built])
+# get list of all languages
+# generate shell variable from completelangiso= from solenv/inc/langlist.mk
+# the sed command does the following:
+#   + if a line ends with a backslash, append the next line to it
+#   + adds " on the beginning of the value (after =)
+#   + adds " at the end of the value
+#   + removes en-US; we want to put it on the beginning
+#   + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
+[eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $SRC_ROOT/solenv/inc/langlist.mk)]
+ALL_LANGS="en-US $completelangiso"
+# check the configured localizations
+WITH_LANG="$with_lang"
+
+# Check for --without-lang which turns up as $with_lang being "no". Luckily there is no language with code "no".
+# (Norwegian is "nb" and "nn".)
+if test "$WITH_LANG" = "no"; then
+    WITH_LANG=
+fi
+
+if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
+    AC_MSG_RESULT([en-US])
+else
+    AC_MSG_RESULT([$WITH_LANG])
+    GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
+    if test -z "$MSGFMT"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/msgfmt" ; then
+            MSGFMT="$LODE_HOME/opt/bin/msgfmt"
+        elif test -x "/opt/lo/bin/msgfmt"; then
+            MSGFMT="/opt/lo/bin/msgfmt"
+        else
+            AC_CHECK_PROGS(MSGFMT, [msgfmt])
+            if test -z "$MSGFMT"; then
+                AC_MSG_ERROR([msgfmt not found. Install GNU gettext, or re-run without languages.])
+            fi
+        fi
+    fi
+    if test -z "$MSGUNIQ"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/msguniq" ; then
+            MSGUNIQ="$LODE_HOME/opt/bin/msguniq"
+        elif test -x "/opt/lo/bin/msguniq"; then
+            MSGUNIQ="/opt/lo/bin/msguniq"
+        else
+            AC_CHECK_PROGS(MSGUNIQ, [msguniq])
+            if test -z "$MSGUNIQ"; then
+                AC_MSG_ERROR([msguniq not found. Install GNU gettext, or re-run without languages.])
+            fi
+        fi
+    fi
+fi
+AC_SUBST(MSGFMT)
+AC_SUBST(MSGUNIQ)
+# check that the list is valid
+for lang in $WITH_LANG; do
+    test "$lang" = "ALL" && continue
+    # need to check for the exact string, so add space before and after the list of all languages
+    for vl in $ALL_LANGS; do
+        if test "$vl" = "$lang"; then
+           break
+        fi
+    done
+    if test "$vl" != "$lang"; then
+        # if you're reading this - you prolly quoted your languages remove the quotes ...
+        AC_MSG_ERROR([invalid language: '$lang' (vs '$v1'); supported languages are: $ALL_LANGS])
+    fi
+done
+if test -n "$WITH_LANG" -a "$WITH_LANG" != "ALL"; then
+    echo $WITH_LANG | grep -q en-US
+    test $? -ne 1 || WITH_LANG=`echo $WITH_LANG en-US`
+fi
+# list with substituted ALL
+WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
+test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
+test "$WITH_LANG" = "en-US" && WITH_LANG=
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
+    ALL_LANGS=`echo $ALL_LANGS qtz`
+fi
+AC_SUBST(ALL_LANGS)
+AC_DEFINE_UNQUOTED(WITH_LANG,"$WITH_LANG")
+AC_SUBST(WITH_LANG)
+AC_SUBST(WITH_LANG_LIST)
+AC_SUBST(GIT_NEEDED_SUBMODULES)
+
+WITH_POOR_HELP_LOCALIZATIONS=
+if test -d "$SRC_ROOT/translations/source"; then
+    for l in `ls -1 $SRC_ROOT/translations/source`; do
+        if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
+            WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
+        fi
+    done
+fi
+AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
+
+if test -n "$with_locales" -a "$with_locales" != ALL; then
+    WITH_LOCALES="$with_locales"
+
+    just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`"
+    # Only languages and scripts for which we actually have ifdefs need to be handled. Also see
+    # config_host/config_locales.h.in
+    for locale in $WITH_LOCALES; do
+        lang=${locale%_*}
+
+        AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1)
+
+        case $lang in
+        hi|mr*ne)
+            AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva)
+            ;;
+        bg|ru)
+            AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl)
+            ;;
+        esac
+    done
+else
+    AC_DEFINE(WITH_LOCALE_ALL)
+fi
+AC_SUBST(WITH_LOCALES)
+
+dnl git submodule update --reference
+dnl ===================================================================
+if test -n "${GIT_REFERENCE_SRC}"; then
+    for repo in ${GIT_NEEDED_SUBMODULES}; do
+        if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then
+            AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}])
+        fi
+    done
+fi
+AC_SUBST(GIT_REFERENCE_SRC)
+
+dnl git submodules linked dirs
+dnl ===================================================================
+if test -n "${GIT_LINK_SRC}"; then
+    for repo in ${GIT_NEEDED_SUBMODULES}; do
+        if ! test -d "${GIT_LINK_SRC}"/${repo}; then
+            AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
+        fi
+    done
+fi
+AC_SUBST(GIT_LINK_SRC)
+
+dnl branding
+dnl ===================================================================
+AC_MSG_CHECKING([for alternative branding images directory])
+# initialize mapped arrays
+BRAND_INTRO_IMAGES="intro.png intro-highres.png"
+brand_files="$BRAND_INTRO_IMAGES logo.svg logo_inverted.svg logo-sc.svg logo-sc_inverted.svg about.svg"
+
+if test -z "$with_branding" -o "$with_branding" = "no"; then
+    AC_MSG_RESULT([none])
+    DEFAULT_BRAND_IMAGES="$brand_files"
+else
+    if ! test -d $with_branding ; then
+        AC_MSG_ERROR([No directory $with_branding, falling back to default branding])
+    else
+        AC_MSG_RESULT([$with_branding])
+        CUSTOM_BRAND_DIR="$with_branding"
+        for lfile in $brand_files
+        do
+            if ! test -f $with_branding/$lfile ; then
+                AC_MSG_WARN([Branded file $lfile does not exist, using the default one])
+                DEFAULT_BRAND_IMAGES="$DEFAULT_BRAND_IMAGES $lfile"
+            else
+                CUSTOM_BRAND_IMAGES="$CUSTOM_BRAND_IMAGES $lfile"
+            fi
+        done
+        check_for_progress="yes"
+    fi
+fi
+AC_SUBST([BRAND_INTRO_IMAGES])
+AC_SUBST([CUSTOM_BRAND_DIR])
+AC_SUBST([CUSTOM_BRAND_IMAGES])
+AC_SUBST([DEFAULT_BRAND_IMAGES])
+
+
+AC_MSG_CHECKING([for 'intro' progress settings])
+PROGRESSBARCOLOR=
+PROGRESSSIZE=
+PROGRESSPOSITION=
+PROGRESSFRAMECOLOR=
+PROGRESSTEXTCOLOR=
+PROGRESSTEXTBASELINE=
+
+if test "$check_for_progress" = "yes" -a -f "$with_branding/progress.conf" ; then
+    source "$with_branding/progress.conf"
+    AC_MSG_RESULT([settings found in $with_branding/progress.conf])
+else
+    AC_MSG_RESULT([none])
+fi
+
+AC_SUBST(PROGRESSBARCOLOR)
+AC_SUBST(PROGRESSSIZE)
+AC_SUBST(PROGRESSPOSITION)
+AC_SUBST(PROGRESSFRAMECOLOR)
+AC_SUBST(PROGRESSTEXTCOLOR)
+AC_SUBST(PROGRESSTEXTBASELINE)
+
+
+dnl ===================================================================
+dnl Custom build version
+dnl ===================================================================
+AC_MSG_CHECKING([for extra build ID])
+if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
+    EXTRA_BUILDID="$with_extra_buildid"
+fi
+# in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
+if test -n "$EXTRA_BUILDID" ; then
+    AC_MSG_RESULT([$EXTRA_BUILDID])
+else
+    AC_MSG_RESULT([not set])
+fi
+AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
+
+OOO_VENDOR=
+AC_MSG_CHECKING([for vendor])
+if test -z "$with_vendor" -o "$with_vendor" = "no"; then
+    OOO_VENDOR="$USERNAME"
+
+    if test -z "$OOO_VENDOR"; then
+        OOO_VENDOR="$USER"
+    fi
+
+    if test -z "$OOO_VENDOR"; then
+        OOO_VENDOR="`id -u -n`"
+    fi
+
+    AC_MSG_RESULT([not set, using $OOO_VENDOR])
+else
+    OOO_VENDOR="$with_vendor"
+    AC_MSG_RESULT([$OOO_VENDOR])
+fi
+AC_DEFINE_UNQUOTED(OOO_VENDOR,"$OOO_VENDOR")
+AC_SUBST(OOO_VENDOR)
+
+if test "$_os" = "Android" ; then
+    ANDROID_PACKAGE_NAME=
+    AC_MSG_CHECKING([for Android package name])
+    if test -z "$with_android_package_name" -o "$with_android_package_name" = "no"; then
+        if test -n "$ENABLE_DEBUG"; then
+            # Default to the package name that makes ndk-gdb happy.
+            ANDROID_PACKAGE_NAME="org.libreoffice"
+        else
+            ANDROID_PACKAGE_NAME="org.example.libreoffice"
+        fi
+
+        AC_MSG_RESULT([not set, using $ANDROID_PACKAGE_NAME])
+    else
+        ANDROID_PACKAGE_NAME="$with_android_package_name"
+        AC_MSG_RESULT([$ANDROID_PACKAGE_NAME])
+    fi
+    AC_SUBST(ANDROID_PACKAGE_NAME)
+fi
+
+AC_MSG_CHECKING([whether to install the compat oo* wrappers])
+if test "$with_compat_oowrappers" = "yes"; then
+    WITH_COMPAT_OOWRAPPERS=TRUE
+    AC_MSG_RESULT(yes)
+else
+    WITH_COMPAT_OOWRAPPERS=
+    AC_MSG_RESULT(no)
+fi
+AC_SUBST(WITH_COMPAT_OOWRAPPERS)
+
+INSTALLDIRNAME=`echo AC_PACKAGE_NAME | $AWK '{print tolower($0)}'`
+AC_MSG_CHECKING([for install dirname])
+if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
+    INSTALLDIRNAME="$with_install_dirname"
+fi
+AC_MSG_RESULT([$INSTALLDIRNAME])
+AC_SUBST(INSTALLDIRNAME)
+
+AC_MSG_CHECKING([for prefix])
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+PREFIXDIR="$prefix"
+AC_MSG_RESULT([$PREFIXDIR])
+AC_SUBST(PREFIXDIR)
+
+LIBDIR=[$(eval echo $(eval echo $libdir))]
+AC_SUBST(LIBDIR)
+
+DATADIR=[$(eval echo $(eval echo $datadir))]
+AC_SUBST(DATADIR)
+
+MANDIR=[$(eval echo $(eval echo $mandir))]
+AC_SUBST(MANDIR)
+
+DOCDIR=[$(eval echo $(eval echo $docdir))]
+AC_SUBST(DOCDIR)
+
+BINDIR=[$(eval echo $(eval echo $bindir))]
+AC_SUBST(BINDIR)
+
+INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
+AC_SUBST(INSTALLDIR)
+
+TESTINSTALLDIR="${BUILDDIR}/test-install"
+AC_SUBST(TESTINSTALLDIR)
+
+
+# ===================================================================
+# OAuth2 id and secrets
+# ===================================================================
+
+AC_MSG_CHECKING([for Google Drive client id and secret])
+if test "$with_gdrive_client_id" = "no" -o -z "$with_gdrive_client_id"; then
+    AC_MSG_RESULT([not set])
+    GDRIVE_CLIENT_ID="\"\""
+    GDRIVE_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
+    GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
+AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
+
+AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
+if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
+    AC_MSG_RESULT([not set])
+    ALFRESCO_CLOUD_CLIENT_ID="\"\""
+    ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
+    ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
+AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
+
+AC_MSG_CHECKING([for OneDrive client id and secret])
+if test "$with_onedrive_client_id" = "no" -o -z "$with_onedrive_client_id"; then
+    AC_MSG_RESULT([not set])
+    ONEDRIVE_CLIENT_ID="\"\""
+    ONEDRIVE_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    ONEDRIVE_CLIENT_ID="\"$with_onedrive_client_id\""
+    ONEDRIVE_CLIENT_SECRET="\"$with_onedrive_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_ID, $ONEDRIVE_CLIENT_ID)
+AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_SECRET, $ONEDRIVE_CLIENT_SECRET)
+
+
+dnl ===================================================================
+dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
+dnl --enable-dependency-tracking configure option
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable dependency tracking])
+if test "$enable_dependency_tracking" = "no"; then
+    nodep=TRUE
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST(nodep)
+
+dnl ===================================================================
+dnl Number of CPUs to use during the build
+dnl ===================================================================
+AC_MSG_CHECKING([for number of processors to use])
+# plain --with-parallelism is just the default
+if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
+    if test "$with_parallelism" = "no"; then
+        PARALLELISM=0
+    else
+        PARALLELISM=$with_parallelism
+    fi
+else
+    if test "$enable_icecream" = "yes"; then
+        PARALLELISM="40"
+    else
+        case `uname -s` in
+
+        Darwin|FreeBSD|NetBSD|OpenBSD)
+            PARALLELISM=`sysctl -n hw.ncpu`
+            ;;
+
+        Linux)
+            PARALLELISM=`getconf _NPROCESSORS_ONLN`
+        ;;
+        # what else than above does profit here *and* has /proc?
+        *)
+            PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
+            ;;
+        esac
+
+        # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
+        # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all).
+    fi
+fi
+
+if test $PARALLELISM -eq 0; then
+    AC_MSG_RESULT([explicit make -j option needed])
+else
+    AC_MSG_RESULT([$PARALLELISM])
+fi
+AC_SUBST(PARALLELISM)
+
+#
+# Set up ILIB for MSVC build
+#
+ILIB1=
+if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+    ILIB="."
+    if test -n "$JAVA_HOME"; then
+        ILIB="$ILIB;$JAVA_HOME/lib"
+    fi
+    ILIB1=-link
+    PathFormat "${COMPATH}/lib/$WIN_HOST_ARCH"
+    ILIB="$ILIB;$formatted_path"
+    ILIB1="$ILIB1 -LIBPATH:$formatted_path"
+    ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$WIN_HOST_ARCH"
+    ILIB1="$ILIB1 -LIBPATH:$WINDOWS_SDK_HOME/lib/$WIN_HOST_ARCH"
+    if test $WINDOWS_SDK_VERSION = 80 -o $WINDOWS_SDK_VERSION = 81 -o $WINDOWS_SDK_VERSION = 10; then
+        ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_HOST_ARCH"
+        ILIB1="$ILIB1 -LIBPATH:$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_HOST_ARCH"
+    fi
+    PathFormat "${UCRTSDKDIR}lib/$UCRTVERSION/ucrt/$WIN_HOST_ARCH"
+    ucrtlibpath_formatted=$formatted_path
+    ILIB="$ILIB;$ucrtlibpath_formatted"
+    ILIB1="$ILIB1 -LIBPATH:$ucrtlibpath_formatted"
+    if test -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
+        PathFormat "$DOTNET_FRAMEWORK_HOME/lib"
+        ILIB="$ILIB;$formatted_path"
+    else
+        PathFormat "$DOTNET_FRAMEWORK_HOME/Lib/um/$WIN_HOST_ARCH"
+        ILIB="$ILIB;$formatted_path"
+    fi
+
+    if test "$cross_compiling" != "yes"; then
+        ILIB_FOR_BUILD="$ILIB"
+    fi
+fi
+AC_SUBST(ILIB)
+AC_SUBST(ILIB_FOR_BUILD)
+
+AC_MSG_CHECKING([whether $CXX_BASE supports a working C++20 consteval])
+dnl ...that does not suffer from <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994> "Missing code
+dnl from consteval constructor initializing const variable",
+dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98752> "wrong 'error: ‘this’ is not a constant
+dnl expression' with consteval constructor", <https://bugs.llvm.org/show_bug.cgi?id=50063> "code
+dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
+dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' failed.'" (which should be
+dnl fixed since Clang 14), <https://developercommunity.visualstudio.com/t/1581879> "Bogus error
+dnl C7595 with consteval constructor in ternary expression (/std:c++latest)", or
+dnl <https://github.com/llvm/llvm-project/issues/54612> "C++20, consteval, anonymous union:
+dnl llvm/lib/IR/Instructions.cpp:1491: void llvm::StoreInst::AssertOK(): Assertion
+dnl `cast<PointerType>(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType())
+dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed since Clang 17):
+AC_LANG_PUSH([C++])
+save_CXX=$CXX
+if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
+    CXX="env LIB=$ILIB $CXX"
+fi
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_RUN_IFELSE([AC_LANG_PROGRAM([
+        struct S {
+            consteval S() { i = 1; }
+            int i = 0;
+        };
+        S const s;
+
+        struct S1 {
+             int a;
+             consteval S1(int n): a(n) {}
+        };
+        struct S2 {
+            S1 x;
+            S2(): x(0) {}
+        };
+
+        struct S3 {
+            consteval S3() {}
+            union {
+                int a;
+                unsigned b = 0;
+            };
+        };
+        void f() { S3(); }
+
+        struct S4 { consteval S4() = default; };
+        void f4(bool b) { b ? S4() : S4(); }
+
+        struct S5 {
+            consteval S5() { c = 0; }
+            char * f() { return &c; }
+            union {
+                char c;
+                int i;
+            };
+        };
+        auto s5 = S5().f();
+    ], [
+        return (s.i == 1) ? 0 : 1;
+    ])], [
+        AC_DEFINE([HAVE_CPP_CONSTEVAL],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([assumed no (cross compiling)])])
+CXX=$save_CXX
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+# ===================================================================
+# Creating bigger shared library to link against
+# ===================================================================
+AC_MSG_CHECKING([whether to create huge library])
+MERGELIBS=
+
+if test $_os = iOS -o $_os = Android; then
+    # Never any point in mergelibs for these as we build just static
+    # libraries anyway...
+    enable_mergelibs=no
+fi
+
+if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
+    if test $_os != Linux -a $_os != WINNT; then
+        add_warning "--enable-mergelibs is not tested for this platform"
+    fi
+    MERGELIBS="TRUE"
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_MERGELIBS)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([MERGELIBS])
+
+dnl ===================================================================
+dnl icerun is a wrapper that stops us spawning tens of processes
+dnl locally - for tools that can't be executed on the compile cluster
+dnl this avoids a dozen javac's ganging up on your laptop to kill it.
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use icerun wrapper])
+ICECREAM_RUN=
+if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
+    ICECREAM_RUN=icerun
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ICECREAM_RUN)
+
+dnl ===================================================================
+dnl Setup the ICECC_VERSION for the build the same way it was set for
+dnl configure, so that CC/CXX and ICECC_VERSION are in sync
+dnl ===================================================================
+x_ICECC_VERSION=[\#]
+if test -n "$ICECC_VERSION" ; then
+    x_ICECC_VERSION=
+fi
+AC_SUBST(x_ICECC_VERSION)
+AC_SUBST(ICECC_VERSION)
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([MPL subset])
+MPL_SUBSET=
+LICENSE="LGPL"
+
+if test "$enable_mpl_subset" = "yes"; then
+    mpl_error_string=
+    newline=$'\n    *'
+    warn_report=false
+    if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
+        warn_report=true
+    elif test "$ENABLE_REPORTBUILDER" = "TRUE"; then
+        warn_report=true
+    fi
+    if test "$warn_report" = "true"; then
+        mpl_error_string="$mpl_error_string$newline Need to --disable-report-builder - extended database report builder."
+    fi
+    if test "x$enable_postgresql_sdbc" != "xno"; then
+        mpl_error_string="$mpl_error_string$newline Need to --disable-postgresql-sdbc - the PostgreSQL database backend."
+    fi
+    if test "$enable_lotuswordpro" = "yes"; then
+        mpl_error_string="$mpl_error_string$newline Need to --disable-lotuswordpro - a Lotus Word Pro file format import filter."
+    fi
+    if test -n "$ENABLE_POPPLER"; then
+        if test "x$SYSTEM_POPPLER" = "x"; then
+            mpl_error_string="$mpl_error_string$newline Need to disable PDF import via poppler (--disable-poppler) or use system library."
+        fi
+    fi
+    # cf. m4/libo_check_extension.m4
+    if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then
+        mpl_error_string="$mpl_error_string$newline Need to disable extra extensions enabled using --enable-ext-XXXX."
+    fi
+    denied_themes=
+    filtered_themes=
+    for theme in $WITH_THEMES; do
+        case $theme in
+        breeze|breeze_dark|breeze_dark_svg|breeze_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg) #denylist of icon themes under GPL or LGPL
+            denied_themes="${denied_themes:+$denied_themes }$theme" ;;
+        *)
+            filtered_themes="${filtered_themes:+$filtered_themes }$theme" ;;
+        esac
+    done
+    if test "x$denied_themes" != "x"; then
+        if test "x$filtered_themes" == "x"; then
+            filtered_themes="colibre"
+        fi
+        mpl_error_string="$mpl_error_string$newline Need to disable icon themes: $denied_themes, use --with-theme=$filtered_themes."
+    fi
+
+    ENABLE_OPENGL_TRANSITIONS=
+
+    if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
+        mpl_error_string="$mpl_error_string$newline Need to --disable-lpsolve - calc linear programming solver."
+    fi
+
+    if test "x$mpl_error_string" != "x"; then
+        AC_MSG_ERROR([$mpl_error_string])
+    fi
+
+    MPL_SUBSET="TRUE"
+    LICENSE="MPL-2.0"
+    AC_DEFINE(MPL_HAVE_SUBSET)
+    AC_MSG_RESULT([only])
+else
+    AC_MSG_RESULT([no restrictions])
+fi
+AC_SUBST(MPL_SUBSET)
+AC_SUBST(LICENSE)
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([formula logger])
+ENABLE_FORMULA_LOGGER=
+
+if test "x$enable_formula_logger" = "xyes"; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_FORMULA_LOGGER)
+    ENABLE_FORMULA_LOGGER=TRUE
+elif test -n "$ENABLE_DBGUTIL" ; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_FORMULA_LOGGER)
+    ENABLE_FORMULA_LOGGER=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_FORMULA_LOGGER)
+
+dnl ===================================================================
+dnl Checking for active Antivirus software.
+dnl ===================================================================
+
+if test $_os = WINNT -a -f "$SRC_ROOT/antivirusDetection.vbs" ; then
+    AC_MSG_CHECKING([for active Antivirus software])
+    PathFormat "$SRC_ROOT/antivirusDetection.vbs"
+    ANTIVIRUS_LIST=`cscript.exe //Nologo ${formatted_path}`
+    if [ [ "$ANTIVIRUS_LIST" != "NULL" ] ]; then
+        if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then
+            AC_MSG_RESULT([found])
+            EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
+            echo $EICAR_STRING > $SRC_ROOT/eicar
+            EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar`
+            rm $SRC_ROOT/eicar
+            if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+                AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+            fi
+            echo $EICAR_STRING > $BUILDDIR/eicar
+            EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar`
+            rm $BUILDDIR/eicar
+            if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+                AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+            fi
+            add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST"
+        else
+            AC_MSG_RESULT([not found])
+        fi
+    else
+        AC_MSG_RESULT([n/a])
+    fi
+fi
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([for coredumpctl support])
+if test -z "$with_coredumpctl" && test $_os != Linux; then
+    with_coredumpctl=no
+fi
+if test "$with_coredumpctl" = no; then
+    WITH_COREDUMPCTL=
+else
+    AC_PATH_PROG(COREDUMPCTL, coredumpctl)
+    AC_PATH_PROG(JQ, jq)
+    AC_PATH_PROG(SYSTEMD_ESCAPE, systemd-escape)
+    AC_PATH_PROG(SYSTEMD_RUN, systemd-run)
+    if test -z "$COREDUMPCTL" || test -z "$JQ" || test -z "$SYSTEMD_ESCAPE" \
+        || test -z "$SYSTEMD_RUN"
+    then
+        if test -z "$with_coredumpctl"; then
+            WITH_COREDUMPCTL=
+        else
+            if test -z "$COREDUMPCTL"; then
+                AC_MSG_ERROR([coredumpctl not found])
+            fi
+            if test -z "$JQ"; then
+                AC_MSG_ERROR([jq not found])
+            fi
+            if test -z "$SYSTEMD_ESCAPE"; then
+                AC_MSG_ERROR([systemd-escape not found])
+            fi
+            if test -z "$SYSTEMD_RUN"; then
+                AC_MSG_ERROR([systemd-run not found])
+            fi
+        fi
+    else
+        WITH_COREDUMPCTL=TRUE
+    fi
+fi
+if test -z "$WITH_COREDUMPCTL"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST(COREDUMPCTL)
+AC_SUBST(JQ)
+AC_SUBST(SYSTEMD_ESCAPE)
+AC_SUBST(SYSTEMD_RUN)
+AC_SUBST(WITH_COREDUMPCTL)
+
+dnl ===================================================================
+dnl Setting up the environment.
+dnl ===================================================================
+AC_MSG_NOTICE([setting up the build environment variables...])
+
+AC_SUBST(COMPATH)
+
+if test "$build_os" = "cygwin" -o "$build_os" = wsl; then
+    if test -d "$COMPATH/atlmfc/lib/spectre"; then
+        ATL_LIB="$COMPATH/atlmfc/lib/spectre"
+        ATL_INCLUDE="$COMPATH/atlmfc/include"
+    elif test -d "$COMPATH/atlmfc/lib"; then
+        ATL_LIB="$COMPATH/atlmfc/lib"
+        ATL_INCLUDE="$COMPATH/atlmfc/include"
+    else
+        ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
+        ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
+    fi
+    ATL_LIB="$ATL_LIB/$WIN_HOST_ARCH"
+    ATL_LIB=`win_short_path_for_make "$ATL_LIB"`
+    ATL_INCLUDE=`win_short_path_for_make "$ATL_INCLUDE"`
+fi
+
+if test "$build_os" = "cygwin"; then
+    # sort.exe and find.exe also exist in C:/Windows/system32 so need /usr/bin/
+    PathFormat "/usr/bin/find.exe"
+    FIND="$formatted_path"
+    PathFormat "/usr/bin/sort.exe"
+    SORT="$formatted_path"
+    PathFormat "/usr/bin/grep.exe"
+    WIN_GREP="$formatted_path"
+    PathFormat "/usr/bin/ls.exe"
+    WIN_LS="$formatted_path"
+    PathFormat "/usr/bin/touch.exe"
+    WIN_TOUCH="$formatted_path"
+else
+    FIND=find
+    SORT=sort
+fi
+
+AC_SUBST(ATL_INCLUDE)
+AC_SUBST(ATL_LIB)
+AC_SUBST(FIND)
+AC_SUBST(SORT)
+AC_SUBST(WIN_GREP)
+AC_SUBST(WIN_LS)
+AC_SUBST(WIN_TOUCH)
+
+AC_SUBST(BUILD_TYPE)
+
+AC_SUBST(SOLARINC)
+
+PathFormat "$PERL"
+PERL="$formatted_path"
+AC_SUBST(PERL)
+
+if test -n "$TMPDIR"; then
+    TEMP_DIRECTORY="$TMPDIR"
+else
+    TEMP_DIRECTORY="/tmp"
+fi
+CYGWIN_BASH="C:/cygwin64/bin/bash.exe"
+if test "$build_os" = "cygwin"; then
+    TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"`
+    CYGWIN_BASH=`cygpath -m /usr/bin/bash`
+fi
+AC_SUBST(TEMP_DIRECTORY)
+AC_SUBST(CYGWIN_BASH)
+
+# setup the PATH for the environment
+if test -n "$LO_PATH_FOR_BUILD"; then
+    LO_PATH="$LO_PATH_FOR_BUILD"
+    case "$host_os" in
+    cygwin*|wsl*)
+        pathmunge "$MSVC_HOST_PATH" "before"
+        ;;
+    esac
+else
+    LO_PATH="$PATH"
+
+    case "$host_os" in
+
+    dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
+        if test "$ENABLE_JAVA" != ""; then
+            pathmunge "$JAVA_HOME/bin" "after"
+        fi
+        ;;
+
+    cygwin*|wsl*)
+        # Win32 make needs native paths
+        if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+            LO_PATH=`cygpath -p -m "$PATH"`
+        fi
+        if test "$WIN_BUILD_ARCH" = "x64"; then
+            # needed for msi packaging
+            pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/x86" "before"
+        fi
+        if test "$WIN_BUILD_ARCH" = "arm64"; then
+            # needed for msi packaging - as of 10.0.22621 SDK no arm64 ones yet
+            # the x86 ones probably would work just as well...
+            pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/arm" "before"
+        fi
+        # .NET 4.6 and higher don't have bin directory
+        if test -f "$DOTNET_FRAMEWORK_HOME/bin"; then
+            pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
+        fi
+        pathmunge "$WINDOWS_SDK_HOME/bin" "before"
+        pathmunge "$CSC_PATH" "before"
+        pathmunge "$MIDL_PATH" "before"
+        pathmunge "$AL_PATH" "before"
+        pathmunge "$MSVC_MULTI_PATH" "before"
+        pathmunge "$MSVC_BUILD_PATH" "before"
+        if test -n "$MSBUILD_PATH" ; then
+            pathmunge "$MSBUILD_PATH" "before"
+        fi
+        pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/$WIN_BUILD_ARCH" "before"
+        if test "$ENABLE_JAVA" != ""; then
+            if test -d "$JAVA_HOME/jre/bin/client"; then
+                pathmunge "$JAVA_HOME/jre/bin/client" "before"
+            fi
+            if test -d "$JAVA_HOME/jre/bin/hotspot"; then
+                pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
+            fi
+            pathmunge "$JAVA_HOME/bin" "before"
+        fi
+        pathmunge "$MSVC_HOST_PATH" "before"
+        ;;
+
+    solaris*)
+        pathmunge "/usr/css/bin" "before"
+        if test "$ENABLE_JAVA" != ""; then
+            pathmunge "$JAVA_HOME/bin" "after"
+        fi
+        ;;
+    esac
+fi
+
+AC_SUBST(LO_PATH)
+
+# Allow to pass LO_ELFCHECK_ALLOWLIST from autogen.input to bin/check-elf-dynamic-objects:
+if test "$LO_ELFCHECK_ALLOWLIST" = x || test "${LO_ELFCHECK_ALLOWLIST-x}" != x; then
+    x_LO_ELFCHECK_ALLOWLIST=
+else
+    x_LO_ELFCHECK_ALLOWLIST=[\#]
+fi
+AC_SUBST(x_LO_ELFCHECK_ALLOWLIST)
+AC_SUBST(LO_ELFCHECK_ALLOWLIST)
+
+libo_FUZZ_SUMMARY
+
+# Generate a configuration sha256 we can use for deps
+if test -f config_host.mk; then
+    config_sha256=`$SHA256SUM config_host.mk | sed "s/ .*//"`
+fi
+if test -f config_host_lang.mk; then
+    config_lang_sha256=`$SHA256SUM config_host_lang.mk | sed "s/ .*//"`
+fi
+
+CFLAGS=$my_original_CFLAGS
+CXXFLAGS=$my_original_CXXFLAGS
+CPPFLAGS=$my_original_CPPFLAGS
+
+AC_CONFIG_LINKS([include:include])
+
+# Keep in sync with list of files far up, at AC_MSG_CHECKING([for
+# BUILD platform configuration] - otherwise breaks cross building
+AC_CONFIG_FILES([config_host.mk
+                 config_host_lang.mk
+                 Makefile
+                 bin/bffvalidator.sh
+                 bin/odfvalidator.sh
+                 bin/officeotron.sh
+                 instsetoo_native/util/openoffice.lst
+                 sysui/desktop/macosx/Info.plist
+                 hardened_runtime.xcent:sysui/desktop/macosx/hardened_runtime.xcent.in
+                 lo.xcent:sysui/desktop/macosx/lo.xcent.in
+                 vs-code.code-workspace.template:.vscode/vs-code-template.code-workspace.in])
+
+AC_CONFIG_HEADERS([config_host/config_atspi.h])
+AC_CONFIG_HEADERS([config_host/config_buildconfig.h])
+AC_CONFIG_HEADERS([config_host/config_buildid.h])
+AC_CONFIG_HEADERS([config_host/config_box2d.h])
+AC_CONFIG_HEADERS([config_host/config_clang.h])
+AC_CONFIG_HEADERS([config_host/config_crypto.h])
+AC_CONFIG_HEADERS([config_host/config_dconf.h])
+AC_CONFIG_HEADERS([config_host/config_eot.h])
+AC_CONFIG_HEADERS([config_host/config_extensions.h])
+AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
+AC_CONFIG_HEADERS([config_host/config_cairo_rgba.h])
+AC_CONFIG_HEADERS([config_host/config_cxxabi.h])
+AC_CONFIG_HEADERS([config_host/config_dbus.h])
+AC_CONFIG_HEADERS([config_host/config_features.h])
+AC_CONFIG_HEADERS([config_host/config_feature_desktop.h])
+AC_CONFIG_HEADERS([config_host/config_feature_opencl.h])
+AC_CONFIG_HEADERS([config_host/config_firebird.h])
+AC_CONFIG_HEADERS([config_host/config_folders.h])
+AC_CONFIG_HEADERS([config_host/config_fonts.h])
+AC_CONFIG_HEADERS([config_host/config_fuzzers.h])
+AC_CONFIG_HEADERS([config_host/config_gio.h])
+AC_CONFIG_HEADERS([config_host/config_global.h])
+AC_CONFIG_HEADERS([config_host/config_gpgme.h])
+AC_CONFIG_HEADERS([config_host/config_java.h])
+AC_CONFIG_HEADERS([config_host/config_langs.h])
+AC_CONFIG_HEADERS([config_host/config_lgpl.h])
+AC_CONFIG_HEADERS([config_host/config_libcxx.h])
+AC_CONFIG_HEADERS([config_host/config_liblangtag.h])
+AC_CONFIG_HEADERS([config_host/config_locales.h])
+AC_CONFIG_HEADERS([config_host/config_mpl.h])
+AC_CONFIG_HEADERS([config_host/config_oox.h])
+AC_CONFIG_HEADERS([config_host/config_options.h])
+AC_CONFIG_HEADERS([config_host/config_options_calc.h])
+AC_CONFIG_HEADERS([config_host/config_zxing.h])
+AC_CONFIG_HEADERS([config_host/config_skia.h])
+AC_CONFIG_HEADERS([config_host/config_typesizes.h])
+AC_CONFIG_HEADERS([config_host/config_validation.h])
+AC_CONFIG_HEADERS([config_host/config_vendor.h])
+AC_CONFIG_HEADERS([config_host/config_vclplug.h])
+AC_CONFIG_HEADERS([config_host/config_version.h])
+AC_CONFIG_HEADERS([config_host/config_oauth2.h])
+AC_CONFIG_HEADERS([config_host/config_poppler.h])
+AC_CONFIG_HEADERS([config_host/config_python.h])
+AC_CONFIG_HEADERS([config_host/config_writerperfect.h])
+AC_CONFIG_HEADERS([config_host/config_wasm_strip.h])
+AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h])
+AC_OUTPUT
+
+if test "$CROSS_COMPILING" = TRUE; then
+    (echo; echo export BUILD_TYPE_FOR_HOST=$BUILD_TYPE) >>config_build.mk
+fi
+
+# touch the config timestamp file
+if test ! -f config_host.mk.stamp; then
+    echo > config_host.mk.stamp
+elif test "$config_sha256" = `$SHA256SUM config_host.mk | sed "s/ .*//"`; then
+    echo "Host Configuration unchanged - avoiding scp2 stamp update"
+else
+    echo > config_host.mk.stamp
+fi
+
+# touch the config lang timestamp file
+if test ! -f config_host_lang.mk.stamp; then
+    echo > config_host_lang.mk.stamp
+elif test "$config_lang_sha256" = `$SHA256SUM config_host_lang.mk | sed "s/ .*//"`; then
+    echo "Language Configuration unchanged - avoiding scp2 stamp update"
+else
+    echo > config_host_lang.mk.stamp
+fi
+
+
+if test \( "$STALE_MAKE" = "TRUE" \) \
+        -a "$build_os" = "cygwin"; then
+
+cat << _EOS
+****************************************************************************
+WARNING:
+Your make version is known to be horribly slow, and hard to debug
+problems with. To get a reasonably functional make please do:
+
+to install a pre-compiled binary make for Win32
+
+ mkdir -p /opt/lo/bin
+ cd /opt/lo/bin
+ wget https://dev-www.libreoffice.org/bin/cygwin/make-4.2.1-msvc.exe
+ cp make-4.2.1-msvc.exe make
+ chmod +x make
+
+to install from source:
+place yourself in a working directory of you choice.
+
+ git clone git://git.savannah.gnu.org/make.git
+
+ [go to Start menu, open "Visual Studio 2019" or "Visual Studio 2022", and then click "x86 Native Tools Command Prompt" or "x64 Native Tools Command Prompt"]
+ set PATH=%PATH%;C:\Cygwin\bin
+ [or Cygwin64, if that is what you have]
+ cd path-to-make-repo-you-cloned-above
+ build_w32.bat --without-guile
+
+should result in a WinRel/gnumake.exe.
+Copy it to the Cygwin /opt/lo/bin directory as make.exe
+
+Then re-run autogen.sh
+
+Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
+Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
+
+_EOS
+fi
+
+
+cat << _EOF
+****************************************************************************
+
+To show information on various make targets and make flags, run:
+$GNUMAKE help
+
+To just build, run:
+$GNUMAKE
+
+_EOF
+
+if test $_os != WINNT -a "$CROSS_COMPILING" != TRUE; then
+    cat << _EOF
+After the build has finished successfully, you can immediately run what you built using the command:
+_EOF
+
+    if test $_os = Darwin; then
+        echo open instdir/$PRODUCTNAME_WITHOUT_SPACES.app
+    else
+        echo instdir/program/soffice
+    fi
+    cat << _EOF
+
+If you want to run the unit tests, run:
+$GNUMAKE check
+
+_EOF
+fi
+
+if test -s "$WARNINGS_FILE_FOR_BUILD"; then
+    echo "BUILD / cross-toolset config, repeated ($WARNINGS_FILE_FOR_BUILD)"
+    cat "$WARNINGS_FILE_FOR_BUILD"
+    echo
+fi
+
+if test -s "$WARNINGS_FILE"; then
+    echo "HOST config ($WARNINGS_FILE)"
+    cat "$WARNINGS_FILE"
+fi
+
+# Remove unneeded emconfigure artifacts
+rm -f a.out a.wasm a.out.js a.out.wasm
+
+dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
Index: libreoffice/create-24.2.0.3-odk-idl-patch/create.patch.sh
===================================================================
--- libreoffice/create-24.2.0.3-odk-idl-patch/create.patch.sh	(nonexistent)
+++ libreoffice/create-24.2.0.3-odk-idl-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=24.2.0.3
+
+tar --files-from=file.list -xJvf ../libreoffice-$VERSION.tar.xz
+mv libreoffice-$VERSION libreoffice-$VERSION-orig
+
+cp -rf ./libreoffice-$VERSION-new ./libreoffice-$VERSION
+
+diff --unified -Nr  libreoffice-$VERSION-orig  libreoffice-$VERSION > libreoffice-$VERSION-odk-idl.patch
+
+mv libreoffice-$VERSION-odk-idl.patch ../patches
+
+rm -rf ./libreoffice-$VERSION
+rm -rf ./libreoffice-$VERSION-orig

Property changes on: libreoffice/create-24.2.0.3-odk-idl-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/create-24.2.0.3-odk-idl-patch/file.list
===================================================================
--- libreoffice/create-24.2.0.3-odk-idl-patch/file.list	(nonexistent)
+++ libreoffice/create-24.2.0.3-odk-idl-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libreoffice-24.2.0.3/bin/distro-install-sdk
Index: libreoffice/create-24.2.0.3-odk-idl-patch/libreoffice-24.2.0.3-new/bin/distro-install-sdk
===================================================================
--- libreoffice/create-24.2.0.3-odk-idl-patch/libreoffice-24.2.0.3-new/bin/distro-install-sdk	(nonexistent)
+++ libreoffice/create-24.2.0.3-odk-idl-patch/libreoffice-24.2.0.3-new/bin/distro-install-sdk	(revision 385)
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+if test -z "${SRC_ROOT}"; then
+    echo "distro-install-clean-up: No environment set!"
+    exit 1
+fi
+
+if test -d $DESTDIR$INSTALLDIR/sdk ; then
+
+    echo "SDK installation clean up"
+
+    # bin potential .orig files
+    find $DESTDIR$INSTALLDIR/sdk -name "*.orig" -exec rm -f {} \;
+
+    # move some SDK directories to the right place according to FHS
+    # note that examples must stay in $DESTDIR$INSTALLDIR/sdk because there are used
+    # relative paths to $DESTDIR$INSTALLDIR/sdk/setting and it does not work via
+    # a symlink
+    mkdir -p $DESTDIR$PREFIXDIR/include
+    mkdir -p $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+    mkdir -p $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk
+    mkdir -p $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/sdk/include      $DESTDIR$PREFIXDIR/include/$INSTALLDIRNAME
+    if [ -d $DESTDIR$INSTALLDIR/sdk/classes ]; then
+        mv $DESTDIR$INSTALLDIR/sdk/classes      $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk/classes
+    fi
+    if [ -d $DESTDIR$INSTALLDIR/sdk/idl ]; then
+        mv $DESTDIR$INSTALLDIR/sdk/idl          $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+    fi
+    mv $DESTDIR$INSTALLDIR/sdk/docs         $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/sdk/share/readme $DESTDIR$DOCDIR/sdk/readme
+    mv $DESTDIR$INSTALLDIR/sdk/index.html   $DESTDIR$DOCDIR/sdk
+
+    # compat symlinks
+    ln -sf $PREFIXDIR/include/$INSTALLDIRNAME                        $DESTDIR$INSTALLDIR/sdk/include
+    ln -sf $DATADIR/$INSTALLDIRNAME/sdk/classes                      $DESTDIR$INSTALLDIR/sdk/classes
+    ln -sf $DATADIR/idl/$INSTALLDIRNAME                              $DESTDIR$INSTALLDIR/sdk/idl
+    ln -sf $DOCDIR/sdk/docs                                          $DESTDIR$INSTALLDIR/sdk/
+    ln -sf $DOCDIR/sdk/index.html                                    $DESTDIR$INSTALLDIR/sdk/index.html
+    ln -sf $INSTALLDIR/sdk/examples         $DESTDIR$DOCDIR/sdk/examples
+
+    # fix file list
+    sed -e "s|^\(%dir \)\?$INSTALLDIR/sdk/include|\1$PREFIXDIR/include/$INSTALLDIRNAME|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/classes|\1$DATADIR/$INSTALLDIRNAME/sdk/classes|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/idl|\1$DATADIR/idl/$INSTALLDIRNAME|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/docs|\1$DOCDIR/sdk/docs|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share/readme|\1$DOCDIR/sdk/readme|" \
+	-e "s|^$INSTALLDIR/sdk/index.html$|$DOCDIR/sdk/index.html|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share.*$||" \
+	-e "/\.orig$/D" \
+	-e "/^$/D" \
+	$DESTDIR/gid_Module_Root_SDK | sort -u \
+	>$DESTDIR/gid_Module_Root_SDK.new
+    mv $DESTDIR/gid_Module_Root_SDK.new $DESTDIR/gid_Module_Root_SDK
+    #
+    echo "%dir $DATADIR/$INSTALLDIRNAME/sdk"                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/$INSTALLDIRNAME"                        >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/idl"                                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk/docs"                                >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk"                                     >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR"                                         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/include"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/classes"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/idl"         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/docs"        >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/index.html"  >>$DESTDIR/gid_Module_Root_SDK
+    echo "$DOCDIR/sdk/examples"                                 >>$DESTDIR/gid_Module_Root_SDK
+
+    # generate default profiles
+    sed -e "s,@OO_SDK_NAME@,libreoffice${PRODUCTVERSION}_sdk," \
+        -e "s,@OO_SDK_HOME@,$INSTALLDIR/sdk," \
+        -e "s,@OFFICE_HOME@,$INSTALLDIR," \
+        -e "s,@OO_SDK_MAKE_HOME@,$(dirname $(command -v make))," \
+        -e "s,@OO_SDK_ZIP_HOME@,$(dirname $(command -v zip))," \
+        -e "s,@OO_SDK_CPP_HOME@,$(dirname $(command -v cpp))," \
+        -e "s,@OO_SDK_SED_HOME@,$(dirname $(command -v sed))," \
+        -e "s,@OO_SDK_CAT_HOME@,$(dirname $(command -v cat))," \
+        -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
+        -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
+        -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
+            $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh.in \
+        > $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh
+    chmod 755 $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh
+    echo $INSTALLDIR/sdk/setsdkenv_unix.sh >>$DESTDIR/gid_Module_Root_SDK
+
+fi

Property changes on: libreoffice/create-24.2.0.3-odk-idl-patch/libreoffice-24.2.0.3-new/bin/distro-install-sdk
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/create-7.6.2.1-isystem-patch/create.patch.sh
===================================================================
--- libreoffice/create-7.6.2.1-isystem-patch/create.patch.sh	(nonexistent)
+++ libreoffice/create-7.6.2.1-isystem-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=7.6.2.1
+
+tar --files-from=file.list -xJvf ../libreoffice-$VERSION.tar.xz
+mv libreoffice-$VERSION libreoffice-$VERSION-orig
+
+cp -rf ./libreoffice-$VERSION-new ./libreoffice-$VERSION
+
+diff --unified -Nr  libreoffice-$VERSION-orig  libreoffice-$VERSION > libreoffice-$VERSION-isystem.patch
+
+mv libreoffice-$VERSION-isystem.patch ../patches
+
+rm -rf ./libreoffice-$VERSION
+rm -rf ./libreoffice-$VERSION-orig

Property changes on: libreoffice/create-7.6.2.1-isystem-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/create-7.6.2.1-isystem-patch/file.list
===================================================================
--- libreoffice/create-7.6.2.1-isystem-patch/file.list	(nonexistent)
+++ libreoffice/create-7.6.2.1-isystem-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libreoffice-7.6.2.1/configure.ac
Index: libreoffice/create-7.6.2.1-isystem-patch/libreoffice-7.6.2.1-new/configure.ac
===================================================================
--- libreoffice/create-7.6.2.1-isystem-patch/libreoffice-7.6.2.1-new/configure.ac	(nonexistent)
+++ libreoffice/create-7.6.2.1-isystem-patch/libreoffice-7.6.2.1-new/configure.ac	(revision 385)
@@ -0,0 +1,14978 @@
+dnl -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil; fill-column: 100 -*-
+dnl configure.ac serves as input for the GNU autoconf package
+dnl in order to create a configure script.
+
+# The version number in the second argument to AC_INIT should be four numbers separated by
+# periods. Some parts of the code requires the first one to be less than 128 and the others to be less
+# than 256. The four numbers can optionally be followed by a period and a free-form string containing
+# no spaces or periods, like "frobozz-mumble-42" or "alpha0". If the free-form string ends with one or
+# several non-alphanumeric characters, those are split off and used only for the
+# ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
+
+AC_INIT([LibreOffice],[7.6.2.1],[],[],[http://documentfoundation.org/])
+
+dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just fine if it is installed
+dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails hard
+dnl so check for the version of autoconf that is actually used to create the configure script
+AC_PREREQ([2.59])
+m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.68]), -1,
+    [AC_MSG_ERROR([at least autoconf version 2.68 is needed (you can use AUTOCONF environment variable to point to a suitable one)])])
+
+if test -n "$BUILD_TYPE"; then
+    AC_MSG_ERROR([You have sourced config_host.mk in this shell.  This may lead to trouble, please run in a fresh (login) shell.])
+fi
+
+save_CC=$CC
+save_CXX=$CXX
+
+first_arg_basename()
+{
+    for i in $1; do
+        basename "$i"
+        break
+    done
+}
+
+CC_BASE=`first_arg_basename "$CC"`
+CXX_BASE=`first_arg_basename "$CXX"`
+
+BUILD_TYPE="LibO"
+SCPDEFS=""
+GIT_NEEDED_SUBMODULES=""
+LO_PATH= # used by path_munge to construct a PATH variable
+
+FilterLibs()
+{
+    # Return value: $filteredlibs
+
+    filteredlibs=
+    if test "$COM" = "MSC"; then
+        for f in $1; do
+            if test "x$f" != "x${f#-L}"; then
+                filteredlibs="$filteredlibs -LIBPATH:${f:2}"
+            elif test "x$f" != "x${f#-l}"; then
+                filteredlibs="$filteredlibs ${f:2}.lib"
+            else
+                filteredlibs="$filteredlibs $f"
+            fi
+        done
+    else
+        for f in $1; do
+            case "$f" in
+                # let's start with Fedora's paths for now
+                -L/lib|-L/lib/|-L/lib64|-L/lib64/|-L/usr/lib|-L/usr/lib/|-L/usr/lib64|-L/usr/lib64/)
+                    # ignore it: on UNIXoids it is searched by default anyway
+                    # but if it's given explicitly then it may override other paths
+                    # (on macOS it would be an error to use it instead of SDK)
+                    ;;
+                *)
+                    filteredlibs="$filteredlibs $f"
+                    ;;
+            esac
+        done
+    fi
+}
+
+PathFormat()
+{
+    # Args: $1: A pathname. On Cygwin and WSL, in either the Unix or the Windows format. Note that this
+    # function is called also on Unix.
+    #
+    # Return value: $formatted_path and $formatted_path_unix.
+    #
+    # $formatted_path is the argument in Windows format, but using forward slashes instead of
+    # backslashes, using 8.3 pathname components if necessary (if it otherwise would contains spaces
+    # or shell metacharacters).
+    #
+    # $formatted_path_unix is the argument in a form usable in Cygwin or WSL, using 8.3 components if
+    # necessary. On Cygwin, it is the same as $formatted_path, but on WSL it is $formatted_path as a
+    # Unix pathname.
+    #
+    # Errors out if 8.3 names are needed but aren't present for some of the path components.
+
+    # Examples:
+    #
+    # /home/tml/lo/master-optimised => C:/cygwin64/home/tml/lo/master-optimised
+    #
+    # C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe => C:/PROGRA~2/MICROS~3/INSTAL~1/vswhere.exe
+    #
+    # C:\Program Files (x86)\Microsoft Visual Studio\2019\Community => C:/PROGRA~2/MICROS~3/2019/COMMUN~1
+    #
+    # C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt => C:/PROGRA~2/WI3CF2~1/10/Include/10.0.18362.0/ucrt
+    #
+    # /cygdrive/c/PROGRA~2/WI3CF2~1/10 => C:/PROGRA~2/WI3CF2~1/10
+    #
+    # C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\ => C:/PROGRA~2/WI3CF2~1/NETFXSDK/4.8/
+    #
+    # /usr/bin/find.exe => C:/cygwin64/bin/find.exe
+
+    if test -n "$UNITTEST_WSL_PATHFORMAT"; then
+        printf "PathFormat $1 ==> "
+    fi
+
+    formatted_path="$1"
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        if test "$build_os" = "wsl"; then
+            formatted_path=$(echo "$formatted_path" | tr -d '\r')
+        fi
+
+        pf_conv_to_dos=
+        # spaces,parentheses,brackets,braces are problematic in pathname
+        # so are backslashes
+        case "$formatted_path" in
+            *\ * | *\)* | *\(* | *\{* | *\}* | *\[* | *\]* | *\\* )
+                pf_conv_to_dos="yes"
+            ;;
+        esac
+        if test "$pf_conv_to_dos" = "yes"; then
+            if test "$build_os" = "wsl"; then
+                case "$formatted_path" in
+                    /*)
+                        formatted_path=$(wslpath -w "$formatted_path")
+                        ;;
+                esac
+                formatted_path=$($WSL_LO_HELPER --8.3 "$formatted_path")
+            elif test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+                formatted_path=`cygpath -sm "$formatted_path"`
+            else
+                formatted_path=`cygpath -d "$formatted_path"`
+            fi
+            if test $? -ne 0;  then
+                AC_MSG_ERROR([path conversion failed for "$1".])
+            fi
+        fi
+        fp_count_colon=`echo "$formatted_path" | $GREP -c "[:]"`
+        fp_count_slash=`echo "$formatted_path" | $GREP -c "[/]"`
+        if test "$fp_count_slash$fp_count_colon" != "00"; then
+            if test "$fp_count_colon" = "0"; then
+                new_formatted_path=`realpath "$formatted_path"`
+                if test $? -ne 0;  then
+                    AC_MSG_WARN([realpath failed for "$formatted_path", not necessarily a problem.])
+                else
+                    formatted_path="$new_formatted_path"
+                fi
+            fi
+            if test "$build_os" = "wsl"; then
+                if test "$fp_count_colon" != "0"; then
+                    formatted_path=$(wslpath "$formatted_path")
+                    local final_slash=
+                    case "$formatted_path" in
+                        */)
+                            final_slash=/
+                            ;;
+                    esac
+                    formatted_path=$(wslpath -m $formatted_path)
+                    case "$formatted_path" in
+                        */)
+                            ;;
+                        *)
+                            formatted_path="$formatted_path"$final_slash
+                            ;;
+                    esac
+                else
+                    formatted_path=$(wslpath -m "$formatted_path")
+                fi
+            else
+                formatted_path=`cygpath -m "$formatted_path"`
+            fi
+            if test $? -ne 0;  then
+                AC_MSG_ERROR([path conversion failed for "$1".])
+            fi
+        fi
+        fp_count_space=`echo "$formatted_path" | $GREP -c "[ ]"`
+        if test "$fp_count_space" != "0"; then
+            AC_MSG_ERROR([converted path "$formatted_path" still contains spaces. Short filenames (8.3 filenames) support was disabled on this system?])
+        fi
+    fi
+    if test "$build_os" = "wsl"; then
+        # WSL can't run Windows binaries from Windows pathnames so we need a separate return value in Unix format
+        formatted_path_unix=$(wslpath "$formatted_path")
+    else
+        # But Cygwin can
+        formatted_path_unix="$formatted_path"
+    fi
+}
+
+AbsolutePath()
+{
+    # There appears to be no simple and portable method to get an absolute and
+    # canonical path, so we try creating the directory if does not exist and
+    # utilizing the shell and pwd.
+
+    # Args: $1: A possibly relative pathname
+    # Return value: $absolute_path
+
+    # Convert to unix path, mkdir would treat c:/path as a relative path.
+    PathFormat "$1"
+    local rel="$formatted_path_unix"
+    absolute_path=""
+    test ! -e "$rel" && mkdir -p "$rel"
+    if test -d "$rel" ; then
+        cd "$rel" || AC_MSG_ERROR([absolute path resolution failed for "$rel".])
+        absolute_path="$(pwd)"
+        cd - > /dev/null
+    else
+        AC_MSG_ERROR([Failed to resolve absolute path.  "$rel" does not exist or is not a directory.])
+    fi
+}
+
+WARNINGS_FILE=config.warn
+WARNINGS_FILE_FOR_BUILD=config.Build.warn
+rm -f "$WARNINGS_FILE" "$WARNINGS_FILE_FOR_BUILD"
+have_WARNINGS="no"
+add_warning()
+{
+    if test "$have_WARNINGS" = "no"; then
+        echo "*************************************" > "$WARNINGS_FILE"
+        have_WARNINGS="yes"
+        if which tput >/dev/null && test "`tput colors 2>/dev/null || echo 0`" -ge 8; then
+            dnl <esc> as actual byte (U+1b), [ escaped using quadrigraph @<:@
+            COLORWARN='*@<:@1;33;40m WARNING @<:@0m:'
+        else
+            COLORWARN="* WARNING :"
+        fi
+    fi
+    echo "$COLORWARN $@" >> "$WARNINGS_FILE"
+}
+
+dnl Some Mac User have the bad habit of letting a lot of crap
+dnl accumulate in their PATH and even adding stuff in /usr/local/bin
+dnl that confuse the build.
+dnl For the ones that use LODE, let's be nice and protect them
+dnl from themselves
+
+mac_sanitize_path()
+{
+    mac_path="$LODE_HOME/opt/bin:/usr/bin:/bin:/usr/sbin:/sbin"
+dnl a common but nevertheless necessary thing that may be in a fancy
+dnl path location is git, so make sure we have it
+    mac_git_path=`which git 2>/dev/null`
+    if test -n "$mac_git_path" -a -x "$mac_git_path" -a "$mac_git_path" != "/usr/bin/git" ; then
+        mac_path="$mac_path:`dirname $mac_git_path`"
+    fi
+dnl a not so common but nevertheless quite helpful thing that may be in a fancy
+dnl path location is gpg, so make sure we find it
+    mac_gpg_path=`which gpg 2>/dev/null`
+    if test -n "$mac_gpg_path" -a -x "$mac_gpg_path" -a "$mac_gpg_path" != "/usr/bin/gpg" ; then
+        mac_path="$mac_path:`dirname $mac_gpg_path`"
+    fi
+    PATH="$mac_path"
+    unset mac_path
+    unset mac_git_path
+    unset mac_gpg_path
+}
+
+dnl semantically test a three digits version
+dnl $1 - $3 = minimal version
+dnl $4 - $6 = current version
+
+check_semantic_version_three()
+{
+    test "$4" -gt "$1" \
+        -o \( "$4" -eq "$1" -a "$5" -gt "$2" \) \
+        -o \( "$4" -eq "$1" -a "$5" -eq "$2" -a "$6" -ge "$3" \)
+    return $?
+}
+
+dnl calls check_semantic_version_three with digits in named variables $1_MAJOR, $1_MINOR, $1_TINY
+dnl $1 = current version prefix, e.g. EMSCRIPTEN => EMSCRIPTEN_
+dnl $2 = postfix to $1, e.g. MIN => EMSCRIPTEN_MIN_
+
+check_semantic_version_three_prefixed()
+{
+    eval local MIN_MAJOR="\$${1}_${2}_MAJOR"
+    eval local MIN_MINOR="\$${1}_${2}_MINOR"
+    eval local MIN_TINY="\$${1}_${2}_TINY"
+    eval local CUR_MAJOR="\$${1}_MAJOR"
+    eval local CUR_MINOR="\$${1}_MINOR"
+    eval local CUR_TINY="\$${1}_TINY"
+    check_semantic_version_three $MIN_MAJOR $MIN_MINOR $MIN_TINY $CUR_MAJOR $CUR_MINOR $CUR_TINY
+    return $?
+}
+
+echo "********************************************************************"
+echo "*"
+echo "*   Running ${PACKAGE_NAME} build configuration."
+echo "*"
+echo "********************************************************************"
+echo ""
+
+dnl ===================================================================
+dnl checks build and host OSes
+dnl do this before argument processing to allow for platform dependent defaults
+dnl ===================================================================
+
+# Check for WSL (version 2, at least). But if --host is explicitly specified (to really do build for
+# Linux on WSL) trust that.
+if test -z "$host" -a -z "$build" -a "`wslsys -v 2>/dev/null`" != ""; then
+    ac_cv_host="x86_64-pc-wsl"
+    ac_cv_host_cpu="x86_64"
+    ac_cv_host_os="wsl"
+    ac_cv_build="$ac_cv_host"
+    ac_cv_build_cpu="$ac_cv_host_cpu"
+    ac_cv_build_os="$ac_cv_host_os"
+
+    # Emulation of Cygwin's cygpath command for WSL.
+    cygpath()
+    {
+        if test -n "$UNITTEST_WSL_CYGPATH"; then
+            echo -n cygpath "$@" "==> "
+        fi
+
+        # Cygwin's real cygpath has a plethora of options but we use only a few here.
+        local args="$@"
+        local opt
+        local opt_d opt_m opt_u opt_w opt_l opt_s opt_p
+        OPTIND=1
+
+        while getopts dmuwlsp opt; do
+            case "$opt" in
+                \?)
+                    AC_MSG_ERROR([Unimplemented cygpath emulation option in invocation: cygpath $args])
+                    ;;
+                ?)
+                    eval opt_$opt=yes
+                    ;;
+            esac
+        done
+
+        shift $((OPTIND-1))
+
+        if test $# -ne 1; then
+            AC_MSG_ERROR([Invalid cygpath emulation invocation: Pathname missing]);
+        fi
+
+        local input="$1"
+
+        local result
+
+        if test -n "$opt_d" -o -n "$opt_m" -o -n "$opt_w"; then
+            # Print Windows path, possibly in 8.3 form (-d) or with forward slashes (-m)
+
+            if test -n "$opt_u"; then
+                AC_MSG_ERROR([Invalid cygpath invocation: Both Windows and Unix path output requested])
+            fi
+
+            case "$input" in
+                /mnt/*)
+                    # A Windows file in WSL format
+                    input=$(wslpath -w "$input")
+                    ;;
+                [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
+                    # Already in Windows format
+                    ;;
+                /*)
+                    input=$(wslpath -w "$input")
+                    ;;
+                *)
+                    AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute])
+                    ;;
+            esac
+            if test -n "$opt_d" -o -n "$opt_s"; then
+                input=$($WSL_LO_HELPER --8.3 "$input")
+            fi
+            if test -n "$opt_m"; then
+                input="${input//\\//}"
+            fi
+            echo "$input"
+        else
+            # Print Unix path
+
+            case "$input" in
+                [[a-zA-Z]]:\\* | \\* | [[a-zA-Z]]:/* | /*)
+                    wslpath -u "$input"
+                    ;;
+                /)
+                    echo "$input"
+                    ;;
+                *)
+                    AC_MSG_ERROR([Invalid cygpath invocation: Path '$input' is not absolute])
+                    ;;
+            esac
+        fi
+    }
+
+    if test -n "$UNITTEST_WSL_CYGPATH"; then
+        BUILDDIR=.
+
+        # Nothing special with these file names, just arbitrary ones picked to test with
+        cygpath -d /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -w /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -m /usr/lib64/ld-linux-x86-64.so.2
+        cygpath -m -s /usr/lib64/ld-linux-x86-64.so.2
+        # At least on my machine for instance this file does have an 8.3 name
+        cygpath -d /mnt/c/windows/WindowsUpdate.log
+        # But for instance this one doesn't
+        cygpath -w /mnt/c/windows/system32/AboutSettingsHandlers.dll
+        cygpath -ws /mnt/c/windows/WindowsUpdate.log
+        cygpath -m /mnt/c/windows/system32/AboutSettingsHandlers.dll
+        cygpath -ms /mnt/c/windows/WindowsUpdate.log
+
+        cygpath -u 'c:\windows\system32\AboutSettingsHandlers.dll'
+        cygpath -u 'c:/windows/system32/AboutSettingsHandlers.dll'
+
+        exit 0
+    fi
+
+    if test -z "$WSL_LO_HELPER"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/wsl-lo-helper" ; then
+            WSL_LO_HELPER="$LODE_HOME/opt/bin/wsl-lo-helper"
+        elif test -x "/opt/lo/bin/wsl-lo-helper"; then
+            WSL_LO_HELPER="/opt/lo/bin/wsl-lo-helper"
+        fi
+    fi
+    if test -z "$WSL_LO_HELPER"; then
+        AC_MSG_ERROR([wsl-lo-helper not found. See solenv/wsl/README.])
+    fi
+fi
+
+AC_CANONICAL_HOST
+AC_CANONICAL_BUILD
+
+if test -n "$UNITTEST_WSL_PATHFORMAT"; then
+    BUILDDIR=.
+    GREP=grep
+
+    # Use of PathFormat must be after AC_CANONICAL_BUILD above
+    PathFormat /
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    PathFormat $PWD
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    PathFormat "$PROGRAMFILESX86"
+    printf "$formatted_path , $formatted_path_unix\n"
+
+    exit 0
+fi
+
+AC_MSG_CHECKING([for product name])
+PRODUCTNAME="AC_PACKAGE_NAME"
+if test -n "$with_product_name" -a "$with_product_name" != no; then
+    PRODUCTNAME="$with_product_name"
+fi
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    PRODUCTNAME="${PRODUCTNAME}Dev"
+fi
+AC_MSG_RESULT([$PRODUCTNAME])
+AC_SUBST(PRODUCTNAME)
+PRODUCTNAME_WITHOUT_SPACES=$(printf %s "$PRODUCTNAME" | sed 's/ //g')
+AC_SUBST(PRODUCTNAME_WITHOUT_SPACES)
+
+dnl ===================================================================
+dnl Our version is defined by the AC_INIT() at the top of this script.
+dnl ===================================================================
+
+AC_MSG_CHECKING([for package version])
+if test -n "$with_package_version" -a "$with_package_version" != no; then
+    PACKAGE_VERSION="$with_package_version"
+fi
+AC_MSG_RESULT([$PACKAGE_VERSION])
+
+set `echo "$PACKAGE_VERSION" | sed "s/\./ /g"`
+
+LIBO_VERSION_MAJOR=$1
+LIBO_VERSION_MINOR=$2
+LIBO_VERSION_MICRO=$3
+LIBO_VERSION_PATCH=$4
+
+LIBO_VERSION_SUFFIX=$5
+
+# Split out LIBO_VERSION_SUFFIX_SUFFIX... horrible crack. But apparently wanted separately in
+# openoffice.lst as ABOUTBOXPRODUCTVERSIONSUFFIX. Note that the double brackets are for m4's sake,
+# they get undoubled before actually passed to sed.
+LIBO_VERSION_SUFFIX_SUFFIX=`echo "$LIBO_VERSION_SUFFIX" | sed -e 's/.*[[a-zA-Z0-9]]\([[^a-zA-Z0-9]]*\)$/\1/'`
+test -n "$LIBO_VERSION_SUFFIX_SUFFIX" && LIBO_VERSION_SUFFIX="${LIBO_VERSION_SUFFIX%${LIBO_VERSION_SUFFIX_SUFFIX}}"
+# LIBO_VERSION_SUFFIX, if non-empty, should include the period separator
+test -n "$LIBO_VERSION_SUFFIX" && LIBO_VERSION_SUFFIX=".$LIBO_VERSION_SUFFIX"
+
+# The value for key CFBundleVersion in the Info.plist file must be a period-separated list of at most
+# three non-negative integers. Please find more information about CFBundleVersion at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion
+
+# The value for key CFBundleShortVersionString in the Info.plist file must be a period-separated list
+# of at most three non-negative integers. Please find more information about
+# CFBundleShortVersionString at
+# https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleshortversionstring
+
+# But that is enforced only in the App Store, and we apparently want to break the rules otherwise.
+
+if test "$enable_macosx_sandbox" = yes; then
+    MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.`expr $LIBO_VERSION_MICRO '*' 1000 + $LIBO_VERSION_PATCH`
+    MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION
+else
+    MACOSX_BUNDLE_SHORTVERSION=$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR.$LIBO_VERSION_MICRO.$LIBO_VERSION_PATCH
+    MACOSX_BUNDLE_VERSION=$MACOSX_BUNDLE_SHORTVERSION$LIBO_VERSION_SUFFIX
+fi
+
+AC_SUBST(LIBO_VERSION_MAJOR)
+AC_SUBST(LIBO_VERSION_MINOR)
+AC_SUBST(LIBO_VERSION_MICRO)
+AC_SUBST(LIBO_VERSION_PATCH)
+AC_SUBST(LIBO_VERSION_SUFFIX)
+AC_SUBST(LIBO_VERSION_SUFFIX_SUFFIX)
+AC_SUBST(MACOSX_BUNDLE_SHORTVERSION)
+AC_SUBST(MACOSX_BUNDLE_VERSION)
+
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MAJOR,$LIBO_VERSION_MAJOR)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MINOR,$LIBO_VERSION_MINOR)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_MICRO,$LIBO_VERSION_MICRO)
+AC_DEFINE_UNQUOTED(LIBO_VERSION_PATCH,$LIBO_VERSION_PATCH)
+
+LIBO_THIS_YEAR=`date +%Y`
+AC_DEFINE_UNQUOTED(LIBO_THIS_YEAR,$LIBO_THIS_YEAR)
+
+# replace backslashes, to get a valid c++ string
+config_args=$(echo $ac_configure_args | tr '\\' '/')
+AC_DEFINE_UNQUOTED([BUILDCONFIG],[["$config_args"]],[Options passed to configure script])
+
+dnl ===================================================================
+dnl Product version
+dnl ===================================================================
+AC_MSG_CHECKING([for product version])
+PRODUCTVERSION="$LIBO_VERSION_MAJOR.$LIBO_VERSION_MINOR"
+AC_MSG_RESULT([$PRODUCTVERSION])
+AC_SUBST(PRODUCTVERSION)
+
+AC_PROG_EGREP
+# AC_PROG_EGREP doesn't set GREP on all systems as well
+AC_PATH_PROG(GREP, grep)
+
+BUILDDIR=`pwd`
+cd $srcdir
+SRC_ROOT=`pwd`
+cd $BUILDDIR
+x_Cygwin=[\#]
+
+dnl ======================================
+dnl Required GObject introspection version
+dnl ======================================
+INTROSPECTION_REQUIRED_VERSION=1.32.0
+
+dnl ===================================================================
+dnl Search all the common names for GNU Make
+dnl ===================================================================
+AC_MSG_CHECKING([for GNU Make])
+
+# try to use our own make if it is available and GNUMAKE was not already defined
+if test -z "$GNUMAKE"; then
+    if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/make" ; then
+        GNUMAKE="$LODE_HOME/opt/bin/make"
+    elif test -x "/opt/lo/bin/make"; then
+        GNUMAKE="/opt/lo/bin/make"
+    fi
+fi
+
+GNUMAKE_WIN_NATIVE=
+for a in "$MAKE" "$GNUMAKE" make gmake gnumake; do
+    if test -n "$a"; then
+        $a --version 2> /dev/null | grep GNU  2>&1 > /dev/null
+        if test $? -eq 0;  then
+            if test "$build_os" = "cygwin"; then
+                if test -n "$($a -v | grep 'Built for Windows')" ; then
+                    GNUMAKE="$(cygpath -m "$(which "$(cygpath -u $a)")")"
+                    GNUMAKE_WIN_NATIVE="TRUE"
+                else
+                    GNUMAKE=`which $a`
+                fi
+            else
+                GNUMAKE=`which $a`
+            fi
+            break
+        fi
+    fi
+done
+AC_MSG_RESULT($GNUMAKE)
+if test -z "$GNUMAKE"; then
+    AC_MSG_ERROR([not found. install GNU Make.])
+else
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        AC_MSG_NOTICE([Using a native Win32 GNU Make version.])
+    fi
+fi
+
+win_short_path_for_make()
+{
+    local short_path="$1"
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        cygpath -sm "$short_path"
+    else
+        cygpath -u "$(cygpath -d "$short_path")"
+    fi
+}
+
+
+if test "$build_os" = "cygwin"; then
+    PathFormat "$SRC_ROOT"
+    SRC_ROOT="$formatted_path"
+    PathFormat "$BUILDDIR"
+    BUILDDIR="$formatted_path"
+    x_Cygwin=
+    AC_MSG_CHECKING(for explicit COMSPEC)
+    if test -z "$COMSPEC"; then
+        AC_MSG_ERROR([COMSPEC not set in environment, please set it and rerun])
+    else
+        AC_MSG_RESULT([found: $COMSPEC])
+    fi
+fi
+
+AC_SUBST(SRC_ROOT)
+AC_SUBST(BUILDDIR)
+AC_SUBST(x_Cygwin)
+AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT")
+AC_DEFINE_UNQUOTED(SRC_ROOT,"$SRC_ROOT")
+AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR")
+
+if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then
+    AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account])
+fi
+
+# need sed in os checks...
+AC_PATH_PROGS(SED, sed)
+if test -z "$SED"; then
+    AC_MSG_ERROR([install sed to run this script])
+fi
+
+# Set the ENABLE_LTO variable
+# ===================================================================
+AC_MSG_CHECKING([whether to use link-time optimization])
+if test -n "$enable_lto" -a "$enable_lto" != "no"; then
+    ENABLE_LTO="TRUE"
+    AC_MSG_RESULT([yes])
+else
+    ENABLE_LTO=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_LTO)
+
+AC_ARG_ENABLE(fuzz-options,
+    AS_HELP_STRING([--enable-fuzz-options],
+        [Randomly enable or disable each of those configurable options
+         that are supposed to be freely selectable without interdependencies,
+         or where bad interaction from interdependencies is automatically avoided.])
+)
+
+dnl ===================================================================
+dnl When building for Android, --with-android-ndk,
+dnl --with-android-ndk-toolchain-version and --with-android-sdk are
+dnl mandatory
+dnl ===================================================================
+
+AC_ARG_WITH(android-ndk,
+    AS_HELP_STRING([--with-android-ndk],
+        [Specify location of the Android Native Development Kit. Mandatory when building for Android.]),
+,)
+
+AC_ARG_WITH(android-ndk-toolchain-version,
+    AS_HELP_STRING([--with-android-ndk-toolchain-version],
+        [Specify which toolchain version to use, of those present in the
+        Android NDK you are using. The default (and only supported version currently) is "clang5.0"]),,
+        with_android_ndk_toolchain_version=clang5.0)
+
+AC_ARG_WITH(android-sdk,
+    AS_HELP_STRING([--with-android-sdk],
+        [Specify location of the Android SDK. Mandatory when building for Android.]),
+,)
+
+AC_ARG_WITH(android-api-level,
+    AS_HELP_STRING([--with-android-api-level],
+        [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]),
+,)
+
+ANDROID_NDK_DIR=
+if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then
+    with_android_ndk="$SRC_ROOT/external/android-ndk"
+fi
+if test -n "$with_android_ndk"; then
+    eval ANDROID_NDK_DIR=$with_android_ndk
+
+    ANDROID_API_LEVEL=16
+    if test -n "$with_android_api_level" ; then
+        ANDROID_API_LEVEL="$with_android_api_level"
+    fi
+
+    if test $host_cpu = arm; then
+        LLVM_TRIPLE=armv7a-linux-androideabi
+        ANDROID_SYSROOT_PLATFORM=arm-linux-androideabi
+        ANDROID_APP_ABI=armeabi-v7a
+        ANDROIDCFLAGS="-mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon -Wl,--fix-cortex-a8"
+    elif test $host_cpu = aarch64; then
+        LLVM_TRIPLE=aarch64-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        # minimum android version that supports aarch64
+        if test "$ANDROID_API_LEVEL" -lt "21" ; then
+            ANDROID_API_LEVEL=21
+        fi
+        ANDROID_APP_ABI=arm64-v8a
+    elif test $host_cpu = x86_64; then
+        LLVM_TRIPLE=x86_64-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        # minimum android version that supports x86_64
+        ANDROID_API_LEVEL=21
+        ANDROID_APP_ABI=x86_64
+    else
+        # host_cpu is something like "i386" or "i686" I guess, NDK uses
+        # "x86" in some contexts
+        LLVM_TRIPLE=i686-linux-android
+        ANDROID_SYSROOT_PLATFORM=$LLVM_TRIPLE
+        ANDROID_APP_ABI=x86
+    fi
+
+    # Set up a lot of pre-canned defaults
+
+    if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then
+        if test ! -f $ANDROID_NDK_DIR/source.properties; then
+            AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.])
+        fi
+        ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties`
+    else
+        ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT`
+    fi
+    if test -z "$ANDROID_NDK_VERSION";  then
+        AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.])
+    fi
+    case $ANDROID_NDK_VERSION in
+    r9*|r10*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    11.1.*|12.1.*|13.1.*|14.1.*|16.*|17.*|18.*|19.*|20.*|21.*|22.*)
+        AC_MSG_ERROR([Building for Android requires NDK version >= 23.*])
+        ;;
+    23.*)
+        ;;
+    *)
+        # NDK 24 dropped support for API levels < 19
+        if test "$ANDROID_API_LEVEL" -lt "19"; then
+            ANDROID_API_LEVEL=19
+        fi
+        case $ANDROID_NDK_VERSION in
+        24.*|25.*)
+            ;;
+        *)
+            AC_MSG_WARN([Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk.])
+            add_warning "Untested Android NDK version $ANDROID_NDK_VERSION, only versions 23.* to 25.* have been used successfully. Proceed at your own risk."
+            ;;
+        esac
+        ;;
+    esac
+
+    case "$with_android_ndk_toolchain_version" in
+    clang5.0)
+        ANDROID_GCC_TOOLCHAIN_VERSION=4.9
+        ;;
+    *)
+        AC_MSG_ERROR([Unrecognized value for the --with-android-ndk-toolchain-version option. Building for Android is only supported with Clang 5.*])
+    esac
+
+    AC_MSG_NOTICE([using the Android API level... $ANDROID_API_LEVEL])
+
+    # NDK 15 or later toolchain is 64bit-only, except for Windows that we don't support. Using a 64-bit
+    # linker is required if you compile large parts of the code with -g. A 32-bit linker just won't
+    # manage to link the (app-specific) single huge .so that is built for the app in
+    # android/source/ if there is debug information in a significant part of the object files.
+    # (A 64-bit ld.gold grows too much over 10 gigabytes of virtual space when linking such a .so if
+    # all objects have been built with debug information.)
+    case $build_os in
+    linux-gnu*)
+        android_HOST_TAG=linux-x86_64
+        ;;
+    darwin*)
+        android_HOST_TAG=darwin-x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([We only support building for Android from Linux or macOS])
+        # ndk would also support windows and windows-x86_64
+        ;;
+    esac
+    ANDROID_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG
+    ANDROID_COMPILER_BIN=$ANDROID_TOOLCHAIN/bin
+
+    test -z "$AR" && AR=$ANDROID_COMPILER_BIN/llvm-ar
+    test -z "$NM" && NM=$ANDROID_COMPILER_BIN/llvm-nm
+    test -z "$OBJDUMP" && OBJDUMP=$ANDROID_COMPILER_BIN/llvm-objdump
+    test -z "$RANLIB" && RANLIB=$ANDROID_COMPILER_BIN/llvm-ranlib
+    test -z "$STRIP" && STRIP=$ANDROID_COMPILER_BIN/llvm-strip
+
+    ANDROIDCFLAGS="$ANDROIDCFLAGS -target ${LLVM_TRIPLE}${ANDROID_API_LEVEL}"
+    ANDROIDCFLAGS="$ANDROIDCFLAGS -no-canonical-prefixes -ffunction-sections -fdata-sections -Qunused-arguments"
+    if test "$ENABLE_LTO" = TRUE; then
+        # -flto comes from com_GCC_defs.mk, too, but we need to make sure it gets passed as part of
+        # $CC and $CXX when building external libraries
+        ANDROIDCFLAGS="$ANDROIDCFLAGS -flto -fuse-linker-plugin -O2"
+    fi
+
+    ANDROIDCXXFLAGS="$ANDROIDCFLAGS -stdlib=libc++"
+
+    if test -z "$CC"; then
+        CC="$ANDROID_COMPILER_BIN/clang $ANDROIDCFLAGS"
+        CC_BASE="clang"
+    fi
+    if test -z "$CXX"; then
+        CXX="$ANDROID_COMPILER_BIN/clang++ $ANDROIDCXXFLAGS"
+        CXX_BASE="clang++"
+    fi
+fi
+AC_SUBST(ANDROID_NDK_DIR)
+AC_SUBST(ANDROID_API_LEVEL)
+AC_SUBST(ANDROID_APP_ABI)
+AC_SUBST(ANDROID_GCC_TOOLCHAIN_VERSION)
+AC_SUBST(ANDROID_SYSROOT_PLATFORM)
+AC_SUBST(ANDROID_TOOLCHAIN)
+
+dnl ===================================================================
+dnl --with-android-sdk
+dnl ===================================================================
+ANDROID_SDK_DIR=
+if test -z "$with_android_sdk" -a -e "$SRC_ROOT/external/android-sdk-linux" -a "$build" != "$host"; then
+    with_android_sdk="$SRC_ROOT/external/android-sdk-linux"
+fi
+if test -n "$with_android_sdk"; then
+    eval ANDROID_SDK_DIR=$with_android_sdk
+    PATH="$ANDROID_SDK_DIR/platform-tools:$ANDROID_SDK_DIR/tools:$PATH"
+fi
+AC_SUBST(ANDROID_SDK_DIR)
+
+AC_ARG_ENABLE([android-lok],
+    AS_HELP_STRING([--enable-android-lok],
+        [The Android app from the android/ subdir needs several tweaks all
+         over the place that break the LOK when used in the Online-based
+         Android app.  This switch indicates that the intent of this build is
+         actually the Online-based, non-modified LOK.])
+)
+ENABLE_ANDROID_LOK=
+if test -n "$ANDROID_NDK_DIR" ; then
+    if test "$enable_android_lok" = yes; then
+        ENABLE_ANDROID_LOK=TRUE
+        AC_DEFINE(HAVE_FEATURE_ANDROID_LOK)
+        AC_MSG_NOTICE([building the Android version... for the Online-based Android app])
+    else
+        AC_MSG_NOTICE([building the Android version... for the app from the android/ subdir])
+    fi
+fi
+AC_SUBST([ENABLE_ANDROID_LOK])
+
+libo_FUZZ_ARG_ENABLE([android-editing],
+    AS_HELP_STRING([--enable-android-editing],
+        [Enable the experimental editing feature on Android.])
+)
+ENABLE_ANDROID_EDITING=
+if test "$enable_android_editing" = yes; then
+    ENABLE_ANDROID_EDITING=TRUE
+fi
+AC_SUBST([ENABLE_ANDROID_EDITING])
+
+disable_database_connectivity_dependencies()
+{
+    enable_evolution2=no
+    enable_firebird_sdbc=no
+    enable_mariadb_sdbc=no
+    enable_postgresql_sdbc=no
+    enable_report_builder=no
+}
+
+# ===================================================================
+#
+# Start initial platform setup
+#
+# The using_* variables reflect platform support and should not be
+# changed after the "End initial platform setup" block.
+# This is also true for most test_* variables.
+# ===================================================================
+build_crypto=yes
+test_clucene=no
+test_gdb_index=no
+test_openldap=yes
+test_split_debug=no
+test_webdav=yes
+usable_dlapi=yes
+
+# There is currently just iOS not using salplug, so this explicitly enables it.
+# must: using_freetype_fontconfig
+#  may: using_headless_plugin defaults to $using_freetype_fontconfig
+# must: using_x11
+
+# Default values, as such probably valid just for Linux, set
+# differently below just for Mac OSX, but at least better than
+# hardcoding these as we used to do. Much of this is duplicated also
+# in solenv for old build system and for gbuild, ideally we should
+# perhaps define stuff like this only here in configure.ac?
+
+LINKFLAGSSHL="-shared"
+PICSWITCH="-fpic"
+DLLPOST=".so"
+
+LINKFLAGSNOUNDEFS="-Wl,-z,defs"
+
+INSTROOTBASESUFFIX=
+INSTROOTCONTENTSUFFIX=
+SDKDIRNAME=sdk
+
+HOST_PLATFORM="$host"
+
+host_cpu_for_clang="$host_cpu"
+
+case "$host_os" in
+
+solaris*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    _os=SunOS
+
+    dnl ===========================================================
+    dnl Check whether we're using Solaris 10 - SPARC or Intel.
+    dnl ===========================================================
+    AC_MSG_CHECKING([the Solaris operating system release])
+    _os_release=`echo $host_os | $SED -e s/solaris2\.//`
+    if test "$_os_release" -lt "10"; then
+        AC_MSG_ERROR([use Solaris >= 10 to build LibreOffice])
+    else
+        AC_MSG_RESULT([ok ($_os_release)])
+    fi
+
+    dnl Check whether we're using a SPARC or i386 processor
+    AC_MSG_CHECKING([the processor type])
+    if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then
+        AC_MSG_RESULT([ok ($host_cpu)])
+    else
+        AC_MSG_ERROR([only SPARC and i386 processors are supported])
+    fi
+    ;;
+
+linux-gnu*|k*bsd*-gnu*|linux-musl*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    test_gdb_index=yes
+    test_split_debug=yes
+    if test "$enable_fuzzers" = yes; then
+        test_system_freetype=no
+    fi
+    _os=Linux
+    ;;
+
+gnu)
+    using_freetype_fontconfig=yes
+    using_x11=no
+    _os=GNU
+     ;;
+
+cygwin*|wsl*)
+    # When building on Windows normally with MSVC under Cygwin,
+    # configure thinks that the host platform (the platform the
+    # built code will run on) is Cygwin, even if it obviously is
+    # Windows, which in Autoconf terminology is called
+    # "mingw32". (Which is misleading as MinGW is the name of the
+    # tool-chain, not an operating system.)
+
+    # Somewhat confusing, yes. But this configure script doesn't
+    # look at $host etc that much, it mostly uses its own $_os
+    # variable, set here in this case statement.
+
+    using_freetype_fontconfig=no
+    using_x11=no
+    test_unix_dlapi=no
+    test_openldap=no
+    enable_pagein=no
+    build_skia=yes
+    _os=WINNT
+
+    DLLPOST=".dll"
+    LINKFLAGSNOUNDEFS=
+
+    if test "$host_cpu" = "aarch64"; then
+        build_skia=no
+        enable_gpgmepp=no
+        enable_coinmp=no
+        enable_firebird_sdbc=no
+    fi
+    ;;
+
+darwin*) # macOS
+    using_freetype_fontconfig=no
+    using_x11=no
+    build_skia=yes
+    enable_pagein=no
+    if test -n "$LODE_HOME" ; then
+        mac_sanitize_path
+        AC_MSG_NOTICE([sanitized the PATH to $PATH])
+    fi
+    _os=Darwin
+    INSTROOTBASESUFFIX=/$PRODUCTNAME_WITHOUT_SPACES.app
+    INSTROOTCONTENTSUFFIX=/Contents
+    SDKDIRNAME=${PRODUCTNAME_WITHOUT_SPACES}${PRODUCTVERSION}_SDK
+    # See "Default values, as such probably valid just for Linux" comment above the case "$host_os"
+    LINKFLAGSSHL="-dynamiclib -single_module"
+
+    # -fPIC is default
+    PICSWITCH=""
+
+    DLLPOST=".dylib"
+
+    # -undefined error is the default
+    LINKFLAGSNOUNDEFS=""
+    case "$host_cpu" in
+    aarch64|arm64)
+        # Apple's Clang uses "arm64"
+        host_cpu_for_clang=arm64
+    esac
+;;
+
+ios*) # iOS
+    using_freetype_fontconfig=no
+    using_x11=no
+    build_crypto=no
+    test_libcmis=no
+    test_openldap=no
+    test_webdav=no
+    if test -n "$LODE_HOME" ; then
+        mac_sanitize_path
+        AC_MSG_NOTICE([sanitized the PATH to $PATH])
+    fi
+    enable_gpgmepp=no
+    _os=iOS
+    enable_mpl_subset=yes
+    enable_lotuswordpro=no
+    disable_database_connectivity_dependencies
+    enable_coinmp=no
+    enable_lpsolve=no
+    enable_extension_integration=no
+    enable_xmlhelp=no
+    with_ppds=no
+    if test "$enable_ios_simulator" = "yes"; then
+        host=x86_64-apple-darwin
+    fi
+    # See "Default values, as such probably valid just for Linux" comment above the case "$host_os"
+    LINKFLAGSSHL="-dynamiclib -single_module"
+
+    # -fPIC is default
+    PICSWITCH=""
+
+    DLLPOST=".dylib"
+
+    # -undefined error is the default
+    LINKFLAGSNOUNDEFS=""
+
+    # HOST_PLATFORM is used for external projects and their configury typically doesn't like the "ios"
+    # part, so use aarch64-apple-darwin for now.
+    HOST_PLATFORM=aarch64-apple-darwin
+
+    # Apple's Clang uses "arm64"
+    host_cpu_for_clang=arm64
+;;
+
+freebsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    AC_MSG_CHECKING([the FreeBSD operating system release])
+    if test -n "$with_os_version"; then
+        OSVERSION="$with_os_version"
+    else
+        OSVERSION=`/sbin/sysctl -n kern.osreldate`
+    fi
+    AC_MSG_RESULT([found OSVERSION=$OSVERSION])
+    AC_MSG_CHECKING([which thread library to use])
+    if test "$OSVERSION" -lt "500016"; then
+        PTHREAD_CFLAGS="-D_THREAD_SAFE"
+        PTHREAD_LIBS="-pthread"
+    elif test "$OSVERSION" -lt "502102"; then
+        PTHREAD_CFLAGS="-D_THREAD_SAFE"
+        PTHREAD_LIBS="-lc_r"
+    else
+        PTHREAD_CFLAGS=""
+        PTHREAD_LIBS="-pthread"
+    fi
+    AC_MSG_RESULT([$PTHREAD_LIBS])
+    _os=FreeBSD
+    ;;
+
+*netbsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    test_gtk3_kde5=no
+    build_skia=yes
+    PTHREAD_LIBS="-pthread -lpthread"
+    _os=NetBSD
+    ;;
+
+openbsd*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    PTHREAD_CFLAGS="-D_THREAD_SAFE"
+    PTHREAD_LIBS="-pthread"
+    _os=OpenBSD
+    ;;
+
+dragonfly*)
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    build_skia=yes
+    PTHREAD_LIBS="-pthread"
+    _os=DragonFly
+    ;;
+
+linux-android*)
+    # API exists, but seems not really usable since Android 7 AFAIK
+    usable_dlapi=no
+    using_freetype_fontconfig=yes
+    using_headless_plugin=no
+    using_x11=no
+    build_crypto=no
+    test_openldap=no
+    test_system_freetype=no
+    test_webdav=no
+    disable_database_connectivity_dependencies
+    enable_lotuswordpro=no
+    enable_mpl_subset=yes
+    enable_cairo_canvas=no
+    enable_coinmp=yes
+    enable_lpsolve=no
+    enable_odk=no
+    enable_python=no
+    enable_xmlhelp=no
+    _os=Android
+    ;;
+
+haiku*)
+    using_freetype_fontconfig=yes
+    using_x11=no
+    test_gtk3=no
+    test_gtk3_kde5=no
+    test_kf5=yes
+    enable_odk=no
+    enable_coinmp=no
+    enable_pdfium=no
+    enable_sdremote=no
+    enable_postgresql_sdbc=no
+    enable_firebird_sdbc=no
+    _os=Haiku
+    ;;
+
+emscripten)
+    # API currently just exists in headers, not code
+    usable_dlapi=no
+    using_freetype_fontconfig=yes
+    using_x11=yes
+    test_openldap=no
+    test_qt5=yes
+    test_split_debug=yes
+    test_system_freetype=no
+    enable_compiler_plugins=no
+    enable_customtarget_components=yes
+    enable_split_debug=yes
+    enable_wasm_strip=yes
+    with_system_zlib=no
+    with_theme="colibre"
+    _os=Emscripten
+    ;;
+
+*)
+    AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
+    ;;
+esac
+
+AC_SUBST(HOST_PLATFORM)
+
+if test -z "$using_x11" -o -z "$using_freetype_fontconfig"; then
+    AC_MSG_ERROR([You must set \$using_freetype_fontconfig and \$using_x11 for your platform])
+fi
+
+# Set defaults, if not set by platform
+test "${test_cups+set}" = set || test_cups="$using_x11"
+test "${test_dbus+set}" = set || test_dbus="$using_x11"
+test "${test_gen+set}" = set || test_gen="$using_x11"
+test "${test_gstreamer_1_0+set}" = set || test_gstreamer_1_0="$using_x11"
+test "${test_gtk3+set}" = set || test_gtk3="$using_x11"
+test "${test_gtk4+set}" = set || test_gtk4="$using_x11"
+test "${test_kf5+set}" = set || test_kf5="$using_x11"
+# don't handle test_qt5, so it can disable test_kf5 later
+test "${test_qt6+set}" = set || test_qt6="$using_x11"
+test "${test_randr+set}" = set || test_randr="$using_x11"
+test "${test_xrender+set}" = set || test_xrender="$using_x11"
+test "${using_headless_plugin+set}" = set || using_headless_plugin="$using_freetype_fontconfig"
+
+test "${test_gtk3_kde5+set}" != set -a "$test_kf5" = yes -a "$test_gtk3" = yes && test_gtk3_kde5="yes"
+# Make sure fontconfig and freetype test both either system or not
+test "${test_system_fontconfig+set}" != set -a "${test_system_freetype+set}" = set && test_system_fontconfig="$test_system_freetype"
+test "${test_system_freetype+set}" != set -a "${test_system_fontconfig+set}" = set && test_system_freetype="$test_system_fontconfig"
+
+# convenience / platform overriding "fixes"
+# Don't sort!
+test "$test_kf5" = yes -a "$test_qt5" = no && test_kf5=no
+test "$test_kf5" = yes && test_qt5=yes
+test "$test_gtk3" != yes && enable_gtk3=no
+test "$test_gtk3" != yes -o "$test_kf5" != yes && test_gtk3_kde5=no
+test "$using_freetype_fontconfig" = no && using_headless_plugin=no
+test "$using_freetype_fontconfig" = yes && test_cairo=yes
+
+# Keep in sync with the above $using_x11 depending test default list
+disable_x11_tests()
+{
+    test_cups=no
+    test_dbus=no
+    test_gen=no
+    test_gstreamer_1_0=no
+    test_gtk3_kde5=no
+    test_gtk3=no
+    test_gtk4=no
+    test_kf5=no
+    test_qt5=no
+    test_qt6=no
+    test_randr=no
+    test_xrender=no
+}
+
+test "$using_x11" = yes && USING_X11=TRUE
+
+if test "$using_freetype_fontconfig" = yes; then
+    AC_DEFINE(USE_HEADLESS_CODE)
+    USE_HEADLESS_CODE=TRUE
+    if test "$using_headless_plugin" = yes; then
+        AC_DEFINE(ENABLE_HEADLESS)
+        ENABLE_HEADLESS=TRUE
+    fi
+else
+    test_fontconfig=no
+    test_freetype=no
+fi
+
+AC_SUBST(ENABLE_HEADLESS)
+AC_SUBST(USE_HEADLESS_CODE)
+
+AC_MSG_NOTICE([VCL platform has a usable dynamic loading API: $usable_dlapi])
+AC_MSG_NOTICE([VCL platform uses freetype+fontconfig: $using_freetype_fontconfig])
+AC_MSG_NOTICE([VCL platform uses headless plugin: $using_headless_plugin])
+AC_MSG_NOTICE([VCL platform uses X11: $using_x11])
+
+# ===================================================================
+#
+# End initial platform setup
+#
+# ===================================================================
+
+if test "$_os" = "Android" ; then
+    # Verify that the NDK and SDK options are proper
+    if test -z "$with_android_ndk"; then
+        AC_MSG_ERROR([the --with-android-ndk option is mandatory, unless it is available at external/android-ndk/.])
+    elif test ! -f "$ANDROID_NDK_DIR/meta/abis.json"; then
+        AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK])
+    fi
+
+    if test -z "$ANDROID_SDK_DIR"; then
+        AC_MSG_ERROR([the --with-android-sdk option is mandatory, unless it is available at external/android-sdk-linux/.])
+    elif test ! -d "$ANDROID_SDK_DIR/platforms"; then
+        AC_MSG_ERROR([the --with-android-sdk option does not point to an Android SDK])
+    fi
+fi
+
+AC_SUBST(SDKDIRNAME)
+
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_LIBS)
+
+# Check for explicit A/C/CXX/OBJC/OBJCXX/LDFLAGS.
+# By default use the ones specified by our build system,
+# but explicit override is possible.
+AC_MSG_CHECKING(for explicit AFLAGS)
+if test -n "$AFLAGS"; then
+    AC_MSG_RESULT([$AFLAGS])
+    x_AFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_AFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CFLAGS)
+if test -n "$CFLAGS"; then
+    AC_MSG_RESULT([$CFLAGS])
+    x_CFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_CFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit CXXFLAGS)
+if test -n "$CXXFLAGS"; then
+    AC_MSG_RESULT([$CXXFLAGS])
+    x_CXXFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_CXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCFLAGS)
+if test -n "$OBJCFLAGS"; then
+    AC_MSG_RESULT([$OBJCFLAGS])
+    x_OBJCFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_OBJCFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit OBJCXXFLAGS)
+if test -n "$OBJCXXFLAGS"; then
+    AC_MSG_RESULT([$OBJCXXFLAGS])
+    x_OBJCXXFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_OBJCXXFLAGS=[\#]
+fi
+AC_MSG_CHECKING(for explicit LDFLAGS)
+if test -n "$LDFLAGS"; then
+    AC_MSG_RESULT([$LDFLAGS])
+    x_LDFLAGS=
+else
+    AC_MSG_RESULT(no)
+    x_LDFLAGS=[\#]
+fi
+AC_SUBST(AFLAGS)
+AC_SUBST(CFLAGS)
+AC_SUBST(CXXFLAGS)
+AC_SUBST(OBJCFLAGS)
+AC_SUBST(OBJCXXFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(x_AFLAGS)
+AC_SUBST(x_CFLAGS)
+AC_SUBST(x_CXXFLAGS)
+AC_SUBST(x_OBJCFLAGS)
+AC_SUBST(x_OBJCXXFLAGS)
+AC_SUBST(x_LDFLAGS)
+
+dnl These are potentially set for MSVC, in the code checking for UCRT below:
+my_original_CFLAGS=$CFLAGS
+my_original_CXXFLAGS=$CXXFLAGS
+my_original_CPPFLAGS=$CPPFLAGS
+
+dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32)
+dnl Needs to precede the AC_C_BIGENDIAN and AC_SEARCH_LIBS calls below, which apparently call
+dnl AC_PROG_CC internally.
+if test "$_os" != "WINNT"; then
+    # AC_PROG_CC sets CFLAGS to -g -O2 if not set, avoid that
+    save_CFLAGS=$CFLAGS
+    AC_PROG_CC
+    CFLAGS=$save_CFLAGS
+    if test -z "$CC_BASE"; then
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+fi
+
+if test "$_os" != "WINNT"; then
+    AC_C_BIGENDIAN([ENDIANNESS=big], [ENDIANNESS=little])
+else
+    ENDIANNESS=little
+fi
+AC_SUBST(ENDIANNESS)
+
+if test "$usable_dlapi" != no; then
+    AC_DEFINE([HAVE_DLAPI])
+    if test "$test_unix_dlapi" != no; then
+        save_LIBS="$LIBS"
+        AC_SEARCH_LIBS([dlsym], [dl],
+            [case "$ac_cv_search_dlsym" in -l*) UNIX_DLAPI_LIBS="$ac_cv_search_dlsym";; esac],
+            [AC_MSG_ERROR([dlsym not found in either libc nor libdl])])
+        LIBS="$save_LIBS"
+        AC_DEFINE([HAVE_UNIX_DLAPI])
+    fi
+fi
+AC_SUBST(UNIX_DLAPI_LIBS)
+
+# Check for a (GNU) backtrace implementation
+AC_ARG_VAR([BACKTRACE_CFLAGS], [Compiler flags needed to use backtrace(3)])
+AC_ARG_VAR([BACKTRACE_LIBS], [Linker flags needed to use backtrace(3)])
+AS_IF([test "x$BACKTRACE_LIBS$BACKTRACE_CFLAGS" = x], [
+    save_LIBS="$LIBS"
+    AC_SEARCH_LIBS([backtrace], [libexecinfo],
+        [case "$ac_cv_search_backtrace" in -l*) BACKTRACE_LIBS="$ac_cv_search_backtrace";; esac],
+        [PKG_CHECK_MODULES([BACKTRACE], [libexecinfo], [ac_cv_search_backtrace=], [:])])
+    LIBS="$save_LIBS"
+])
+AS_IF([test "x$ac_cv_search_backtrace" != xno ], [
+    AC_DEFINE([HAVE_FEATURE_BACKTRACE])
+])
+
+dnl ===================================================================
+dnl Sanity checks for Emscripten SDK setup
+dnl ===================================================================
+
+EMSCRIPTEN_MIN_MAJOR=2
+EMSCRIPTEN_MIN_MINOR=0
+EMSCRIPTEN_MIN_TINY=31
+EMSCRIPTEN_MIN_VERSION="${EMSCRIPTEN_MIN_MAJOR}.${EMSCRIPTEN_MIN_MINOR}.${EMSCRIPTEN_MIN_TINY}"
+
+if test "$_os" = "Emscripten"; then
+    AC_MSG_CHECKING([if Emscripten is at least $EMSCRIPTEN_MIN_VERSION])
+    AS_IF([test -z "$EMSDK"],
+          [AC_MSG_ERROR([No \$EMSDK environment variable.])])
+    EMSCRIPTEN_VERSION_H=$EMSDK/upstream/emscripten/cache/sysroot/include/emscripten/version.h
+    if test -f "$EMSCRIPTEN_VERSION_H"; then
+        EMSCRIPTEN_MAJOR=$($GREP __EMSCRIPTEN_major__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
+        EMSCRIPTEN_MINOR=$($GREP __EMSCRIPTEN_minor__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
+        EMSCRIPTEN_TINY=$($GREP __EMSCRIPTEN_tiny__ "$EMSCRIPTEN_VERSION_H" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
+    else
+        EMSCRIPTEN_DEFINES=$(echo | emcc -dM -E - | $GREP __EMSCRIPTEN_)
+        EMSCRIPTEN_MAJOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_major__ //p')
+        EMSCRIPTEN_MINOR=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_minor__ //p')
+        EMSCRIPTEN_TINY=$(echo "$EMSCRIPTEN_DEFINES" | $SED -ne 's/.*__EMSCRIPTEN_tiny__ //p')
+    fi
+
+    EMSCRIPTEN_VERSION="${EMSCRIPTEN_MAJOR}.${EMSCRIPTEN_MINOR}.${EMSCRIPTEN_TINY}"
+
+    check_semantic_version_three_prefixed EMSCRIPTEN MIN
+    if test $? -eq 0; then
+        AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)])
+    else
+        AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION])
+    fi
+
+    EMSCRIPTEN_ERROR=0
+    if ! which emconfigure >/dev/null 2>&1; then
+        AC_MSG_WARN([emconfigure must be in your \$PATH])
+        EMSCRIPTEN_ERROR=1
+    fi
+    if test -z "$EMMAKEN_JUST_CONFIGURE"; then
+        AC_MSG_WARN(["\$EMMAKEN_JUST_CONFIGURE wasn't set by emconfigure. Prefix configure or use autogen.sh])
+        EMSCRIPTEN_ERROR=1
+    fi
+    EMSDK_FILE_PACKAGER="$(em-config EMSCRIPTEN_ROOT)"/tools/file_packager
+    if ! test -x "$EMSDK_FILE_PACKAGER"; then
+        AC_MSG_WARN([No file_packager found in $(em-config EMSCRIPTEN_ROOT)/tools/file_packager.])
+        EMSCRIPTEN_ERROR=1
+    fi
+    if test $EMSCRIPTEN_ERROR -ne 0; then
+        AC_MSG_ERROR(["Please fix your EMSDK setup to build with Emscripten!"])
+    fi
+fi
+AC_SUBST(EMSDK_FILE_PACKAGER)
+
+###############################################################################
+# Extensions switches --enable/--disable
+###############################################################################
+# By default these should be enabled unless having extra dependencies.
+# If there is extra dependency over configure options then the enable should
+# be automagic based on whether the requiring feature is enabled or not.
+# All this options change anything only with --enable-extension-integration.
+
+# The name of this option and its help string makes it sound as if
+# extensions are built anyway, just not integrated in the installer,
+# if you use --disable-extension-integration. Is that really the
+# case?
+
+AC_ARG_ENABLE(ios-simulator,
+    AS_HELP_STRING([--enable-ios-simulator],
+        [build for iOS simulator])
+)
+
+libo_FUZZ_ARG_ENABLE(extension-integration,
+    AS_HELP_STRING([--disable-extension-integration],
+        [Disable integration of the built extensions in the installer of the
+         product. Use this switch to disable the integration.])
+)
+
+AC_ARG_ENABLE(avmedia,
+    AS_HELP_STRING([--disable-avmedia],
+        [Disable displaying and inserting AV media in documents. Work in progress, use only if you are hacking on it.]),
+,test "${enable_avmedia+set}" = set || enable_avmedia=yes)
+
+AC_ARG_ENABLE(database-connectivity,
+    AS_HELP_STRING([--disable-database-connectivity],
+        [Disable various database connectivity. Work in progress, use only if you are hacking on it.])
+)
+
+# This doesn't mean not building (or "integrating") extensions
+# (although it probably should; i.e. it should imply
+# --disable-extension-integration I guess), it means not supporting
+# any extension mechanism at all
+libo_FUZZ_ARG_ENABLE(extensions,
+    AS_HELP_STRING([--disable-extensions],
+        [Disable all add-on extension functionality. Work in progress, use only if you are hacking on it.])
+)
+
+AC_ARG_ENABLE(scripting,
+    AS_HELP_STRING([--disable-scripting],
+        [Disable BASIC, Java and Python. Work in progress, use only if you are hacking on it.]),
+,test "${enable_scripting+set}" = set || enable_scripting=yes)
+
+# This is mainly for Android and iOS, but could potentially be used in some
+# special case otherwise, too, so factored out as a separate setting
+
+AC_ARG_ENABLE(dynamic-loading,
+    AS_HELP_STRING([--disable-dynamic-loading],
+        [Disable any use of dynamic loading of code. Work in progress, use only if you are hacking on it.])
+)
+
+libo_FUZZ_ARG_ENABLE(report-builder,
+    AS_HELP_STRING([--disable-report-builder],
+        [Disable the Report Builder.])
+)
+
+libo_FUZZ_ARG_ENABLE(ext-wiki-publisher,
+    AS_HELP_STRING([--enable-ext-wiki-publisher],
+        [Enable the Wiki Publisher extension.])
+)
+
+libo_FUZZ_ARG_ENABLE(lpsolve,
+    AS_HELP_STRING([--disable-lpsolve],
+        [Disable compilation of the lp solve solver ])
+)
+libo_FUZZ_ARG_ENABLE(coinmp,
+    AS_HELP_STRING([--disable-coinmp],
+        [Disable compilation of the CoinMP solver ])
+)
+
+libo_FUZZ_ARG_ENABLE(pdfimport,
+    AS_HELP_STRING([--disable-pdfimport],
+        [Disable building the PDF import feature.])
+)
+
+libo_FUZZ_ARG_ENABLE(pdfium,
+    AS_HELP_STRING([--disable-pdfium],
+        [Disable building PDFium. Results in unsecure PDF signature verification.])
+)
+
+libo_FUZZ_ARG_ENABLE(skia,
+    AS_HELP_STRING([--disable-skia],
+        [Disable building Skia. Use --enable-skia=debug to build without optimizations.])
+)
+
+###############################################################################
+
+dnl ---------- *** ----------
+
+libo_FUZZ_ARG_ENABLE(mergelibs,
+    AS_HELP_STRING([--enable-mergelibs],
+        [Merge several of the smaller libraries into one big, "merged", one.])
+)
+
+libo_FUZZ_ARG_ENABLE(breakpad,
+    AS_HELP_STRING([--enable-breakpad],
+        [Enables breakpad for crash reporting.])
+)
+
+libo_FUZZ_ARG_ENABLE(crashdump,
+    AS_HELP_STRING([--disable-crashdump],
+        [Disable dump.ini and dump-file, when --enable-breakpad])
+)
+
+AC_ARG_ENABLE(fetch-external,
+    AS_HELP_STRING([--disable-fetch-external],
+        [Disables fetching external tarballs from web sources.])
+)
+
+AC_ARG_ENABLE(fuzzers,
+    AS_HELP_STRING([--enable-fuzzers],
+        [Enables building libfuzzer targets for fuzz testing.])
+)
+
+libo_FUZZ_ARG_ENABLE(pch,
+    AS_HELP_STRING([--enable-pch=<yes/no/system/base/normal/full>],
+        [Enables precompiled header support for C++. Forced default on Windows/VC build.
+         Using 'system' will include only external headers, 'base' will add also headers
+         from base modules, 'normal' will also add all headers except from the module built,
+         'full' will use all suitable headers even from a module itself.])
+)
+
+libo_FUZZ_ARG_ENABLE(epm,
+    AS_HELP_STRING([--enable-epm],
+        [LibreOffice includes self-packaging code, that requires epm, however epm is
+         useless for large scale package building.])
+)
+
+libo_FUZZ_ARG_ENABLE(odk,
+    AS_HELP_STRING([--enable-odk],
+        [Enable building the Office Development Kit, the part that extensions need to build against])
+)
+
+AC_ARG_ENABLE(mpl-subset,
+    AS_HELP_STRING([--enable-mpl-subset],
+        [Don't compile any pieces which are not MPL or more liberally licensed])
+)
+
+libo_FUZZ_ARG_ENABLE(evolution2,
+    AS_HELP_STRING([--enable-evolution2],
+        [Allows the built-in evolution 2 addressbook connectivity build to be
+         enabled.])
+)
+
+AC_ARG_ENABLE(avahi,
+    AS_HELP_STRING([--enable-avahi],
+        [Determines whether to use Avahi to advertise Impress to remote controls.])
+)
+
+libo_FUZZ_ARG_ENABLE(werror,
+    AS_HELP_STRING([--enable-werror],
+        [Turn warnings to errors. (Has no effect in modules where the treating
+         of warnings as errors is disabled explicitly.)]),
+,)
+
+libo_FUZZ_ARG_ENABLE(assert-always-abort,
+    AS_HELP_STRING([--enable-assert-always-abort],
+        [make assert() failures abort even when building without --enable-debug or --enable-dbgutil.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(dbgutil,
+    AS_HELP_STRING([--enable-dbgutil],
+        [Provide debugging support from --enable-debug and include additional debugging
+         utilities such as object counting or more expensive checks.
+         This is the recommended option for developers.
+         Note that this makes the build ABI incompatible, it is not possible to mix object
+         files or libraries from a --enable-dbgutil and a --disable-dbgutil build.]))
+
+libo_FUZZ_ARG_ENABLE(debug,
+    AS_HELP_STRING([--enable-debug],
+        [Include debugging information, disable compiler optimization and inlining plus
+         extra debugging code like assertions. Extra large build! (enables -g compiler flag).]))
+
+libo_FUZZ_ARG_ENABLE(split-debug,
+    AS_HELP_STRING([--disable-split-debug],
+        [Disable using split debug information (-gsplit-dwarf compile flag). Split debug information
+         saves disk space and build time, but requires tools that support it (both build tools and debuggers).]))
+
+libo_FUZZ_ARG_ENABLE(gdb-index,
+    AS_HELP_STRING([--disable-gdb-index],
+        [Disables creating debug information in the gdb index format, which makes gdb start faster.
+         The feature requires a linker that supports the --gdb-index option.]))
+
+libo_FUZZ_ARG_ENABLE(sal-log,
+    AS_HELP_STRING([--enable-sal-log],
+        [Make SAL_INFO and SAL_WARN calls do something even in a non-debug build.]))
+
+libo_FUZZ_ARG_ENABLE(symbols,
+    AS_HELP_STRING([--enable-symbols],
+        [Generate debug information.
+         By default, enabled for --enable-debug and --enable-dbgutil, disabled
+         otherwise. It is possible to explicitly specify gbuild build targets
+         (where 'all' means everything, '-' prepended means to not enable, '/' appended means
+         everything in the directory; there is no ordering, more specific overrides
+         more general, and disabling takes precedence).
+         Example: --enable-symbols="all -sw/ -Library_sc".]))
+
+libo_FUZZ_ARG_ENABLE(optimized,
+    AS_HELP_STRING([--enable-optimized=<yes/no/debug>],
+        [Whether to compile with optimization flags.
+         By default, disabled for --enable-debug and --enable-dbgutil, enabled
+         otherwise. Using 'debug' will try to use only optimizations that should
+         not interfere with debugging. For Emscripten we default to optimized (-O1)
+         debug build, as otherwise binaries become too large.]))
+
+libo_FUZZ_ARG_ENABLE(runtime-optimizations,
+    AS_HELP_STRING([--disable-runtime-optimizations],
+        [Statically disable certain runtime optimizations (like rtl/alloc.h or
+         JVM JIT) that are known to interact badly with certain dynamic analysis
+         tools (like -fsanitize=address or Valgrind).  By default, disabled iff
+         CC contains "-fsanitize=*".  (For Valgrind, those runtime optimizations
+         are typically disabled dynamically via RUNNING_ON_VALGRIND.)]))
+
+AC_ARG_WITH(valgrind,
+    AS_HELP_STRING([--with-valgrind],
+        [Make availability of Valgrind headers a hard requirement.]))
+
+libo_FUZZ_ARG_ENABLE(compiler-plugins,
+    AS_HELP_STRING([--enable-compiler-plugins],
+        [Enable compiler plugins that will perform additional checks during
+         building. Enabled automatically by --enable-dbgutil.
+         Use --enable-compiler-plugins=debug to also enable debug code in the plugins.]))
+COMPILER_PLUGINS_DEBUG=
+if test "$enable_compiler_plugins" = debug; then
+    enable_compiler_plugins=yes
+    COMPILER_PLUGINS_DEBUG=TRUE
+fi
+
+libo_FUZZ_ARG_ENABLE(compiler-plugins-analyzer-pch,
+    AS_HELP_STRING([--disable-compiler-plugins-analyzer-pch],
+        [Disable use of precompiled headers when running the Clang compiler plugin analyzer.  Not
+         relevant in the --disable-compiler-plugins case.]))
+
+libo_FUZZ_ARG_ENABLE(ooenv,
+    AS_HELP_STRING([--enable-ooenv],
+        [Enable ooenv for the instdir installation.]))
+
+AC_ARG_ENABLE(lto,
+    AS_HELP_STRING([--enable-lto],
+        [Enable link-time optimization. Suitable for (optimised) product builds. Building might take
+         longer but libraries and executables are optimized for speed. For GCC, best to use the 'gold'
+         linker.)]))
+
+AC_ARG_ENABLE(python,
+    AS_HELP_STRING([--enable-python=<no/auto/system/internal/fully-internal>],
+        [Enables or disables Python support at run-time.
+         Also specifies what Python to use at build-time.
+         'fully-internal' even forces the internal version for uses of Python
+         during the build.
+         On macOS the only choices are
+         'internal' (default) or 'fully-internal'. Otherwise the default is 'auto'.
+         ]))
+
+libo_FUZZ_ARG_ENABLE(gtk3,
+    AS_HELP_STRING([--disable-gtk3],
+        [Determines whether to use Gtk+ 3.0 vclplug on platforms where Gtk+ 3.0 is available.]),
+,test "${test_gtk3}" = no -o "${enable_gtk3+set}" = set || enable_gtk3=yes)
+
+AC_ARG_ENABLE(gtk4,
+    AS_HELP_STRING([--enable-gtk4],
+        [Determines whether to use Gtk+ 4.0 vclplug on platforms where Gtk+ 4.0 is available.]))
+
+AC_ARG_ENABLE(introspection,
+    AS_HELP_STRING([--enable-introspection],
+        [Generate files for GObject introspection.  Requires --enable-gtk3.  (Typically used by
+         Linux distributions.)]))
+
+AC_ARG_ENABLE(split-app-modules,
+    AS_HELP_STRING([--enable-split-app-modules],
+        [Split file lists for app modules, e.g. base, calc.
+         Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_ENABLE(split-opt-features,
+    AS_HELP_STRING([--enable-split-opt-features],
+        [Split file lists for some optional features, e.g. pyuno, testtool.
+         Has effect only with make distro-pack-install]),
+,)
+
+libo_FUZZ_ARG_ENABLE(cairo-canvas,
+    AS_HELP_STRING([--disable-cairo-canvas],
+        [Determines whether to build the Cairo canvas on platforms where Cairo is available.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(dbus,
+    AS_HELP_STRING([--disable-dbus],
+        [Determines whether to enable features that depend on dbus.
+         e.g. Presentation mode screensaver control, bluetooth presentation control, automatic font install]),
+,test "${enable_dbus+set}" = set || enable_dbus=yes)
+
+libo_FUZZ_ARG_ENABLE(sdremote,
+    AS_HELP_STRING([--disable-sdremote],
+        [Determines whether to enable Impress remote control (i.e. the server component).]),
+,test "${enable_sdremote+set}" = set || enable_sdremote=yes)
+
+libo_FUZZ_ARG_ENABLE(sdremote-bluetooth,
+    AS_HELP_STRING([--disable-sdremote-bluetooth],
+        [Determines whether to build sdremote with bluetooth support.
+         Requires dbus on Linux.]))
+
+libo_FUZZ_ARG_ENABLE(gio,
+    AS_HELP_STRING([--disable-gio],
+        [Determines whether to use the GIO support.]),
+,test "${enable_gio+set}" = set || enable_gio=yes)
+
+AC_ARG_ENABLE(qt5,
+    AS_HELP_STRING([--enable-qt5],
+        [Determines whether to use Qt5 vclplug on platforms where Qt5 is
+         available.]),
+,)
+
+AC_ARG_ENABLE(qt6,
+    AS_HELP_STRING([--enable-qt6],
+        [Determines whether to use Qt6 vclplug on platforms where Qt6 is
+         available.]),
+,)
+
+AC_ARG_ENABLE(kf5,
+    AS_HELP_STRING([--enable-kf5],
+        [Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and
+         KF5 are available.]),
+,)
+
+AC_ARG_ENABLE(gtk3_kde5,
+    AS_HELP_STRING([--enable-gtk3-kde5],
+        [Determines whether to use Gtk3 vclplug with KF5 file dialogs on
+         platforms where Gtk3, Qt5 and Plasma is available.]),
+,)
+
+AC_ARG_ENABLE(gen,
+    AS_HELP_STRING([--enable-gen],
+        [To select the gen backend in case of --disable-dynamic-loading.
+         Per default auto-enabled when X11 is used.]),
+,test "${test_gen}" = no -o "${enable_gen+set}" = set || enable_gen=yes)
+
+AC_ARG_ENABLE(gui,
+    AS_HELP_STRING([--disable-gui],
+        [Disable use of X11 or Wayland to reduce dependencies (e.g. for building LibreOfficeKit).]),
+,enable_gui=yes)
+
+libo_FUZZ_ARG_ENABLE(randr,
+    AS_HELP_STRING([--disable-randr],
+        [Disable RandR support in the vcl project.]),
+,test "${enable_randr+set}" = set || enable_randr=yes)
+
+libo_FUZZ_ARG_ENABLE(gstreamer-1-0,
+    AS_HELP_STRING([--disable-gstreamer-1-0],
+        [Disable building with the gstreamer 1.0 avmedia backend.]),
+,test "${enable_gstreamer_1_0+set}" = set || enable_gstreamer_1_0=yes)
+
+libo_FUZZ_ARG_ENABLE([eot],
+    [AS_HELP_STRING([--enable-eot],
+        [Enable support for Embedded OpenType fonts.])],
+,test "${enable_eot+set}" = set || enable_eot=no)
+
+libo_FUZZ_ARG_ENABLE(cve-tests,
+    AS_HELP_STRING([--disable-cve-tests],
+        [Prevent CVE tests to be executed]),
+,)
+
+AC_ARG_ENABLE(build-opensymbol,
+    AS_HELP_STRING([--enable-build-opensymbol],
+        [Do not use the prebuilt opens___.ttf. Build it instead. This needs
+         fontforge installed.]),
+,)
+
+AC_ARG_ENABLE(dependency-tracking,
+    AS_HELP_STRING([--enable-dependency-tracking],
+        [Do not reject slow dependency extractors.])[
+  --disable-dependency-tracking
+                          Disables generation of dependency information.
+                          Speed up one-time builds.],
+,)
+
+AC_ARG_ENABLE(icecream,
+    AS_HELP_STRING([--enable-icecream],
+        [Use the 'icecream' distributed compiling tool to speedup the compilation.
+         It defaults to /opt/icecream for the location of the icecream gcc/g++
+         wrappers, you can override that using --with-gcc-home=/the/path switch.]),
+,)
+
+AC_ARG_ENABLE(ld,
+    AS_HELP_STRING([--enable-ld=<linker>],
+        [Use the specified linker. Both 'gold' and 'lld' linkers generally use less memory and link faster.
+         By default tries to use the best linker possible, use --disable-ld to use the default linker.
+         If <linker> contains any ':', the part before the first ':' is used as the value of
+         -fuse-ld, while the part after the first ':' is used as the value of --ld-path (which is
+         needed for Clang 12).]),
+,)
+
+libo_FUZZ_ARG_ENABLE(cups,
+    AS_HELP_STRING([--disable-cups],
+        [Do not build cups support.])
+)
+
+AC_ARG_ENABLE(ccache,
+    AS_HELP_STRING([--disable-ccache],
+        [Do not try to use ccache automatically.
+         By default we will try to detect if ccache is available; in that case if
+         CC/CXX are not yet set, and --enable-icecream is not given, we
+         attempt to use ccache. --disable-ccache disables ccache completely.
+         Additionally ccache's depend mode is enabled if possible,
+         use --enable-ccache=nodepend to enable ccache without depend mode.
+]),
+,)
+
+AC_ARG_ENABLE(z7-debug,
+    AS_HELP_STRING([--enable-z7-debug],
+        [Makes the MSVC compiler use -Z7 for debugging instead of the default -Zi. Using this option takes
+         more disk spaces but allows to use ccache. Final PDB files are created even with this option enabled.
+         Enabled by default if ccache is detected.]))
+
+libo_FUZZ_ARG_ENABLE(online-update,
+    AS_HELP_STRING([--enable-online-update],
+        [Enable the online update service that will check for new versions of
+         LibreOffice. Disabled by default. Requires --with-privacy-policy-url to be set.
+         If the value is "mar", the experimental Mozilla-like update will be
+         enabled instead of the traditional update mechanism.]),
+,)
+
+AC_ARG_WITH(update-config,
+    AS_HELP_STRING([--with-update-config=/tmp/update.ini],
+                   [Path to the update config ini file]))
+
+libo_FUZZ_ARG_ENABLE(extension-update,
+    AS_HELP_STRING([--disable-extension-update],
+        [Disable possibility to update installed extensions.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(release-build,
+    AS_HELP_STRING([--enable-release-build],
+        [Enable release build. Note that the "release build" choice is orthogonal to
+         whether symbols are present, debug info is generated, or optimization
+         is done.
+         See https://wiki.documentfoundation.org/Development/DevBuild]),
+,)
+
+AC_ARG_ENABLE(windows-build-signing,
+    AS_HELP_STRING([--enable-windows-build-signing],
+        [Enable signing of windows binaries (*.exe, *.dll)]),
+,)
+
+AC_ARG_ENABLE(silent-msi,
+    AS_HELP_STRING([--enable-silent-msi],
+        [Enable MSI with LIMITUI=1 (silent install).]),
+,)
+
+AC_ARG_ENABLE(wix,
+    AS_HELP_STRING([--enable-wix],
+        [Build Windows installer using WiX.]),
+,)
+
+AC_ARG_ENABLE(macosx-code-signing,
+    AS_HELP_STRING([--enable-macosx-code-signing=<identity>],
+        [Sign executables, dylibs, frameworks and the app bundle. If you
+         don't provide an identity the first suitable certificate
+         in your keychain is used.]),
+,)
+
+AC_ARG_ENABLE(macosx-package-signing,
+    AS_HELP_STRING([--enable-macosx-package-signing=<identity>],
+        [Create a .pkg suitable for uploading to the Mac App Store and sign
+         it. If you don't provide an identity the first suitable certificate
+         in your keychain is used.]),
+,)
+
+AC_ARG_ENABLE(macosx-sandbox,
+    AS_HELP_STRING([--enable-macosx-sandbox],
+        [Make the app bundle run in a sandbox. Requires code signing.
+         Is required by apps distributed in the Mac App Store, and implies
+         adherence to App Store rules.]),
+,)
+
+AC_ARG_WITH(macosx-bundle-identifier,
+    AS_HELP_STRING([--with-macosx-bundle-identifier=tld.mumble.orifice.TheOffice],
+        [Define the macOS bundle identifier. Default is the somewhat weird
+         org.libreoffice.script ("script", huh?).]),
+,with_macosx_bundle_identifier=org.libreoffice.script)
+
+AC_ARG_WITH(macosx-provisioning-profile,
+    AS_HELP_STRING([--with-macosx-provisioning-profile=/path/to/mac.provisionprofile],
+        [Specify the path to a provisioning profile to use]),
+,)
+
+AC_ARG_WITH(product-name,
+    AS_HELP_STRING([--with-product-name='My Own Office Suite'],
+        [Define the product name. Default is AC_PACKAGE_NAME.]),
+,with_product_name=$PRODUCTNAME)
+
+libo_FUZZ_ARG_ENABLE(community-flavor,
+    AS_HELP_STRING([--disable-community-flavor],
+        [Disable the Community branding.]),
+,)
+
+AC_ARG_WITH(package-version,
+    AS_HELP_STRING([--with-package-version='3.1.4.5'],
+        [Define the package version. Default is AC_PACKAGE_VERSION. Use only if you distribute an own build for macOS.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(readonly-installset,
+    AS_HELP_STRING([--enable-readonly-installset],
+        [Prevents any attempts by LibreOffice to write into its installation. That means
+         at least that no "system-wide" extensions can be added. Partly experimental work in
+         progress, probably not fully implemented. Always enabled for macOS.]),
+,)
+
+libo_FUZZ_ARG_ENABLE(mariadb-sdbc,
+    AS_HELP_STRING([--disable-mariadb-sdbc],
+        [Disable the build of the MariaDB/MySQL-SDBC driver.])
+)
+
+libo_FUZZ_ARG_ENABLE(postgresql-sdbc,
+    AS_HELP_STRING([--disable-postgresql-sdbc],
+        [Disable the build of the PostgreSQL-SDBC driver.])
+)
+
+libo_FUZZ_ARG_ENABLE(lotuswordpro,
+    AS_HELP_STRING([--disable-lotuswordpro],
+        [Disable the build of the Lotus Word Pro filter.]),
+,test "${enable_lotuswordpro+set}" = set || enable_lotuswordpro=yes)
+
+libo_FUZZ_ARG_ENABLE(firebird-sdbc,
+    AS_HELP_STRING([--disable-firebird-sdbc],
+        [Disable the build of the Firebird-SDBC driver if it doesn't compile for you.]),
+,test "${enable_firebird_sdbc+set}" = set || enable_firebird_sdbc=yes)
+
+AC_ARG_ENABLE(bogus-pkg-config,
+    AS_HELP_STRING([--enable-bogus-pkg-config],
+        [MACOSX only: on MacOSX pkg-config can cause trouble. by default if one is found in the PATH, an error is issued. This flag turn that error into a warning.]),
+)
+
+AC_ARG_ENABLE(openssl,
+    AS_HELP_STRING([--disable-openssl],
+        [Disable using libssl/libcrypto from OpenSSL. If disabled,
+         components will use NSS. Work in progress,
+         use only if you are hacking on it.]),
+,enable_openssl=yes)
+
+libo_FUZZ_ARG_ENABLE(cipher-openssl-backend,
+    AS_HELP_STRING([--enable-cipher-openssl-backend],
+        [Enable using OpenSSL as the actual implementation of the rtl/cipher.h functionality.
+         Requires --enable-openssl.]))
+
+AC_ARG_ENABLE(nss,
+    AS_HELP_STRING([--disable-nss],
+        [Disable using NSS. If disabled,
+         components will use openssl. Work in progress,
+         use only if you are hacking on it.]),
+,enable_nss=yes)
+
+AC_ARG_ENABLE(library-bin-tar,
+    AS_HELP_STRING([--enable-library-bin-tar],
+        [Enable the building and reused of tarball of binary build for some 'external' libraries.
+        Some libraries can save their build result in a tarball
+        stored in TARFILE_LOCATION. That binary tarball is
+        uniquely identified by the source tarball,
+        the content of the config_host.mk file and the content
+        of the top-level directory in core for that library
+        If this option is enabled, then if such a tarfile exist, it will be untarred
+        instead of the source tarfile, and the build step will be skipped for that
+        library.
+        If a proper tarfile does not exist, then the normal source-based
+        build is done for that library and a proper binary tarfile is created
+        for the next time.]),
+)
+
+AC_ARG_ENABLE(dconf,
+    AS_HELP_STRING([--disable-dconf],
+        [Disable the dconf configuration backend (enabled by default where
+         available).]))
+
+libo_FUZZ_ARG_ENABLE(formula-logger,
+    AS_HELP_STRING(
+        [--enable-formula-logger],
+        [Enable formula logger for logging formula calculation flow in Calc.]
+    )
+)
+
+AC_ARG_ENABLE(ldap,
+    AS_HELP_STRING([--disable-ldap],
+        [Disable LDAP support.]),
+,enable_ldap=yes)
+
+AC_ARG_ENABLE(opencl,
+    AS_HELP_STRING([--disable-opencl],
+        [Disable OpenCL support.]),
+,enable_opencl=yes)
+
+libo_FUZZ_ARG_ENABLE(librelogo,
+    AS_HELP_STRING([--disable-librelogo],
+        [Do not build LibreLogo.]),
+,enable_librelogo=yes)
+
+AC_ARG_ENABLE(wasm-strip,
+    AS_HELP_STRING([--enable-wasm-strip],
+        [Strip the static build like for WASM/emscripten platform.]),
+,)
+
+AC_ARG_WITH(main-module,
+    AS_HELP_STRING([--with-main-module=<writer/calc>],
+        [Specify which main module to build for wasm.
+        Default value is 'writer'.]),
+,)
+
+AC_ARG_ENABLE(wasm-exceptions,
+    AS_HELP_STRING([--enable-wasm-exceptions],
+        [Build with native WASM exceptions (AKA -fwasm-exceptions),
+        matter of fact, this is currently not finished by any implementation)
+        (see https://webassembly.org/roadmap/ for the current state]),
+,)
+
+AC_ARG_ENABLE(xmlhelp,
+    AS_HELP_STRING([--disable-xmlhelp],
+        [Disable XML help support]),
+,enable_xmlhelp=yes)
+
+AC_ARG_ENABLE(customtarget-components,
+    AS_HELP_STRING([--enable-customtarget-components],
+        [Generates the static UNO object constructor mapping from the build.]))
+
+AC_ARG_ENABLE(float_device_pixel,
+    AS_HELP_STRING([--enable-float-device-pixel],
+                   [Uses doubles for VCL device coordinates instead of 32-bit integers.]),
+,)
+
+dnl ===================================================================
+dnl Optional Packages (--with/without-)
+dnl ===================================================================
+
+AC_ARG_WITH(gcc-home,
+    AS_HELP_STRING([--with-gcc-home],
+        [Specify the location of gcc/g++ manually. This can be used in conjunction
+         with --enable-icecream when icecream gcc/g++ wrappers are installed in a
+         non-default path.]),
+,)
+
+AC_ARG_WITH(gnu-patch,
+    AS_HELP_STRING([--with-gnu-patch],
+        [Specify location of GNU patch on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(build-platform-configure-options,
+    AS_HELP_STRING([--with-build-platform-configure-options],
+        [Specify options for the configure script run for the *build* platform in a cross-compilation]),
+,)
+
+AC_ARG_WITH(gnu-cp,
+    AS_HELP_STRING([--with-gnu-cp],
+        [Specify location of GNU cp on Solaris or FreeBSD.]),
+,)
+
+AC_ARG_WITH(external-tar,
+    AS_HELP_STRING([--with-external-tar=<TARFILE_PATH>],
+        [Specify an absolute path of where to find (and store) tarfiles.]),
+    TARFILE_LOCATION=$withval ,
+)
+
+AC_ARG_WITH(referenced-git,
+    AS_HELP_STRING([--with-referenced-git=<OTHER_CHECKOUT_DIR>],
+        [Specify another checkout directory to reference. This makes use of
+                 git submodule update --reference, and saves a lot of diskspace
+                 when having multiple trees side-by-side.]),
+    GIT_REFERENCE_SRC=$withval ,
+)
+
+AC_ARG_WITH(linked-git,
+    AS_HELP_STRING([--with-linked-git=<submodules repo basedir>],
+        [Specify a directory where the repositories of submodules are located.
+         This uses a method similar to git-new-workdir to get submodules.]),
+    GIT_LINK_SRC=$withval ,
+)
+
+AC_ARG_WITH(galleries,
+    AS_HELP_STRING([--with-galleries],
+        [Specify how galleries should be built. It is possible either to
+         build these internally from source ("build"),
+         or to disable them ("no")]),
+)
+
+AC_ARG_WITH(theme,
+    AS_HELP_STRING([--with-theme="theme1 theme2..."],
+        [Choose which themes to include. By default those themes with an '*' are included.
+         Possible choices: *breeze, *breeze_dark, *breeze_dark_svg, *breeze_svg,
+         *colibre, *colibre_svg, *colibre_dark, *colibre_dark_svg,
+         *elementary, *elementary_svg,
+         *karasa_jaga, *karasa_jaga_svg,
+         *sifr, *sifr_dark, *sifr_dark_svg, *sifr_svg,
+         *sukapura, *sukapura_dark, *sukapura_dark_svg, *sukapura_svg.]),
+,)
+
+libo_FUZZ_ARG_WITH(helppack-integration,
+    AS_HELP_STRING([--without-helppack-integration],
+        [It will not integrate the helppacks to the installer
+         of the product. Please use this switch to use the online help
+         or separate help packages.]),
+,)
+
+libo_FUZZ_ARG_WITH(fonts,
+    AS_HELP_STRING([--without-fonts],
+        [LibreOffice includes some third-party fonts to provide a reliable basis for
+         help content, templates, samples, etc. When these fonts are already
+         known to be available on the system then you should use this option.]),
+,)
+
+AC_ARG_WITH(epm,
+    AS_HELP_STRING([--with-epm],
+        [Decides which epm to use. Default is to use the one from the system if
+         one is built. When either this is not there or you say =internal epm
+         will be built.]),
+,)
+
+AC_ARG_WITH(package-format,
+    AS_HELP_STRING([--with-package-format],
+        [Specify package format(s) for LibreOffice installation sets. The
+         implicit --without-package-format leads to no installation sets being
+         generated. Possible values: archive, bsd, deb, dmg,
+         installed, msi, pkg, and rpm.
+         Example: --with-package-format='deb rpm']),
+,)
+
+AC_ARG_WITH(tls,
+    AS_HELP_STRING([--with-tls],
+        [Decides which TLS/SSL and cryptographic implementations to use for
+         LibreOffice's code. Default is to use NSS although OpenSSL is also
+         possible. Notice that selecting NSS restricts the usage of OpenSSL
+         in LO's code but selecting OpenSSL doesn't restrict by now the
+         usage of NSS in LO's code. Possible values: openssl, nss.
+         Example: --with-tls="nss"]),
+,)
+
+AC_ARG_WITH(system-libs,
+    AS_HELP_STRING([--with-system-libs],
+        [Use libraries already on system -- enables all --with-system-* flags.]),
+,)
+
+AC_ARG_WITH(system-bzip2,
+    AS_HELP_STRING([--with-system-bzip2],
+        [Use bzip2 already on system. Used only when --enable-online-update=mar]),,
+    [with_system_bzip2="$with_system_libs"])
+
+AC_ARG_WITH(system-headers,
+    AS_HELP_STRING([--with-system-headers],
+        [Use headers already on system -- enables all --with-system-* flags for
+         external packages whose headers are the only entities used i.e.
+         boost/odbc/sane-header(s).]),,
+    [with_system_headers="$with_system_libs"])
+
+AC_ARG_WITH(system-jars,
+    AS_HELP_STRING([--without-system-jars],
+        [When building with --with-system-libs, also the needed jars are expected
+         on the system. Use this to disable that]),,
+    [with_system_jars="$with_system_libs"])
+
+AC_ARG_WITH(system-cairo,
+    AS_HELP_STRING([--with-system-cairo],
+        [Use cairo libraries already on system.  Happens automatically for
+         (implicit) --enable-gtk3.]))
+
+AC_ARG_WITH(system-epoxy,
+    AS_HELP_STRING([--with-system-epoxy],
+        [Use epoxy libraries already on system.  Happens automatically for
+         (implicit) --enable-gtk3.]),,
+       [with_system_epoxy="$with_system_libs"])
+
+AC_ARG_WITH(myspell-dicts,
+    AS_HELP_STRING([--with-myspell-dicts],
+        [Adds myspell dictionaries to the LibreOffice installation set]),
+,)
+
+AC_ARG_WITH(system-dicts,
+    AS_HELP_STRING([--without-system-dicts],
+        [Do not use dictionaries from system paths.]),
+,)
+
+AC_ARG_WITH(external-dict-dir,
+    AS_HELP_STRING([--with-external-dict-dir],
+        [Specify external dictionary dir.]),
+,)
+
+AC_ARG_WITH(external-hyph-dir,
+    AS_HELP_STRING([--with-external-hyph-dir],
+        [Specify external hyphenation pattern dir.]),
+,)
+
+AC_ARG_WITH(external-thes-dir,
+    AS_HELP_STRING([--with-external-thes-dir],
+        [Specify external thesaurus dir.]),
+,)
+
+AC_ARG_WITH(system-zlib,
+    AS_HELP_STRING([--with-system-zlib],
+        [Use zlib already on system.]),,
+    [with_system_zlib=auto])
+
+AC_ARG_WITH(system-jpeg,
+    AS_HELP_STRING([--with-system-jpeg],
+        [Use jpeg already on system.]),,
+    [with_system_jpeg="$with_system_libs"])
+
+AC_ARG_WITH(system-expat,
+    AS_HELP_STRING([--with-system-expat],
+        [Use expat already on system.]),,
+    [with_system_expat="$with_system_libs"])
+
+AC_ARG_WITH(system-libxml,
+    AS_HELP_STRING([--with-system-libxml],
+        [Use libxml/libxslt already on system.]),,
+    [with_system_libxml=auto])
+
+AC_ARG_WITH(system-openldap,
+    AS_HELP_STRING([--with-system-openldap],
+        [Use the OpenLDAP LDAP SDK already on system.]),,
+    [with_system_openldap="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(poppler,
+    AS_HELP_STRING([--disable-poppler],
+        [Disable building Poppler.])
+)
+
+AC_ARG_WITH(system-poppler,
+    AS_HELP_STRING([--with-system-poppler],
+        [Use system poppler (only needed for PDF import).]),,
+    [with_system_poppler="$with_system_libs"])
+
+AC_ARG_WITH(system-abseil,
+    AS_HELP_STRING([--with-system-abseil],
+        [Use the abseil libraries already on system.]),,
+    [with_system_abseil="$with_system_libs"])
+
+AC_ARG_WITH(system-openjpeg,
+    AS_HELP_STRING([--with-system-openjpeg],
+        [Use the OpenJPEG library already on system.]),,
+    [with_system_openjpeg="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(gpgmepp,
+    AS_HELP_STRING([--disable-gpgmepp],
+        [Disable building gpgmepp. Do not use in normal cases unless you want to fix potential problems it causes.])
+)
+
+AC_ARG_WITH(system-gpgmepp,
+    AS_HELP_STRING([--with-system-gpgmepp],
+        [Use gpgmepp already on system]),,
+    [with_system_gpgmepp="$with_system_libs"])
+
+AC_ARG_WITH(system-mariadb,
+    AS_HELP_STRING([--with-system-mariadb],
+        [Use MariaDB/MySQL libraries already on system.]),,
+    [with_system_mariadb="$with_system_libs"])
+
+AC_ARG_ENABLE(bundle-mariadb,
+    AS_HELP_STRING([--enable-bundle-mariadb],
+        [When using MariaDB/MySQL libraries already on system, bundle them with the MariaDB Connector/LibreOffice.])
+)
+
+AC_ARG_WITH(system-postgresql,
+    AS_HELP_STRING([--with-system-postgresql],
+        [Use PostgreSQL libraries already on system, for building the PostgreSQL-SDBC
+         driver. If pg_config is not in PATH, use PGCONFIG to point to it.]),,
+    [with_system_postgresql="$with_system_libs"])
+
+AC_ARG_WITH(libpq-path,
+    AS_HELP_STRING([--with-libpq-path=<absolute path to your libpq installation>],
+        [Use this PostgreSQL C interface (libpq) installation for building
+         the PostgreSQL-SDBC extension.]),
+,)
+
+AC_ARG_WITH(system-firebird,
+    AS_HELP_STRING([--with-system-firebird],
+        [Use Firebird libraries already on system, for building the Firebird-SDBC
+         driver. If fb_config is not in PATH, use FBCONFIG to point to it.]),,
+    [with_system_firebird="$with_system_libs"])
+
+AC_ARG_WITH(system-libtommath,
+            AS_HELP_STRING([--with-system-libtommath],
+                           [Use libtommath already on system]),,
+            [with_system_libtommath="$with_system_libs"])
+
+AC_ARG_WITH(system-hsqldb,
+    AS_HELP_STRING([--with-system-hsqldb],
+        [Use hsqldb already on system.]))
+
+AC_ARG_WITH(hsqldb-jar,
+    AS_HELP_STRING([--with-hsqldb-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    HSQLDB_JAR=$withval)
+
+libo_FUZZ_ARG_ENABLE(scripting-beanshell,
+    AS_HELP_STRING([--disable-scripting-beanshell],
+        [Disable support for scripts in BeanShell.]),
+,
+)
+
+AC_ARG_WITH(system-beanshell,
+    AS_HELP_STRING([--with-system-beanshell],
+        [Use beanshell already on system.]),,
+    [with_system_beanshell="$with_system_jars"])
+
+AC_ARG_WITH(beanshell-jar,
+    AS_HELP_STRING([--with-beanshell-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    BSH_JAR=$withval)
+
+libo_FUZZ_ARG_ENABLE(scripting-javascript,
+    AS_HELP_STRING([--disable-scripting-javascript],
+        [Disable support for scripts in JavaScript.]),
+,
+)
+
+AC_ARG_WITH(system-rhino,
+    AS_HELP_STRING([--with-system-rhino],
+        [Use rhino already on system.]),,)
+#    [with_system_rhino="$with_system_jars"])
+# Above is not used as we have different debug interface
+# patched into internal rhino. This code needs to be fixed
+# before we can enable it by default.
+
+AC_ARG_WITH(rhino-jar,
+    AS_HELP_STRING([--with-rhino-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    RHINO_JAR=$withval)
+
+AC_ARG_WITH(system-jfreereport,
+    AS_HELP_STRING([--with-system-jfreereport],
+        [Use JFreeReport already on system.]),,
+    [with_system_jfreereport="$with_system_jars"])
+
+AC_ARG_WITH(sac-jar,
+    AS_HELP_STRING([--with-sac-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    SAC_JAR=$withval)
+
+AC_ARG_WITH(libxml-jar,
+    AS_HELP_STRING([--with-libxml-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBXML_JAR=$withval)
+
+AC_ARG_WITH(flute-jar,
+    AS_HELP_STRING([--with-flute-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    FLUTE_JAR=$withval)
+
+AC_ARG_WITH(jfreereport-jar,
+    AS_HELP_STRING([--with-jfreereport-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    JFREEREPORT_JAR=$withval)
+
+AC_ARG_WITH(liblayout-jar,
+    AS_HELP_STRING([--with-liblayout-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBLAYOUT_JAR=$withval)
+
+AC_ARG_WITH(libloader-jar,
+    AS_HELP_STRING([--with-libloader-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBLOADER_JAR=$withval)
+
+AC_ARG_WITH(libformula-jar,
+    AS_HELP_STRING([--with-libformula-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBFORMULA_JAR=$withval)
+
+AC_ARG_WITH(librepository-jar,
+    AS_HELP_STRING([--with-librepository-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBREPOSITORY_JAR=$withval)
+
+AC_ARG_WITH(libfonts-jar,
+    AS_HELP_STRING([--with-libfonts-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBFONTS_JAR=$withval)
+
+AC_ARG_WITH(libserializer-jar,
+    AS_HELP_STRING([--with-libserializer-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBSERIALIZER_JAR=$withval)
+
+AC_ARG_WITH(libbase-jar,
+    AS_HELP_STRING([--with-libbase-jar=JARFILE],
+        [Specify path to jarfile manually.]),
+    LIBBASE_JAR=$withval)
+
+AC_ARG_WITH(system-odbc,
+    AS_HELP_STRING([--with-system-odbc],
+        [Use the odbc headers already on system.]),,
+    [with_system_odbc="auto"])
+
+AC_ARG_WITH(system-sane,
+    AS_HELP_STRING([--with-system-sane],
+        [Use sane.h already on system.]),,
+    [with_system_sane="$with_system_headers"])
+
+AC_ARG_WITH(system-bluez,
+    AS_HELP_STRING([--with-system-bluez],
+        [Use bluetooth.h already on system.]),,
+    [with_system_bluez="$with_system_headers"])
+
+AC_ARG_WITH(system-boost,
+    AS_HELP_STRING([--with-system-boost],
+        [Use boost already on system.]),,
+    [with_system_boost="$with_system_headers"])
+
+AC_ARG_WITH(system-dragonbox,
+    AS_HELP_STRING([--with-system-dragonbox],
+        [Use dragonbox already on system.]),,
+    [with_system_dragonbox="$with_system_headers"])
+
+AC_ARG_WITH(system-frozen,
+    AS_HELP_STRING([--with-system-frozen],
+        [Use frozen already on system.]),,
+    [with_system_frozen="$with_system_headers"])
+
+AC_ARG_WITH(system-libfixmath,
+    AS_HELP_STRING([--with-system-libfixmath],
+        [Use libfixmath already on system.]),,
+    [with_system_libfixmath="$with_system_libs"])
+
+AC_ARG_WITH(system-glm,
+    AS_HELP_STRING([--with-system-glm],
+        [Use glm already on system.]),,
+    [with_system_glm="$with_system_headers"])
+
+AC_ARG_WITH(system-hunspell,
+    AS_HELP_STRING([--with-system-hunspell],
+        [Use libhunspell already on system.]),,
+    [with_system_hunspell="$with_system_libs"])
+
+libo_FUZZ_ARG_ENABLE(zxing,
+    AS_HELP_STRING([--disable-zxing],
+       [Disable use of zxing external library.]))
+
+AC_ARG_WITH(system-zxing,
+    AS_HELP_STRING([--with-system-zxing],
+        [Use libzxing already on system.]),,
+    [with_system_zxing="$with_system_libs"])
+
+AC_ARG_WITH(system-box2d,
+    AS_HELP_STRING([--with-system-box2d],
+        [Use box2d already on system.]),,
+    [with_system_box2d="$with_system_libs"])
+
+AC_ARG_WITH(system-mythes,
+    AS_HELP_STRING([--with-system-mythes],
+        [Use mythes already on system.]),,
+    [with_system_mythes="$with_system_libs"])
+
+AC_ARG_WITH(system-altlinuxhyph,
+    AS_HELP_STRING([--with-system-altlinuxhyph],
+        [Use ALTLinuxhyph already on system.]),,
+    [with_system_altlinuxhyph="$with_system_libs"])
+
+AC_ARG_WITH(system-lpsolve,
+    AS_HELP_STRING([--with-system-lpsolve],
+        [Use lpsolve already on system.]),,
+    [with_system_lpsolve="$with_system_libs"])
+
+AC_ARG_WITH(system-coinmp,
+    AS_HELP_STRING([--with-system-coinmp],
+        [Use CoinMP already on system.]),,
+    [with_system_coinmp="$with_system_libs"])
+
+AC_ARG_WITH(system-liblangtag,
+    AS_HELP_STRING([--with-system-liblangtag],
+        [Use liblangtag library already on system.]),,
+    [with_system_liblangtag="$with_system_libs"])
+
+AC_ARG_WITH(system-lockfile,
+    AS_HELP_STRING([--with-system-lockfile[=file]],
+        [Detect a system lockfile program or use the \$file argument.]))
+
+AC_ARG_WITH(webdav,
+    AS_HELP_STRING([--without-webdav],
+        [Disable WebDAV support in the UCB.]))
+
+AC_ARG_WITH(linker-hash-style,
+    AS_HELP_STRING([--with-linker-hash-style],
+        [Use linker with --hash-style=<style> when linking shared objects.
+         Possible values: "sysv", "gnu", "both". The default value is "gnu"
+         if supported on the build system, and "sysv" otherwise.]))
+
+AC_ARG_WITH(jdk-home,
+    AS_HELP_STRING([--with-jdk-home=<absolute path to JDK home>],
+        [If you have installed JDK 9 or later on your system please supply the
+         path here. Note that this is not the location of the java command but the
+         location of the entire distribution. In case of cross-compiling, this
+         is the JDK of the host os. Use --with-build-platform-configure-options
+         to point to a different build platform JDK.]),
+,)
+
+AC_ARG_WITH(help,
+    AS_HELP_STRING([--with-help],
+        [Enable the build of help. There is a special parameter "common" that
+         can be used to bundle only the common part, .e.g help-specific icons.
+         This is useful when you build the helpcontent separately.])
+    [
+                          Usage:     --with-help    build the old local help
+                                 --without-help     no local help (default)
+                                 --with-help=html   build the new HTML local help
+                                 --with-help=online build the new HTML online help
+    ],
+,)
+
+AC_ARG_WITH(omindex,
+   AS_HELP_STRING([--with-omindex],
+        [Enable the support of xapian-omega index for online help.])
+   [
+                         Usage: --with-omindex=server prepare the pages for omindex
+                                but let xapian-omega be built in server.
+                                --with-omindex=noxap do not prepare online pages
+                                for xapian-omega
+  ],
+,)
+
+libo_FUZZ_ARG_WITH(java,
+    AS_HELP_STRING([--with-java=<java command>],
+        [Specify the name of the Java interpreter command. Typically "java"
+         which is the default.
+
+         To build without support for Java components, applets, accessibility
+         or the XML filters written in Java, use --without-java or --with-java=no.]),
+    [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ],
+    [ test -z "$with_java" -o "$with_java" = "yes" && with_java=java ]
+)
+
+AC_ARG_WITH(jvm-path,
+    AS_HELP_STRING([--with-jvm-path=<absolute path to parent of jvm home>],
+        [Use a specific JVM search path at runtime.
+         e.g. use --with-jvm-path=/usr/lib/ to find JRE/JDK in /usr/lib/jvm/]),
+,)
+
+AC_ARG_WITH(ant-home,
+    AS_HELP_STRING([--with-ant-home=<absolute path to Ant home>],
+        [If you have installed Apache Ant on your system, please supply the path here.
+         Note that this is not the location of the Ant binary but the location
+         of the entire distribution.]),
+,)
+
+AC_ARG_WITH(symbol-config,
+    AS_HELP_STRING([--with-symbol-config],
+        [Configuration for the crashreport symbol upload]),
+        [],
+        [with_symbol_config=no])
+
+AC_ARG_WITH(export-validation,
+    AS_HELP_STRING([--without-export-validation],
+        [Disable validating OOXML and ODF files as exported from in-tree tests.]),
+,with_export_validation=auto)
+
+AC_ARG_WITH(bffvalidator,
+    AS_HELP_STRING([--with-bffvalidator=<absolute path to BFFValidator>],
+        [Enables export validation for Microsoft Binary formats (doc, xls, ppt).
+         Requires installed Microsoft Office Binary File Format Validator.
+         Note: export-validation (--with-export-validation) is required to be turned on.
+         See https://web.archive.org/web/20200804155745/https://www.microsoft.com/en-us/download/details.aspx?id=26794]),
+,with_bffvalidator=no)
+
+libo_FUZZ_ARG_WITH(junit,
+    AS_HELP_STRING([--with-junit=<absolute path to JUnit 4 jar>],
+        [Specifies the JUnit 4 jar file to use for JUnit-based tests.
+         --without-junit disables those tests. Not relevant in the --without-java case.]),
+,with_junit=yes)
+
+AC_ARG_WITH(hamcrest,
+    AS_HELP_STRING([--with-hamcrest=<absolute path to hamcrest jar>],
+        [Specifies the hamcrest jar file to use for JUnit-based tests.
+         --without-junit disables those tests. Not relevant in the --without-java case.]),
+,with_hamcrest=yes)
+
+AC_ARG_WITH(perl-home,
+    AS_HELP_STRING([--with-perl-home=<abs. path to Perl 5 home>],
+        [If you have installed Perl 5 Distribution, on your system, please
+         supply the path here. Note that this is not the location of the Perl
+         binary but the location of the entire distribution.]),
+,)
+
+libo_FUZZ_ARG_WITH(doxygen,
+    AS_HELP_STRING(
+        [--with-doxygen=<absolute path to doxygen executable>],
+        [Specifies the doxygen executable to use when generating ODK C/C++
+         documentation. --without-doxygen disables generation of ODK C/C++
+         documentation. Not relevant in the --disable-odk case.]),
+,with_doxygen=yes)
+
+AC_ARG_WITH(visual-studio,
+    AS_HELP_STRING([--with-visual-studio=<2019/2022/2022preview>],
+        [Specify which Visual Studio version to use in case several are
+         installed. Currently 2019 (default) and 2022 are supported.]),
+,)
+
+AC_ARG_WITH(windows-sdk,
+    AS_HELP_STRING([--with-windows-sdk=<8.0(A)/8.1(A)/10.0>],
+        [Specify which Windows SDK, or "Windows Kit", version to use
+         in case the one that came with the selected Visual Studio
+         is not what you want for some reason. Note that not all compiler/SDK
+         combinations are supported. The intent is that this option should not
+         be needed.]),
+,)
+
+AC_ARG_WITH(lang,
+    AS_HELP_STRING([--with-lang="es sw tu cs sk"],
+        [Use this option to build LibreOffice with additional UI language support.
+         English (US) is always included by default.
+         Separate multiple languages with space.
+         For all languages, use --with-lang=ALL.]),
+,)
+
+AC_ARG_WITH(locales,
+    AS_HELP_STRING([--with-locales="en es pt fr zh kr ja"],
+        [Use this option to limit the locale information built in.
+         Separate multiple locales with space.
+         Very experimental and might well break stuff.
+         Just a desperate measure to shrink code and data size.
+         By default all the locales available is included.
+         Just works with --disable-dynloading. Defaults to "ALL".
+         This option is completely unrelated to --with-lang.])
+    [
+                          Affects also our character encoding conversion
+                          tables for encodings mainly targeted for a
+                          particular locale, like EUC-CN and EUC-TW for
+                          zh, ISO-2022-JP for ja.
+
+                          Affects also our add-on break iterator data for
+                          some languages.
+
+                          For the default, all locales, don't use this switch at all.
+                          Specifying just the language part of a locale means all matching
+                          locales will be included.
+    ],
+,)
+
+# Kerberos and GSSAPI used only by PostgreSQL as of LibO 3.5
+libo_FUZZ_ARG_WITH(krb5,
+    AS_HELP_STRING([--with-krb5],
+        [Enable MIT Kerberos 5 support in modules that support it.
+         By default automatically enabled on platforms
+         where a good system Kerberos 5 is available.]),
+,)
+
+libo_FUZZ_ARG_WITH(gssapi,
+    AS_HELP_STRING([--with-gssapi],
+        [Enable GSSAPI support in modules that support it.
+         By default automatically enabled on platforms
+         where a good system GSSAPI is available.]),
+,)
+
+libo_FUZZ_ARG_WITH(lxml,
+    AS_HELP_STRING([--without-lxml],
+        [gla11y will use python lxml when available, potentially building a local copy if necessary.
+         --without-lxml tells it to not use python lxml at all, which means that gla11y will only
+         report widget classes and ids.]),
+,)
+
+libo_FUZZ_ARG_WITH(latest-c++,
+    AS_HELP_STRING([--with-latest-c++],
+        [Try to enable the latest features of the C++ compiler, even if they are not yet part of a
+         published standard.  This option is ignored when CXXFLAGS_CXX11 is set explicitly.]),,
+        [with_latest_c__=no])
+
+AC_ARG_WITH(gtk3-build,
+    AS_HELP_STRING([--with-gtk3-build=<absolute path to GTK3 build>],
+        [(Windows-only) In order to build GtkTiledViewer on Windows, pass the path
+         to a GTK3 build, like '--with-gtk3-build=C:/gtk-build/gtk/x64/release'.]))
+
+dnl ===================================================================
+dnl Branding
+dnl ===================================================================
+
+AC_ARG_WITH(branding,
+    AS_HELP_STRING([--with-branding=/path/to/images],
+        [Use given path to retrieve branding images set.])
+    [
+                          Search for intro.png about.svg and logo.svg.
+                          If any is missing, default ones will be used instead.
+
+                          Search also progress.conf for progress
+                          settings on intro screen :
+
+                          PROGRESSBARCOLOR="255,255,255" Set color of
+                          progress bar. Comma separated RGB decimal values.
+                          PROGRESSSIZE="407,6" Set size of progress bar.
+                          Comma separated decimal values (width, height).
+                          PROGRESSPOSITION="61,317" Set position of progress
+                          bar from left,top. Comma separated decimal values.
+                          PROGRESSFRAMECOLOR="20,136,3" Set color of progress
+                          bar frame. Comma separated RGB decimal values.
+                          PROGRESSTEXTCOLOR="0,0,0" Set color of progress
+                          bar text. Comma separated RGB decimal values.
+                          PROGRESSTEXTBASELINE="287" Set vertical position of
+                          progress bar text from top. Decimal value.
+
+                          Default values will be used if not found.
+    ],
+,)
+
+
+AC_ARG_WITH(extra-buildid,
+    AS_HELP_STRING([--with-extra-buildid="Tinderbox: Win-x86@6, Branch:master, Date:2012-11-26_00.29.34"],
+        [Show addition build identification in about dialog.]),
+,)
+
+
+AC_ARG_WITH(vendor,
+    AS_HELP_STRING([--with-vendor="John the Builder"],
+        [Set vendor of the build.]),
+,)
+
+AC_ARG_WITH(privacy-policy-url,
+    AS_HELP_STRING([--with-privacy-policy-url="https://yourdomain/privacy-policy"],
+        [The URL to your privacy policy (needed when
+         enabling online-update or crashreporting via breakpad)]),
+        [if test "x$with_privacy_policy_url" = "xyes"; then
+            AC_MSG_FAILURE([you need to specify an argument when using --with-privacy-policy-url])
+         elif test "x$with_privacy_policy_url" = "xno"; then
+            with_privacy_policy_url="undefined"
+         fi]
+,[with_privacy_policy_url="undefined"])
+
+AC_ARG_WITH(android-package-name,
+    AS_HELP_STRING([--with-android-package-name="org.libreoffice"],
+        [Set Android package name of the build.]),
+,)
+
+AC_ARG_WITH(compat-oowrappers,
+    AS_HELP_STRING([--with-compat-oowrappers],
+        [Install oo* wrappers in parallel with
+         lo* ones to keep backward compatibility.
+         Has effect only with make distro-pack-install]),
+,)
+
+AC_ARG_WITH(os-version,
+    AS_HELP_STRING([--with-os-version=<OSVERSION>],
+        [For FreeBSD users, use this option to override the detected OSVERSION.]),
+,)
+
+AC_ARG_WITH(parallelism,
+    AS_HELP_STRING([--with-parallelism],
+        [Number of jobs to run simultaneously during build. Parallel builds can
+        save a lot of time on multi-cpu machines. Defaults to the number of
+        CPUs on the machine, unless you configure --enable-icecream - then to
+        40.]),
+,)
+
+AC_ARG_WITH(all-tarballs,
+    AS_HELP_STRING([--with-all-tarballs],
+        [Download all external tarballs unconditionally]))
+
+AC_ARG_WITH(gdrive-client-id,
+    AS_HELP_STRING([--with-gdrive-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on Google Drive. If either this or --with-gdrive-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(gdrive-client-secret,
+    AS_HELP_STRING([--with-gdrive-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on Google Drive. If either this or
+        --with-gdrive-client-id is empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(alfresco-cloud-client-id,
+    AS_HELP_STRING([--with-alfresco-cloud-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on Alfresco Cloud. If either this or --with-alfresco-cloud-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(alfresco-cloud-client-secret,
+    AS_HELP_STRING([--with-alfresco-cloud-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on Alfresco Cloud. If either this or
+        --with-alfresco-cloud-client-id is empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(onedrive-client-id,
+    AS_HELP_STRING([--with-onedrive-client-id],
+        [Provides the client id of the application for OAuth2 authentication
+        on OneDrive. If either this or --with-onedrive-client-secret is
+        empty, the feature will be disabled]),
+)
+
+AC_ARG_WITH(onedrive-client-secret,
+    AS_HELP_STRING([--with-onedrive-client-secret],
+        [Provides the client secret of the application for OAuth2
+        authentication on OneDrive. If either this or
+        --with-onedrive-client-id is empty, the feature will be disabled]),
+)
+
+dnl Check for coredumpctl support to present information about crashing test processes:
+AC_ARG_WITH(coredumpctl,
+    AS_HELP_STRING([--with-coredumpctl],
+        [Use coredumpctl (together with systemd-run) to retrieve core dumps of crashing test
+        processes.]))
+
+dnl ===================================================================
+dnl Do we want to use pre-build binary tarball for recompile
+dnl ===================================================================
+
+if test "$enable_library_bin_tar" = "yes" ; then
+    USE_LIBRARY_BIN_TAR=TRUE
+else
+    USE_LIBRARY_BIN_TAR=
+fi
+AC_SUBST(USE_LIBRARY_BIN_TAR)
+
+dnl ===================================================================
+dnl Test whether build target is Release Build
+dnl ===================================================================
+AC_MSG_CHECKING([whether build target is Release Build])
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_RELEASE_BUILD=
+    dnl Pu the value on one line as make (at least on macOS) seems to ignore
+    dnl the newlines and then complains about spaces.
+    GET_TASK_ALLOW_ENTITLEMENT='<!-- We want to be able to debug a hardened process when not building for release --><key>com.apple.security.get-task-allow</key><true/>'
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_RELEASE_BUILD=TRUE
+    GET_TASK_ALLOW_ENTITLEMENT=
+fi
+AC_SUBST(ENABLE_RELEASE_BUILD)
+AC_SUBST(GET_TASK_ALLOW_ENTITLEMENT)
+
+AC_MSG_CHECKING([whether to build a Community flavor])
+if test -z "$enable_community_flavor" -o "$enable_community_flavor" = "yes"; then
+    AC_DEFINE(HAVE_FEATURE_COMMUNITY_FLAVOR)
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Test whether to sign Windows Build
+dnl ===================================================================
+AC_MSG_CHECKING([whether to sign windows build])
+if test "$enable_windows_build_signing" = "yes" -a "$_os" = "WINNT"; then
+    AC_MSG_RESULT([yes])
+    WINDOWS_BUILD_SIGNING="TRUE"
+else
+    AC_MSG_RESULT([no])
+    WINDOWS_BUILD_SIGNING="FALSE"
+fi
+AC_SUBST(WINDOWS_BUILD_SIGNING)
+
+dnl ===================================================================
+dnl MacOSX build and runtime environment options
+dnl ===================================================================
+
+AC_ARG_WITH(macosx-version-min-required,
+    AS_HELP_STRING([--with-macosx-version-min-required=<version>],
+        [set the minimum OS version needed to run the built LibreOffice])
+    [
+                          e. g.: --with-macosx-version-min-required=10.15
+    ],
+,)
+
+dnl ===================================================================
+dnl Check for incompatible options set by fuzzing, and reset those
+dnl automatically to working combinations
+dnl ===================================================================
+
+if test "$libo_fuzzed_enable_dbus" = yes -a "$libo_fuzzed_enable_avahi" -a \
+        "$enable_dbus" != "$enable_avahi"; then
+    AC_MSG_NOTICE([Resetting --enable-avahi=$enable_dbus])
+    enable_avahi=$enable_dbus
+fi
+
+add_lopath_after ()
+{
+    if ! echo "$LO_PATH" | $EGREP -q "(^|${P_SEP})$1($|${P_SEP})"; then
+        LO_PATH="${LO_PATH:+$LO_PATH$P_SEP}$1"
+    fi
+}
+
+add_lopath_before ()
+{
+    local IFS=${P_SEP}
+    local path_cleanup
+    local dir
+    for dir in $LO_PATH ; do
+        if test "$dir" != "$1" ; then
+            path_cleanup=${path_cleanup:+$path_cleanup$P_SEP}$dir
+        fi
+    done
+    LO_PATH="$1${path_cleanup:+$P_SEP$path_cleanup}"
+}
+
+dnl ===================================================================
+dnl check for required programs (grep, awk, sed, bash)
+dnl ===================================================================
+
+pathmunge ()
+{
+    local new_path
+    if test -n "$1"; then
+        if test "$build_os" = "cygwin"; then
+            if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+                PathFormat "$1"
+                new_path=`cygpath -sm "$formatted_path"`
+            else
+                PathFormat "$1"
+                new_path=`cygpath -u "$formatted_path"`
+            fi
+        else
+            new_path="$1"
+        fi
+        if test "$2" = "after"; then
+            add_lopath_after "$new_path"
+        else
+            add_lopath_before "$new_path"
+        fi
+    fi
+}
+
+AC_PROG_AWK
+AC_PATH_PROG( AWK, $AWK)
+if test -z "$AWK"; then
+    AC_MSG_ERROR([install awk to run this script])
+fi
+
+AC_PATH_PROG(BASH, bash)
+if test -z "$BASH"; then
+    AC_MSG_ERROR([bash not found in \$PATH])
+fi
+AC_SUBST(BASH)
+
+# prefer parallel compression tools, if available
+AC_PATH_PROG(COMPRESSIONTOOL, pigz)
+if test -z "$COMPRESSIONTOOL"; then
+    AC_PATH_PROG(COMPRESSIONTOOL, gzip)
+    if test -z "$COMPRESSIONTOOL"; then
+        AC_MSG_ERROR([gzip not found in \$PATH])
+    fi
+fi
+AC_SUBST(COMPRESSIONTOOL)
+
+AC_MSG_CHECKING([for GNU or BSD tar])
+for a in $GNUTAR gtar gnutar tar bsdtar /usr/sfw/bin/gtar; do
+    $a --version 2> /dev/null | grep -E "GNU|bsdtar"  2>&1 > /dev/null
+    if test $? -eq 0;  then
+        GNUTAR=$a
+        break
+    fi
+done
+AC_MSG_RESULT($GNUTAR)
+if test -z "$GNUTAR"; then
+    AC_MSG_ERROR([not found. install GNU or BSD tar.])
+fi
+AC_SUBST(GNUTAR)
+
+AC_MSG_CHECKING([for tar's option to strip components])
+$GNUTAR --help 2> /dev/null | grep -E "bsdtar|strip-components" 2>&1 >/dev/null
+if test $? -eq 0; then
+    STRIP_COMPONENTS="--strip-components"
+else
+    $GNUTAR --help 2> /dev/null | grep -E "strip-path" 2>&1 >/dev/null
+    if test $? -eq 0; then
+        STRIP_COMPONENTS="--strip-path"
+    else
+        STRIP_COMPONENTS="unsupported"
+    fi
+fi
+AC_MSG_RESULT($STRIP_COMPONENTS)
+if test x$STRIP_COMPONENTS = xunsupported; then
+    AC_MSG_ERROR([you need a tar that is able to strip components.])
+fi
+AC_SUBST(STRIP_COMPONENTS)
+
+dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal"
+dnl desktop OSes from "mobile" ones.
+
+dnl We assume that a non-DESKTOP build type is also a non-NATIVE one.
+dnl In other words, that when building for an OS that is not a
+dnl "desktop" one but a "mobile" one, we are always cross-compiling.
+
+dnl Note the direction of the implication; there is no assumption that
+dnl cross-compiling would imply a non-desktop OS.
+
+if test $_os != iOS -a $_os != Android -a "$enable_fuzzers" != "yes"; then
+    BUILD_TYPE="$BUILD_TYPE DESKTOP"
+    AC_DEFINE(HAVE_FEATURE_DESKTOP)
+    if test "$_os" != Emscripten; then
+        AC_DEFINE(HAVE_FEATURE_MULTIUSER_ENVIRONMENT)
+    fi
+fi
+
+# explicitly doesn't include enable_gtk3=no and enable_qt5=yes, so it should
+# also work with the default gtk3 plugin.
+if test "$enable_wasm_strip" = "yes"; then
+    enable_avmedia=no
+    enable_cmis=no
+    enable_coinmp=no
+    enable_cups=no
+    test "$_os" = Emscripten && enable_curl=no
+    enable_database_connectivity=no
+    enable_dbus=no
+    enable_dconf=no
+    test "${enable_dynamic_loading+set}" = set -o "$_os" != Emscripten || enable_dynamic_loading=no
+    enable_extension_integration=no
+    enable_extensions=no
+    enable_extension_update=no
+    enable_gio=no
+    enable_gpgmepp=no
+    enable_ldap=no
+    enable_lotuswordpro=no
+    enable_lpsolve=no
+    enable_nss=no
+    enable_odk=no
+    enable_online_update=no
+    enable_opencl=no
+    enable_pdfimport=no
+    enable_randr=no
+    enable_report_builder=no
+    enable_scripting=no
+    enable_sdremote_bluetooth=no
+    enable_skia=no
+    enable_xmlhelp=no
+    enable_zxing=no
+    test_libepubgen=no
+    test_libcdr=no
+    test_libcmis=no
+    test_libetonyek=no
+    test_libfreehand=no
+    test_libmspub=no
+    test_libpagemaker=no
+    test_libqxp=no
+    test_libvisio=no
+    test_libzmf=no
+    test_webdav=no
+    with_galleries=no
+    with_webdav=no
+    with_x=no
+
+    test "${with_fonts+set}" = set || with_fonts=yes
+    test "${with_locales+set}" = set || with_locales=en
+
+    AC_DEFINE(ENABLE_WASM_STRIP_ACCESSIBILITY)
+    AC_DEFINE(ENABLE_WASM_STRIP_WRITER)
+    AC_DEFINE(ENABLE_WASM_STRIP_CALC)
+    AC_DEFINE(ENABLE_WASM_STRIP_CANVAS)
+#    AC_DEFINE(ENABLE_WASM_STRIP_CHART)
+    AC_DEFINE(ENABLE_WASM_STRIP_DBACCESS)
+    AC_DEFINE(ENABLE_WASM_STRIP_EPUB)
+    AC_DEFINE(ENABLE_WASM_STRIP_EXTRA)
+    AC_DEFINE(ENABLE_WASM_STRIP_GUESSLANG)
+#    AC_DEFINE(ENABLE_WASM_STRIP_HUNSPELL)
+    AC_DEFINE(ENABLE_WASM_STRIP_LANGUAGETOOL)
+    AC_DEFINE(ENABLE_WASM_STRIP_PINGUSER)
+    AC_DEFINE(ENABLE_WASM_STRIP_PREMULTIPLY)
+    AC_DEFINE(ENABLE_WASM_STRIP_RECENT)
+    AC_DEFINE(ENABLE_WASM_STRIP_RECOVERYUI)
+    AC_DEFINE(ENABLE_WASM_STRIP_SPLASH)
+    AC_DEFINE(ENABLE_WASM_STRIP_SWEXPORTS)
+    AC_DEFINE(ENABLE_WASM_STRIP_SCEXPORTS)
+fi
+
+EMSCRIPTEN_NEH_MAJOR=3
+EMSCRIPTEN_NEH_MINOR=1
+EMSCRIPTEN_NEH_TINY=3
+EMSCRIPTEN_NEH_VERSION="${EMSCRIPTEN_NEH_MAJOR}.${EMSCRIPTEN_NEH_MINOR}.${EMSCRIPTEN_NEH_TINY}"
+
+if test "$enable_wasm_exceptions" = yes; then
+    AC_MSG_CHECKING([if Emscripten version is at least $EMSCRIPTEN_NEH_VERSION for SjLj + native EH])
+    check_semantic_version_three_prefixed EMSCRIPTEN NEH
+    if test $? -ne 0; then
+        AC_MSG_ERROR([no, found $EMSCRIPTEN_VERSION])
+    else
+        AC_MSG_RESULT([yes ($EMSCRIPTEN_VERSION)])
+    fi
+    ENABLE_WASM_EXCEPTIONS=TRUE
+fi
+AC_SUBST(ENABLE_WASM_EXCEPTIONS)
+
+# Whether to build "avmedia" functionality or not.
+
+if test "$enable_avmedia" = yes; then
+    BUILD_TYPE="$BUILD_TYPE AVMEDIA"
+    AC_DEFINE(HAVE_FEATURE_AVMEDIA)
+else
+    test_gstreamer_1_0=no
+fi
+
+# Decide whether to build database connectivity stuff (including Base) or not.
+if test "$enable_database_connectivity" != no; then
+    BUILD_TYPE="$BUILD_TYPE DBCONNECTIVITY"
+    AC_DEFINE(HAVE_FEATURE_DBCONNECTIVITY)
+else
+    if test "$_os" = iOS; then
+        AC_MSG_ERROR([Presumly can't disable DB connectivity on iOS.])
+    fi
+    disable_database_connectivity_dependencies
+fi
+
+if test -z "$enable_extensions"; then
+    # For iOS and Android Viewer, disable extensions unless specifically overridden with --enable-extensions.
+    if test $_os != iOS && test $_os != Android -o "$ENABLE_ANDROID_LOK" = TRUE ; then
+        enable_extensions=yes
+    fi
+fi
+
+DISABLE_SCRIPTING=''
+if test "$enable_scripting" = yes; then
+    BUILD_TYPE="$BUILD_TYPE SCRIPTING"
+    AC_DEFINE(HAVE_FEATURE_SCRIPTING)
+else
+    DISABLE_SCRIPTING='TRUE'
+    SCPDEFS="$SCPDEFS -DDISABLE_SCRIPTING"
+fi
+
+if test $_os = iOS -o $_os = Android -o $_os = Emscripten; then
+    # Disable dynamic_loading always for iOS and Android
+    enable_dynamic_loading=no
+elif test -z "$enable_dynamic_loading"; then
+    # Otherwise enable it unless specifically disabled
+    enable_dynamic_loading=yes
+fi
+
+DISABLE_DYNLOADING=''
+if test "$enable_dynamic_loading" = yes; then
+    BUILD_TYPE="$BUILD_TYPE DYNLOADING"
+else
+    DISABLE_DYNLOADING='TRUE'
+    if test $_os != iOS -a $_os != Android; then
+        enable_database_connectivity=no
+        enable_nss=no
+        enable_odk=no
+        enable_python=no
+        enable_skia=no
+        with_java=no
+    fi
+fi
+AC_SUBST(DISABLE_DYNLOADING)
+
+ENABLE_CUSTOMTARGET_COMPONENTS=
+if test "$enable_customtarget_components" = yes -a "$DISABLE_DYNLOADING" = TRUE; then
+    ENABLE_CUSTOMTARGET_COMPONENTS=TRUE
+    if test -n "$with_locales" -a "$with_locales" != en -a "$with_locales" != ALL; then
+        AC_MSG_ERROR([Currently just --with-locales=all or en is supported with --enable-customtarget-components])
+    fi
+fi
+AC_SUBST(ENABLE_CUSTOMTARGET_COMPONENTS)
+
+if test "$enable_extensions" = yes; then
+    BUILD_TYPE="$BUILD_TYPE EXTENSIONS"
+    AC_DEFINE(HAVE_FEATURE_EXTENSIONS)
+else
+    enable_extension_integration=no
+    enable_extension_update=no
+fi
+
+# remember SYSBASE value
+AC_SUBST(SYSBASE)
+
+dnl ===================================================================
+dnl  Sort out various gallery compilation options
+dnl ===================================================================
+WITH_GALLERY_BUILD=TRUE
+AC_MSG_CHECKING([how to build and package galleries])
+if test -n "${with_galleries}"; then
+    if test "$with_galleries" = "build"; then
+        if test "$enable_database_connectivity" = no; then
+            AC_MSG_ERROR([DB connectivity is needed for gengal / svx])
+        fi
+        AC_MSG_RESULT([build from source images internally])
+    elif test "$with_galleries" = "no"; then
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable non-internal gallery build])
+    else
+        AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
+    fi
+else
+    if test $_os != iOS -a $_os != Android; then
+        AC_MSG_RESULT([internal src images for desktop])
+    else
+        WITH_GALLERY_BUILD=
+        AC_MSG_RESULT([disable src image build])
+    fi
+fi
+AC_SUBST(WITH_GALLERY_BUILD)
+
+dnl ===================================================================
+dnl  Checks if ccache is available
+dnl ===================================================================
+CCACHE_DEPEND_MODE=
+if test "$enable_ccache" = "no"; then
+    CCACHE=""
+elif test -n "$enable_ccache" -o \( "$enable_ccache" = "" -a "$enable_icecream" != "yes" \); then
+    case "%$CC%$CXX%" in
+    # If $CC and/or $CXX already contain "ccache" (possibly suffixed with some version number etc),
+    # assume that's good then
+    *%ccache[[-_' ']]*|*/ccache[[-_' ']]*)
+        AC_MSG_NOTICE([ccache seems to be included in a pre-defined CC and/or CXX])
+        CCACHE_DEPEND_MODE=1
+        ;;
+    *)
+        # try to use our own ccache if it is available and CCACHE was not already defined
+        if test -z "$CCACHE"; then
+            if test "$_os" = "WINNT"; then
+                ccache_ext=.exe # e.g. openssl build needs ccache.exe, not just ccache
+            fi
+            if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/ccache$ccache_ext" ; then
+                CCACHE="$LODE_HOME/opt/bin/ccache$ccache_ext"
+            elif test -x "/opt/lo/bin/ccache$ccache_ext"; then
+                CCACHE="/opt/lo/bin/ccache$ccache_ext"
+            fi
+        fi
+        AC_PATH_PROG([CCACHE],[ccache],[not found])
+        if test "$CCACHE" != "not found" -a "$_os" = "WINNT"; then
+            CCACHE=`win_short_path_for_make "$CCACHE"`
+            # check that it has MSVC support (it should recognize it in CCACHE_COMPILERTYPE)
+            rm -f conftest.txt
+            AC_MSG_CHECKING([whether $CCACHE has MSVC support])
+            CCACHE_COMPILERTYPE=cl CCACHE_LOGFILE=conftest.txt $CCACHE echo >/dev/null 2>/dev/null
+            if grep -q 'Config: (environment) compiler_type = cl' conftest.txt; then
+                AC_MSG_RESULT(yes)
+            else
+                AC_MSG_RESULT(no)
+                CCACHE="not found"
+            fi
+            rm -f conftest.txt
+        fi
+        if test "$CCACHE" = "not found" -a "$_os" = "WINNT"; then
+            # on windows/VC perhaps sccache is around?
+            case "%$CC%$CXX%" in
+            # If $CC and/or $CXX already contain "sccache" (possibly suffixed with some version number etc),
+            # assume that's good then
+            *%sccache[[-_' ']]*|*/sccache[[-_' ']]*)
+                AC_MSG_NOTICE([sccache seems to be included in a pre-defined CC and/or CXX])
+                CCACHE_DEPEND_MODE=1
+                SCCACHE=1
+                ;;
+            *)
+                # for sharing code below, reuse CCACHE env var
+                AC_PATH_PROG([CCACHE],[sccache],[not found])
+                if test "$CCACHE" != "not found"; then
+                    CCACHE=`win_short_path_for_make "$CCACHE"`
+                    SCCACHE=1
+                    CCACHE_DEPEND_MODE=1
+                fi
+                ;;
+            esac
+        fi
+        if test "$CCACHE" = "not found"; then
+            CCACHE=""
+        fi
+        if test -n "$CCACHE" -a -z "$SCCACHE"; then
+            CCACHE_DEPEND_MODE=1
+            # Need to check for ccache version: otherwise prevents
+            # caching of the results (like "-x objective-c++" for Mac)
+            if test $_os = Darwin -o $_os = iOS; then
+                # Check ccache version
+                AC_MSG_CHECKING([whether version of ccache is suitable])
+                CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'`
+                CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+                if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then
+                    AC_MSG_RESULT([yes, $CCACHE_VERSION])
+                else
+                    AC_MSG_RESULT([no, $CCACHE_VERSION])
+                    CCACHE=""
+                    CCACHE_DEPEND_MODE=
+                fi
+            fi
+        fi
+        ;;
+    esac
+else
+    CCACHE=""
+fi
+if test "$enable_ccache" = "nodepend"; then
+    CCACHE_DEPEND_MODE=""
+fi
+AC_SUBST(CCACHE_DEPEND_MODE)
+
+# sccache defaults are good enough
+if test "$CCACHE" != "" -a -z "$SCCACHE"; then
+    # e.g. (/home/rene/.config/ccache/ccache.conf) max_size = 20.0G
+    # or (...) max_size = 20.0 G
+    # -p works with both 4.2 and 4.4
+    ccache_size_msg=$([$CCACHE -p | $AWK /max_size/'{ print $4 $5 }' | sed -e 's/\.[0-9]*//'])
+    ccache_size=$(echo "$ccache_size_msg" | grep "G" | sed -e 's/G.*$//')
+    if test "$ccache_size" = ""; then
+        ccache_size=$(echo "$ccache_size_msg" | grep "M" | sed -e 's/\ M.*$//')
+        if test "$ccache_size" = ""; then
+            ccache_size=0
+        fi
+        # we could not determine the size or it was less than 1GB -> disable auto-ccache
+        if test $ccache_size -lt 1024; then
+            CCACHE=""
+            AC_MSG_WARN([ccache's cache size is less than 1GB using it is counter-productive: Disabling auto-ccache detection])
+            add_warning "ccache's cache size is less than 1GB using it is counter-productive: auto-ccache detection disabled"
+        else
+            # warn that ccache may be too small for debug build
+            AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
+            add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
+        fi
+    else
+        if test $ccache_size -lt 5; then
+            #warn that ccache may be too small for debug build
+            AC_MSG_WARN([ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build])
+            add_warning "ccache's cache size is less than 5GB using it may be counter-productive for debug or symbol-enabled build"
+        fi
+    fi
+fi
+
+ENABLE_Z7_DEBUG=
+if test "$enable_z7_debug" != no; then
+    if test "$enable_z7_debug" = yes -o -n "$CCACHE"; then
+        ENABLE_Z7_DEBUG=TRUE
+    fi
+else
+    AC_MSG_WARN([ccache will not work with --disable-z7-debug])
+    add_warning "ccache will not work with --disable-z7-debug"
+fi
+AC_SUBST(ENABLE_Z7_DEBUG)
+
+dnl ===================================================================
+dnl  Checks for C compiler,
+dnl  The check for the C++ compiler is later on.
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+    GCC_HOME_SET="true"
+    AC_MSG_CHECKING([gcc home])
+    if test -z "$with_gcc_home"; then
+        if test "$enable_icecream" = "yes"; then
+            if test -d "/usr/lib/icecc/bin"; then
+                GCC_HOME="/usr/lib/icecc/"
+            elif test -d "/usr/libexec/icecc/bin"; then
+                GCC_HOME="/usr/libexec/icecc/"
+            elif test -d "/opt/icecream/bin"; then
+                GCC_HOME="/opt/icecream/"
+            else
+                AC_MSG_ERROR([Could not figure out the location of icecream GCC wrappers, manually use --with-gcc-home])
+
+            fi
+        else
+            GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,`
+            GCC_HOME_SET="false"
+        fi
+    else
+        GCC_HOME="$with_gcc_home"
+    fi
+    AC_MSG_RESULT($GCC_HOME)
+    AC_SUBST(GCC_HOME)
+
+    if test "$GCC_HOME_SET" = "true"; then
+        if test -z "$CC"; then
+            CC="$GCC_HOME/bin/gcc"
+            CC_BASE="gcc"
+        fi
+        if test -z "$CXX"; then
+            CXX="$GCC_HOME/bin/g++"
+            CXX_BASE="g++"
+        fi
+    fi
+fi
+
+COMPATH=`dirname "$CC"`
+if test "$COMPATH" = "."; then
+    AC_PATH_PROGS(COMPATH, $CC)
+    dnl double square bracket to get single because of M4 quote...
+    COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`
+fi
+COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`
+
+dnl ===================================================================
+dnl Java support
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build with Java support])
+if test "$with_java" != "no"; then
+    if test "$DISABLE_SCRIPTING" = TRUE; then
+        AC_MSG_RESULT([no, overridden by --disable-scripting])
+        ENABLE_JAVA=""
+        with_java=no
+    else
+        AC_MSG_RESULT([yes])
+        ENABLE_JAVA="TRUE"
+        AC_DEFINE(HAVE_FEATURE_JAVA)
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_JAVA=""
+fi
+
+AC_SUBST(ENABLE_JAVA)
+
+dnl ENABLE_JAVA="TRUE" if we want there to be *run-time* (and build-time) support for Java
+
+dnl ENABLE_JAVA="" indicate no Java support at all
+
+dnl ===================================================================
+dnl Check macOS SDK and compiler
+dnl ===================================================================
+
+if test $_os = Darwin; then
+
+    # The SDK in the currently selected Xcode should be found.
+
+    AC_MSG_CHECKING([what macOS SDK to use])
+    # XCode only ships with a single SDK for a while now, and using older SDKs alongside is not
+    # really supported anymore, instead you'd use different copies of Xcode, each with their own
+    # SDK, and thus xcrun will pick the SDK that matches the currently selected Xcode version
+    # also restricting the SDK version to "known good" versions doesn't seem necessary anymore, the
+    # problems that existed in the PPC days with target versions not being respected or random
+    # failures seems to be a thing of the past or rather: limiting either the Xcode version or the
+    # SDK version is enough, no need to do both...
+    MACOSX_SDK_PATH=`xcrun --sdk macosx --show-sdk-path 2> /dev/null`
+    if test ! -d "$MACOSX_SDK_PATH"; then
+        AC_MSG_ERROR([Could not find an appropriate macOS SDK])
+    fi
+    macosx_sdk=`xcodebuild -version -sdk "$MACOSX_SDK_PATH" SDKVersion`
+    MACOSX_SDK_BUILD_VERSION=$(xcodebuild -version -sdk "$MACOSX_SDK_PATH" ProductBuildVersion)
+    # format changed between 10.9 and 10.10 - up to 10.9 it was just four digits (1090), starting
+    # with macOS 10.10 it was switched to account for x.y.z with six digits, 10.10 is 101000,
+    # 10.10.2 is 101002
+    # we don't target the lower versions anymore, so it doesn't matter that we don't generate the
+    # correct version in case such an old SDK is specified, it will be rejected later anyway
+    MACOSX_SDK_VERSION=$(echo $macosx_sdk | $AWK -F. '{ print $1*10000+$2*100+$3 }')
+    if test $MACOSX_SDK_VERSION -lt 101500; then
+        AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported, lowest supported version is 10.15])
+    fi
+    if test "$host_cpu" = arm64 -a $MACOSX_SDK_VERSION -lt 110000; then
+        AC_MSG_ERROR([macOS SDK $macosx_sdk is not supported for Apple Silicon (need at least 11.0)])
+    fi
+    AC_MSG_RESULT([macOS SDK $macosx_sdk at $MACOSX_SDK_PATH])
+
+    AC_MSG_CHECKING([what minimum version of macOS to require])
+    if test "$with_macosx_version_min_required" = "" ; then
+        if test "$host_cpu" = x86_64; then
+            with_macosx_version_min_required="10.15";
+        else
+            with_macosx_version_min_required="11.0";
+        fi
+    fi
+    # see same notes about MACOSX_SDK_VERSION above
+    MAC_OS_X_VERSION_MIN_REQUIRED=$(echo $with_macosx_version_min_required | $AWK -F. '{ print $1*10000+$2*100+$3 }')
+    if test $MAC_OS_X_VERSION_MIN_REQUIRED -lt 101500; then
+        AC_MSG_ERROR([with-macosx-version-min-required $with_macosx_version_min_required is not a supported value, minimum supported version is 10.15])
+    fi
+    AC_MSG_RESULT([$with_macosx_version_min_required])
+
+    AC_MSG_CHECKING([that macosx-version-min-required is coherent with macos-with-sdk])
+    if test $MAC_OS_X_VERSION_MIN_REQUIRED -gt $MACOSX_SDK_VERSION; then
+        AC_MSG_ERROR([the version minimum required ($with_macosx_version_min_required) cannot be greater than the sdk level ($macosx_sdk)])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+
+    # export this so that "xcrun" invocations later return matching values
+    DEVELOPER_DIR="${MACOSX_SDK_PATH%/SDKs*}"
+    DEVELOPER_DIR="${DEVELOPER_DIR%/Platforms*}"
+    export DEVELOPER_DIR
+    FRAMEWORKSHOME="$MACOSX_SDK_PATH/System/Library/Frameworks"
+    MACOSX_DEPLOYMENT_TARGET="$with_macosx_version_min_required"
+
+    AC_MSG_CHECKING([whether Xcode is new enough])
+    my_xcode_ver1=$(xcrun xcodebuild -version | head -n 1)
+    my_xcode_ver2=${my_xcode_ver1#Xcode }
+    my_xcode_ver3=$(printf %s "$my_xcode_ver2" | $AWK -F. '{ print $1*100+($2<100?$2:99) }')
+    if test "$my_xcode_ver3" -ge 1205; then
+        AC_MSG_RESULT([yes ($my_xcode_ver2)])
+    else
+        AC_MSG_ERROR(["$my_xcode_ver1" is too old or unrecognized, must be at least Xcode 12.5])
+    fi
+
+    my_xcode_ver1=$(xcrun xcodebuild -version | tail -n 1)
+    MACOSX_XCODE_BUILD_VERSION=${my_xcode_ver1#Build version }
+
+    LIBTOOL=/usr/bin/libtool
+    INSTALL_NAME_TOOL=install_name_tool
+    if test -z "$save_CC"; then
+        stdlib=-stdlib=libc++
+
+        AC_MSG_CHECKING([what C compiler to use])
+        CC="`xcrun -find clang`"
+        CC_BASE=`first_arg_basename "$CC"`
+        if test "$host_cpu" = x86_64; then
+            CC+=" -target x86_64-apple-macos"
+        else
+            CC+=" -target arm64-apple-macos"
+        fi
+        CC+=" -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
+        AC_MSG_RESULT([$CC])
+
+        AC_MSG_CHECKING([what C++ compiler to use])
+        CXX="`xcrun -find clang++`"
+        CXX_BASE=`first_arg_basename "$CXX"`
+        if test "$host_cpu" = x86_64; then
+            CXX+=" -target x86_64-apple-macos"
+        else
+            CXX+=" -target arm64-apple-macos"
+        fi
+        CXX+=" $stdlib -mmacosx-version-min=$with_macosx_version_min_required -isysroot $MACOSX_SDK_PATH"
+        AC_MSG_RESULT([$CXX])
+
+        INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
+        AR=`xcrun -find ar`
+        NM=`xcrun -find nm`
+        STRIP=`xcrun -find strip`
+        LIBTOOL=`xcrun -find libtool`
+        RANLIB=`xcrun -find ranlib`
+    fi
+
+    AC_MSG_CHECKING([whether to do code signing])
+
+    if test -z "$enable_macosx_code_signing" -o "$enable_macosx_code_signing" == "no" ; then
+        AC_MSG_RESULT([no])
+    else
+        if test "$enable_macosx_code_signing" = yes; then
+            # By default use the first suitable certificate (?).
+
+            # https://stackoverflow.com/questions/13196291/difference-between-mac-developer-and-3rd-party-mac-developer-application
+            # says that the "Mac Developer" certificate is useful just for self-testing. For distribution
+            # outside the Mac App Store, use the "Developer ID Application" one, and for distribution in
+            # the App Store, the "3rd Party Mac Developer" one. I think it works best to the
+            # "Developer ID Application" one.
+            identity="Developer ID Application:"
+        else
+            identity=$enable_macosx_code_signing
+        fi
+        identity=`security find-identity -p codesigning -v 2>/dev/null | $AWK "/$identity/{print \\$2; exit}"`
+        if test -n "$identity"; then
+            MACOSX_CODESIGNING_IDENTITY=$identity
+            pretty_name=`security find-identity -p codesigning -v | grep "$MACOSX_CODESIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
+            AC_MSG_RESULT([yes, using the identity $MACOSX_CODESIGNING_IDENTITY for $pretty_name])
+        else
+            AC_MSG_ERROR([cannot determine identity to use])
+        fi
+    fi
+
+    AC_MSG_CHECKING([whether to create a Mac App Store package])
+
+    if test -z "$enable_macosx_package_signing" || test "$enable_macosx_package_signing" == no; then
+        AC_MSG_RESULT([no])
+    elif test -z "$MACOSX_CODESIGNING_IDENTITY"; then
+        AC_MSG_ERROR([You forgot --enable-macosx-code-signing])
+    else
+        if test "$enable_macosx_package_signing" = yes; then
+            # By default use the first suitable certificate.
+            # It should be a "3rd Party Mac Developer Installer" one
+            identity="3rd Party Mac Developer Installer:"
+        else
+            identity=$enable_macosx_package_signing
+        fi
+        identity=`security find-identity -v 2>/dev/null | $AWK "/$identity/ {print \\$2; exit}"`
+        if test -n "$identity"; then
+            MACOSX_PACKAGE_SIGNING_IDENTITY=$identity
+            pretty_name=`security find-identity -v | grep "$MACOSX_PACKAGE_SIGNING_IDENTITY" | sed -e 's/^[[^"]]*"//' -e 's/"//'`
+            AC_MSG_RESULT([yes, using the identity $MACOSX_PACKAGE_SIGNING_IDENTITY for $pretty_name])
+        else
+            AC_MSG_ERROR([Could not find any suitable '3rd Party Mac Developer Installer' certificate])
+        fi
+    fi
+
+    if test -n "$MACOSX_CODESIGNING_IDENTITY" -a -n "$MACOSX_PACKAGE_SIGNING_IDENTITY" -a "$MACOSX_CODESIGNING_IDENTITY" = "$MACOSX_PACKAGE_SIGNING_IDENTITY"; then
+        AC_MSG_ERROR([You should not use the same identity for code and package signing])
+    fi
+
+    AC_MSG_CHECKING([whether to sandbox the application])
+
+    if test -n "$ENABLE_JAVA" -a "$enable_macosx_sandbox" = yes; then
+        AC_MSG_ERROR([macOS sandboxing (actually App Store rules) disallows use of Java])
+    elif test "$enable_macosx_sandbox" = yes; then
+        ENABLE_MACOSX_SANDBOX=TRUE
+        AC_DEFINE(HAVE_FEATURE_MACOSX_SANDBOX)
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([what macOS app bundle identifier to use])
+    MACOSX_BUNDLE_IDENTIFIER=$with_macosx_bundle_identifier
+    AC_MSG_RESULT([$MACOSX_BUNDLE_IDENTIFIER])
+
+    if test -n "$with_macosx_provisioning_profile" ; then
+        if test ! -f "$with_macosx_provisioning_profile"; then
+            AC_MSG_ERROR([provisioning profile not found at $with_macosx_provisioning_profile])
+        else
+            MACOSX_PROVISIONING_PROFILE=$with_macosx_provisioning_profile
+            MACOSX_PROVISIONING_INFO=$([security cms -D -i "$MACOSX_PROVISIONING_PROFILE" | \
+                xmllint --xpath "//key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier'] \
+                    | //key[.='com.apple.application-identifier' or .='com.apple.developer.team-identifier']/following-sibling::string[1]" - | \
+                sed -e 's#><#>\n\t<#g' -e 's#^#\t#'])
+        fi
+    fi
+fi
+AC_SUBST(MACOSX_SDK_PATH)
+AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
+AC_SUBST(MAC_OS_X_VERSION_MIN_REQUIRED)
+AC_SUBST(INSTALL_NAME_TOOL)
+AC_SUBST(LIBTOOL) # Note that the macOS libtool command is unrelated to GNU libtool
+AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
+AC_SUBST(MACOSX_PACKAGE_SIGNING_IDENTITY)
+AC_SUBST(ENABLE_MACOSX_SANDBOX)
+AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
+AC_SUBST(MACOSX_PROVISIONING_INFO)
+AC_SUBST(MACOSX_PROVISIONING_PROFILE)
+AC_SUBST(MACOSX_SDK_BUILD_VERSION)
+AC_SUBST(MACOSX_XCODE_BUILD_VERSION)
+
+dnl ===================================================================
+dnl Check iOS SDK and compiler
+dnl ===================================================================
+
+if test $_os = iOS; then
+    AC_MSG_CHECKING([what iOS SDK to use])
+
+    if test "$enable_ios_simulator" = "yes"; then
+        platformlc=iphonesimulator
+        versionmin=-mios-simulator-version-min=14.5
+    else
+        platformlc=iphoneos
+        versionmin=-miphoneos-version-min=14.5
+    fi
+
+    sysroot=`xcrun --sdk $platformlc --show-sdk-path`
+
+    if ! test -d "$sysroot"; then
+        AC_MSG_ERROR([Could not find iOS SDK $sysroot])
+    fi
+
+    AC_MSG_RESULT($sysroot)
+
+    stdlib="-stdlib=libc++"
+
+    AC_MSG_CHECKING([what C compiler to use])
+    CC="`xcrun -find clang`"
+    CC_BASE=`first_arg_basename "$CC"`
+    CC+=" -arch $host_cpu_for_clang -isysroot $sysroot $versionmin"
+    AC_MSG_RESULT([$CC])
+
+    AC_MSG_CHECKING([what C++ compiler to use])
+    CXX="`xcrun -find clang++`"
+    CXX_BASE=`first_arg_basename "$CXX"`
+    CXX+=" -arch $host_cpu_for_clang $stdlib -isysroot $sysroot $versionmin"
+    AC_MSG_RESULT([$CXX])
+
+    INSTALL_NAME_TOOL=`xcrun -find install_name_tool`
+    AR=`xcrun -find ar`
+    NM=`xcrun -find nm`
+    STRIP=`xcrun -find strip`
+    LIBTOOL=`xcrun -find libtool`
+    RANLIB=`xcrun -find ranlib`
+fi
+
+AC_MSG_CHECKING([whether to treat the installation as read-only])
+
+if test $_os = Darwin; then
+    enable_readonly_installset=yes
+elif test "$enable_extensions" != yes; then
+    enable_readonly_installset=yes
+fi
+if test "$enable_readonly_installset" = yes; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(HAVE_FEATURE_READONLY_INSTALLSET)
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Structure of install set
+dnl ===================================================================
+
+if test $_os = Darwin; then
+    LIBO_BIN_FOLDER=MacOS
+    LIBO_ETC_FOLDER=Resources
+    LIBO_LIBEXEC_FOLDER=MacOS
+    LIBO_LIB_FOLDER=Frameworks
+    LIBO_LIB_PYUNO_FOLDER=Resources
+    LIBO_SHARE_FOLDER=Resources
+    LIBO_SHARE_HELP_FOLDER=Resources/help
+    LIBO_SHARE_JAVA_FOLDER=Resources/java
+    LIBO_SHARE_PRESETS_FOLDER=Resources/presets
+    LIBO_SHARE_READMES_FOLDER=Resources/readmes
+    LIBO_SHARE_RESOURCE_FOLDER=Resources/resource
+    LIBO_SHARE_SHELL_FOLDER=Resources/shell
+    LIBO_URE_BIN_FOLDER=MacOS
+    LIBO_URE_ETC_FOLDER=Resources/ure/etc
+    LIBO_URE_LIB_FOLDER=Frameworks
+    LIBO_URE_MISC_FOLDER=Resources/ure/share/misc
+    LIBO_URE_SHARE_JAVA_FOLDER=Resources/java
+elif test $_os = WINNT; then
+    LIBO_BIN_FOLDER=program
+    LIBO_ETC_FOLDER=program
+    LIBO_LIBEXEC_FOLDER=program
+    LIBO_LIB_FOLDER=program
+    LIBO_LIB_PYUNO_FOLDER=program
+    LIBO_SHARE_FOLDER=share
+    LIBO_SHARE_HELP_FOLDER=help
+    LIBO_SHARE_JAVA_FOLDER=program/classes
+    LIBO_SHARE_PRESETS_FOLDER=presets
+    LIBO_SHARE_READMES_FOLDER=readmes
+    LIBO_SHARE_RESOURCE_FOLDER=program/resource
+    LIBO_SHARE_SHELL_FOLDER=program/shell
+    LIBO_URE_BIN_FOLDER=program
+    LIBO_URE_ETC_FOLDER=program
+    LIBO_URE_LIB_FOLDER=program
+    LIBO_URE_MISC_FOLDER=program
+    LIBO_URE_SHARE_JAVA_FOLDER=program/classes
+else
+    LIBO_BIN_FOLDER=program
+    LIBO_ETC_FOLDER=program
+    LIBO_LIBEXEC_FOLDER=program
+    LIBO_LIB_FOLDER=program
+    LIBO_LIB_PYUNO_FOLDER=program
+    LIBO_SHARE_FOLDER=share
+    LIBO_SHARE_HELP_FOLDER=help
+    LIBO_SHARE_JAVA_FOLDER=program/classes
+    LIBO_SHARE_PRESETS_FOLDER=presets
+    LIBO_SHARE_READMES_FOLDER=readmes
+    if test "$enable_fuzzers" != yes; then
+        LIBO_SHARE_RESOURCE_FOLDER=program/resource
+    else
+        LIBO_SHARE_RESOURCE_FOLDER=resource
+    fi
+    LIBO_SHARE_SHELL_FOLDER=program/shell
+    LIBO_URE_BIN_FOLDER=program
+    LIBO_URE_ETC_FOLDER=program
+    LIBO_URE_LIB_FOLDER=program
+    LIBO_URE_MISC_FOLDER=program
+    LIBO_URE_SHARE_JAVA_FOLDER=program/classes
+fi
+AC_DEFINE_UNQUOTED(LIBO_BIN_FOLDER,"$LIBO_BIN_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_ETC_FOLDER,"$LIBO_ETC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIBEXEC_FOLDER,"$LIBO_LIBEXEC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIB_FOLDER,"$LIBO_LIB_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_LIB_PYUNO_FOLDER,"$LIBO_LIB_PYUNO_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_FOLDER,"$LIBO_SHARE_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_HELP_FOLDER,"$LIBO_SHARE_HELP_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_JAVA_FOLDER,"$LIBO_SHARE_JAVA_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_PRESETS_FOLDER,"$LIBO_SHARE_PRESETS_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_RESOURCE_FOLDER,"$LIBO_SHARE_RESOURCE_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_SHARE_SHELL_FOLDER,"$LIBO_SHARE_SHELL_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_BIN_FOLDER,"$LIBO_URE_BIN_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_ETC_FOLDER,"$LIBO_URE_ETC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_LIB_FOLDER,"$LIBO_URE_LIB_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_MISC_FOLDER,"$LIBO_URE_MISC_FOLDER")
+AC_DEFINE_UNQUOTED(LIBO_URE_SHARE_JAVA_FOLDER,"$LIBO_URE_SHARE_JAVA_FOLDER")
+
+# Not all of them needed in config_host.mk, add more if need arises
+AC_SUBST(LIBO_BIN_FOLDER)
+AC_SUBST(LIBO_ETC_FOLDER)
+AC_SUBST(LIBO_LIB_FOLDER)
+AC_SUBST(LIBO_LIB_PYUNO_FOLDER)
+AC_SUBST(LIBO_SHARE_FOLDER)
+AC_SUBST(LIBO_SHARE_HELP_FOLDER)
+AC_SUBST(LIBO_SHARE_JAVA_FOLDER)
+AC_SUBST(LIBO_SHARE_PRESETS_FOLDER)
+AC_SUBST(LIBO_SHARE_READMES_FOLDER)
+AC_SUBST(LIBO_SHARE_RESOURCE_FOLDER)
+AC_SUBST(LIBO_URE_BIN_FOLDER)
+AC_SUBST(LIBO_URE_ETC_FOLDER)
+AC_SUBST(LIBO_URE_LIB_FOLDER)
+AC_SUBST(LIBO_URE_MISC_FOLDER)
+AC_SUBST(LIBO_URE_SHARE_JAVA_FOLDER)
+
+dnl ===================================================================
+dnl Windows specific tests and stuff
+dnl ===================================================================
+
+reg_get_value()
+{
+    # Return value: $regvalue
+    unset regvalue
+
+    if test "$build_os" = "wsl"; then
+        regvalue=$($WSL_LO_HELPER --read-registry $1 "$2" 2>/dev/null)
+        return
+    fi
+
+    local _regentry="/proc/registry${1}/${2}"
+    if test -f "$_regentry"; then
+        # Stop bash complaining about \0 bytes in input, as it can't handle them.
+        # Registry keys read via /proc/registry* are always \0 terminated!
+        local _regvalue=$(tr -d '\0' < "$_regentry")
+        if test $? -eq 0; then
+            regvalue=$_regvalue
+        fi
+    fi
+}
+
+# Get a value from the 32-bit side of the Registry
+reg_get_value_32()
+{
+    reg_get_value "32" "$1"
+}
+
+# Get a value from the 64-bit side of the Registry
+reg_get_value_64()
+{
+    reg_get_value "64" "$1"
+}
+
+reg_list_values()
+{
+    # Return value: $reglist
+    unset reglist
+
+    if test "$build_os" = "wsl"; then
+        reglist=$($WSL_LO_HELPER --list-registry $1 "$2" 2>/dev/null | tr -d '\r')
+        return
+    fi
+
+    reglist=$(ls "/proc/registry${1}/${2}")
+}
+
+# List values from the 32-bit side of the Registry
+reg_list_values_32()
+{
+    reg_list_values "32" "$1"
+}
+
+# List values from the 64-bit side of the Registry
+reg_list_values_64()
+{
+    reg_list_values "64" "$1"
+}
+
+case "$host_os" in
+cygwin*|wsl*)
+    COM=MSC
+    OS=WNT
+    RTL_OS=Windows
+    if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+        P_SEP=";"
+    else
+        P_SEP=:
+    fi
+    case "$host_cpu" in
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=windows_x86_64
+        WINDOWS_X64=1
+        SCPDEFS="$SCPDEFS -DWINDOWS_X64"
+        WIN_HOST_ARCH="x64"
+        WIN_MULTI_ARCH="x86"
+        WIN_HOST_BITS=64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=windows_x86
+        WIN_HOST_ARCH="x86"
+        WIN_HOST_BITS=32
+        WIN_OTHER_ARCH="x64"
+        ;;
+    aarch64)
+        CPUNAME=AARCH64
+        RTL_ARCH=AARCH64
+        PLATFORMID=windows_aarch64
+        WINDOWS_X64=1
+        SCPDEFS="$SCPDEFS -DWINDOWS_AARCH64"
+        WIN_HOST_ARCH="arm64"
+        WIN_HOST_BITS=64
+        with_ucrt_dir=no
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+
+    case "$build_cpu" in
+    x86_64) WIN_BUILD_ARCH="x64" ;;
+    i*86) WIN_BUILD_ARCH="x86" ;;
+    aarch64) WIN_BUILD_ARCH="arm64" ;;
+    *)
+        AC_MSG_ERROR([Unsupported build_cpu $build_cpu for host_os $host_os])
+        ;;
+    esac
+
+    SCPDEFS="$SCPDEFS -D_MSC_VER"
+    ;;
+esac
+
+# multi-arch is an arch, which can execute on the host (x86 on x64), while
+# other-arch won't, but wouldn't break the build (x64 on x86).
+if test -n "$WIN_MULTI_ARCH" -a -n "$WIN_OTHER_ARCH"; then
+    AC_MSG_ERROR([Broken configure.ac file: can't have set \$WIN_MULTI_ARCH and $WIN_OTHER_ARCH])
+fi
+
+
+if test "$build_cpu" != "$host_cpu" -o "$DISABLE_DYNLOADING" = TRUE; then
+    # To allow building Windows multi-arch releases without cross-tooling
+    if test "$DISABLE_DYNLOADING" = TRUE -o \( -z "$WIN_MULTI_ARCH" -a -z "$WIN_OTHER_ARCH" \); then
+        cross_compiling="yes"
+    fi
+fi
+
+if test "$cross_compiling" = "yes"; then
+    export CROSS_COMPILING=TRUE
+    if test "$enable_dynamic_loading" != yes -a "$enable_wasm_strip" = yes; then
+        ENABLE_WASM_STRIP=TRUE
+    fi
+    if test "$_os" = "Emscripten"; then
+        if test "$with_main_module" = "calc"; then
+            ENABLE_WASM_STRIP_WRITER=TRUE
+        elif test "$with_main_module" = "writer"; then
+            ENABLE_WASM_STRIP_CALC=TRUE
+        fi
+    fi
+else
+    CROSS_COMPILING=
+    BUILD_TYPE="$BUILD_TYPE NATIVE"
+fi
+AC_SUBST(CROSS_COMPILING)
+AC_SUBST(ENABLE_WASM_STRIP)
+AC_SUBST(ENABLE_WASM_STRIP_WRITER)
+AC_SUBST(ENABLE_WASM_STRIP_CALC)
+
+ISYSTEM=-I
+AC_SUBST(ISYSTEM)
+
+dnl ===================================================================
+dnl  Check which Visual Studio compiler is used
+dnl ===================================================================
+
+map_vs_year_to_version()
+{
+    # Return value: $vsversion
+
+    unset vsversion
+
+    case $1 in
+    2019)
+        vsversion=16;;
+    2022)
+        vsversion=17;;
+    2022preview)
+        vsversion=17.7;;
+    *)
+        AC_MSG_ERROR([Assertion failure - invalid argument "$1" to map_vs_year_to_version()]);;
+    esac
+}
+
+vs_versions_to_check()
+{
+    # Args: $1 (optional) : versions to check, in the order of preference
+    # Return value: $vsversions
+
+    unset vsversions
+
+    if test -n "$1"; then
+        map_vs_year_to_version "$1"
+        vsversions=$vsversion
+    else
+        # Default version is 2019
+        vsversions="16"
+    fi
+}
+
+win_get_env_from_vsdevcmdbat()
+{
+    local WRAPPERBATCHFILEPATH="`mktemp -t wrpXXXXXX.bat`"
+    printf '@set VSCMD_SKIP_SENDTELEMETRY=1\r\n' > $WRAPPERBATCHFILEPATH
+    printf '@call "%s/../Common7/Tools/VsDevCmd.bat" /no_logo\r\n' "$(cygpath -w $VC_PRODUCT_DIR)" >> $WRAPPERBATCHFILEPATH
+    # use 'echo.%ENV%' syntax (instead of 'echo %ENV%') to avoid outputting "ECHO is off." in case when ENV is empty or a space
+    printf '@setlocal\r\n@echo.%%%s%%\r\n@endlocal\r\n' "$1" >> $WRAPPERBATCHFILEPATH
+    local result
+    if test "$build_os" = "wsl"; then
+        result=$(cd /mnt/c && cmd.exe /c $(wslpath -w $WRAPPERBATCHFILEPATH) | tr -d '\r')
+    else
+        chmod +x $WRAPPERBATCHFILEPATH
+        result=$("$WRAPPERBATCHFILEPATH" | tr -d '\r')
+    fi
+    rm -f $WRAPPERBATCHFILEPATH
+    printf '%s' "$result"
+}
+
+find_ucrt()
+{
+    reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/InstallationFolder"
+    if test -n "$regvalue"; then
+        PathFormat "$regvalue"
+        UCRTSDKDIR=$formatted_path_unix
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v10.0/ProductVersion"
+        UCRTVERSION=$regvalue
+        # Rest if not exist
+        if ! test -d "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"; then
+          UCRTSDKDIR=
+        fi
+    fi
+    if test -z "$UCRTSDKDIR"; then
+        ide_env_dir="$VC_PRODUCT_DIR/../Common7/Tools/"
+        ide_env_file="${ide_env_dir}VsDevCmd.bat"
+        if test -f "$ide_env_file"; then
+            PathFormat "$(win_get_env_from_vsdevcmdbat UniversalCRTSdkDir)"
+            UCRTSDKDIR=$formatted_path
+            UCRTVERSION=$(win_get_env_from_vsdevcmdbat UCRTVersion)
+            dnl Hack needed at least by tml:
+            if test "$UCRTVERSION" = 10.0.15063.0 \
+                -a ! -f "${UCRTSDKDIR}Include/10.0.15063.0/um/sqlext.h" \
+                -a -f "${UCRTSDKDIR}Include/10.0.14393.0/um/sqlext.h"
+            then
+                UCRTVERSION=10.0.14393.0
+            fi
+        else
+          AC_MSG_ERROR([No UCRT found])
+        fi
+    fi
+}
+
+find_msvc()
+{
+    # Find Visual C++
+    # Args: $1 (optional) : The VS version year
+    # Return values: $vctest, $vcyear, $vctoolset, $vcnumwithdot, $vcbuildnumber
+
+    unset vctest vctoolset vcnumwithdot vcbuildnumber
+
+    vs_versions_to_check "$1"
+    if test "$build_os" = wsl; then
+        vswhere="$PROGRAMFILESX86"
+        if test -z "$vswhere"; then
+            vswhere="c:\\Program Files (x86)"
+        fi
+    else
+        vswhere="$(perl -e 'print $ENV{"ProgramFiles(x86)"}')"
+    fi
+    vswhere+="\\Microsoft Visual Studio\\Installer\\vswhere.exe"
+    PathFormat "$vswhere"
+    vswhere=$formatted_path_unix
+    for ver in $vsversions; do
+        vswhereoutput=`$vswhere -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        if test -z "$vswhereoutput"; then
+            vswhereoutput=`$vswhere -prerelease -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        fi
+        # Fall back to all MS products (this includes VC++ Build Tools)
+        if ! test -n "$vswhereoutput"; then
+            AC_MSG_CHECKING([VC++ Build Tools and similar])
+            vswhereoutput=`$vswhere -products \* -version "@<:@ $ver , $(expr ${ver%%.*} + 1) @:}@" -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath | head -1`
+        fi
+        if test -n "$vswhereoutput"; then
+            PathFormat "$vswhereoutput"
+            vctest=$formatted_path_unix
+            break
+        fi
+    done
+
+    if test -n "$vctest"; then
+        vcnumwithdot="$ver"
+        if test "${vcnumwithdot%%.*}" = "$vcnumwithdot"; then
+            vcnumwithdot=$vcnumwithdot.0
+        fi
+        case "$vcnumwithdot" in
+        16.0)
+            vcyear=2019
+            vctoolset=v142
+            ;;
+        17.0 | 17.7)
+            vcyear=2022
+            vctoolset=v143
+            ;;
+        esac
+        vcbuildnumber=`ls $vctest/VC/Tools/MSVC -A1r | head -1`
+
+    fi
+}
+
+test_cl_exe()
+{
+    AC_MSG_CHECKING([$1 compiler])
+
+    CL_EXE_PATH="$2/cl.exe"
+
+    if test ! -f "$CL_EXE_PATH"; then
+        if test "$1" = "multi-arch"; then
+            AC_MSG_WARN([no compiler (cl.exe) in $2])
+            return 1
+        else
+            AC_MSG_ERROR([no compiler (cl.exe) in $2])
+        fi
+    fi
+
+    dnl ===========================================================
+    dnl  Check for the corresponding mspdb*.dll
+    dnl ===========================================================
+
+    # MSVC 15.0 has libraries from 14.0?
+    mspdbnum="140"
+
+    if test ! -e "$2/mspdb${mspdbnum}.dll"; then
+        AC_MSG_ERROR([No mspdb${mspdbnum}.dll in $2, Visual Studio installation broken?])
+    fi
+
+    # The compiles has to find its shared libraries
+    OLD_PATH="$PATH"
+    TEMP_PATH=`cygpath -d "$2"`
+    PATH="`cygpath -u "$TEMP_PATH"`:$PATH"
+
+    if ! "$CL_EXE_PATH" -? </dev/null >/dev/null 2>&1; then
+        AC_MSG_ERROR([no compiler (cl.exe) in $2])
+    fi
+
+    PATH="$OLD_PATH"
+
+    AC_MSG_RESULT([$CL_EXE_PATH])
+}
+
+SOLARINC=
+MSBUILD_PATH=
+DEVENV=
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([Visual C++])
+    find_msvc "$with_visual_studio"
+    if test -z "$vctest"; then
+        if test -n "$with_visual_studio"; then
+            AC_MSG_ERROR([no Visual Studio $with_visual_studio installation found])
+        else
+            AC_MSG_ERROR([no Visual Studio installation found])
+        fi
+    fi
+    AC_MSG_RESULT([])
+
+    VC_PRODUCT_DIR="$vctest/VC"
+    COMPATH="$VC_PRODUCT_DIR/Tools/MSVC/$vcbuildnumber"
+
+    # $WIN_OTHER_ARCH is a hack to test the x64 compiler on x86, even if it's not multi-arch
+    if test -n "$WIN_MULTI_ARCH" -o -n "$WIN_OTHER_ARCH"; then
+        MSVC_MULTI_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/${WIN_MULTI_ARCH}${WIN_OTHER_ARCH}"
+        test_cl_exe "multi-arch" "$MSVC_MULTI_PATH"
+        if test $? -ne 0; then
+            WIN_MULTI_ARCH=""
+            WIN_OTHER_ARCH=""
+        fi
+    fi
+
+    if test "$WIN_BUILD_ARCH" = "$WIN_HOST_ARCH"; then
+        MSVC_BUILD_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_BUILD_ARCH"
+        test_cl_exe "build" "$MSVC_BUILD_PATH"
+    fi
+
+    if test "$WIN_BUILD_ARCH" != "$WIN_HOST_ARCH"; then
+        MSVC_HOST_PATH="$COMPATH/bin/Host$WIN_BUILD_ARCH/$WIN_HOST_ARCH"
+        test_cl_exe "host" "$MSVC_HOST_PATH"
+    else
+        MSVC_HOST_PATH="$MSVC_BUILD_PATH"
+    fi
+
+    AC_MSG_CHECKING([for short pathname of VC product directory])
+    VC_PRODUCT_DIR=`win_short_path_for_make "$VC_PRODUCT_DIR"`
+    AC_MSG_RESULT([$VC_PRODUCT_DIR])
+
+    UCRTSDKDIR=
+    UCRTVERSION=
+
+    AC_MSG_CHECKING([for UCRT location])
+    find_ucrt
+    # find_ucrt errors out if it doesn't find it
+    AC_MSG_RESULT([$UCRTSDKDIR ($UCRTVERSION)])
+    PathFormat "${UCRTSDKDIR}Include/$UCRTVERSION/ucrt"
+    ucrtincpath_formatted=$formatted_path
+    # SOLARINC is used for external modules and must be set too.
+    # And no, it's not sufficient to set SOLARINC only, as configure
+    # itself doesn't honour it.
+    SOLARINC="$SOLARINC -I$ucrtincpath_formatted"
+    CFLAGS="$CFLAGS -I$ucrtincpath_formatted"
+    CXXFLAGS="$CXXFLAGS -I$ucrtincpath_formatted"
+    CPPFLAGS="$CPPFLAGS -I$ucrtincpath_formatted"
+
+    AC_SUBST(UCRTSDKDIR)
+    AC_SUBST(UCRTVERSION)
+
+    AC_MSG_CHECKING([for MSBuild.exe location for: $vcnumwithdot])
+    # Find the proper version of MSBuild.exe to use based on the VS version
+    reg_get_value_32 HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/MSBuild/$vcnumwithdot/MSBuildOverrideTasksPath
+    if test -z "$regvalue" ; then
+        if test "$WIN_BUILD_ARCH" != "x64"; then
+            regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin"
+        else
+            regvalue="$VC_PRODUCT_DIR/../MSBuild/Current/Bin/amd64"
+        fi
+    fi
+    if test -d "$regvalue" ; then
+        MSBUILD_PATH=`win_short_path_for_make "$regvalue"`
+        AC_MSG_RESULT([$regvalue])
+    else
+        AC_MSG_ERROR([MSBuild.exe location not found])
+    fi
+
+    # Find the version of devenv.exe
+    # MSVC 2017 devenv does not start properly from a DOS 8.3 path
+    DEVENV=$(cygpath -lm "$VC_PRODUCT_DIR/../Common7/IDE/devenv.exe")
+    DEVENV_unix=$(cygpath -u "$DEVENV")
+    if test ! -e "$DEVENV_unix"; then
+        AC_MSG_WARN([No devenv.exe found - this is expected for VC++ Build Tools])
+    fi
+
+    dnl Save the true MSVC cl.exe for use when CC/CXX is actually clang-cl,
+    dnl needed when building CLR code:
+    if test -z "$MSVC_CXX"; then
+        # This gives us a posix path with 8.3 filename restrictions
+        MSVC_CXX=`win_short_path_for_make "$MSVC_HOST_PATH/cl.exe"`
+    fi
+
+    if test -z "$CC"; then
+        CC=$MSVC_CXX
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+    if test -z "$CXX"; then
+        CXX=$MSVC_CXX
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+
+    if test -n "$CC"; then
+        # Remove /cl.exe from CC case insensitive
+        AC_MSG_NOTICE([found Visual C++ $vcyear])
+
+        main_include_dir=`cygpath -d -m "$COMPATH/Include"`
+        CPPFLAGS="$CPPFLAGS -I$main_include_dir"
+
+        PathFormat "$COMPATH"
+        COMPATH=`win_short_path_for_make "$formatted_path"`
+
+        VCVER=$vcnumwithdot
+        VCTOOLSET=$vctoolset
+
+        # The WINDOWS_SDK_ACCEPTABLE_VERSIONS is mostly an educated guess...  Assuming newer ones
+        # are always "better", we list them in reverse chronological order.
+
+        case "$vcnumwithdot" in
+        16.0 | 17.0 | 17.7)
+            WINDOWS_SDK_ACCEPTABLE_VERSIONS="10.0 8.1A 8.1 8.0"
+            ;;
+        esac
+
+        # The expectation is that --with-windows-sdk should not need to be used
+        if test -n "$with_windows_sdk"; then
+            case " $WINDOWS_SDK_ACCEPTABLE_VERSIONS " in
+            *" "$with_windows_sdk" "*)
+                WINDOWS_SDK_ACCEPTABLE_VERSIONS=$with_windows_sdk
+                ;;
+            *)
+                AC_MSG_ERROR([Windows SDK $with_windows_sdk is not known to work with VS $vcyear])
+                ;;
+            esac
+        fi
+
+        # Make AC_COMPILE_IFELSE etc. work (set by AC_PROG_C, which we don't use for MSVC)
+        ac_objext=obj
+        ac_exeext=exe
+
+    else
+        AC_MSG_ERROR([Visual C++ not found after all, huh])
+    fi
+
+    # ERROR if VS version < 16.5
+    AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.5])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        // See <https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros> for mapping
+        // between Visual Studio versions and _MSC_VER:
+        #if _MSC_VER < 1925
+        #error
+        #endif
+    ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no])])
+
+    # WARN if VS version < 16.10
+    AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.10])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        #if _MSC_VER < 1929
+        #error
+        #endif
+    ]])],[vs2019_recommended_version=yes],[vs2019_recommended_version=no])
+
+    if test $vs2019_recommended_version = yes; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_WARN([no])
+        add_warning "You should have at least Visual Studio 2019 version 16.10 to avoid build problems. Otherwise, you may face problems with the build of some modules including dragonbox."
+    fi
+
+    # Check for 64-bit (cross-)compiler to use to build the 64-bit
+    # version of the Explorer extension (and maybe other small
+    # bits, too) needed when installing a 32-bit LibreOffice on a
+    # 64-bit OS. The 64-bit Explorer extension is a feature that
+    # has been present since long in OOo. Don't confuse it with
+    # building LibreOffice itself as 64-bit code.
+
+    BUILD_X64=
+    CXX_X64_BINARY=
+
+    if test "$WIN_HOST_ARCH" = "x86" -a -n "$WIN_OTHER_ARCH"; then
+        AC_MSG_CHECKING([for the libraries to build the 64-bit Explorer extensions])
+        if test -f "$COMPATH/atlmfc/lib/x64/atls.lib" -o \
+             -f "$COMPATH/atlmfc/lib/spectre/x64/atls.lib"
+        then
+            BUILD_X64=TRUE
+            CXX_X64_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
+            AC_MSG_RESULT([found])
+        else
+            AC_MSG_RESULT([not found])
+            AC_MSG_WARN([Installation set will not contain 64-bit Explorer extensions])
+        fi
+    elif test "$WIN_HOST_ARCH" = "x64"; then
+        CXX_X64_BINARY=$CXX
+    fi
+    AC_SUBST(BUILD_X64)
+
+    # These are passed to the environment and then used in gbuild/platform/com_MSC_class.mk
+    AC_SUBST(CXX_X64_BINARY)
+
+    # Check for 32-bit compiler to use to build the 32-bit TWAIN shim
+    # needed to support TWAIN scan on both 32- and 64-bit systems
+
+    case "$WIN_HOST_ARCH" in
+    x64)
+        AC_MSG_CHECKING([for a x86 compiler and libraries for 32-bit binaries required for TWAIN support])
+        if test -n "$CXX_X86_BINARY"; then
+            BUILD_X86=TRUE
+            AC_MSG_RESULT([preset])
+        elif test -n "$WIN_MULTI_ARCH"; then
+            BUILD_X86=TRUE
+            CXX_X86_BINARY=`win_short_path_for_make "$MSVC_MULTI_PATH/cl.exe"`
+            AC_MSG_RESULT([found])
+        else
+            AC_MSG_RESULT([not found])
+            AC_MSG_WARN([Installation set will not contain 32-bit binaries required for TWAIN support])
+        fi
+        ;;
+    x86)
+        BUILD_X86=TRUE
+        CXX_X86_BINARY=$MSVC_CXX
+        ;;
+    esac
+    AC_SUBST(BUILD_X86)
+    AC_SUBST(CXX_X86_BINARY)
+fi
+AC_SUBST(VCVER)
+AC_SUBST(VCTOOLSET)
+AC_SUBST(DEVENV)
+AC_SUBST(MSVC_CXX)
+
+COM_IS_CLANG=
+AC_MSG_CHECKING([whether the compiler is actually Clang])
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+    #ifndef __clang__
+    you lose
+    #endif
+    int foo=42;
+    ]])],
+    [AC_MSG_RESULT([yes])
+     COM_IS_CLANG=TRUE],
+    [AC_MSG_RESULT([no])])
+AC_SUBST(COM_IS_CLANG)
+
+CLANGVER=
+if test "$COM_IS_CLANG" = TRUE; then
+    AC_MSG_CHECKING([whether Clang is new enough])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+        #if !defined __apple_build_version__
+        #error
+        #endif
+        ]])],
+        [my_apple_clang=yes],[my_apple_clang=])
+    if test "$my_apple_clang" = yes; then
+        AC_MSG_RESULT([assumed yes (Apple Clang)])
+    elif test "$_os" = Emscripten; then
+        AC_MSG_RESULT([assumed yes (Emscripten Clang)])
+    else
+        if test "$_os" = WINNT; then
+            dnl In which case, assume clang-cl:
+            my_args="/EP /TC"
+        else
+            my_args="-E -P"
+        fi
+        clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC $my_args - | sed 's/ //g'`
+        CLANG_FULL_VERSION=`echo __clang_version__ | $CC $my_args -`
+        CLANGVER=`echo $clang_version \
+            | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
+        if test "$CLANGVER" -ge 80001; then
+            AC_MSG_RESULT([yes ($clang_version)])
+        else
+            AC_MSG_ERROR(["$CLANG_FULL_VERSION" is too old or unrecognized, must be at least Clang 8.0.1])
+        fi
+        AC_DEFINE_UNQUOTED(CLANG_VERSION,$CLANGVER)
+        AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
+    fi
+fi
+
+SHOWINCLUDES_PREFIX=
+if test "$_os" = WINNT; then
+    dnl We need to guess the prefix of the -showIncludes output, it can be
+    dnl localized
+    AC_MSG_CHECKING([the dependency generation prefix (cl.exe -showIncludes)])
+    echo "#include <stdlib.h>" > conftest.c
+    SHOWINCLUDES_PREFIX=`VSLANG=1033 $CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
+        grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+    rm -f conftest.c conftest.obj
+    if test -z "$SHOWINCLUDES_PREFIX"; then
+        AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+    else
+        AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"])
+    fi
+fi
+AC_SUBST(SHOWINCLUDES_PREFIX)
+
+#
+# prefix C with ccache if needed
+#
+if test "$CCACHE" != ""; then
+    AC_MSG_CHECKING([whether $CC_BASE is already ccached])
+
+    AC_LANG_PUSH([C])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS --ccache-skip -O2"
+    # msvc does not fail on unknown options, check stdout
+    if test "$COM" = MSC; then
+        CFLAGS="$CFLAGS -nologo"
+    fi
+    save_ac_c_werror_flag=$ac_c_werror_flag
+    ac_c_werror_flag=yes
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    CFLAGS=$save_CFLAGS
+    ac_c_werror_flag=$save_ac_c_werror_flag
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        CC="$CCACHE $CC"
+        CC_BASE="ccache $CC_BASE"
+        AC_MSG_RESULT([no])
+    fi
+    AC_LANG_POP([C])
+fi
+
+# ===================================================================
+# check various GCC options that Clang does not support now but maybe
+# will somewhen in the future, check them even for GCC, so that the
+# flags are set
+# ===================================================================
+
+HAVE_GCC_GGDB2=
+if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+    AC_MSG_CHECKING([whether $CC_BASE supports -ggdb2])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -ggdb2"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_GGDB2=TRUE ],[])
+    CFLAGS=$save_CFLAGS
+    if test "$HAVE_GCC_GGDB2" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    if test "$host_cpu" = "m68k"; then
+        AC_MSG_CHECKING([whether $CC_BASE supports -mlong-jump-table-offsets])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -mlong-jump-table-offsets"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_LONG_JUMP_TABLE_OFFSETS=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_GCC_LONG_JUMP_TABLE_OFFSETS" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_ERROR([no])
+        fi
+    fi
+fi
+AC_SUBST(HAVE_GCC_GGDB2)
+
+dnl ===================================================================
+dnl  Test the gcc version
+dnl ===================================================================
+if test "$GCC" = "yes" -a -z "$COM_IS_CLANG"; then
+    AC_MSG_CHECKING([the GCC version])
+    _gcc_version=`$CC -dumpfullversion`
+    gcc_full_version=$(printf '%s' "$_gcc_version" | \
+        $AWK -F. '{ print $1*10000+$2*100+(NF<3?1:$3) }')
+    GCC_VERSION=`echo $_gcc_version | $AWK -F. '{ print \$1*100+\$2 }'`
+
+    AC_MSG_RESULT([gcc $_gcc_version ($gcc_full_version)])
+
+    if test "$gcc_full_version" -lt 70000; then
+        AC_MSG_ERROR([GCC $_gcc_version is too old, must be at least GCC 7.0.0])
+    fi
+else
+    # Explicitly force GCC_VERSION to be empty, even for Clang, to check incorrect uses.
+    # GCC version should generally be checked only when handling GCC-specific bugs, for testing
+    # things like features configure checks should be used, otherwise they may e.g. fail with Clang
+    # (which reports itself as GCC 4.2.1).
+    GCC_VERSION=
+fi
+AC_SUBST(GCC_VERSION)
+
+dnl Set the ENABLE_DBGUTIL variable
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build with additional debug utilities])
+if test -n "$enable_dbgutil" -a "$enable_dbgutil" != "no"; then
+    ENABLE_DBGUTIL="TRUE"
+    # this is an extra var so it can have different default on different MSVC
+    # versions (in case there are version specific problems with it)
+    MSVC_USE_DEBUG_RUNTIME="TRUE"
+
+    AC_MSG_RESULT([yes])
+    # cppunit and graphite expose STL in public headers
+    if test "$with_system_cppunit" = "yes"; then
+        AC_MSG_ERROR([--with-system-cppunit conflicts with --enable-dbgutil])
+    else
+        with_system_cppunit=no
+    fi
+    if test "$with_system_graphite" = "yes"; then
+        AC_MSG_ERROR([--with-system-graphite conflicts with --enable-dbgutil])
+    else
+        with_system_graphite=no
+    fi
+    if test "$with_system_orcus" = "yes"; then
+        AC_MSG_ERROR([--with-system-orcus conflicts with --enable-dbgutil])
+    else
+        with_system_orcus=no
+    fi
+    if test "$with_system_libcmis" = "yes"; then
+        AC_MSG_ERROR([--with-system-libcmis conflicts with --enable-dbgutil])
+    else
+        with_system_libcmis=no
+    fi
+    if test "$with_system_hunspell" = "yes"; then
+        AC_MSG_ERROR([--with-system-hunspell conflicts with --enable-dbgutil])
+    else
+        with_system_hunspell=no
+    fi
+    if test "$with_system_gpgmepp" = "yes"; then
+        AC_MSG_ERROR([--with-system-gpgmepp conflicts with --enable-dbgutil])
+    else
+        with_system_gpgmepp=no
+    fi
+    # As mixing system libwps and non-system libnumbertext or vice versa likely causes trouble (see
+    # 603074c5f2b84de8a24593faf807da784b040625 "Pass _GLIBCXX_DEBUG into external/libwps" and the
+    # mail thread starting at <https://gcc.gnu.org/ml/gcc/2018-05/msg00057.html> "libstdc++: ODR
+    # violation when using std::regex with and without -D_GLIBCXX_DEBUG"), simply make sure neither
+    # of those two is using the system variant:
+    if test "$with_system_libnumbertext" = "yes"; then
+        AC_MSG_ERROR([--with-system-libnumbertext conflicts with --enable-dbgutil])
+    else
+        with_system_libnumbertext=no
+    fi
+    if test "$with_system_libwps" = "yes"; then
+        AC_MSG_ERROR([--with-system-libwps conflicts with --enable-dbgutil])
+    else
+        with_system_libwps=no
+    fi
+else
+    ENABLE_DBGUTIL=""
+    MSVC_USE_DEBUG_RUNTIME=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_DBGUTIL)
+AC_SUBST(MSVC_USE_DEBUG_RUNTIME)
+
+dnl Set the ENABLE_DEBUG variable.
+dnl ===================================================================
+if test -n "$enable_debug" && test "$enable_debug" != "yes" && test "$enable_debug" != "no"; then
+    AC_MSG_ERROR([--enable-debug now accepts only yes or no, use --enable-symbols])
+fi
+if test -n "$ENABLE_DBGUTIL" -a "$enable_debug" = "no"; then
+    if test -z "$libo_fuzzed_enable_debug"; then
+        AC_MSG_ERROR([--disable-debug cannot be used with --enable-dbgutil])
+    else
+        AC_MSG_NOTICE([Resetting --enable-debug=yes])
+        enable_debug=yes
+    fi
+fi
+
+AC_MSG_CHECKING([whether to do a debug build])
+if test -n "$ENABLE_DBGUTIL" -o \( -n "$enable_debug" -a "$enable_debug" != "no" \) ; then
+    ENABLE_DEBUG="TRUE"
+    if test -n "$ENABLE_DBGUTIL" ; then
+        AC_MSG_RESULT([yes (dbgutil)])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+else
+    ENABLE_DEBUG=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_DEBUG)
+
+dnl ===================================================================
+dnl Select the linker to use (gold/lld/ld.bfd/mold).
+dnl This is done only after compiler checks (need to know if Clang is
+dnl used, for different defaults) and after checking if a debug build
+dnl is wanted (non-debug builds get the default linker if not explicitly
+dnl specified otherwise).
+dnl All checks for linker features/options should come after this.
+dnl ===================================================================
+check_use_ld()
+{
+    use_ld=-fuse-ld=${1%%:*}
+    use_ld_path=${1#*:}
+    if test "$use_ld_path" != "$1"; then
+        if test "$COM_IS_CLANG" = TRUE; then
+            if test "$CLANGVER" -ge 120000; then
+                use_ld="${use_ld} --ld-path=${use_ld_path}"
+            else
+                use_ld="-fuse-ld=${use_ld_path}"
+            fi
+        else
+            # I tried to use gcc's '-B<path>' and a directory + symlink setup in
+            # $BUILDDIR, but libtool always filtered-out that option, so gcc wouldn't
+            # pickup the alternative linker, when called by libtool for linking.
+            # For mold, one can use LD_PRELOAD=/usr/lib/mold/mold-wrapper.so instead.
+            AC_MSG_ERROR([A linker path is just supported with clang, because of libtool's -B filtering!])
+        fi
+    fi
+    use_ld_fail_if_error=$2
+    use_ld_ok=
+    AC_MSG_CHECKING([for $use_ld linker support])
+    use_ld_ldflags_save="$LDFLAGS"
+    LDFLAGS="$LDFLAGS $use_ld"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+        ],[
+printf ("hello world\n");
+        ])], USE_LD=$use_ld, [])
+    if test -n "$USE_LD"; then
+        AC_MSG_RESULT( yes )
+        use_ld_ok=yes
+    else
+        if test -n "$use_ld_fail_if_error"; then
+            AC_MSG_ERROR( no )
+        else
+            AC_MSG_RESULT( no )
+        fi
+    fi
+    if test -n "$use_ld_ok"; then
+        dnl keep the value of LDFLAGS
+        return 0
+    fi
+    LDFLAGS="$use_ld_ldflags_save"
+    return 1
+}
+USE_LD=
+if test "$enable_ld" != "no"; then
+    if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+        if test -n "$enable_ld"; then
+            check_use_ld "$enable_ld" fail_if_error
+        elif test -z "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            dnl non-debug builds default to the default linker
+            true
+        elif test -n "$COM_IS_CLANG"; then
+            check_use_ld lld
+            if test $? -ne 0; then
+                check_use_ld gold
+                if test $? -ne 0; then
+                    check_use_ld mold
+                fi
+            fi
+        else
+            # For gcc first try gold, new versions also support lld/mold.
+            check_use_ld gold
+            if test $? -ne 0; then
+                check_use_ld lld
+                if test $? -ne 0; then
+                    check_use_ld mold
+                fi
+            fi
+        fi
+        ld_output=$(echo 'int main() { return 0; }' | $CC -Wl,-v -x c -o conftest.out - $CFLAGS $LDFLAGS 2>/dev/null)
+        rm conftest.out
+        ld_used=$(echo "$ld_output" | grep -E '(^GNU gold|^GNU ld|^LLD|^mold)')
+        if test -z "$ld_used"; then
+            ld_used="unknown"
+        fi
+        AC_MSG_CHECKING([for linker that is used])
+        AC_MSG_RESULT([$ld_used])
+        if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            if echo "$ld_used" | grep -q "^GNU ld"; then
+                AC_MSG_WARN([The default GNU linker is slow, consider using LLD, mold or the GNU gold linker.])
+                add_warning "The default GNU linker is slow, consider using LLD, mold or the GNU gold linker."
+            fi
+        fi
+    else
+        if test "$enable_ld" = "yes"; then
+            AC_MSG_ERROR([--enable-ld not supported])
+        fi
+    fi
+fi
+AC_SUBST(USE_LD)
+AC_SUBST(LD)
+
+HAVE_LD_BSYMBOLIC_FUNCTIONS=
+if test "$GCC" = "yes" -a "$_os" != Emscripten ; then
+    AC_MSG_CHECKING([for -Bsymbolic-functions linker support])
+    bsymbolic_functions_ldflags_save=$LDFLAGS
+    LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+        ],[
+printf ("hello world\n");
+        ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, [])
+    if test "$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "TRUE"; then
+        AC_MSG_RESULT( found )
+    else
+        AC_MSG_RESULT( not found )
+    fi
+    LDFLAGS=$bsymbolic_functions_ldflags_save
+fi
+AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
+
+LD_GC_SECTIONS=
+if test "$GCC" = "yes"; then
+    for flag in "--gc-sections" "-dead_strip"; do
+        AC_MSG_CHECKING([for $flag linker support])
+        ldflags_save=$LDFLAGS
+        LDFLAGS="$LDFLAGS -Wl,$flag"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+            ],[
+printf ("hello world\n");
+            ])],[
+            LD_GC_SECTIONS="-Wl,$flag"
+            AC_MSG_RESULT( found )
+            ], [
+            AC_MSG_RESULT( not found )
+            ])
+        LDFLAGS=$ldflags_save
+        if test -n "$LD_GC_SECTIONS"; then
+            break
+        fi
+    done
+fi
+AC_SUBST(LD_GC_SECTIONS)
+
+HAVE_EXTERNAL_DWARF=
+if test "$enable_split_debug" != no; then
+    use_split_debug=
+    if test -n "$ENABLE_LTO"; then
+        : # Inherently incompatible, since no debug info is created while compiling, GCC complains.
+    elif test "$enable_split_debug" = yes; then
+        use_split_debug=1
+    dnl Currently by default enabled only on Linux, feel free to set test_split_debug above also for other platforms.
+    elif test "$test_split_debug" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        use_split_debug=1
+    fi
+    if test -n "$use_split_debug"; then
+        if test "$_os" = "Emscripten"; then
+            TEST_CC_FLAG=-gseparate-dwarf
+        else
+            TEST_CC_FLAG=-gsplit-dwarf
+        fi
+        AC_MSG_CHECKING([whether $CC_BASE supports $TEST_CC_FLAG])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror $TEST_CC_FLAG"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_EXTERNAL_DWARF=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_EXTERNAL_DWARF" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            if test "$enable_split_debug" = yes; then
+                AC_MSG_ERROR([no])
+            else
+                AC_MSG_RESULT([no])
+            fi
+        fi
+    fi
+    if test -z "$HAVE_EXTERNAL_DWARF" -a "$test_split_debug" = "yes" -a -n "$use_split_debug"; then
+        AC_MSG_WARN([Compiler is not capable of creating split debug info, linking will require more time and disk space.])
+        add_warning "Compiler is not capable of creating split debug info, linking will require more time and disk space."
+    fi
+fi
+AC_SUBST(HAVE_EXTERNAL_DWARF)
+
+HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=
+AC_MSG_CHECKING([whether $CC_BASE supports -Xclang -debug-info-kind=constructor])
+save_CFLAGS=$CFLAGS
+CFLAGS="$CFLAGS -Werror -Xclang -debug-info-kind=constructor"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=TRUE ],[])
+CFLAGS=$save_CFLAGS
+if test "$HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR" = "TRUE"; then
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR)
+
+ENABLE_GDB_INDEX=
+if test "$enable_gdb_index" != "no"; then
+    dnl Currently by default enabled only on Linux, feel free to set test_gdb_index above also for other platforms.
+    if test "$enable_gdb_index" = yes -o \( "$test_gdb_index" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL" \); then
+        AC_MSG_CHECKING([whether $CC_BASE supports -ggnu-pubnames])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -g -ggnu-pubnames"
+        have_ggnu_pubnames=
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[have_ggnu_pubnames=TRUE],[have_ggnu_pubnames=])
+        if test "$have_ggnu_pubnames" != "TRUE"; then
+            if test "$enable_gdb_index" = "yes"; then
+                AC_MSG_ERROR([no, --enable-gdb-index not supported])
+            else
+                AC_MSG_RESULT( no )
+            fi
+        else
+            AC_MSG_RESULT( yes )
+            AC_MSG_CHECKING([whether $CC_BASE supports -Wl,--gdb-index])
+            ldflags_save=$LDFLAGS
+            LDFLAGS="$LDFLAGS -Wl,--gdb-index"
+            AC_LINK_IFELSE([AC_LANG_PROGRAM([
+#include <stdio.h>
+                ],[
+printf ("hello world\n");
+                ])], ENABLE_GDB_INDEX=TRUE, [])
+            if test "$ENABLE_GDB_INDEX" = "TRUE"; then
+                AC_MSG_RESULT( yes )
+            else
+                if test "$enable_gdb_index" = "yes"; then
+                    AC_MSG_ERROR( no )
+                else
+                    AC_MSG_RESULT( no )
+                fi
+            fi
+            LDFLAGS=$ldflags_save
+        fi
+        CFLAGS=$save_CFLAGS
+        fi
+    if test -z "$ENABLE_GDB_INDEX" -a "$test_gdb_index" = "yes" -a -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        AC_MSG_WARN([Linker is not capable of creating gdb index, debugger startup will be slow.])
+        add_warning "Linker is not capable of creating gdb index, debugger startup will be slow."
+    fi
+fi
+AC_SUBST(ENABLE_GDB_INDEX)
+
+if test -z "$enable_sal_log" && test "$ENABLE_DEBUG" = TRUE; then
+    enable_sal_log=yes
+fi
+if test "$enable_sal_log" = yes; then
+    ENABLE_SAL_LOG=TRUE
+fi
+AC_SUBST(ENABLE_SAL_LOG)
+
+dnl Check for enable symbols option
+dnl ===================================================================
+AC_MSG_CHECKING([whether to generate debug information])
+if test -z "$enable_symbols"; then
+    if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        enable_symbols=yes
+    else
+        enable_symbols=no
+    fi
+fi
+if test "$enable_symbols" = yes; then
+    ENABLE_SYMBOLS_FOR=all
+    AC_MSG_RESULT([yes])
+elif test "$enable_symbols" = no; then
+    ENABLE_SYMBOLS_FOR=
+    AC_MSG_RESULT([no])
+else
+    # Selective debuginfo.
+    ENABLE_SYMBOLS_FOR="$enable_symbols"
+    AC_MSG_RESULT([for "$enable_symbols"])
+fi
+AC_SUBST(ENABLE_SYMBOLS_FOR)
+
+if test -n "$with_android_ndk" -a \( -n "$ENABLE_SYMBOLS" -o -n "$ENABLE_DEBUG" -o -n "$ENABLE_DBGUTIL" \) -a "$ENABLE_DEBUGINFO_FOR" = "all"; then
+    # Building on Android with full symbols: without enough memory the linker never finishes currently.
+    AC_MSG_CHECKING([whether enough memory is available for linking])
+    mem_size=$(grep -o 'MemTotal: *.\+ kB' /proc/meminfo | sed 's/MemTotal: *\(.\+\) kB/\1/')
+    # Check for 15GB, as Linux reports a bit less than the physical memory size.
+    if test -n "$mem_size" -a $mem_size -lt 15728640; then
+        AC_MSG_ERROR([building with full symbols and less than 16GB of memory is not supported])
+    else
+        AC_MSG_RESULT([yes])
+    fi
+fi
+
+ENABLE_OPTIMIZED=
+ENABLE_OPTIMIZED_DEBUG=
+AC_MSG_CHECKING([whether to compile with optimization flags])
+if test -z "$enable_optimized"; then
+    if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+        enable_optimized=no
+    else
+        enable_optimized=yes
+    fi
+fi
+if test "$enable_optimized" = yes; then
+    ENABLE_OPTIMIZED=TRUE
+    AC_MSG_RESULT([yes])
+elif test "$enable_optimized" = debug; then
+    ENABLE_OPTIMIZED_DEBUG=TRUE
+    AC_MSG_RESULT([yes (debug)])
+    HAVE_GCC_OG=
+    if test "$GCC" = "yes" -a "$_os" != "Emscripten"; then
+        AC_MSG_CHECKING([whether $CC_BASE supports -Og])
+        save_CFLAGS=$CFLAGS
+        CFLAGS="$CFLAGS -Werror -Og"
+        AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_OG=TRUE ],[])
+        CFLAGS=$save_CFLAGS
+        if test "$HAVE_GCC_OG" = "TRUE"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no])
+        fi
+    fi
+    if test -z "$HAVE_GCC_OG" -a "$_os" != "Emscripten"; then
+        AC_MSG_ERROR([The compiler does not support optimizations suitable for debugging.])
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_OPTIMIZED)
+AC_SUBST(ENABLE_OPTIMIZED_DEBUG)
+
+#
+# determine CPUNAME, OS, ...
+#
+case "$host_os" in
+
+cygwin*|wsl*)
+    # Already handled
+    ;;
+
+darwin*)
+    COM=GCC
+    OS=MACOSX
+    RTL_OS=MacOSX
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64|arm64)
+        if test "$enable_ios_simulator" = "yes"; then
+            OS=iOS
+        else
+            CPUNAME=AARCH64
+            RTL_ARCH=AARCH64
+            PLATFORMID=macosx_aarch64
+        fi
+        ;;
+    x86_64)
+        if test "$enable_ios_simulator" = "yes"; then
+            OS=iOS
+        fi
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=macosx_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+ios*)
+    COM=GCC
+    OS=iOS
+    RTL_OS=iOS
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64|arm64)
+        if test "$enable_ios_simulator" = "yes"; then
+            AC_MSG_ERROR([iOS simulator is only available in macOS not iOS])
+        fi
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    CPUNAME=AARCH64
+    RTL_ARCH=AARCH64
+    PLATFORMID=ios_arm64
+    ;;
+
+dragonfly*)
+    COM=GCC
+    OS=DRAGONFLY
+    RTL_OS=DragonFly
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=dragonfly_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=dragonfly_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+freebsd*)
+    COM=GCC
+    RTL_OS=FreeBSD
+    OS=FREEBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    aarch64)
+        CPUNAME=AARCH64
+        PLATFORMID=freebsd_aarch64
+        RTL_ARCH=AARCH64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=freebsd_x86
+        ;;
+    x86_64|amd64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=freebsd_x86_64
+        ;;
+    powerpc64)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64
+        PLATFORMID=freebsd_powerpc64
+        ;;
+    powerpc|powerpcspe)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=freebsd_powerpc
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+haiku*)
+    COM=GCC
+    GUIBASE=haiku
+    RTL_OS=Haiku
+    OS=HAIKU
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=haiku_x86
+        ;;
+    x86_64|amd64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=haiku_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+kfreebsd*)
+    COM=GCC
+    OS=LINUX
+    RTL_OS=kFreeBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=kfreebsd_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=kfreebsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+linux-gnu*|linux-musl*)
+    COM=GCC
+    OS=LINUX
+    RTL_OS=Linux
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    aarch64)
+        CPUNAME=AARCH64
+        PLATFORMID=linux_aarch64
+        RTL_ARCH=AARCH64
+        EPM_FLAGS="-a arm64"
+        ;;
+    alpha)
+        CPUNAME=AXP
+        RTL_ARCH=ALPHA
+        PLATFORMID=linux_alpha
+        ;;
+    arm*)
+        CPUNAME=ARM
+        EPM_FLAGS="-a arm"
+        RTL_ARCH=ARM_EABI
+        PLATFORMID=linux_arm_eabi
+        case "$host_cpu" in
+        arm*-linux)
+            RTL_ARCH=ARM_OABI
+            PLATFORMID=linux_arm_oabi
+            ;;
+        esac
+        ;;
+    hppa)
+        CPUNAME=HPPA
+        RTL_ARCH=HPPA
+        EPM_FLAGS="-a hppa"
+        PLATFORMID=linux_hppa
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=linux_x86
+        ;;
+    ia64)
+        CPUNAME=IA64
+        RTL_ARCH=IA64
+        PLATFORMID=linux_ia64
+        ;;
+    mips)
+        CPUNAME=MIPS
+        RTL_ARCH=MIPS_EB
+        EPM_FLAGS="-a mips"
+        PLATFORMID=linux_mips_eb
+        ;;
+    mips64)
+        CPUNAME=MIPS64
+        RTL_ARCH=MIPS64_EB
+        EPM_FLAGS="-a mips64"
+        PLATFORMID=linux_mips64_eb
+        ;;
+    mips64el)
+        CPUNAME=MIPS64
+        RTL_ARCH=MIPS64_EL
+        EPM_FLAGS="-a mips64el"
+        PLATFORMID=linux_mips64_el
+        ;;
+    mipsel)
+        CPUNAME=MIPS
+        RTL_ARCH=MIPS_EL
+        EPM_FLAGS="-a mipsel"
+        PLATFORMID=linux_mips_el
+        ;;
+    riscv64)
+        CPUNAME=RISCV64
+        RTL_ARCH=RISCV64
+        EPM_FLAGS="-a riscv64"
+        PLATFORMID=linux_riscv64
+        ;;
+    m68k)
+        CPUNAME=M68K
+        RTL_ARCH=M68K
+        PLATFORMID=linux_m68k
+        ;;
+    powerpc)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=linux_powerpc
+        ;;
+    powerpc64)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64
+        PLATFORMID=linux_powerpc64
+        ;;
+    powerpc64le)
+        CPUNAME=POWERPC64
+        RTL_ARCH=PowerPC_64_LE
+        PLATFORMID=linux_powerpc64_le
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=linux_sparc
+        ;;
+    sparc64)
+        CPUNAME=SPARC64
+        RTL_ARCH=SPARC64
+        PLATFORMID=linux_sparc64
+        ;;
+    s390x)
+        CPUNAME=S390X
+        RTL_ARCH=S390x
+        PLATFORMID=linux_s390x
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=linux_x86_64
+        ;;
+    loongarch64)
+	CPUNAME=LOONGARCH64
+	RTL_ARCH=LOONGARCH64
+	PLATFORMID=linux_loongarch64
+	;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+linux-android*)
+    COM=GCC
+    OS=ANDROID
+    RTL_OS=Android
+    P_SEP=:
+
+    case "$host_cpu" in
+
+    arm|armel)
+        CPUNAME=ARM
+        RTL_ARCH=ARM_EABI
+        PLATFORMID=android_arm_eabi
+        ;;
+    aarch64)
+        CPUNAME=AARCH64
+        RTL_ARCH=AARCH64
+        PLATFORMID=android_aarch64
+        ;;
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=android_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=android_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+*netbsd*)
+    COM=GCC
+    OS=NETBSD
+    RTL_OS=NetBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=netbsd_x86
+        ;;
+    powerpc)
+        CPUNAME=POWERPC
+        RTL_ARCH=PowerPC
+        PLATFORMID=netbsd_powerpc
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=netbsd_sparc
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=netbsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    ;;
+
+openbsd*)
+    COM=GCC
+    OS=OPENBSD
+    RTL_OS=OpenBSD
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=openbsd_x86
+        ;;
+    x86_64)
+        CPUNAME=X86_64
+        RTL_ARCH=X86_64
+        PLATFORMID=openbsd_x86_64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    SOLARINC="$SOLARINC -I/usr/local/include"
+    ;;
+
+solaris*)
+    COM=GCC
+    OS=SOLARIS
+    RTL_OS=Solaris
+    P_SEP=:
+
+    case "$host_cpu" in
+    i*86)
+        CPUNAME=INTEL
+        RTL_ARCH=x86
+        PLATFORMID=solaris_x86
+        ;;
+    sparc)
+        CPUNAME=SPARC
+        RTL_ARCH=SPARC
+        PLATFORMID=solaris_sparc
+        ;;
+    sparc64)
+        CPUNAME=SPARC64
+        RTL_ARCH=SPARC64
+        PLATFORMID=solaris_sparc64
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    SOLARINC="$SOLARINC -I/usr/local/include"
+    ;;
+
+emscripten*)
+    COM=GCC
+    OS=EMSCRIPTEN
+    RTL_OS=Emscripten
+    P_SEP=:
+
+    case "$host_cpu" in
+    wasm32|wasm64)
+        ;;
+    *)
+        AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+        ;;
+    esac
+    CPUNAME=INTEL
+    RTL_ARCH=x86
+    PLATFORMID=linux_x86
+    ;;
+
+*)
+    AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice for!])
+    ;;
+esac
+
+DISABLE_GUI=""
+if test "$enable_gui" = "no"; then
+    if test "$using_x11" != yes; then
+        AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice with --disable-gui.])
+    fi
+    USING_X11=
+    DISABLE_GUI=TRUE
+    test_epoxy=no
+else
+    AC_DEFINE(HAVE_FEATURE_UI)
+fi
+AC_SUBST(DISABLE_GUI)
+
+if test "$with_x" = "no"; then
+    USING_X11=
+fi
+
+if test -z "$USING_X11" -a "$enable_qt5" = "yes" -a "$enable_gen" = "yes"; then
+    AC_MSG_ERROR([Can't select gen VCL plugin, if --without-x is used!])
+fi
+
+if test "$using_x11" = yes; then
+    if test "$USING_X11" = TRUE; then
+        AC_DEFINE(USING_X11)
+    else
+        disable_x11_tests
+        if test "$DISABLE_DYNLOADING" = TRUE; then
+            test_qt5=yes
+        fi
+    fi
+else
+    if test "$USING_X11" = TRUE; then
+        AC_MSG_ERROR([Platform doesn't support X11 (\$using_x11), but \$USING_X11 is set!])
+    fi
+fi
+
+WORKDIR="${BUILDDIR}/workdir"
+INSTDIR="${BUILDDIR}/instdir"
+INSTROOTBASE=${INSTDIR}${INSTROOTBASESUFFIX}
+INSTROOT=${INSTROOTBASE}${INSTROOTCONTENTSUFFIX}
+AC_SUBST(COM)
+AC_SUBST(CPUNAME)
+AC_SUBST(RTL_OS)
+AC_SUBST(RTL_ARCH)
+AC_SUBST(EPM_FLAGS)
+AC_SUBST(USING_X11)
+AC_SUBST([INSTDIR])
+AC_SUBST([INSTROOT])
+AC_SUBST([INSTROOTBASE])
+AC_SUBST(OS)
+AC_SUBST(P_SEP)
+AC_SUBST(WORKDIR)
+AC_SUBST(PLATFORMID)
+AC_SUBST(WINDOWS_X64)
+AC_DEFINE_UNQUOTED(SDKDIR, "$INSTDIR/$SDKDIRNAME")
+AC_DEFINE_UNQUOTED(WORKDIR,"$WORKDIR")
+
+if test "$OS" = WNT -a "$COM" = MSC; then
+    case "$CPUNAME" in
+    INTEL) CPPU_ENV=msci ;;
+    X86_64) CPPU_ENV=mscx ;;
+    AARCH64) CPPU_ENV=msca ;;
+    *)
+        AC_MSG_ERROR([Unknown \$CPUNAME '$CPUNAME' for $OS / $COM"])
+        ;;
+    esac
+else
+    CPPU_ENV=gcc3
+fi
+AC_SUBST(CPPU_ENV)
+
+dnl ===================================================================
+dnl Test which package format to use
+dnl ===================================================================
+AC_MSG_CHECKING([which package format to use])
+if test -n "$with_package_format" -a "$with_package_format" != no; then
+    for i in $with_package_format; do
+        case "$i" in
+        bsd | deb | pkg | rpm | archive | dmg | installed | msi)
+            ;;
+        *)
+            AC_MSG_ERROR([unsupported format $i. Supported by EPM are:
+bsd - FreeBSD, NetBSD, or OpenBSD software distribution
+deb - Debian software distribution
+pkg - Solaris software distribution
+rpm - RedHat software distribution
+
+LibreOffice additionally supports:
+archive - .tar.gz or .zip
+dmg - macOS .dmg
+installed - installation tree
+msi - Windows .msi
+        ])
+            ;;
+        esac
+    done
+    # fakeroot is needed to ensure correct file ownerships/permissions
+    # inside deb packages and tar archives created on Linux and Solaris.
+    if test "$OS" = "LINUX" || test "$OS" = "SOLARIS"; then
+        AC_PATH_PROG(FAKEROOT, fakeroot, no)
+        if test "$FAKEROOT" = "no"; then
+            AC_MSG_ERROR(
+                [--with-package-format='$with_package_format' requires fakeroot. Install fakeroot.])
+        fi
+    fi
+    PKGFORMAT="$with_package_format"
+    AC_MSG_RESULT([$PKGFORMAT])
+else
+    PKGFORMAT=
+    AC_MSG_RESULT([none])
+fi
+AC_SUBST(PKGFORMAT)
+
+dnl ===================================================================
+dnl handle help related options
+dnl
+dnl If you change help related options, please update README.help
+dnl ===================================================================
+
+ENABLE_HTMLHELP=
+HELP_OMINDEX_PAGE=
+HELP_ONLINE=
+WITH_HELPPACKS=
+
+AC_MSG_CHECKING([which help to build])
+if test -n "$with_help" -a "$with_help" != "no"; then
+    GIT_NEEDED_SUBMODULES="helpcontent2 $GIT_NEEDED_SUBMODULES"
+    BUILD_TYPE="$BUILD_TYPE HELP"
+    case "$with_help" in
+    "html")
+        ENABLE_HTMLHELP=TRUE
+        WITH_HELPPACKS=TRUE
+        SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
+        AC_MSG_RESULT([HTML (local)])
+        ;;
+    "online")
+        ENABLE_HTMLHELP=TRUE
+        HELP_ONLINE=TRUE
+        AC_MSG_RESULT([HTML (online)])
+        ;;
+    yes)
+        WITH_HELPPACKS=TRUE
+        SCPDEFS="$SCPDEFS -DWITH_HELPPACKS"
+        AC_MSG_RESULT([XML (local)])
+        ;;
+    *)
+        AC_MSG_ERROR([Unknown --with-help=$with_help])
+        ;;
+    esac
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([if we need to build the help index tooling])
+if test \( "$with_help" = yes -o "$enable_extension_integration" != no \) -a -z "$DISABLE_DYNLOADING"; then
+    BUILD_TYPE="$BUILD_TYPE HELPTOOLS"
+    test_clucene=yes
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([whether to enable xapian-omega support for online help])
+if test -n "$with_omindex" -a "$with_omindex" != "no"; then
+    if test "$HELP_ONLINE" != TRUE; then
+        AC_MSG_ERROR([Can't build xapian-omega index without --help=online])
+    fi
+    case "$with_omindex" in
+    "server")
+        HELP_OMINDEX_PAGE=TRUE
+        AC_MSG_RESULT([SERVER])
+        ;;
+    "noxap")
+        AC_MSG_RESULT([NOXAP])
+        ;;
+    *)
+        AC_MSG_ERROR([Unknown --with-omindex=$with_omindex])
+        ;;
+    esac
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([whether to include the XML-help support])
+if test "$enable_xmlhelp" = yes; then
+    BUILD_TYPE="$BUILD_TYPE XMLHELP"
+    test_clucene=yes
+    AC_DEFINE(HAVE_FEATURE_XMLHELP)
+    AC_MSG_RESULT([yes])
+else
+    if test "$with_help" = yes; then
+        add_warning "Building the XML help, but LO with disabled xmlhelp support. Generated help can't be accessed from this LO build!"
+    fi
+    AC_MSG_RESULT([no])
+fi
+
+dnl Test whether to integrate helppacks into the product's installer
+AC_MSG_CHECKING([for helppack integration])
+if test -z "$WITH_HELPPACKS" -o "$with_helppack_integration" = no; then
+    AC_MSG_RESULT([no integration])
+else
+    SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION"
+    AC_MSG_RESULT([integration])
+fi
+
+AC_SUBST([ENABLE_HTMLHELP])
+AC_SUBST([HELP_OMINDEX_PAGE])
+AC_SUBST([HELP_ONLINE])
+# WITH_HELPPACKS is used only in configure
+
+dnl ===================================================================
+dnl Set up a different compiler to produce tools to run on the build
+dnl machine when doing cross-compilation
+dnl ===================================================================
+
+m4_pattern_allow([PKG_CONFIG_FOR_BUILD])
+m4_pattern_allow([PKG_CONFIG_LIBDIR])
+if test "$cross_compiling" = "yes"; then
+    AC_MSG_CHECKING([for BUILD platform configuration])
+    echo
+    rm -rf CONF-FOR-BUILD config_build.mk
+    mkdir CONF-FOR-BUILD
+    # Here must be listed all files needed when running the configure script. In particular, also
+    # those expanded by the AC_CONFIG_FILES() call near the end of this configure.ac. For clarity,
+    # keep them in the same order as there.
+    (cd $SRC_ROOT && tar cf - \
+        config.guess \
+        bin/get_config_variables \
+        solenv/bin/getcompver.awk \
+        solenv/inc/langlist.mk \
+        download.lst \
+        config_host.mk.in \
+        config_host_lang.mk.in \
+        Makefile.in \
+        lo.xcent.in \
+        bin/bffvalidator.sh.in \
+        bin/odfvalidator.sh.in \
+        bin/officeotron.sh.in \
+        hardened_runtime.xcent.in \
+        instsetoo_native/util/openoffice.lst.in \
+        config_host/*.in \
+        sysui/desktop/macosx/Info.plist.in \
+        .vscode/vs-code-template.code-workspace.in \
+        solenv/lockfile/autoconf.h.in \
+        ) \
+    | (cd CONF-FOR-BUILD && tar xf -)
+    cp configure CONF-FOR-BUILD
+    test -d config_build && cp -p config_build/*.h CONF-FOR-BUILD/config_host 2>/dev/null
+    (
+    unset COM USING_X11 OS CPUNAME
+    unset CC CXX SYSBASE CFLAGS
+    unset AR LD NM OBJDUMP PKG_CONFIG RANLIB READELF STRIP
+    unset CPPUNIT_CFLAGS CPPUNIT_LIBS
+    unset LIBXML_CFLAGS LIBXML_LIBS LIBXSLT_CFLAGS LIBXSLT_LIBS XSLTPROC
+    unset PKG_CONFIG_LIBDIR PKG_CONFIG_PATH
+    if test -n "$CC_FOR_BUILD"; then
+        export CC="$CC_FOR_BUILD"
+        CC_BASE=`first_arg_basename "$CC"`
+    fi
+    if test -n "$CXX_FOR_BUILD"; then
+        export CXX="$CXX_FOR_BUILD"
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+    test -n "$PKG_CONFIG_FOR_BUILD" && export PKG_CONFIG="$PKG_CONFIG_FOR_BUILD"
+    cd CONF-FOR-BUILD
+
+    # Handle host configuration, which affects the cross-toolset too
+    sub_conf_opts=""
+    test -n "$enable_ccache" && sub_conf_opts="$sub_conf_opts --enable-ccache=$enable_ccache"
+    test -n "$with_ant_home" && sub_conf_opts="$sub_conf_opts --with-ant-home=$with_ant_home"
+    test "$with_junit" = "no" && sub_conf_opts="$sub_conf_opts --without-junit"
+    # While we don't need scripting support, we don't have a PYTHON_FOR_BUILD Java equivalent, so must enable scripting for Java
+    if test -n "$ENABLE_JAVA"; then
+        case "$_os" in
+        Android)
+            # Hack for Android - the build doesn't need a host JDK, so just forward to build for convenience
+            test -n "$with_jdk_home" && sub_conf_opts="$sub_conf_opts --with-jdk-home=$with_jdk_home"
+            ;;
+        *)
+            if test -z "$with_jdk_home"; then
+                AC_MSG_ERROR([Missing host JDK! This can't be detected for the build OS, so you have to specify it with --with-jdk-home.])
+            fi
+            ;;
+        esac
+    else
+        sub_conf_opts="$sub_conf_opts --without-java"
+    fi
+    test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION"
+    test "$with_galleries" = "no" -o -z "$WITH_GALLERY_BUILD" && sub_conf_opts="$sub_conf_opts --with-galleries=no --disable-database-connectivity"
+    test -n "$with_help" -a "$with_help" != "no" && sub_conf_opts="$sub_conf_opts --with-help=$with_help"
+    test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts --disable-extensions"
+    test "${enable_ld+set}" = set -a "$build_cpu" = "$host_cpu" && sub_conf_opts="$sub_conf_opts --enable-ld=${enable_ld}"
+    test "${enable_pch+set}" = set && sub_conf_opts="$sub_conf_opts --enable-pch=${enable_pch}"
+    test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts --enable-wasm-strip"
+    test "${with_system_lockfile+set}" = set && sub_conf_opts="$sub_conf_opts --with-system-lockfile=${with_system_lockfile}"
+    test "${enable_fuzzers}" = yes && sub_conf_opts="$sub_conf_opts --without-system-libxml"
+    if test "$_os" = "Emscripten"; then
+        sub_conf_opts="$sub_conf_opts --without-system-libxml --without-system-fontconfig --without-system-freetype --without-system-zlib"
+        if test "${with_main_module+set}" = set; then
+            sub_conf_opts="$sub_conf_opts --with-main-module=${with_main_module}"
+        else
+            sub_conf_opts="$sub_conf_opts --with-main-module=writer"
+        fi
+    fi
+    # windows uses full-internal python and that in turn relies on openssl, so also enable openssl
+    # when cross-compiling for aarch64, overriding the defaults below
+    test "${PLATFORMID}" = "windows_aarch64" && sub_conf_opts="$sub_conf_opts --enable-openssl --with-tls=openssl"
+
+    # Don't bother having configure look for stuff not needed for the build platform anyway
+    # WARNING: any option with an argument containing spaces must be handled separately (see --with-theme)
+    sub_conf_defaults=" \
+        --build="$build_alias" \
+        --disable-cairo-canvas \
+        --disable-cups \
+        --disable-customtarget-components \
+        --disable-firebird-sdbc \
+        --disable-gpgmepp \
+        --disable-gstreamer-1-0 \
+        --disable-gtk3 \
+        --disable-gtk4 \
+        --disable-libcmis \
+        --disable-mariadb-sdbc \
+        --disable-nss \
+        --disable-online-update \
+        --disable-opencl \
+        --disable-openssl \
+        --disable-pdfimport \
+        --disable-postgresql-sdbc \
+        --disable-skia \
+        --disable-xmlhelp \
+        --enable-dynamic-loading \
+        --enable-icecream="$enable_icecream" \
+        --without-doxygen \
+        --without-tls \
+        --without-webdav \
+        --without-x \
+"
+    # single quotes added for better readability in case of spaces
+    echo "    Running CONF-FOR-BUILD/configure" \
+        $sub_conf_defaults \
+        --with-parallelism="'$with_parallelism'" \
+        --with-theme="'$with_theme'" \
+        --with-vendor="'$with_vendor'" \
+        $sub_conf_opts \
+        $with_build_platform_configure_options \
+        --srcdir=$srcdir
+
+    ./configure \
+        $sub_conf_defaults \
+        --with-parallelism="$with_parallelism" \
+        --with-theme="$with_theme" \
+        "--with-vendor=$with_vendor" \
+        $sub_conf_opts \
+        $with_build_platform_configure_options \
+        --srcdir=$srcdir \
+        2>&1 | sed -e 's/^/    /'
+    if test [${PIPESTATUS[0]}] -ne 0; then
+        AC_MSG_ERROR([Running the configure script for BUILD side failed, see CONF-FOR-BUILD/config.log])
+    fi
+
+    # filter permitted build targets
+    PERMITTED_BUILD_TARGETS="
+        AVMEDIA
+        BOOST
+        CAIRO
+        CLUCENE
+        CURL
+        DBCONNECTIVITY
+        DESKTOP
+        DRAGONBOX
+        DYNLOADING
+        EPOXY
+        EXPAT
+        FROZEN
+        GLM
+        GRAPHITE
+        HARFBUZZ
+        HELPTOOLS
+        ICU
+        LCMS2
+        LIBJPEG_TURBO
+        LIBLANGTAG
+        LibO
+        LIBFFI
+        LIBPN
+        LIBTIFF
+        LIBWEBP
+        LIBXML2
+        LIBXSLT
+        MDDS
+        NATIVE
+        OPENSSL
+        ORCUS
+        PYTHON
+        SCRIPTING
+        ZLIB
+"
+    # converts BUILD_TYPE and PERMITTED_BUILD_TARGETS into non-whitespace,
+    # newlined lists, to use grep as a filter
+    PERMITTED_BUILD_TARGETS=$(echo "$PERMITTED_BUILD_TARGETS" | sed -e '/^ *$/d' -e 's/ *//')
+    BUILD_TARGETS="$(sed -n -e '/^export BUILD_TYPE=/ s/.*=//p' config_host.mk | tr ' ' '\n')"
+    BUILD_TARGETS="$(echo "$BUILD_TARGETS" | grep -F "$PERMITTED_BUILD_TARGETS" | tr '\n' ' ')"
+    sed -i -e "s/ BUILD_TYPE=.*$/ BUILD_TYPE=$BUILD_TARGETS/" config_host.mk
+
+    cp config_host.mk ../config_build.mk
+    cp config_host_lang.mk ../config_build_lang.mk
+    mv config.log ../config.Build.log
+    mkdir -p ../config_build
+    mv config_host/*.h ../config_build
+    test -f "$WARNINGS_FILE" && mv "$WARNINGS_FILE" "../$WARNINGS_FILE_FOR_BUILD"
+
+    # all these will get a _FOR_BUILD postfix
+    DIRECT_FOR_BUILD_SETTINGS="
+        CC
+        CPPU_ENV
+        CXX
+        ILIB
+        JAVA_HOME
+        JAVAIFLAGS
+        JDK
+        JDK_SECURITYMANAGER_DISALLOWED
+        LIBO_BIN_FOLDER
+        LIBO_LIB_FOLDER
+        LIBO_URE_LIB_FOLDER
+        LIBO_URE_MISC_FOLDER
+        OS
+        SDKDIRNAME
+        SYSTEM_LIBXML
+        SYSTEM_LIBXSLT
+"
+    # these overwrite host config with build config
+    OVERWRITING_SETTINGS="
+        ANT
+        ANT_HOME
+        ANT_LIB
+        JAVA_CLASSPATH_NOT_SET
+        JAVA_SOURCE_VER
+        JAVA_TARGET_VER
+        JAVACFLAGS
+        JAVACOMPILER
+        JAVADOC
+        JAVADOCISGJDOC
+        LOCKFILE
+        SYSTEM_GENBRK
+        SYSTEM_GENCCODE
+        SYSTEM_GENCMN
+"
+    # these need some special handling
+    EXTRA_HANDLED_SETTINGS="
+        INSTDIR
+        INSTROOT
+        PATH
+        WORKDIR
+"
+    OLD_PATH=$PATH
+    . ./bin/get_config_variables $DIRECT_FOR_BUILD_SETTINGS $OVERWRITING_SETTINGS $EXTRA_HANDLED_SETTINGS
+    BUILD_PATH=$PATH
+    PATH=$OLD_PATH
+
+    line=`echo "LO_PATH_FOR_BUILD='${BUILD_PATH}'" | sed -e 's,/CONF-FOR-BUILD,,g'`
+    echo "$line" >>build-config
+
+    for V in $DIRECT_FOR_BUILD_SETTINGS; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        if test -n "$VV"; then
+            line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}'
+            echo "$line" >>build-config
+        fi
+    done
+
+    for V in $OVERWRITING_SETTINGS; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        if test -n "$VV"; then
+            line=${V}='${'${V}:-$VV'}'
+            echo "$line" >>build-config
+        fi
+    done
+
+    for V in INSTDIR INSTROOT WORKDIR; do
+        VV='$'$V
+        VV=`eval "echo $VV"`
+        VV=`echo $VV | sed -e "s,/CONF-FOR-BUILD/\([[a-z]]*\),/\1_for_build,g"`
+        if test -n "$VV"; then
+            line="${V}_FOR_BUILD='$VV'"
+            echo "$line" >>build-config
+        fi
+    done
+
+    )
+    test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([setup/configure for BUILD side failed, see CONF-FOR-BUILD/config.log])
+    test -f config_build.mk || AC_MSG_ERROR([A file called config_build.mk was supposed to have been copied here, but it isn't found])
+    perl -pi -e 's,/(workdir|instdir)(/|$),/\1_for_build\2,g;' \
+             -e 's,/CONF-FOR-BUILD,,g;' config_build.mk
+
+    eval `cat CONF-FOR-BUILD/build-config`
+
+    AC_MSG_RESULT([checking for BUILD platform configuration... done])
+
+    rm -rf CONF-FOR-BUILD
+else
+    OS_FOR_BUILD="$OS"
+    CC_FOR_BUILD="$CC"
+    CPPU_ENV_FOR_BUILD="$CPPU_ENV"
+    CXX_FOR_BUILD="$CXX"
+    INSTDIR_FOR_BUILD="$INSTDIR"
+    INSTROOT_FOR_BUILD="$INSTROOT"
+    LIBO_BIN_FOLDER_FOR_BUILD="$LIBO_BIN_FOLDER"
+    LIBO_LIB_FOLDER_FOR_BUILD="$LIBO_LIB_FOLDER"
+    LIBO_URE_LIB_FOLDER_FOR_BUILD="$LIBO_URE_LIB_FOLDER"
+    LIBO_URE_MISC_FOLDER_FOR_BUILD="$LIBO_URE_MISC_FOLDER"
+    SDKDIRNAME_FOR_BUILD="$SDKDIRNAME"
+    WORKDIR_FOR_BUILD="$WORKDIR"
+fi
+AC_SUBST(OS_FOR_BUILD)
+AC_SUBST(INSTDIR_FOR_BUILD)
+AC_SUBST(INSTROOT_FOR_BUILD)
+AC_SUBST(LIBO_BIN_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_LIB_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_URE_LIB_FOLDER_FOR_BUILD)
+AC_SUBST(LIBO_URE_MISC_FOLDER_FOR_BUILD)
+AC_SUBST(SDKDIRNAME_FOR_BUILD)
+AC_SUBST(WORKDIR_FOR_BUILD)
+AC_SUBST(CC_FOR_BUILD)
+AC_SUBST(CXX_FOR_BUILD)
+AC_SUBST(CPPU_ENV_FOR_BUILD)
+
+dnl ===================================================================
+dnl Check for lockfile deps
+dnl ===================================================================
+if test -z "$CROSS_COMPILING"; then
+    test -n "$LOCKFILE" -a "${with_system_lockfile+set}" != set && with_system_lockfile="$LOCKFILE"
+    test "${with_system_lockfile+set}" = set || with_system_lockfile=no
+    AC_MSG_CHECKING([which lockfile binary to use])
+    case "$with_system_lockfile" in
+    yes)
+        AC_MSG_RESULT([external])
+        AC_PATH_PROGS([LOCKFILE],[dotlockfile lockfile])
+        ;;
+    no)
+        AC_MSG_RESULT([internal])
+        ;;
+    *)
+        if test -x "$with_system_lockfile"; then
+            LOCKFILE="$with_system_lockfile"
+        else
+            AC_MSG_ERROR(['$with_system_lockfile' is not executable.])
+        fi
+        AC_MSG_RESULT([$with_system_lockfile])
+        ;;
+    esac
+fi
+
+if test -n "$LOCKFILE" -a "$DISABLE_DYNLOADING" = TRUE; then
+    add_warning "The default system lockfile has increasing poll intervals up to 60s, so linking executables may be delayed."
+fi
+
+AC_CHECK_HEADERS([getopt.h paths.h sys/param.h])
+AC_CHECK_FUNCS([utime utimes])
+AC_SUBST(LOCKFILE)
+
+dnl ===================================================================
+dnl Check for syslog header
+dnl ===================================================================
+AC_CHECK_HEADER(syslog.h, AC_DEFINE(HAVE_SYSLOG_H))
+
+dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to turn warnings to errors])
+if test -n "$enable_werror" -a "$enable_werror" != "no"; then
+    ENABLE_WERROR="TRUE"
+    PYTHONWARNINGS="error"
+    AC_MSG_RESULT([yes])
+else
+    if test -n "$LODE_HOME" -a -z "$enable_werror"; then
+        ENABLE_WERROR="TRUE"
+        PYTHONWARNINGS="error"
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_WERROR)
+AC_SUBST(PYTHONWARNINGS)
+
+dnl Check for --enable-assert-always-abort, set ASSERT_ALWAYS_ABORT
+dnl ===================================================================
+AC_MSG_CHECKING([whether to have assert() failures abort even without --enable-debug])
+if test -z "$enable_assert_always_abort"; then
+   if test "$ENABLE_DEBUG" = TRUE; then
+       enable_assert_always_abort=yes
+   else
+       enable_assert_always_abort=no
+   fi
+fi
+if test "$enable_assert_always_abort" = "yes"; then
+    ASSERT_ALWAYS_ABORT="TRUE"
+    AC_MSG_RESULT([yes])
+else
+    ASSERT_ALWAYS_ABORT="FALSE"
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ASSERT_ALWAYS_ABORT)
+
+# Determine whether to use ooenv for the instdir installation
+# ===================================================================
+if test $_os != "WINNT" -a $_os != "Darwin"; then
+    AC_MSG_CHECKING([whether to use ooenv for the instdir installation])
+    if test -z "$enable_ooenv"; then
+        if test -n "$ENABLE_DEBUG$ENABLE_DBGUTIL"; then
+            enable_ooenv=yes
+        else
+            enable_ooenv=no
+        fi
+    fi
+    if test "$enable_ooenv" = "no"; then
+        AC_MSG_RESULT([no])
+    else
+        ENABLE_OOENV="TRUE"
+        AC_MSG_RESULT([yes])
+    fi
+fi
+AC_SUBST(ENABLE_OOENV)
+
+if test "$test_kf5" = "yes" -a "$enable_kf5" = "yes"; then
+    if test "$enable_qt5" = "no"; then
+        AC_MSG_ERROR([KF5 support depends on QT5, so it conflicts with --disable-qt5])
+    else
+        enable_qt5=yes
+    fi
+fi
+
+AC_MSG_CHECKING([whether to build the pagein binaries for oosplash])
+if test "${enable_pagein}" != no -a -z "$DISABLE_DYNLOADING"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PAGEIN=TRUE
+    AC_DEFINE(HAVE_FEATURE_PAGEIN)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_PAGEIN)
+
+dnl ===================================================================
+dnl check for cups support
+dnl ===================================================================
+
+AC_MSG_CHECKING([whether to enable CUPS support])
+if test "$test_cups" = yes -a "$enable_cups" != no; then
+    ENABLE_CUPS=TRUE
+    AC_MSG_RESULT([yes])
+
+    AC_MSG_CHECKING([whether cups support is present])
+    AC_CHECK_LIB([cups], [cupsPrintFiles], [:])
+    AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H))
+    if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -o "$ac_cv_header_cups_cups_h" != "yes"; then
+        AC_MSG_ERROR([Could not find CUPS. Install libcups2-dev or cups-devel.])
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_CUPS)
+
+libo_CHECK_SYSTEM_MODULE([fontconfig],[FONTCONFIG],[fontconfig >= 2.4.1],,system,TRUE)
+
+dnl whether to find & fetch external tarballs?
+dnl ===================================================================
+if test -z "$TARFILE_LOCATION" -a -n "$LODE_HOME" ; then
+   if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+       TARFILE_LOCATION="`cygpath -m $LODE_HOME/ext_tar`"
+   else
+       TARFILE_LOCATION="$LODE_HOME/ext_tar"
+   fi
+fi
+if test -z "$TARFILE_LOCATION"; then
+    if test -d "$SRC_ROOT/src" ; then
+        mv "$SRC_ROOT/src" "$SRC_ROOT/external/tarballs"
+        ln -s "$SRC_ROOT/external/tarballs" "$SRC_ROOT/src"
+    fi
+    TARFILE_LOCATION="$SRC_ROOT/external/tarballs"
+else
+    AbsolutePath "$TARFILE_LOCATION"
+    PathFormat "${absolute_path}"
+    TARFILE_LOCATION="${formatted_path_unix}"
+fi
+AC_SUBST(TARFILE_LOCATION)
+
+AC_MSG_CHECKING([whether we want to fetch tarballs])
+if test "$enable_fetch_external" != "no"; then
+    if test "$with_all_tarballs" = "yes"; then
+        AC_MSG_RESULT([yes, all of them])
+        DO_FETCH_TARBALLS="ALL"
+    else
+        AC_MSG_RESULT([yes, if we use them])
+        DO_FETCH_TARBALLS="TRUE"
+    fi
+else
+    AC_MSG_RESULT([no])
+    DO_FETCH_TARBALLS=
+fi
+AC_SUBST(DO_FETCH_TARBALLS)
+
+dnl Test whether to include MySpell dictionaries
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include MySpell dictionaries])
+if test "$with_myspell_dicts" = "yes"; then
+    AC_MSG_RESULT([yes])
+    WITH_MYSPELL_DICTS=TRUE
+    BUILD_TYPE="$BUILD_TYPE DICTIONARIES"
+    GIT_NEEDED_SUBMODULES="dictionaries $GIT_NEEDED_SUBMODULES"
+else
+    AC_MSG_RESULT([no])
+    WITH_MYSPELL_DICTS=
+fi
+AC_SUBST(WITH_MYSPELL_DICTS)
+
+# There are no "system" myspell, hyphen or mythes dictionaries on macOS, Windows, Android or iOS.
+if test $_os = Darwin -o $_os = WINNT -o $_os = iOS -o $_os = Android; then
+    if test "$with_system_dicts" = yes; then
+        AC_MSG_ERROR([There are no system dicts on this OS in the formats the 3rd-party libs we use expect]);
+    fi
+    with_system_dicts=no
+fi
+
+AC_MSG_CHECKING([whether to use dicts from external paths])
+if test -z "$with_system_dicts" -o "$with_system_dicts" != "no"; then
+    AC_MSG_RESULT([yes])
+    SYSTEM_DICTS=TRUE
+    AC_MSG_CHECKING([for spelling dictionary directory])
+    if test -n "$with_external_dict_dir"; then
+        DICT_SYSTEM_DIR=file://$with_external_dict_dir
+    else
+        DICT_SYSTEM_DIR=file:///usr/share/hunspell
+        if test ! -d /usr/share/hunspell -a -d /usr/share/myspell; then
+            DICT_SYSTEM_DIR=file:///usr/share/myspell
+        fi
+    fi
+    AC_MSG_RESULT([$DICT_SYSTEM_DIR])
+    AC_MSG_CHECKING([for hyphenation patterns directory])
+    if test -n "$with_external_hyph_dir"; then
+        HYPH_SYSTEM_DIR=file://$with_external_hyph_dir
+    else
+        HYPH_SYSTEM_DIR=file:///usr/share/hyphen
+    fi
+    AC_MSG_RESULT([$HYPH_SYSTEM_DIR])
+    AC_MSG_CHECKING([for thesaurus directory])
+    if test -n "$with_external_thes_dir"; then
+        THES_SYSTEM_DIR=file://$with_external_thes_dir
+    else
+        THES_SYSTEM_DIR=file:///usr/share/mythes
+    fi
+    AC_MSG_RESULT([$THES_SYSTEM_DIR])
+else
+    AC_MSG_RESULT([no])
+    SYSTEM_DICTS=
+fi
+AC_SUBST(SYSTEM_DICTS)
+AC_SUBST(DICT_SYSTEM_DIR)
+AC_SUBST(HYPH_SYSTEM_DIR)
+AC_SUBST(THES_SYSTEM_DIR)
+
+dnl ===================================================================
+dnl Precompiled headers.
+ENABLE_PCH=""
+AC_MSG_CHECKING([whether to enable pch feature])
+if test -z "$enable_pch"; then
+    if test "$_os" = "WINNT"; then
+        # Enabled by default on Windows.
+        enable_pch=yes
+        # never use sccache on auto-enabled PCH builds, except if requested explicitly
+        if test -z "$enable_ccache" -a "$SCCACHE"; then
+            CCACHE=""
+        fi
+    else
+        enable_pch=no
+    fi
+fi
+if test "$enable_pch" != no -a "$_os" = Emscripten -a "$ENABLE_WASM_EXCEPTIONS" = TRUE; then
+    AC_MSG_ERROR([PCH currently isn't supported for Emscripten with native EH (nEH) because of missing Sj/Lj support with nEH in clang.])
+fi
+if test "$enable_pch" != "no" -a "$_os" != "WINNT" -a "$GCC" != "yes" ; then
+    AC_MSG_ERROR([Precompiled header not yet supported for your platform/compiler])
+fi
+if test "$enable_pch" = "system"; then
+    ENABLE_PCH="1"
+    AC_MSG_RESULT([yes (system headers)])
+elif test "$enable_pch" = "base"; then
+    ENABLE_PCH="2"
+    AC_MSG_RESULT([yes (system and base headers)])
+elif test "$enable_pch" = "normal"; then
+    ENABLE_PCH="3"
+    AC_MSG_RESULT([yes (normal)])
+elif test "$enable_pch" = "full"; then
+    ENABLE_PCH="4"
+    AC_MSG_RESULT([yes (full)])
+elif test "$enable_pch" = "yes"; then
+    # Pick a suitable default.
+    if test "$GCC" = "yes"; then
+        # With Clang and GCC higher levels do not seem to make a noticeable improvement,
+        # while making the PCHs larger and rebuilds more likely.
+        ENABLE_PCH="2"
+        AC_MSG_RESULT([yes (system and base headers)])
+    else
+        # With MSVC the highest level makes a significant difference,
+        # and it was the default when there used to be no PCH levels.
+        ENABLE_PCH="4"
+        AC_MSG_RESULT([yes (full)])
+    fi
+elif test "$enable_pch" = "no"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_ERROR([Unknown value for --enable-pch])
+fi
+AC_SUBST(ENABLE_PCH)
+# ccache 3.7.1 and older do not properly detect/handle -include .gch in CCACHE_DEPEND mode
+if test -n "$ENABLE_PCH" -a -n "$CCACHE_DEPEND_MODE" -a "$GCC" = "yes" -a "$COM_IS_CLANG" != "TRUE"; then
+    AC_PATH_PROG([CCACHE_BIN],[ccache],[not found])
+    if test "$CCACHE_BIN" != "not found"; then
+        AC_MSG_CHECKING([ccache version])
+        CCACHE_VERSION=`"$CCACHE_BIN" -V | "$AWK" '/^ccache version/{print $3}'`
+        CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+        AC_MSG_RESULT([$CCACHE_VERSION])
+        AC_MSG_CHECKING([whether ccache depend mode works properly with GCC PCH])
+        if test "$CCACHE_NUMVER" -gt "030701"; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_RESULT([no (not newer than 3.7.1)])
+            CCACHE_DEPEND_MODE=
+        fi
+    fi
+fi
+
+PCH_INSTANTIATE_TEMPLATES=
+if test -n "$ENABLE_PCH"; then
+    AC_MSG_CHECKING([whether $CC supports -fpch-instantiate-templates])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -fpch-instantiate-templates"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_INSTANTIATE_TEMPLATES="-fpch-instantiate-templates" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_INSTANTIATE_TEMPLATES"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_INSTANTIATE_TEMPLATES)
+
+BUILDING_PCH_WITH_OBJ=
+if test -n "$ENABLE_PCH"; then
+    AC_MSG_CHECKING([whether $CC supports -Xclang -building-pch-with-obj])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -Xclang -building-pch-with-obj"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ BUILDING_PCH_WITH_OBJ="-Xclang -building-pch-with-obj" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$BUILDING_PCH_WITH_OBJ"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(BUILDING_PCH_WITH_OBJ)
+
+PCH_CODEGEN=
+PCH_NO_CODEGEN=
+fpch_prefix=
+if test "$COM" = MSC; then
+    fpch_prefix="-Xclang "
+fi
+if test -n "$BUILDING_PCH_WITH_OBJ"; then
+    AC_MSG_CHECKING([whether $CC supports ${fpch_prefix}-fpch-codegen])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fpch-codegen"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
+        [ PCH_CODEGEN="${fpch_prefix}-fpch-codegen" ],[])
+    CFLAGS=$save_CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fno-pch-codegen"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],
+        [ PCH_NO_CODEGEN="${fpch_prefix}-fno-pch-codegen" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_CODEGEN"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_CODEGEN)
+AC_SUBST(PCH_NO_CODEGEN)
+PCH_DEBUGINFO=
+if test -n "$BUILDING_PCH_WITH_OBJ"; then
+    AC_MSG_CHECKING([whether $CC supports ${fpch_prefix}-fpch-debuginfo])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror ${fpch_prefix}-fpch-debuginfo"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ PCH_DEBUGINFO="${fpch_prefix}-fpch-debuginfo" ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$PCH_DEBUGINFO"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+AC_SUBST(PCH_DEBUGINFO)
+
+TAB=`printf '\t'`
+
+AC_MSG_CHECKING([the GNU Make version])
+_make_version=`$GNUMAKE --version | grep GNU | $GREP -v GPL | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
+_make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+if test "$_make_longver" -ge "040000"; then
+    AC_MSG_RESULT([$GNUMAKE $_make_version])
+else
+    AC_MSG_ERROR([failed ($GNUMAKE version >= 4.0 needed)])
+fi
+
+_make_ver_check=`$GNUMAKE --version | grep "Built for Windows"`
+STALE_MAKE=
+if test "$_make_ver_check" = ""; then
+   STALE_MAKE=TRUE
+fi
+
+HAVE_LD_HASH_STYLE=FALSE
+WITH_LINKER_HASH_STYLE=
+AC_MSG_CHECKING([for --hash-style gcc linker support])
+if test "$GCC" = "yes"; then
+    if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes"; then
+        hash_styles="gnu sysv"
+    elif test "$with_linker_hash_style" = "no"; then
+        hash_styles=
+    else
+        hash_styles="$with_linker_hash_style"
+    fi
+
+    for hash_style in $hash_styles; do
+        test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue
+        hash_style_ldflags_save=$LDFLAGS
+        LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style"
+
+        AC_RUN_IFELSE([AC_LANG_PROGRAM(
+            [
+#include <stdio.h>
+            ],[
+printf ("");
+            ])],
+            [
+                  HAVE_LD_HASH_STYLE=TRUE
+                  WITH_LINKER_HASH_STYLE=$hash_style
+            ],
+            [HAVE_LD_HASH_STYLE=FALSE],
+            [HAVE_LD_HASH_STYLE=FALSE])
+        LDFLAGS=$hash_style_ldflags_save
+    done
+
+    if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then
+        AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE )
+    else
+        AC_MSG_RESULT( no )
+    fi
+    LDFLAGS=$hash_style_ldflags_save
+else
+    AC_MSG_RESULT( no )
+fi
+AC_SUBST(HAVE_LD_HASH_STYLE)
+AC_SUBST(WITH_LINKER_HASH_STYLE)
+
+dnl ===================================================================
+dnl Check whether there's a Perl version available.
+dnl ===================================================================
+if test -z "$with_perl_home"; then
+    AC_PATH_PROG(PERL, perl)
+else
+    test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"`
+    _perl_path="$with_perl_home/bin/perl"
+    if test -x "$_perl_path"; then
+        PERL=$_perl_path
+    else
+        AC_MSG_ERROR([$_perl_path not found])
+    fi
+fi
+
+dnl ===================================================================
+dnl Testing for Perl version 5 or greater.
+dnl $] is the Perl version variable, it is returned as an integer
+dnl ===================================================================
+if test "$PERL"; then
+    AC_MSG_CHECKING([the Perl version])
+    ${PERL} -e "exit($]);"
+    _perl_version=$?
+    if test "$_perl_version" -lt 5; then
+        AC_MSG_ERROR([found Perl $_perl_version, use Perl 5])
+    fi
+    AC_MSG_RESULT([Perl $_perl_version])
+else
+    AC_MSG_ERROR([Perl not found, install Perl 5])
+fi
+
+dnl ===================================================================
+dnl Testing for required Perl modules
+dnl ===================================================================
+
+AC_MSG_CHECKING([for required Perl modules])
+perl_use_string="use Cwd ; use Digest::MD5"
+if test "$_os" = "WINNT"; then
+    if test -n "$PKGFORMAT"; then
+        for i in $PKGFORMAT; do
+            case "$i" in
+            msi)
+                # for getting fonts versions to use in MSI
+                perl_use_string="$perl_use_string ; use Font::TTF::Font"
+                ;;
+            esac
+        done
+    fi
+fi
+if test "$with_system_hsqldb" = "yes"; then
+    perl_use_string="$perl_use_string ; use Archive::Zip"
+fi
+if test "$enable_openssl" = "yes" -a "$with_system_openssl" != "yes"; then
+    # OpenSSL needs that to build
+    perl_use_string="$perl_use_string ; use FindBin"
+fi
+if $PERL -e "$perl_use_string">/dev/null 2>&1; then
+    AC_MSG_RESULT([all modules found])
+else
+    AC_MSG_RESULT([failed to find some modules])
+    # Find out which modules are missing.
+    for i in $perl_use_string; do
+        if test "$i" != "use" -a "$i" != ";"; then
+            if ! $PERL -e "use $i;">/dev/null 2>&1; then
+                missing_perl_modules="$missing_perl_modules $i"
+            fi
+        fi
+    done
+    AC_MSG_ERROR([
+    The missing Perl modules are: $missing_perl_modules
+    Install them as superuser/administrator with "cpan -i $missing_perl_modules"])
+fi
+
+dnl ===================================================================
+dnl Check for pkg-config
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+    PKG_PROG_PKG_CONFIG
+fi
+AC_SUBST(PKG_CONFIG)
+AC_SUBST(PKG_CONFIG_PATH)
+AC_SUBST(PKG_CONFIG_LIBDIR)
+
+if test "$_os" != "WINNT"; then
+
+    # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache
+    # /path/to/compiler/foo-gcc" you need to set the AR etc env vars
+    # explicitly. Or put /path/to/compiler in PATH yourself.
+
+    toolprefix=gcc
+    if test "$COM_IS_CLANG" = "TRUE"; then
+        toolprefix=llvm
+    fi
+    AC_CHECK_TOOLS(AR,$toolprefix-ar ar)
+    AC_CHECK_TOOLS(NM,$toolprefix-nm nm)
+    AC_CHECK_TOOLS(RANLIB,$toolprefix-ranlib ranlib)
+    AC_CHECK_TOOLS(OBJDUMP,$toolprefix-objdump objdump)
+    AC_CHECK_TOOLS(READELF,$toolprefix-readelf readelf)
+    AC_CHECK_TOOLS(STRIP,$toolprefix-strip strip)
+fi
+AC_SUBST(AR)
+AC_SUBST(NM)
+AC_SUBST(OBJDUMP)
+AC_SUBST(RANLIB)
+AC_SUBST(READELF)
+AC_SUBST(STRIP)
+
+dnl ===================================================================
+dnl pkg-config checks on macOS
+dnl ===================================================================
+
+if test $_os = Darwin; then
+    AC_MSG_CHECKING([for bogus pkg-config])
+    if test -n "$PKG_CONFIG"; then
+        if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | $GREP -q Mono.framework; then
+            AC_MSG_ERROR([yes, from Mono. This *will* break the build. Please remove or hide $PKG_CONFIG])
+        else
+            if test "$enable_bogus_pkg_config" = "yes"; then
+                AC_MSG_RESULT([yes, user-approved from unknown origin.])
+            else
+                AC_MSG_ERROR([yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that $PKG_CONFIG is no longer found by configure scripts.])
+            fi
+        fi
+    else
+        AC_MSG_RESULT([no, good])
+    fi
+fi
+
+find_csc()
+{
+    # Return value: $csctest
+
+    unset csctest
+
+    reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/NET Framework Setup/NDP/v4/Client/InstallPath"
+    if test -n "$regvalue"; then
+        csctest=$regvalue
+        return
+    fi
+}
+
+find_al()
+{
+    # Return value: $altest
+
+    unset altest
+
+    # We need this check to detect 4.6.1 or above.
+    for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/WinSDK-NetFx40Tools/InstallationFolder"
+        PathFormat "$regvalue"
+        if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then
+            altest=$regvalue
+            return
+        fi
+    done
+
+    reg_list_values_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows"
+    for x in $reglist; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/$x/WinSDK-NetFx40Tools/InstallationFolder"
+        PathFormat "$regvalue"
+        if test -n "$regvalue" -a \( -f "$formatted_path_unix/al.exe" -o -f "$formatted_path_unix/bin/al.exe" \); then
+            altest=$regvalue
+            return
+        fi
+    done
+}
+
+find_dotnetsdk()
+{
+    unset frametest
+
+    for ver in 4.8.1 4.8 4.7.2 4.7.1 4.7 4.6.2 4.6.1 4.6; do
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/NETFXSDK/$ver/KitsInstallationFolder"
+        if test -n "$regvalue"; then
+            frametest=$regvalue
+            return
+        fi
+    done
+    AC_MSG_ERROR([The Windows NET SDK (minimum 4.6) not found, check the installation])
+}
+
+find_winsdk_version()
+{
+    # Args: $1 : SDK version as in "8.0", "8.1A" etc
+    # Return values: $winsdktest, $winsdkbinsubdir, $winsdklibsubdir
+
+    unset winsdktest winsdkbinsubdir winsdklibsubdir
+
+    case "$1" in
+    8.0|8.0A)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            winsdklibsubdir=win8
+            return
+        fi
+        ;;
+    8.1|8.1A)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Windows Kits/Installed Roots/KitsRoot81"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            winsdklibsubdir=winv6.3
+            return
+        fi
+        ;;
+    10.0)
+        reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/InstallationFolder"
+        if test -n "$regvalue"; then
+            winsdktest=$regvalue
+            reg_get_value_32 "HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SDKs/Windows/v${1}/ProductVersion"
+            if test -n "$regvalue"; then
+                winsdkbinsubdir="$regvalue".0
+                winsdklibsubdir=$winsdkbinsubdir
+                local tmppath="$winsdktest\\Include\\$winsdklibsubdir"
+                local tmppath_unix=$(cygpath -u "$tmppath")
+                # test exist the SDK path
+                if test -d "$tmppath_unix"; then
+                   # when path is convertible to a short path then path is okay
+                   cygpath -d "$tmppath" >/dev/null 2>&1
+                   if test $? -ne 0; then
+                      AC_MSG_ERROR([Windows SDK doesn't have a 8.3 name, see NtfsDisable8dot3NameCreation])
+                   fi
+                else
+                   AC_MSG_ERROR([The Windows SDK not found, check the installation])
+                fi
+            fi
+            return
+        fi
+        ;;
+    esac
+}
+
+find_winsdk()
+{
+    # Return value: From find_winsdk_version
+
+    unset winsdktest
+
+    for ver in $WINDOWS_SDK_ACCEPTABLE_VERSIONS; do
+        find_winsdk_version $ver
+        if test -n "$winsdktest"; then
+            return
+        fi
+    done
+}
+
+find_msms()
+{
+    # Return value: $msmdir
+    local version="$1"
+
+    AC_MSG_CHECKING([for MSVC $version merge modules directory])
+    local my_msm_file="Microsoft_VC${version}_CRT_x86.msm"
+    local my_msm_dir
+
+    echo "$as_me:$LINENO: searching for $my_msm_file" >&5
+
+    msmdir=
+    case "$VCVER" in
+    16.0 | 17.0 | 17.7)
+        for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+            my_msm_dir="$VC_PRODUCT_DIR/redist/MSVC/$l/MergeModules/"
+            echo "$as_me:$LINENO: looking for $my_msm_dir${my_msm_file}])" >&5
+            if test -e "$my_msm_dir${my_msm_file}"; then
+                msmdir=$my_msm_dir
+            fi
+        done
+        ;;
+    esac
+
+    if test -n "$msmdir"; then
+        msmdir=`cygpath -m "$msmdir"`
+        AC_MSG_RESULT([$msmdir])
+    else
+        if test "$ENABLE_RELEASE_BUILD" = "TRUE" ; then
+            AC_MSG_FAILURE([not found])
+        else
+            AC_MSG_WARN([not found (check config.log)])
+            add_warning "MSM ${my_msm_file} not found"
+        fi
+    fi
+}
+
+find_msvc_x64_dlls()
+{
+    # Return value: $msvcdllpath, $msvcdlls
+
+    AC_MSG_CHECKING([for MSVC x64 DLL path])
+
+    dnl Order crtver in increasing order. Then check the directories returned by
+    dnl ls in an inner loop; assuming they are also ordered in increasing order,
+    dnl the result will be the highest CRT version found in the highest directory.
+
+    msvcdllpath="$VC_PRODUCT_DIR/redist/x64/Microsoft.VC${VCVER}.CRT"
+    case "$VCVER" in
+    16.0 | 17.0 | 17.7)
+        for crtver in 141 142 143; do
+            for l in `ls -1 $VC_PRODUCT_DIR/redist/MSVC/`; do
+                echo "$as_me:$LINENO: testing $VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT" >&5
+                if test -d "$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT"; then
+                    msvcdllpath="$VC_PRODUCT_DIR/redist/MSVC/$l/x64/Microsoft.VC$crtver.CRT"
+                fi
+            done
+        done
+        ;;
+    esac
+    AC_MSG_RESULT([$msvcdllpath])
+    AC_MSG_CHECKING([for MSVC x64 DLLs])
+    msvcdlls="msvcp140.dll vcruntime140.dll"
+    for dll in $msvcdlls; do
+        if ! test -f "$msvcdllpath/$dll"; then
+            AC_MSG_FAILURE([missing $dll])
+        fi
+    done
+    AC_MSG_RESULT([found all ($msvcdlls)])
+}
+
+dnl =========================================
+dnl Check for the Windows  SDK.
+dnl =========================================
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([for Windows SDK])
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        find_winsdk
+        WINDOWS_SDK_HOME=$winsdktest
+
+        # normalize if found
+        if test -n "$WINDOWS_SDK_HOME"; then
+            WINDOWS_SDK_HOME=`cygpath -d "$WINDOWS_SDK_HOME"`
+            WINDOWS_SDK_HOME=`cygpath -u "$WINDOWS_SDK_HOME"`
+        fi
+
+        WINDOWS_SDK_LIB_SUBDIR=$winsdklibsubdir
+    fi
+
+    if test -n "$WINDOWS_SDK_HOME"; then
+        # Remove a possible trailing backslash
+        WINDOWS_SDK_HOME=`echo $WINDOWS_SDK_HOME | $SED 's/\/$//'`
+
+        if test -f "$WINDOWS_SDK_HOME/Include/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/usp10.h"; then
+            have_windows_sdk_headers=yes
+        elif test -f "$WINDOWS_SDK_HOME/Include/um/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/um/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/um/usp10.h"; then
+            have_windows_sdk_headers=yes
+        elif test -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/adoint.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/SqlUcode.h" \
+             -a -f "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um/usp10.h"; then
+            have_windows_sdk_headers=yes
+        else
+            have_windows_sdk_headers=no
+        fi
+
+        if test -f "$WINDOWS_SDK_HOME/lib/user32.lib"; then
+            have_windows_sdk_libs=yes
+        elif test -f "$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/user32.lib"; then
+            have_windows_sdk_libs=yes
+        else
+            have_windows_sdk_libs=no
+        fi
+
+        if test $have_windows_sdk_headers = no -o $have_windows_sdk_libs = no; then
+            AC_MSG_ERROR([Some (all?) Windows SDK files not found, please check if all needed parts of
+the  Windows SDK are installed.])
+        fi
+    fi
+
+    if test -z "$WINDOWS_SDK_HOME"; then
+        AC_MSG_RESULT([no, hoping the necessary headers and libraries will be found anyway!?])
+    elif echo $WINDOWS_SDK_HOME | grep "8.0" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=80
+        AC_MSG_RESULT([found Windows SDK 8.0 ($WINDOWS_SDK_HOME)])
+    elif echo $WINDOWS_SDK_HOME | grep "8.1" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=81
+        AC_MSG_RESULT([found Windows SDK 8.1 ($WINDOWS_SDK_HOME)])
+    elif echo $WINDOWS_SDK_HOME | grep "/10" >/dev/null 2>/dev/null; then
+        WINDOWS_SDK_VERSION=10
+        AC_MSG_RESULT([found Windows SDK 10.0 ($WINDOWS_SDK_HOME)])
+    else
+        AC_MSG_ERROR([Found legacy Windows Platform SDK ($WINDOWS_SDK_HOME)])
+    fi
+    PathFormat "$WINDOWS_SDK_HOME"
+    WINDOWS_SDK_HOME="$formatted_path"
+    WINDOWS_SDK_HOME_unix="$formatted_path_unix"
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include -I$COMPATH/Include"
+        if test -d "$WINDOWS_SDK_HOME/include/um"; then
+            SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/include/um -I$WINDOWS_SDK_HOME/include/shared"
+        elif test -d "$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um"; then
+            SOLARINC="$SOLARINC -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/um -I$WINDOWS_SDK_HOME/Include/$winsdklibsubdir/shared"
+        fi
+    fi
+
+    dnl TODO: solenv/bin/modules/installer/windows/msiglobal.pm wants to use a
+    dnl WiLangId.vbs that is included only in some SDKs (e.g., included in v7.1
+    dnl but not in v8.0), so allow this to be overridden with a
+    dnl WINDOWS_SDK_WILANGID for now; a full-blown --with-windows-sdk-wilangid
+    dnl and configuration error if no WiLangId.vbs is found would arguably be
+    dnl better, but I do not know under which conditions exactly it is needed by
+    dnl msiglobal.pm:
+    if test -z "$WINDOWS_SDK_WILANGID" -a -n "$WINDOWS_SDK_HOME"; then
+        WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/Samples/sysmgmt/msi/scripts/WiLangId.vbs
+        WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID="${WINDOWS_SDK_HOME}/bin/${WINDOWS_SDK_LIB_SUBDIR}/${WIN_BUILD_ARCH}/WiLangId.vbs"
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID=$WINDOWS_SDK_HOME/bin/$WIN_BUILD_ARCH/WiLangId.vbs
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+        if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+            WINDOWS_SDK_WILANGID=$(cygpath -sm "C:/Program Files (x86)/Windows Kits/8.1/bin/$WIN_BUILD_ARCH/WiLangId.vbs")
+            WINDOWS_SDK_WILANGID_unix=$(cygpath -u "$WINDOWS_SDK_WILANGID")
+        fi
+    fi
+    if test -n "$with_lang" -a "$with_lang" != "en-US"; then
+        if test -n "$with_package_format" -a "$with_package_format" != no; then
+            for i in "$with_package_format"; do
+                if test "$i" = "msi"; then
+                    if ! test -e "$WINDOWS_SDK_WILANGID_unix" ; then
+                        AC_MSG_ERROR([WiLangId.vbs not found - building translated packages will fail])
+                    fi
+                fi
+            done
+        fi
+    fi
+fi
+AC_SUBST(WINDOWS_SDK_HOME)
+AC_SUBST(WINDOWS_SDK_LIB_SUBDIR)
+AC_SUBST(WINDOWS_SDK_VERSION)
+AC_SUBST(WINDOWS_SDK_WILANGID)
+
+if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+    dnl Check midl.exe; this being the first check for a tool in the SDK bin
+    dnl dir, it also determines that dir's path w/o an arch segment if any,
+    dnl WINDOWS_SDK_BINDIR_NO_ARCH:
+    AC_MSG_CHECKING([for midl.exe])
+
+    find_winsdk
+    PathFormat "$winsdktest"
+    winsdktest_unix="$formatted_path_unix"
+
+    if test -n "$winsdkbinsubdir" \
+        -a -f "$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/midl.exe"
+    then
+        MIDL_PATH=$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin/$winsdkbinsubdir
+    elif test -f "$winsdktest_unix/Bin/$WIN_BUILD_ARCH/midl.exe"; then
+        MIDL_PATH=$winsdktest/Bin/$WIN_BUILD_ARCH
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin
+    elif test -f "$winsdktest_unix/Bin/midl.exe"; then
+        MIDL_PATH=$winsdktest/Bin
+        WINDOWS_SDK_BINDIR_NO_ARCH=$WINDOWS_SDK_HOME_unix/Bin
+    fi
+    PathFormat "$MIDL_PATH"
+    if test ! -f "$formatted_path_unix/midl.exe"; then
+        AC_MSG_ERROR([midl.exe not found in $winsdktest/Bin/$WIN_BUILD_ARCH, Windows SDK installation broken?])
+    else
+        AC_MSG_RESULT([$MIDL_PATH/midl.exe])
+    fi
+
+    # Convert to posix path with 8.3 filename restrictions ( No spaces )
+    MIDL_PATH=`win_short_path_for_make "$MIDL_PATH"`
+
+    if test -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/msitran.exe"; then :
+    elif test -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/msitran.exe"; then :
+    elif test -f "$WINDOWS_SDK_HOME/bin/x86/msiinfo.exe" \
+         -a -f "$WINDOWS_SDK_HOME/bin/x86/msidb.exe" \
+         -a -f "$WINDOWS_SDK_BINDIR_NO_ARCH/x86/uuidgen.exe" \
+         -a -f "$WINDOWS_SDK_HOME/bin/x86/msitran.exe"; then :
+    else
+        AC_MSG_ERROR([Some (all?) Windows Installer tools in the Windows SDK are missing, please install.])
+    fi
+
+    dnl Check csc.exe
+    AC_MSG_CHECKING([for csc.exe])
+    find_csc
+    PathFormat "$csctest"
+    csctest_unix="$formatted_path_unix"
+    if test -f "$csctest_unix/csc.exe"; then
+        CSC_PATH="$csctest"
+    fi
+    if test ! -f "$csctest_unix/csc.exe"; then
+        AC_MSG_ERROR([csc.exe not found as $CSC_PATH/csc.exe])
+    else
+        AC_MSG_RESULT([$CSC_PATH/csc.exe])
+    fi
+
+    CSC_PATH=`win_short_path_for_make "$CSC_PATH"`
+
+    dnl Check al.exe
+    AC_MSG_CHECKING([for al.exe])
+    if test -n "$winsdkbinsubdir" \
+        -a -f "$winsdktest_unix/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH/al.exe"
+    then
+        AL_PATH="$winsdktest/Bin/$winsdkbinsubdir/$WIN_BUILD_ARCH"
+    elif test -f "$winsdktest_unix/Bin/$WIN_BUILD_ARCH/al.exe"; then
+        AL_PATH="$winsdktest/Bin/$WIN_BUILD_ARCH"
+    elif test -f "$winsdktest_unix/Bin/al.exe"; then
+        AL_PATH="$winsdktest/Bin"
+    fi
+
+    if test -z "$AL_PATH"; then
+        find_al
+        PathFormat "$altest"
+        altest_unix="$formatted_path_unix"
+        if test -f "$altest_unix/bin/al.exe"; then
+            AL_PATH="$altest/bin"
+        elif test -f "$altest_unix/al.exe"; then
+            AL_PATH="$altest"
+        fi
+    fi
+    PathFormat "$AL_PATH"
+    if test ! -f "$formatted_path_unix/al.exe"; then
+        AC_MSG_ERROR([al.exe not found as $AL_PATH/al.exe])
+    else
+        AC_MSG_RESULT([$AL_PATH/al.exe])
+    fi
+
+    AL_PATH=`win_short_path_for_make "$AL_PATH"`
+
+    dnl Check mscoree.lib / .NET Framework dir
+    AC_MSG_CHECKING(.NET Framework)
+    find_dotnetsdk
+    PathFormat "$frametest"
+    frametest="$formatted_path_unix"
+    if test -f "$frametest/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+        DOTNET_FRAMEWORK_HOME="$frametest"
+    else
+        if test -f "$winsdktest_unix/lib/mscoree.lib" -o -f "$winsdktest_unix/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+            DOTNET_FRAMEWORK_HOME="$winsdktest"
+        fi
+    fi
+    PathFormat "$DOTNET_FRAMEWORK_HOME"
+    if test ! -f "$formatted_path_unix/lib/mscoree.lib" -a ! -f "$formatted_path_unix/lib/$winsdklibsubdir/um/$WIN_BUILD_ARCH/mscoree.lib" -a ! -f "$formatted_path_unix/Lib/um/$WIN_BUILD_ARCH/mscoree.lib"; then
+        AC_MSG_ERROR([mscoree.lib not found])
+    fi
+    AC_MSG_RESULT([found: $DOTNET_FRAMEWORK_HOME])
+
+    PathFormat "$MIDL_PATH"
+    MIDL_PATH="$formatted_path"
+
+    PathFormat "$AL_PATH"
+    AL_PATH="$formatted_path"
+
+    PathFormat "$DOTNET_FRAMEWORK_HOME"
+    DOTNET_FRAMEWORK_HOME="$formatted_path"
+
+    PathFormat "$CSC_PATH"
+    CSC_PATH="$formatted_path"
+fi
+
+dnl ===================================================================
+dnl Testing for C++ compiler and version...
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+    # AC_PROG_CXX sets CXXFLAGS to -g -O2 if not set, avoid that
+    save_CXXFLAGS=$CXXFLAGS
+    AC_PROG_CXX
+    CXXFLAGS=$save_CXXFLAGS
+    if test -z "$CXX_BASE"; then
+        CXX_BASE=`first_arg_basename "$CXX"`
+    fi
+fi
+
+dnl check for GNU C++ compiler version
+if test "$GXX" = "yes" -a -z "$COM_IS_CLANG"; then
+    AC_MSG_CHECKING([the GNU C++ compiler version])
+
+    _gpp_version=`$CXX -dumpversion`
+    _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'`
+
+    if test "$_gpp_majmin" -lt "700"; then
+        AC_MSG_ERROR([You need to use GNU C++ compiler version >= 7.0 to build LibreOffice, you have $_gpp_version.])
+    else
+        AC_MSG_RESULT([ok (g++ $_gpp_version)])
+    fi
+
+    dnl see https://issuetracker.google.com/issues/36962819
+        glibcxx_threads=no
+        AC_LANG_PUSH([C++])
+        AC_REQUIRE_CPP
+        AC_MSG_CHECKING([whether $CXX_BASE is broken with boost.thread])
+        AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+            #include <bits/c++config.h>]],[[
+            #if !defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
+            && !defined(_GLIBCXX__PTHREADS) \
+            && !defined(_GLIBCXX_HAS_GTHREADS)
+            choke me
+            #endif
+        ]])],[AC_MSG_RESULT([yes])
+        glibcxx_threads=yes],[AC_MSG_RESULT([no])])
+        AC_LANG_POP([C++])
+        if test $glibcxx_threads = yes; then
+            BOOST_CXXFLAGS="-D_GLIBCXX_HAS_GTHREADS"
+        fi
+fi
+AC_SUBST(BOOST_CXXFLAGS)
+
+#
+# prefx CXX with ccache if needed
+#
+if test "$CCACHE" != ""; then
+    AC_MSG_CHECKING([whether $CXX_BASE is already ccached])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS --ccache-skip -O2"
+    # msvc does not fail on unknown options, check stdout
+    if test "$COM" = MSC; then
+        CXXFLAGS="$CXXFLAGS -nologo"
+    fi
+    save_ac_cxx_werror_flag=$ac_cxx_werror_flag
+    ac_cxx_werror_flag=yes
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        CXX="$CCACHE $CXX"
+        CXX_BASE="ccache $CXX_BASE"
+        AC_MSG_RESULT([no])
+    fi
+    CXXFLAGS=$save_CXXFLAGS
+    ac_cxx_werror_flag=$save_ac_cxx_werror_flag
+    AC_LANG_POP([C++])
+fi
+
+dnl ===================================================================
+dnl Find pre-processors.(should do that _after_ messing with CC/CXX)
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+    AC_PROG_CXXCPP
+
+    dnl Check whether there's a C pre-processor.
+    AC_PROG_CPP
+fi
+
+
+dnl ===================================================================
+dnl Find integral type sizes and alignments
+dnl ===================================================================
+
+if test "$_os" != "WINNT"; then
+
+    AC_CHECK_SIZEOF(long)
+    AC_CHECK_SIZEOF(short)
+    AC_CHECK_SIZEOF(int)
+    AC_CHECK_SIZEOF(long long)
+    AC_CHECK_SIZEOF(double)
+    AC_CHECK_SIZEOF(void*)
+    AC_CHECK_SIZEOF(size_t)
+
+    SAL_TYPES_SIZEOFSHORT=$ac_cv_sizeof_short
+    SAL_TYPES_SIZEOFINT=$ac_cv_sizeof_int
+    SAL_TYPES_SIZEOFLONG=$ac_cv_sizeof_long
+    SAL_TYPES_SIZEOFLONGLONG=$ac_cv_sizeof_long_long
+    SAL_TYPES_SIZEOFPOINTER=$ac_cv_sizeof_voidp
+    SIZEOF_SIZE_T=$ac_cv_sizeof_size_t
+
+    dnl Allow build without AC_CHECK_ALIGNOF, grrr
+    m4_pattern_allow([AC_CHECK_ALIGNOF])
+    m4_ifdef([AC_CHECK_ALIGNOF],
+        [
+            AC_CHECK_ALIGNOF(short,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(int,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(long,[#include <stddef.h>])
+            AC_CHECK_ALIGNOF(double,[#include <stddef.h>])
+        ],
+        [
+            case "$_os-$host_cpu" in
+            Linux-i686)
+                test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
+                test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
+                test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=4
+                test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=4
+                ;;
+            Linux-x86_64)
+                test -z "$ac_cv_alignof_short" && ac_cv_alignof_short=2
+                test -z "$ac_cv_alignof_int" && ac_cv_alignof_int=4
+                test -z "$ac_cv_alignof_long" && ac_cv_alignof_long=8
+                test -z "$ac_cv_alignof_double" && ac_cv_alignof_double=8
+                ;;
+            *)
+                if test -z "$ac_cv_alignof_short" -o \
+                        -z "$ac_cv_alignof_int" -o \
+                        -z "$ac_cv_alignof_long" -o \
+                        -z "$ac_cv_alignof_double"; then
+                   AC_MSG_ERROR([Your Autoconf doesn't have [AC_][CHECK_ALIGNOF]. You need to set the environment variables ac_cv_alignof_short, ac_cv_alignof_int, ac_cv_alignof_long and ac_cv_alignof_double.])
+                fi
+                ;;
+            esac
+        ])
+
+    SAL_TYPES_ALIGNMENT2=$ac_cv_alignof_short
+    SAL_TYPES_ALIGNMENT4=$ac_cv_alignof_int
+    if test $ac_cv_sizeof_long -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_long
+    elif test $ac_cv_sizeof_double -eq 8; then
+        SAL_TYPES_ALIGNMENT8=$ac_cv_alignof_double
+    else
+        AC_MSG_ERROR([Cannot find alignment of 8 byte types.])
+    fi
+
+    dnl Check for large file support
+    AC_SYS_LARGEFILE
+    if test -n "$ac_cv_sys_file_offset_bits" -a "$ac_cv_sys_file_offset_bits" != "no"; then
+        LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
+    fi
+    if test -n "$ac_cv_sys_large_files" -a "$ac_cv_sys_large_files" != "no"; then
+        LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES"
+    fi
+else
+    # Hardcode for MSVC
+    SAL_TYPES_SIZEOFSHORT=2
+    SAL_TYPES_SIZEOFINT=4
+    SAL_TYPES_SIZEOFLONG=4
+    SAL_TYPES_SIZEOFLONGLONG=8
+    if test $WIN_HOST_BITS -eq 32; then
+        SAL_TYPES_SIZEOFPOINTER=4
+        SIZEOF_SIZE_T=4
+    else
+        SAL_TYPES_SIZEOFPOINTER=8
+        SIZEOF_SIZE_T=8
+    fi
+    SAL_TYPES_ALIGNMENT2=2
+    SAL_TYPES_ALIGNMENT4=4
+    SAL_TYPES_ALIGNMENT8=8
+    LFS_CFLAGS=''
+fi
+AC_SUBST(LFS_CFLAGS)
+AC_SUBST(SIZEOF_SIZE_T)
+
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFSHORT,$SAL_TYPES_SIZEOFSHORT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFINT,$SAL_TYPES_SIZEOFINT)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONG,$SAL_TYPES_SIZEOFLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFLONGLONG,$SAL_TYPES_SIZEOFLONGLONG)
+AC_DEFINE_UNQUOTED(SAL_TYPES_SIZEOFPOINTER,$SAL_TYPES_SIZEOFPOINTER)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT2,$SAL_TYPES_ALIGNMENT2)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT4,$SAL_TYPES_ALIGNMENT4)
+AC_DEFINE_UNQUOTED(SAL_TYPES_ALIGNMENT8,$SAL_TYPES_ALIGNMENT8)
+
+dnl Calc jumbo sheets (1m+ rows) depend on 64 bit tools::Long .
+AC_MSG_CHECKING([whether jumbo sheets are supported])
+if test "$_os" != "WINNT"; then
+    if test $SAL_TYPES_SIZEOFLONG -gt 4; then
+        AC_MSG_RESULT([yes])
+        ENABLE_JUMBO_SHEETS=TRUE
+        AC_DEFINE(HAVE_FEATURE_JUMBO_SHEETS)
+    else
+        AC_MSG_RESULT([no])
+    fi
+else
+    if test $WIN_HOST_BITS -gt 32; then
+        # 64bit windows is special-cased for tools::Long because long is 32bit
+        AC_MSG_RESULT([yes])
+        ENABLE_JUMBO_SHEETS=TRUE
+        AC_DEFINE(HAVE_FEATURE_JUMBO_SHEETS)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_JUMBO_SHEETS)
+
+dnl ===================================================================
+dnl Check whether to enable runtime optimizations
+dnl ===================================================================
+ENABLE_RUNTIME_OPTIMIZATIONS=
+AC_MSG_CHECKING([whether to enable runtime optimizations])
+if test -z "$enable_runtime_optimizations"; then
+    for i in $CC; do
+        case $i in
+        -fsanitize=*)
+            enable_runtime_optimizations=no
+            break
+            ;;
+        esac
+    done
+fi
+if test "$enable_runtime_optimizations" != no; then
+    ENABLE_RUNTIME_OPTIMIZATIONS=TRUE
+    AC_DEFINE(ENABLE_RUNTIME_OPTIMIZATIONS)
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_RUNTIME_OPTIMIZATIONS])
+
+dnl ===================================================================
+dnl Check if valgrind headers are available
+dnl ===================================================================
+ENABLE_VALGRIND=
+if test "$cross_compiling" != yes -a "$with_valgrind" != no; then
+    prev_cppflags=$CPPFLAGS
+    # Is VALGRIND_CFLAGS something one is supposed to have in the environment,
+    # or where does it come from?
+    CPPFLAGS="$CPPFLAGS $VALGRIND_CFLAGS"
+    AC_CHECK_HEADER([valgrind/valgrind.h],
+        [ENABLE_VALGRIND=TRUE])
+    CPPFLAGS=$prev_cppflags
+fi
+AC_SUBST([ENABLE_VALGRIND])
+if test -z "$ENABLE_VALGRIND"; then
+    if test "$with_valgrind" = yes; then
+        AC_MSG_ERROR([--with-valgrind specified but no Valgrind headers found])
+    fi
+    VALGRIND_CFLAGS=
+fi
+AC_SUBST([VALGRIND_CFLAGS])
+
+
+dnl ===================================================================
+dnl Check if SDT probes (for systemtap, gdb, dtrace) are available
+dnl ===================================================================
+
+# We need at least the sys/sdt.h include header.
+AC_CHECK_HEADER([sys/sdt.h], [SDT_H_FOUND='TRUE'], [SDT_H_FOUND='FALSE'])
+if test "$SDT_H_FOUND" = "TRUE"; then
+    # Found sys/sdt.h header, now make sure the c++ compiler works.
+    # Old g++ versions had problems with probes in constructors/destructors.
+    AC_MSG_CHECKING([working sys/sdt.h and c++ support])
+    AC_LANG_PUSH([C++])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+    #include <sys/sdt.h>
+    class ProbeClass
+    {
+    private:
+      int& ref;
+      const char *name;
+
+    public:
+      ProbeClass(int& v, const char *n) : ref(v), name(n)
+      {
+        DTRACE_PROBE2(_test_, cons, name, ref);
+      }
+
+      void method(int min)
+      {
+        DTRACE_PROBE3(_test_, meth, name, ref, min);
+        ref -= min;
+      }
+
+      ~ProbeClass()
+      {
+        DTRACE_PROBE2(_test_, dest, name, ref);
+      }
+    };
+    ]],[[
+    int i = 64;
+    DTRACE_PROBE1(_test_, call, i);
+    ProbeClass inst = ProbeClass(i, "call");
+    inst.method(24);
+    ]])], [AC_MSG_RESULT([yes]); AC_DEFINE([USE_SDT_PROBES])],
+          [AC_MSG_RESULT([no, sdt.h or c++ compiler too old])])
+    AC_LANG_POP([C++])
+fi
+AC_CONFIG_HEADERS([config_host/config_probes.h])
+
+dnl ===================================================================
+dnl GCC features
+dnl ===================================================================
+HAVE_GCC_STACK_CLASH_PROTECTION=
+if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+    AC_MSG_CHECKING([whether $CC_BASE supports -fstack-clash-protection])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -fstack-clash-protection"
+    AC_LINK_IFELSE(
+        [AC_LANG_PROGRAM(, [[return 0;]])],
+        [AC_MSG_RESULT([yes]); HAVE_GCC_STACK_CLASH_PROTECTION=TRUE],
+        [AC_MSG_RESULT([no])])
+    CFLAGS=$save_CFLAGS
+
+    AC_MSG_CHECKING([whether $CC_BASE supports -mno-avx])
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -mno-avx"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_AVX=TRUE ],[])
+    CFLAGS=$save_CFLAGS
+    if test "$HAVE_GCC_AVX" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([whether $CC_BASE supports atomic functions])
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
+    int v = 0;
+    if (__sync_add_and_fetch(&v, 1) != 1 ||
+        __sync_sub_and_fetch(&v, 1) != 0)
+        return 1;
+    __sync_synchronize();
+    if (__sync_val_compare_and_swap(&v, 0, 1) != 0 ||
+        v != 1)
+        return 1;
+    return 0;
+]])],[HAVE_GCC_BUILTIN_ATOMIC=TRUE],[])
+    if test "$HAVE_GCC_BUILTIN_ATOMIC" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_GCC_BUILTIN_ATOMIC)
+    else
+        AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __base_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__base_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_BASE_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_allocate_exception in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_allocate_exception(0); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_eh_globals in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__cxa_eh_globals); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_EH_GLOBALS],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exception in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTION],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_get_globals in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_get_globals(); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_GET_GLOBALS],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_current_exception_type in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void * f() { return __cxxabiv1::__cxa_current_exception_type(); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE declares __cxa_throw in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cxxabi.h>
+            void f() { __cxxabiv1::__cxa_throw(0, 0, 0); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_CXA_THROW],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __si_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__si_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_SI_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([whether $CXX_BASE defines __vmi_class_type_info in cxxabi.h])
+    AC_LANG_PUSH([C++])
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <cstddef>
+            #include <cxxabi.h>
+            std::size_t f() { return sizeof(__cxxabiv1::__vmi_class_type_info); }
+        ])], [
+            AC_DEFINE([HAVE_CXXABI_H_VMI_CLASS_TYPE_INFO],[1])
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    AC_LANG_POP([C++])
+fi
+
+AC_SUBST(HAVE_GCC_AVX)
+AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
+AC_SUBST(HAVE_GCC_STACK_CLASH_PROTECTION)
+
+dnl ===================================================================
+dnl Identify the C++ library
+dnl ===================================================================
+
+AC_MSG_CHECKING([what the C++ library is])
+HAVE_LIBSTDCPP=
+HAVE_LIBCPP=
+AC_LANG_PUSH([C++])
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef __GLIBCXX__
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=GLIBCXX
+     cpp_library_name="GNU libstdc++"
+     HAVE_LIBSTDCPP=TRUE
+    ],
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _LIBCPP_VERSION
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=LIBCPP
+     cpp_library_name="LLVM libc++"
+     AC_DEFINE([HAVE_LIBCPP])
+     HAVE_LIBCPP=TRUE
+    ],
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <utility>
+#ifndef _MSC_VER
+foo bar
+#endif
+]])],
+    [CPP_LIBRARY=MSVCRT
+     cpp_library_name="Microsoft"
+    ],
+    AC_MSG_ERROR([Could not figure out what C++ library this is]))))
+AC_MSG_RESULT([$cpp_library_name])
+AC_LANG_POP([C++])
+AC_SUBST([HAVE_LIBSTDCPP])
+AC_SUBST([HAVE_LIBCPP])
+
+if test -z "${LIBCPP_DEBUG+x}" -a -z "$CROSS_COMPILING" -a -n "$HAVE_LIBCPP" -a -n "$ENABLE_DBGUTIL"
+then
+    # Libc++ has two levels of debug mode, assertions mode enabled with -D_LIBCPP_DEBUG=0,
+    # and actual debug mode enabled with -D_LIBCPP_DEBUG=1 (and starting with LLVM15
+    # assertions mode will be separate and controlled by -D_LIBCPP_ENABLE_ASSERTIONS=1,
+    # although there will be backwards compatibility).
+    # Debug mode is supported by libc++ only if built for it, e.g. Mac libc++ isn't,
+    # and there would be undefined references to debug functions.
+    # Moreover std::to_string() has a bug (https://reviews.llvm.org/D125184).
+    # So check if debug mode can be used and disable or downgrade it to assertions
+    # if needed.
+    AC_MSG_CHECKING([if libc++ has a usable debug mode])
+    AC_LANG_PUSH([C++])
+    libcpp_debug_links=
+    AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#define _LIBCPP_DEBUG 0 // only assertions
+#include <vector>
+int main()
+{
+    std::vector<int> v;
+    v.push_back( 1 );
+    return v[ 3 ];
+}
+]])], [libcpp_debug_links=1])
+    if test -n "$libcpp_debug_links"; then
+        # we can use at least assertions, check if debug mode works
+        AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#define _LIBCPP_DEBUG 1 // debug mode
+#include <string>
+#include <vector>
+int foo(const std::vector<int>& v) { return *v.begin(); }
+int main()
+{
+    std::vector<int> v;
+    v.push_back( 1 );
+    std::string s = "xxxxxxxxxxxxxxxxxxxxxxxxx" + std::to_string(10);
+    return (foo(v) + s.size()) != 0 ? 0 : 1;
+}
+]])],
+        [AC_MSG_RESULT(yes)
+         LIBCPP_DEBUG=-D_LIBCPP_DEBUG=1
+        ],
+        [AC_MSG_RESULT(no, using only assertions)
+         LIBCPP_DEBUG=-D_LIBCPP_DEBUG=0
+        ]
+        )
+    else
+        AC_MSG_RESULT(no)
+    fi
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([LIBCPP_DEBUG])
+
+dnl ===================================================================
+dnl Check for gperf
+dnl ===================================================================
+AC_PATH_PROG(GPERF, gperf)
+if test -z "$GPERF"; then
+    AC_MSG_ERROR([gperf not found but needed. Install it.])
+fi
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GPERF=`cygpath -m $GPERF`
+fi
+AC_MSG_CHECKING([whether gperf is new enough])
+my_gperf_ver1=$($GPERF --version | head -n 1)
+my_gperf_ver2=${my_gperf_ver1#GNU gperf }
+my_gperf_ver3=$(printf %s "$my_gperf_ver2" | $AWK -F. '{ print $1*100+($2<100?$2:99) }')
+if test "$my_gperf_ver3" -ge 301; then
+    AC_MSG_RESULT([yes ($my_gperf_ver2)])
+else
+    AC_MSG_ERROR(["$my_gperf_ver1" is too old or unrecognized, must be at least gperf 3.1])
+fi
+AC_SUBST(GPERF)
+
+dnl ===================================================================
+dnl Check for system libcmis
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libcmis],[LIBCMIS],[libcmis-0.5 >= 0.5.2],enabled)
+
+dnl ===================================================================
+dnl C++11
+dnl ===================================================================
+
+if test -z "${CXXFLAGS_CXX11+x}"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports C++17])
+    if test "$COM" = MSC -a "$COM_IS_CLANG" != TRUE; then
+        if test "$with_latest_c__" = yes; then
+            CXXFLAGS_CXX11=-std:c++latest
+        else
+            CXXFLAGS_CXX11=-std:c++17
+        fi
+        CXXFLAGS_CXX11="$CXXFLAGS_CXX11 -permissive- -Zc:__cplusplus,preprocessor"
+    elif test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+        my_flags='-std=c++17 -std=c++1z'
+        if test "$with_latest_c__" = yes; then
+            my_flags="-std=c++26 -std=c++2c -std=c++23 -std=c++2b -std=c++20 -std=c++2a $my_flags"
+        fi
+        for flag in $my_flags; do
+            if test "$COM" = MSC; then
+                flag="-Xclang $flag"
+            fi
+            save_CXXFLAGS=$CXXFLAGS
+            CXXFLAGS="$CXXFLAGS $flag -Werror"
+            if test "$SYSTEM_LIBCMIS" = TRUE; then
+                CXXFLAGS="$CXXFLAGS -DSYSTEM_LIBCMIS $LIBCMIS_CFLAGS"
+            fi
+            AC_LANG_PUSH([C++])
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+                #include <algorithm>
+                #include <functional>
+                #include <vector>
+
+                #if defined SYSTEM_LIBCMIS
+                // See ucb/source/ucp/cmis/auth_provider.hxx:
+                #if !defined __clang__
+                #pragma GCC diagnostic push
+                #pragma GCC diagnostic ignored "-Wdeprecated"
+                #pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
+                #endif
+                #include <libcmis/libcmis.hxx>
+                #if !defined __clang__
+                #pragma GCC diagnostic pop
+                #endif
+                #endif
+
+                void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
+                    std::sort(v.begin(), v.end(), fn);
+                }
+                ]])],[CXXFLAGS_CXX11=$flag])
+            AC_LANG_POP([C++])
+            CXXFLAGS=$save_CXXFLAGS
+            if test -n "$CXXFLAGS_CXX11"; then
+                break
+            fi
+        done
+    fi
+    if test -n "$CXXFLAGS_CXX11"; then
+        AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
+    else
+        AC_MSG_ERROR(no)
+    fi
+fi
+AC_SUBST(CXXFLAGS_CXX11)
+
+if test "$GCC" = "yes"; then
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+    CHECK_L_ATOMIC
+    CXXFLAGS=$save_CXXFLAGS
+    AC_SUBST(ATOMIC_LIB)
+fi
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++11 without Language Defect 757])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_LANG_PUSH([C++])
+
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <stddef.h>
+
+template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S];
+
+namespace
+{
+        struct b
+        {
+                int i;
+                int j;
+        };
+}
+]], [[
+struct a
+{
+        int i;
+        int j;
+};
+a thinga[]={{0,0}, {1,1}};
+b thingb[]={{0,0}, {1,1}};
+size_t i = sizeof(sal_n_array_size(thinga));
+size_t j = sizeof(sal_n_array_size(thingb));
+return !(i != 0 && j != 0);
+]])
+    ], [ AC_MSG_RESULT(yes) ],
+    [ AC_MSG_ERROR(no)])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+
+HAVE_GCC_FNO_SIZED_DEALLOCATION=
+if test "$GCC" = yes; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -fno-sized-deallocation])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -fno-sized-deallocation"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM()],[HAVE_GCC_FNO_SIZED_DEALLOCATION=TRUE])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    if test "$HAVE_GCC_FNO_SIZED_DEALLOCATION" = TRUE; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST([HAVE_GCC_FNO_SIZED_DEALLOCATION])
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++2a constinit sorted vectors])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <algorithm>
+        #include <initializer_list>
+        #include <vector>
+        template<typename T> class S {
+        private:
+            std::vector<T> v_;
+        public:
+            constexpr S(std::initializer_list<T> i): v_(i) { std::sort(v_.begin(), v_.end()); }
+        };
+        constinit S<int> s{3, 2, 1};
+    ])], [
+        AC_DEFINE([HAVE_CPP_CONSTINIT_SORTED_VECTOR],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++2a <span> with unsigned size_type])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <span>
+        #include <type_traits>
+        // Don't check size_type directly, as it was called index_type before P1872R0:
+        void f(std::span<int> s) { static_assert(std::is_unsigned_v<decltype(s.size())>); };
+    ])], [
+        AC_DEFINE([HAVE_CPP_SPAN],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether $CXX_BASE implements C++ DR P1155R3])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        struct S1 { S1(S1 &&); };
+        struct S2: S1 {};
+        S1 f(S2 s) { return s; }
+    ])], [
+        AC_DEFINE([HAVE_P1155R3],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+AC_MSG_CHECKING([whether $CXX_BASE supports C++20 std::atomic_ref])
+HAVE_CXX20_ATOMIC_REF=
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+        #include <atomic>
+        int x;
+        std::atomic_ref<int> y(x);
+    ])], [
+        HAVE_CXX20_ATOMIC_REF=TRUE
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])])
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+AC_SUBST([HAVE_CXX20_ATOMIC_REF])
+
+dnl Supported since GCC 9 and Clang 10 (which each also started to support -Wdeprecated-copy, but
+dnl which is included in -Wextra anyway):
+HAVE_WDEPRECATED_COPY_DTOR=
+if test "$GCC" = yes; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -Wdeprecated-copy-dtor])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -Werror -Wdeprecated-copy-dtor"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+            HAVE_WDEPRECATED_COPY_DTOR=TRUE
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_WDEPRECATED_COPY_DTOR])
+
+dnl At least GCC 8.2 with -O2 (i.e., --enable-optimized) causes a false-positive -Wmaybe-
+dnl uninitialized warning for code like
+dnl
+dnl   OString f();
+dnl   boost::optional<OString> * g(bool b) {
+dnl       boost::optional<OString> o;
+dnl       if (b) o = f();
+dnl       return new boost::optional<OString>(o);
+dnl   }
+dnl
+dnl (as is e.g. present, in a slightly more elaborate form, in
+dnl librdf_TypeConverter::extractNode_NoLock in unoxml/source/rdf/librdf_repository.cxx); the below
+dnl code is meant to be a faithfully stripped-down and self-contained version of the above code:
+HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=
+if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then
+    AC_MSG_CHECKING([whether $CXX_BASE might report false -Werror=maybe-uninitialized])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror -Wmaybe-uninitialized"
+    if test "$ENABLE_OPTIMIZED" = TRUE; then
+        CXXFLAGS="$CXXFLAGS -O2"
+    else
+        CXXFLAGS="$CXXFLAGS -O0"
+    fi
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            #include <new>
+            void f1(int);
+            struct S1 {
+                ~S1() { f1(n); }
+                int n = 0;
+            };
+            struct S2 {
+                S2() {}
+                S2(S2 const & s) { if (s.init) set(*reinterpret_cast<S1 const *>(s.stg)); }
+                ~S2() { if (init) reinterpret_cast<S1 *>(stg)->S1::~S1(); }
+                void set(S1 s) {
+                    new (stg) S1(s);
+                    init = true;
+                }
+                bool init = false;
+                char stg[sizeof (S1)];
+            } ;
+            S1 f2();
+            S2 * f3(bool b) {
+                S2 o;
+                if (b) o.set(f2());
+                return new S2(o);
+            }
+        ]])], [AC_MSG_RESULT([no])], [
+            HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=TRUE
+            AC_MSG_RESULT([yes])
+        ])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED])
+
+dnl Check for <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c5> "[8/9/10/11 Regression]
+dnl -Wstringop-overflow false positive due to using MEM_REF type of &MEM" (fixed in GCC 11), which
+dnl hits us e.g. with GCC 10 and --enable-optimized at
+dnl
+dnl   In file included from include/rtl/string.hxx:49,
+dnl                    from include/rtl/ustring.hxx:43,
+dnl                    from include/osl/file.hxx:35,
+dnl                    from include/codemaker/global.hxx:28,
+dnl                    from include/codemaker/options.hxx:23,
+dnl                    from codemaker/source/commoncpp/commoncpp.cxx:24:
+dnl   In function ‘char* rtl::addDataHelper(char*, const char*, std::size_t)’,
+dnl       inlined from ‘static char* rtl::ToStringHelper<const char [N]>::addData(char*, const char*) [with long unsigned int N = 3]’ at include/rtl/stringconcat.hxx:147:85,
+dnl       inlined from ‘char* rtl::OStringConcat<T1, T2>::addData(char*) const [with T1 = const char [3]; T2 = rtl::OString]’ at include/rtl/stringconcat.hxx:226:103,
+dnl       inlined from ‘rtl::OStringBuffer& rtl::OStringBuffer::append(rtl::OStringConcat<T1, T2>&&) [with T1 = const char [3]; T2 = rtl::OString]’ at include/rtl/strbuf.hxx:599:30,
+dnl       inlined from ‘rtl::OString codemaker::cpp::scopedCppName(const rtl::OString&, bool)’ at codemaker/source/commoncpp/commoncpp.cxx:53:55:
+dnl   include/rtl/stringconcat.hxx:78:15: error: writing 2 bytes into a region of size 1 [-Werror=stringop-overflow=]
+dnl      78 |         memcpy( buffer, data, length );
+dnl         |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
+HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW=
+if test "$GCC" = yes && test "$COM_IS_CLANG" != TRUE; then
+    AC_MSG_CHECKING([whether $CXX_BASE might report false -Werror=stringop-overflow=])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11 -Werror -Wstringop-overflow"
+    if test "$ENABLE_OPTIMIZED" = TRUE; then
+        CXXFLAGS="$CXXFLAGS -O2"
+    else
+        CXXFLAGS="$CXXFLAGS -O0"
+    fi
+    dnl Test code taken from <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87296#c0>:
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            void fill(char const * begin, char const * end, char c);
+            struct q {
+                char ids[4];
+                char username[6];
+            };
+            void test(q & c) {
+                fill(c.ids, c.ids + sizeof(c.ids), '\0');
+                __builtin_strncpy(c.username, "root", sizeof(c.username));
+            }
+        ]])], [AC_MSG_RESULT([no])], [
+            HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW=TRUE
+            AC_MSG_RESULT([yes])
+        ])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_BROKEN_GCC_WSTRINGOP_OVERFLOW])
+
+HAVE_DLLEXPORTINLINES=
+if test "$_os" = "WINNT"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -Zc:dllexportInlines-])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS -Werror -Zc:dllexportInlines-"
+    AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+            HAVE_DLLEXPORTINLINES=TRUE
+            AC_MSG_RESULT([yes])
+        ], [AC_MSG_RESULT([no])])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST([HAVE_DLLEXPORTINLINES])
+
+dnl ===================================================================
+dnl CPU Intrinsics support - SSE, AVX
+dnl ===================================================================
+
+CXXFLAGS_INTRINSICS_SSE2=
+CXXFLAGS_INTRINSICS_SSSE3=
+CXXFLAGS_INTRINSICS_SSE41=
+CXXFLAGS_INTRINSICS_SSE42=
+CXXFLAGS_INTRINSICS_AVX=
+CXXFLAGS_INTRINSICS_AVX2=
+CXXFLAGS_INTRINSICS_AVX512=
+CXXFLAGS_INTRINSICS_AVX512F=
+CXXFLAGS_INTRINSICS_F16C=
+CXXFLAGS_INTRINSICS_FMA=
+
+if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+    # GCC, Clang or Clang-cl (clang-cl + MSVC's -arch options don't work well together)
+    flag_sse2=-msse2
+    flag_ssse3=-mssse3
+    flag_sse41=-msse4.1
+    flag_sse42=-msse4.2
+    flag_avx=-mavx
+    flag_avx2=-mavx2
+    flag_avx512="-mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd"
+    flag_avx512f=-mavx512f
+    flag_f16c=-mf16c
+    flag_fma=-mfma
+else
+    # With MSVC using -arch is in fact not necessary for being able
+    # to use CPU intrinsics, code using AVX512F intrinsics will compile
+    # even if compiled with -arch:AVX, the -arch option really only affects
+    # instructions generated for C/C++ code.
+    # So use the matching same (or lower) -arch options, but only in order
+    # to generate the best matching instructions for the C++ code surrounding
+    # the intrinsics.
+    # SSE2 is the default for x86/x64, so no need to specify the option.
+    flag_sse2=
+    # No specific options for these, use the next lower.
+    flag_ssse3="$flag_sse2"
+    flag_sse41="$flag_sse2"
+    flag_sse42="$flag_sse2"
+    flag_avx=-arch:AVX
+    flag_avx2=-arch:AVX2
+    flag_avx512=-arch:AVX512
+    # Using -arch:AVX512 would enable more than just AVX512F, so use only AVX2.
+    flag_avx512f=-arch:AVX2
+    # No MSVC options for these.
+    flag_f16c="$flag_sse2"
+    flag_fma="$flag_sse2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <emmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_xor_si128 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse2=yes],
+    [can_compile_sse2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse2}])
+if test "${can_compile_sse2}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE2="$flag_sse2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSSE3 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_ssse3"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <tmmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_maddubs_epi16 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_ssse3=yes],
+    [can_compile_ssse3=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_ssse3}])
+if test "${can_compile_ssse3}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSSE3="$flag_ssse3"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE4.1 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse41"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <smmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_cmpeq_epi64 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse41=yes],
+    [can_compile_sse41=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse41}])
+if test "${can_compile_sse41}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE41="$flag_sse41"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile SSE4.2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_sse42"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <nmmintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+        c = _mm_cmpgt_epi64 (a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_sse42=yes],
+    [can_compile_sse42=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_sse42}])
+if test "${can_compile_sse42}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_SSE42="$flag_sse42"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c;
+        c = _mm256_xor_ps(a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_avx=yes],
+    [can_compile_avx=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx}])
+if test "${can_compile_avx}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX="$flag_avx"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX2 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx2"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
+        c = _mm256_maddubs_epi16(a, b);
+        return 0;
+    }
+    ])],
+    [can_compile_avx2=yes],
+    [can_compile_avx2=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx2}])
+if test "${can_compile_avx2}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX2="$flag_avx2"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile AVX512 intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_avx512"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m512i a = _mm512_loadu_si512(0);
+        __m512d v1 = _mm512_load_pd(0);
+        // https://gcc.gnu.org/git/?p=gcc.git;a=commit;f=gcc/config/i386/avx512fintrin.h;h=23bce99cbe7016a04e14c2163ed3fe6a5a64f4e2
+        __m512d v2 = _mm512_abs_pd(v1);
+        return 0;
+    }
+    ])],
+    [can_compile_avx512=yes],
+    [can_compile_avx512=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_avx512}])
+if test "${can_compile_avx512}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_AVX512="$flag_avx512"
+    CXXFLAGS_INTRINSICS_AVX512F="$flag_avx512f"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile F16C intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_f16c"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m128i a = _mm_set1_epi32 (0);
+        __m128 c;
+        c = _mm_cvtph_ps(a);
+        return 0;
+    }
+    ])],
+    [can_compile_f16c=yes],
+    [can_compile_f16c=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_f16c}])
+if test "${can_compile_f16c}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_F16C="$flag_f16c"
+fi
+
+AC_MSG_CHECKING([whether $CXX can compile FMA intrinsics])
+AC_LANG_PUSH([C++])
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $flag_fma"
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+    #include <immintrin.h>
+    int main () {
+        __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c = _mm256_set1_ps (0.0f), d;
+        d = _mm256_fmadd_ps(a, b, c);
+        return 0;
+    }
+    ])],
+    [can_compile_fma=yes],
+    [can_compile_fma=no])
+AC_LANG_POP([C++])
+CXXFLAGS=$save_CXXFLAGS
+AC_MSG_RESULT([${can_compile_fma}])
+if test "${can_compile_fma}" = "yes" ; then
+    CXXFLAGS_INTRINSICS_FMA="$flag_fma"
+fi
+
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE2])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSSE3])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE41])
+AC_SUBST([CXXFLAGS_INTRINSICS_SSE42])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX2])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX512])
+AC_SUBST([CXXFLAGS_INTRINSICS_AVX512F])
+AC_SUBST([CXXFLAGS_INTRINSICS_F16C])
+AC_SUBST([CXXFLAGS_INTRINSICS_FMA])
+
+dnl ===================================================================
+dnl system stl sanity tests
+dnl ===================================================================
+if test "$_os" != "WINNT"; then
+
+    AC_LANG_PUSH([C++])
+
+    save_CPPFLAGS="$CPPFLAGS"
+    if test -n "$MACOSX_SDK_PATH"; then
+        CPPFLAGS="-isysroot $MACOSX_SDK_PATH $CPPFLAGS"
+    fi
+
+    # Assume visibility is not broken with libc++. The below test is very much designed for libstdc++
+    # only.
+    if test "$CPP_LIBRARY" = GLIBCXX; then
+        dnl gcc#19664, gcc#22482, rhbz#162935
+        AC_MSG_CHECKING([if STL headers are visibility safe (GCC bug 22482)])
+        AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no)
+        AC_MSG_RESULT([$stlvisok])
+        if test "$stlvisok" = "no"; then
+            AC_MSG_ERROR([Your libstdc++ headers are not visibility safe. This is no longer supported.])
+        fi
+    fi
+
+    # As the below test checks things when linking self-compiled dynamic libraries, it presumably is irrelevant
+    # when we don't make any dynamic libraries?
+    if test "$DISABLE_DYNLOADING" = ""; then
+        AC_MSG_CHECKING([if $CXX_BASE is -fvisibility-inlines-hidden safe (Clang bug 11250)])
+        cat > conftestlib1.cc <<_ACEOF
+template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
+struct S2: S1<int> { virtual ~S2(); };
+S2::~S2() {}
+_ACEOF
+        cat > conftestlib2.cc <<_ACEOF
+template<typename T> struct S1 { virtual ~S1() {} virtual void f() {} };
+struct S2: S1<int> { virtual ~S2(); };
+struct S3: S2 { virtual ~S3(); }; S3::~S3() {}
+_ACEOF
+        gccvisinlineshiddenok=yes
+        if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib1.cc -o libconftest1$DLLPOST >/dev/null 2>&5; then
+            gccvisinlineshiddenok=no
+        else
+            dnl At least Clang -fsanitize=address and -fsanitize=undefined are
+            dnl known to not work with -z defs (unsetting which makes the test
+            dnl moot, though):
+            my_linkflagsnoundefs=$LINKFLAGSNOUNDEFS
+            if test "$COM_IS_CLANG" = TRUE; then
+                for i in $CXX $CXXFLAGS; do
+                    case $i in
+                    -fsanitize=*)
+                        my_linkflagsnoundefs=
+                        break
+                        ;;
+                    esac
+                done
+            fi
+            if ! $CXX $CXXFLAGS $CPPFLAGS $LINKFLAGSSHL -fPIC -fvisibility-inlines-hidden conftestlib2.cc -L. -lconftest1 $my_linkflagsnoundefs -o libconftest2$DLLPOST >/dev/null 2>&5; then
+                gccvisinlineshiddenok=no
+            fi
+        fi
+
+        rm -fr libconftest*
+        AC_MSG_RESULT([$gccvisinlineshiddenok])
+        if test "$gccvisinlineshiddenok" = "no"; then
+            AC_MSG_ERROR([Your gcc/clang is not -fvisibility-inlines-hidden safe. This is no longer supported.])
+        fi
+    fi
+
+   AC_MSG_CHECKING([if $CXX_BASE has a visibility bug with class-level attributes (GCC bug 26905)])
+    cat >visibility.cxx <<_ACEOF
+#pragma GCC visibility push(hidden)
+struct __attribute__ ((visibility ("default"))) TestStruct {
+  static void Init();
+};
+__attribute__ ((visibility ("default"))) void TestFunc() {
+  TestStruct::Init();
+}
+_ACEOF
+    if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx; then
+        gccvisbroken=yes
+    else
+        case "$host_cpu" in
+        i?86|x86_64)
+            if test "$_os" = "Darwin" -o "$_os" = "iOS"; then
+                gccvisbroken=no
+            else
+                if $EGREP -q '@PLT|@GOT' visibility.s || test "$ENABLE_LTO" = "TRUE"; then
+                    gccvisbroken=no
+                else
+                    gccvisbroken=yes
+                fi
+            fi
+            ;;
+        *)
+            gccvisbroken=no
+            ;;
+        esac
+    fi
+    rm -f visibility.s visibility.cxx
+
+    AC_MSG_RESULT([$gccvisbroken])
+    if test "$gccvisbroken" = "yes"; then
+        AC_MSG_ERROR([Your gcc is not -fvisibility=hidden safe. This is no longer supported.])
+    fi
+
+    CPPFLAGS="$save_CPPFLAGS"
+
+    AC_MSG_CHECKING([if CET endbranch is recognized])
+cat > endbr.s <<_ACEOF
+endbr32
+_ACEOF
+    HAVE_ASM_END_BRANCH_INS_SUPPORT=
+    if $CXX -c endbr.s -o endbr.o >/dev/null 2>&5; then
+        AC_MSG_RESULT([yes])
+        HAVE_ASM_END_BRANCH_INS_SUPPORT=TRUE
+    else
+        AC_MSG_RESULT([no])
+    fi
+    rm -f endbr.s endbr.o
+    AC_SUBST(HAVE_ASM_END_BRANCH_INS_SUPPORT)
+
+    AC_LANG_POP([C++])
+fi
+
+dnl ===================================================================
+dnl  Clang++ tests
+dnl ===================================================================
+
+HAVE_GCC_FNO_ENFORCE_EH_SPECS=
+if test "$GCC" = "yes"; then
+    AC_MSG_CHECKING([whether $CXX_BASE supports -fno-enforce-eh-specs])
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CFLAGS -Werror -fno-enforce-eh-specs"
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ HAVE_GCC_FNO_ENFORCE_EH_SPECS=TRUE ],[])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    if test "$HAVE_GCC_FNO_ENFORCE_EH_SPECS" = "TRUE"; then
+        AC_MSG_RESULT([yes])
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(HAVE_GCC_FNO_ENFORCE_EH_SPECS)
+
+dnl ===================================================================
+dnl Compiler plugins
+dnl ===================================================================
+
+COMPILER_PLUGINS=
+# currently only Clang
+
+if test "$COM_IS_CLANG" != "TRUE"; then
+    if test "$libo_fuzzed_enable_compiler_plugins" = yes -a "$enable_compiler_plugins" = yes; then
+        AC_MSG_NOTICE([Resetting --enable-compiler-plugins=no])
+        enable_compiler_plugins=no
+    fi
+fi
+
+COMPILER_PLUGINS_COM_IS_CLANG=
+if test "$COM_IS_CLANG" = "TRUE"; then
+    if test -n "$enable_compiler_plugins"; then
+        compiler_plugins="$enable_compiler_plugins"
+    elif test -n "$ENABLE_DBGUTIL"; then
+        compiler_plugins=test
+    else
+        compiler_plugins=no
+    fi
+    if test "$compiler_plugins" != no -a "$my_apple_clang" != yes; then
+        if test "$CLANGVER" -lt 120001; then
+            if test "$compiler_plugins" = yes; then
+                AC_MSG_ERROR(
+                    [Clang $CLANGVER is too old to build compiler plugins; need >= 12.0.1.])
+            else
+                compiler_plugins=no
+            fi
+        fi
+    fi
+    if test "$compiler_plugins" != "no"; then
+        dnl The prefix where Clang resides, override to where Clang resides if
+        dnl using a source build:
+        if test -z "$CLANGDIR"; then
+            CLANGDIR=$(dirname $(dirname $($CXX -print-prog-name=$(basename $(printf '%s\n' $CXX | grep clang | head -n 1)))))
+        fi
+        # Assume Clang is self-built, but allow overriding COMPILER_PLUGINS_CXX to the compiler Clang was built with.
+        if test -z "$COMPILER_PLUGINS_CXX"; then
+            COMPILER_PLUGINS_CXX=[$(echo $CXX | sed -e 's/-fsanitize=[^ ]*//g')]
+        fi
+        clangbindir=$CLANGDIR/bin
+        if test "$build_os" = "cygwin"; then
+            clangbindir=$(cygpath -u "$clangbindir")
+        fi
+        AC_PATH_PROG(LLVM_CONFIG, llvm-config,[],"$clangbindir" $PATH)
+        if test -n "$LLVM_CONFIG"; then
+            COMPILER_PLUGINS_CXXFLAGS=$($LLVM_CONFIG --cxxflags)
+            COMPILER_PLUGINS_LINKFLAGS=$($LLVM_CONFIG --ldflags --libs --system-libs | tr '\n' ' ')
+            if test -z "$CLANGLIBDIR"; then
+                CLANGLIBDIR=$($LLVM_CONFIG --libdir)
+            fi
+            # Try if clang is built from source (in which case its includes are not together with llvm includes).
+            # src-root is [llvm-toplevel-src-dir]/llvm, clang is [llvm-toplevel-src-dir]/clang
+            if $LLVM_CONFIG --src-root >/dev/null 2>&1; then
+                clangsrcdir=$(dirname $($LLVM_CONFIG --src-root))
+                if test -n "$clangsrcdir" -a -d "$clangsrcdir" -a -d "$clangsrcdir/clang/include"; then
+                    COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangsrcdir/clang/include"
+                fi
+            fi
+            # obj-root is [llvm-toplevel-obj-dir]/, clang is [llvm-toplevel-obj-dir]/tools/clang
+            clangobjdir=$($LLVM_CONFIG --obj-root)
+            if test -n "$clangobjdir" -a -d "$clangobjdir" -a -d "$clangobjdir/tools/clang/include"; then
+                COMPILER_PLUGINS_CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS -I$clangobjdir/tools/clang/include"
+            fi
+        fi
+        AC_MSG_NOTICE([compiler plugins compile flags: $COMPILER_PLUGINS_CXXFLAGS])
+        AC_LANG_PUSH([C++])
+        save_CXX=$CXX
+        save_CXXCPP=$CXXCPP
+        save_CPPFLAGS=$CPPFLAGS
+        save_CXXFLAGS=$CXXFLAGS
+        save_LDFLAGS=$LDFLAGS
+        save_LIBS=$LIBS
+        CXX=$COMPILER_PLUGINS_CXX
+        CXXCPP="$COMPILER_PLUGINS_CXX -E"
+        CPPFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
+        CXXFLAGS="$COMPILER_PLUGINS_CXXFLAGS"
+        AC_CHECK_HEADER(clang/Basic/SourceLocation.h,
+            [COMPILER_PLUGINS=TRUE],
+            [
+            if test "$compiler_plugins" = "yes"; then
+                AC_MSG_ERROR([Cannot find Clang headers to build compiler plugins.])
+            else
+                AC_MSG_WARN([Cannot find Clang headers to build compiler plugins, plugins disabled])
+                add_warning "Cannot find Clang headers to build compiler plugins, plugins disabled."
+            fi
+            ])
+        dnl TODO: Windows doesn't use LO_CLANG_SHARED_PLUGINS for now, see corresponding TODO
+        dnl comment in compilerplugins/Makefile-clang.mk:
+        if test -n "$COMPILER_PLUGINS" && test "$_os" != "WINNT"; then
+            LDFLAGS=""
+            AC_MSG_CHECKING([for clang libraries to use])
+            if test -z "$CLANGTOOLLIBS"; then
+                LIBS="-lclang-cpp $COMPILER_PLUGINS_LINKFLAGS"
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
+                        [[ clang::FullSourceLoc().dump(); ]])
+                ],[CLANGTOOLLIBS="$LIBS"],[])
+            fi
+            dnl If the above check for the combined -lclang-cpp failed, fall back to a hand-curated
+            dnl list of individual -lclang* (but note that that list can become outdated over time,
+            dnl see e.g. the since-reverted 5078591de9a0e65ca560a4f1913e90dfe95f66bf "CLANGTOOLLIBS
+            dnl needs to include -lclangSupport now"):
+            if test -z "$CLANGTOOLLIBS"; then
+                LIBS="-lclangTooling -lclangFrontend -lclangDriver -lclangParse -lclangSema -lclangEdit \
+ -lclangAnalysis -lclangAST -lclangLex -lclangSerialization -lclangBasic $COMPILER_PLUGINS_LINKFLAGS"
+                AC_LINK_IFELSE([
+                    AC_LANG_PROGRAM([[#include "clang/Basic/SourceLocation.h"]],
+                        [[ clang::FullSourceLoc().dump(); ]])
+                ],[CLANGTOOLLIBS="$LIBS"],[])
+            fi
+            AC_MSG_RESULT([$CLANGTOOLLIBS])
+            if test -z "$CLANGTOOLLIBS"; then
+                if test "$compiler_plugins" = "yes"; then
+                    AC_MSG_ERROR([Cannot find Clang libraries to build compiler plugins.])
+                else
+                    AC_MSG_WARN([Cannot find Clang libraries to build compiler plugins, plugins disabled])
+                    add_warning "Cannot find Clang libraries to build compiler plugins, plugins disabled."
+                fi
+                COMPILER_PLUGINS=
+            fi
+            if test -n "$COMPILER_PLUGINS"; then
+                if test -z "$CLANGSYSINCLUDE"; then
+                    if test -n "$LLVM_CONFIG"; then
+                        # Path to the clang system headers (no idea if there's a better way to get it).
+                        CLANGSYSINCLUDE=$($LLVM_CONFIG --libdir)/clang/$($LLVM_CONFIG --version | sed 's/git\|svn//')/include
+                    fi
+                fi
+            fi
+        fi
+        CXX=$save_CXX
+        CXXCPP=$save_CXXCPP
+        CPPFLAGS=$save_CPPFLAGS
+        CXXFLAGS=$save_CXXFLAGS
+        LDFLAGS=$save_LDFLAGS
+        LIBS="$save_LIBS"
+        AC_LANG_POP([C++])
+
+        AC_MSG_CHECKING([whether the compiler for building compilerplugins is actually Clang])
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+            #ifndef __clang__
+            you lose
+            #endif
+            int foo=42;
+            ]])],
+            [AC_MSG_RESULT([yes])
+             COMPILER_PLUGINS_COM_IS_CLANG=TRUE],
+            [AC_MSG_RESULT([no])])
+        AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
+    fi
+else
+    if test "$enable_compiler_plugins" = "yes"; then
+        AC_MSG_ERROR([Compiler plugins are currently supported only with the Clang compiler.])
+    fi
+fi
+COMPILER_PLUGINS_ANALYZER_PCH=
+if test "$enable_compiler_plugins_analyzer_pch" != no; then
+    COMPILER_PLUGINS_ANALYZER_PCH=TRUE
+fi
+AC_SUBST(COMPILER_PLUGINS)
+AC_SUBST(COMPILER_PLUGINS_ANALYZER_PCH)
+AC_SUBST(COMPILER_PLUGINS_COM_IS_CLANG)
+AC_SUBST(COMPILER_PLUGINS_CXX)
+AC_SUBST(COMPILER_PLUGINS_CXXFLAGS)
+AC_SUBST(COMPILER_PLUGINS_CXX_LINKFLAGS)
+AC_SUBST(COMPILER_PLUGINS_DEBUG)
+AC_SUBST(COMPILER_PLUGINS_TOOLING_ARGS)
+AC_SUBST(CLANGDIR)
+AC_SUBST(CLANGLIBDIR)
+AC_SUBST(CLANGTOOLLIBS)
+AC_SUBST(CLANGSYSINCLUDE)
+
+# Plugin to help linker.
+# Add something like LD_PLUGIN=/usr/lib64/LLVMgold.so to your autogen.input.
+# This makes --enable-lto build with clang work.
+AC_SUBST(LD_PLUGIN)
+
+AC_CHECK_FUNCS(posix_fallocate, HAVE_POSIX_FALLOCATE=YES, [HAVE_POSIX_FALLOCATE=NO])
+AC_SUBST(HAVE_POSIX_FALLOCATE)
+
+JITC_PROCESSOR_TYPE=""
+if test "$_os" = "Linux" -a "$host_cpu" = "powerpc"; then
+    # IBMs JDK needs this...
+    JITC_PROCESSOR_TYPE=6
+    export JITC_PROCESSOR_TYPE
+fi
+AC_SUBST([JITC_PROCESSOR_TYPE])
+
+# Misc Windows Stuff
+AC_ARG_WITH(ucrt-dir,
+    AS_HELP_STRING([--with-ucrt-dir],
+        [path to the directory with the arch-specific MSU packages of the Windows Universal CRT redistributables
+        (MS KB 2999226) for packaging into the installsets (without those the target system needs to install
+        the UCRT or Visual C++ Runtimes manually). The directory must contain the following 6 files:
+            Windows6.1-KB2999226-x64.msu
+            Windows6.1-KB2999226-x86.msu
+            Windows8.1-KB2999226-x64.msu
+            Windows8.1-KB2999226-x86.msu
+            Windows8-RT-KB2999226-x64.msu
+            Windows8-RT-KB2999226-x86.msu
+        A zip archive including those files is available from Microsoft site:
+        https://www.microsoft.com/en-us/download/details.aspx?id=48234]),
+,)
+
+UCRT_REDISTDIR="$with_ucrt_dir"
+if test $_os = "WINNT"; then
+    find_msvc_x64_dlls
+    MSVC_DLL_PATH=`win_short_path_for_make "$msvcdllpath"`
+    MSVC_DLLS="$msvcdlls"
+    if echo "$msvcdllpath" | grep -q "VC143.CRT$"; then
+        with_redist=143
+    elif echo "$msvcdllpath" | grep -q "VC142.CRT$"; then
+        with_redist=142
+    elif echo "$msvcdllpath" | grep -q "VC141.CRT$"; then
+        with_redist=141
+    fi
+    for i in $PKGFORMAT; do
+        if test "$i" = msi; then
+            find_msms "$with_redist"
+            if test -n "$msmdir"; then
+                MSM_PATH=`win_short_path_for_make "$msmdir"`
+                SCPDEFS="$SCPDEFS -DWITH_VC_REDIST=$with_redist"
+            fi
+            break
+        fi
+    done
+
+    if test "$UCRT_REDISTDIR" = "no"; then
+        dnl explicitly disabled
+        UCRT_REDISTDIR=""
+    else
+        if ! test -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows6.1-KB2999226-x86.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8.1-KB2999226-x86.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x64.msu" -a \
+                  -f "$UCRT_REDISTDIR/Windows8-RT-KB2999226-x86.msu"; then
+            UCRT_REDISTDIR=""
+            if test -n "$PKGFORMAT"; then
+               for i in $PKGFORMAT; do
+                   case "$i" in
+                   msi)
+                       AC_MSG_WARN([--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency])
+                       add_warning "--without-ucrt-dir not specified or MSUs not found - installer will have runtime dependency"
+                       ;;
+                   esac
+               done
+            fi
+        fi
+    fi
+fi
+
+AC_SUBST(UCRT_REDISTDIR)
+AC_SUBST(MSVC_DLL_PATH)
+AC_SUBST(MSVC_DLLS)
+AC_SUBST(MSM_PATH)
+
+
+dnl ===================================================================
+dnl Checks for Java
+dnl ===================================================================
+if test "$ENABLE_JAVA" != ""; then
+
+    # Windows-specific tests
+    if test "$build_os" = "cygwin"; then
+        if test -z "$with_jdk_home"; then
+            dnl See <https://docs.oracle.com/javase/9/migrate/toc.htm#JSMIG-GUID-EEED398E-AE37-4D12-
+            dnl AB10-49F82F720027> section "Windows Registry Key Changes":
+            reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/CurrentVersion"
+            if test -n "$regvalue"; then
+                ver=$regvalue
+                reg_get_value "$WIN_HOST_BITS" "HKEY_LOCAL_MACHINE/SOFTWARE/JavaSoft/JDK/$ver/JavaHome"
+                with_jdk_home=$regvalue
+            fi
+            howfound="found automatically"
+        else
+            with_jdk_home=`win_short_path_for_make "$with_jdk_home"`
+            howfound="you passed"
+        fi
+
+        if ! test -f "$with_jdk_home/lib/jvm.lib" -a -f "$with_jdk_home/bin/java.exe"; then
+            AC_MSG_ERROR([No JDK found, pass the --with-jdk-home option (or fix the path) pointing to a $WIN_HOST_BITS-bit JDK >= 9])
+        fi
+    fi
+
+    # macOS: /usr/libexec/java_home helps to set the current JDK_HOME. Actually JDK_HOME should NOT be set where java (/usr/bin/java) is located.
+    # /usr/bin/java -> /System/Library/Frameworks/JavaVM.framework/Versions/Current/Commands/java, but /usr does not contain the JDK libraries
+    if test -z "$with_jdk_home" -a "$_os" = "Darwin" -a -x /usr/libexec/java_home; then
+        with_jdk_home=`/usr/libexec/java_home`
+    fi
+
+    JAVA_HOME=; export JAVA_HOME
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVAINTERPRETER, $with_java)
+    else
+        _java_path="$with_jdk_home/bin/$with_java"
+        dnl Check if there is a Java interpreter at all.
+        if test -x "$_java_path"; then
+            JAVAINTERPRETER=$_java_path
+        else
+            AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home])
+        fi
+    fi
+
+    dnl Check that the JDK found is correct architecture (at least 2 reasons to
+    dnl check: officebean needs to link -ljawt, and libjpipe.so needs to be
+    dnl loaded by java to run JunitTests:
+    if test "$build_os" = "cygwin" -a "$cross_compiling" != "yes"; then
+        shortjdkhome=`cygpath -d "$with_jdk_home"`
+        if test $WIN_HOST_BITS -eq 64 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
+            AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit])
+            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+        elif test $WIN_HOST_BITS -eq 32 -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | $GREP -i 64-bit`" != ""  >/dev/null; then
+            AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
+            AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
+        fi
+
+        if test x`echo "$JAVAINTERPRETER" | $GREP -i '\.exe$'` = x; then
+            JAVAINTERPRETER="${JAVAINTERPRETER}.exe"
+        fi
+        JAVAINTERPRETER=`win_short_path_for_make "$JAVAINTERPRETER"`
+    elif test "$cross_compiling" != "yes"; then
+        case $CPUNAME in
+            AARCH64|AXP|X86_64|IA64|POWERPC64|S390X|SPARC64|MIPS64|RISCV64|LOONGARCH64)
+                if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" = "" >/dev/null; then
+                    AC_MSG_WARN([You are building 64-bit binaries but the JDK $JAVAINTERPRETER is 32-bit])
+                    AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK])
+                fi
+                ;;
+            *) # assumption: everything else 32-bit
+                if test -f "$JAVAINTERPRETER" -a "`$JAVAINTERPRETER -version 2>&1 | $GREP -i 64-bit`" != ""  >/dev/null; then
+                    AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit])
+                    AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK])
+                fi
+                ;;
+        esac
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for JDK.
+dnl ===================================================================
+
+# Whether all the complexity here actually is needed any more or not, no idea.
+
+JDK_SECURITYMANAGER_DISALLOWED=
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    _gij_longver=0
+    AC_MSG_CHECKING([the installed JDK])
+    if test -n "$JAVAINTERPRETER"; then
+        dnl java -version sends output to stderr!
+        if test `$JAVAINTERPRETER -version 2>&1 | $GREP -c "Kaffe"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER --version 2>&1 | $GREP -c "GNU libgcj"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "BEA"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | $GREP -c "IBM"` -gt 0; then
+            AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.ac])
+        else
+            JDK=sun
+
+            dnl Sun JDK specific tests
+            _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED '/^$/d' | $SED s/[[-A-Za-z]]*//`
+            _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
+
+            if test "$_jdk_ver" -lt 10900; then
+                AC_MSG_ERROR([JDK is too old, you need at least 9 ($_jdk_ver < 10900)])
+            fi
+            if test "$_jdk_ver" -gt 10900; then
+                JAVA_CLASSPATH_NOT_SET=TRUE
+            fi
+            dnl TODO: Presumably, the Security Manager will not merely be disallowed, but be
+            dnl completely removed in some Java version > 18 (see
+            dnl <https://openjdk.java.net/jeps/411> "Deprecate the Security Manager for Removal"):
+            if test "$_jdk_ver" -ge 180000; then
+                JDK_SECURITYMANAGER_DISALLOWED=TRUE
+            fi
+
+            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"`
+            if test "$_os" = "WINNT"; then
+                JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"`
+            fi
+            AC_MSG_RESULT([found $JAVA_HOME (JDK $_jdk)])
+
+            # set to limit VM usage for JunitTests
+            JAVAIFLAGS=-Xmx64M
+            # set to limit VM usage for javac
+            JAVACFLAGS=-J-Xmx128M
+        fi
+    else
+        AC_MSG_ERROR([Java not found. You need at least JDK 9])
+    fi
+else
+    if test -z "$ENABLE_JAVA"; then
+        dnl Java disabled
+        JAVA_HOME=
+        export JAVA_HOME
+    elif test "$cross_compiling" = "yes"; then
+        # Just assume compatibility of build and host JDK
+        JDK=$JDK_FOR_BUILD
+        JAVAIFLAGS=$JAVAIFLAGS_FOR_BUILD
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for javac
+dnl ===================================================================
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    javacompiler="javac"
+    : ${JAVA_SOURCE_VER=8}
+    : ${JAVA_TARGET_VER=8}
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVACOMPILER, $javacompiler)
+    else
+        _javac_path="$with_jdk_home/bin/$javacompiler"
+        dnl Check if there is a Java compiler at all.
+        if test -x "$_javac_path"; then
+            JAVACOMPILER=$_javac_path
+        fi
+    fi
+    if test -z "$JAVACOMPILER"; then
+        AC_MSG_ERROR([$javacompiler not found set with_jdk_home])
+    fi
+    if test "$build_os" = "cygwin"; then
+        if test x`echo "$JAVACOMPILER" | $GREP -i '\.exe$'` = x; then
+            JAVACOMPILER="${JAVACOMPILER}.exe"
+        fi
+        JAVACOMPILER=`win_short_path_for_make "$JAVACOMPILER"`
+    fi
+fi
+
+dnl ===================================================================
+dnl Checks for javadoc
+dnl ===================================================================
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    if test -z "$with_jdk_home"; then
+        AC_PATH_PROG(JAVADOC, javadoc)
+    else
+        _javadoc_path="$with_jdk_home/bin/javadoc"
+        dnl Check if there is a javadoc at all.
+        if test -x "$_javadoc_path"; then
+            JAVADOC=$_javadoc_path
+        else
+            AC_PATH_PROG(JAVADOC, javadoc)
+        fi
+    fi
+    if test -z "$JAVADOC"; then
+        AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home])
+    fi
+    if test "$build_os" = "cygwin"; then
+        if test x`echo "$JAVADOC" | $GREP -i '\.exe$'` = x; then
+            JAVADOC="${JAVADOC}.exe"
+        fi
+        JAVADOC=`win_short_path_for_make "$JAVADOC"`
+    fi
+
+    if test `$JAVADOC --version 2>&1 | $GREP -c "gjdoc"` -gt 0; then
+    JAVADOCISGJDOC="yes"
+    fi
+fi
+AC_SUBST(JAVADOC)
+AC_SUBST(JAVADOCISGJDOC)
+
+if test "$ENABLE_JAVA" != "" -a \( "$cross_compiling" != "yes" -o -n "$with_jdk_home" \); then
+    # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr
+    if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then
+        if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then
+           # try to recover first by looking whether we have an alternative
+           # system as in Debian or newer SuSEs where following /usr/bin/javac
+           # over /etc/alternatives/javac leads to the right bindir where we
+           # just need to strip a bit away to get a valid JAVA_HOME
+           JAVA_HOME=$(readlink $(readlink $JAVACOMPILER))
+        elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then
+            # maybe only one level of symlink (e.g. on Mac)
+            JAVA_HOME=$(readlink $JAVACOMPILER)
+            if test "$(dirname $JAVA_HOME)" = "."; then
+                # we've got no path to trim back
+                JAVA_HOME=""
+            fi
+        else
+            # else warn
+            AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect])
+            AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home])
+            add_warning "JAVA_HOME is set to /usr - this is very likely to be incorrect"
+            add_warning "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home"
+        fi
+        dnl now that we probably have the path to the real javac, make a JAVA_HOME out of it...
+        if test "$JAVA_HOME" != "/usr"; then
+            if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
+                dnl Leopard returns a non-suitable path with readlink - points to "Current" only
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,)
+                dnl Tiger already returns a JDK path...
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,)
+            else
+                JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,)
+                dnl check that we have a directory as certain distros eg gentoo substitute javac for a script
+                dnl that checks which version to run
+                if test -f "$JAVA_HOME"; then
+                    JAVA_HOME=""; # set JAVA_HOME to null if it's a file
+                fi
+            fi
+        fi
+    fi
+    # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink
+
+    dnl now if JAVA_HOME has been set to empty, then call findhome to find it
+    if test -z "$JAVA_HOME"; then
+        if test "x$with_jdk_home" = "x"; then
+            cat > findhome.java <<_ACEOF
+[import java.io.File;
+
+class findhome
+{
+    public static void main(String args[])
+    {
+        String jrelocation = System.getProperty("java.home");
+        File jre = new File(jrelocation);
+        System.out.println(jre.getParent());
+    }
+}]
+_ACEOF
+            AC_MSG_CHECKING([if javac works])
+            javac_cmd="$JAVACOMPILER findhome.java 1>&2"
+            AC_TRY_EVAL(javac_cmd)
+            if test $? = 0 -a -f ./findhome.class; then
+                AC_MSG_RESULT([javac works])
+            else
+                echo "configure: javac test failed" >&5
+                cat findhome.java >&5
+                AC_MSG_ERROR([javac does not work - java projects will not build!])
+            fi
+            AC_MSG_CHECKING([if gij knows its java.home])
+            JAVA_HOME=`$JAVAINTERPRETER findhome`
+            if test $? = 0 -a "$JAVA_HOME" != ""; then
+                AC_MSG_RESULT([$JAVA_HOME])
+            else
+                echo "configure: java test failed" >&5
+                cat findhome.java >&5
+                AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home])
+            fi
+            # clean-up after ourselves
+            rm -f ./findhome.java ./findhome.class
+        else
+            JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"`
+        fi
+    fi
+
+    # now check if $JAVA_HOME is really valid
+    if test "$_os" = "Darwin" -o "$OS_FOR_BUILD" = MACOSX; then
+        if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then
+            AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script])
+            AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed])
+            AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects will not be built correctly])
+            add_warning "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script"
+            add_warning "attempted to find JAVA_HOME automatically, but apparently it failed"
+            add_warning "in case JAVA_HOME is incorrectly set, some projects will not be built correctly"
+        fi
+    fi
+    PathFormat "$JAVA_HOME"
+    JAVA_HOME="$formatted_path"
+fi
+
+if test -z "$JAWTLIB" -a -n "$ENABLE_JAVA" -a "$_os" != Android -a \
+    "$_os" != Darwin
+then
+    AC_MSG_CHECKING([for JAWT lib])
+    if test "$_os" = WINNT; then
+        # The path to $JAVA_HOME/lib/$JAWTLIB is part of $ILIB:
+        JAWTLIB=jawt.lib
+    else
+        case "$host_cpu" in
+        arm*)
+            AS_IF([test -e "$JAVA_HOME/jre/lib/aarch32/libjawt.so"], [my_java_arch=aarch32], [my_java_arch=arm])
+            JAVA_ARCH=$my_java_arch
+            ;;
+        i*86)
+            my_java_arch=i386
+            ;;
+        m68k)
+            my_java_arch=m68k
+            ;;
+        powerpc)
+            my_java_arch=ppc
+            ;;
+        powerpc64)
+            my_java_arch=ppc64
+            ;;
+        powerpc64le)
+            AS_IF([test -e "$JAVA_HOME/jre/lib/ppc64le/libjawt.so"], [my_java_arch=ppc64le], [my_java_arch=ppc64])
+            JAVA_ARCH=$my_java_arch
+            ;;
+        sparc64)
+            my_java_arch=sparcv9
+            ;;
+        x86_64)
+            my_java_arch=amd64
+            ;;
+        *)
+            my_java_arch=$host_cpu
+            ;;
+        esac
+        # This is where JDK9 puts the library
+        if test -e "$JAVA_HOME/lib/libjawt.so"; then
+            JAWTLIB="-L$JAVA_HOME/lib/ -ljawt"
+        else
+            JAWTLIB="-L$JAVA_HOME/jre/lib/$my_java_arch -ljawt"
+        fi
+        AS_IF([test "$JAVA_ARCH" != ""], [AC_DEFINE_UNQUOTED([JAVA_ARCH], ["$JAVA_ARCH"])])
+    fi
+    AC_MSG_RESULT([$JAWTLIB])
+fi
+AC_SUBST(JAWTLIB)
+
+if test -n "$ENABLE_JAVA" -a -z "$JAVAINC"; then
+    case "$host_os" in
+
+    cygwin*|wsl*)
+        JAVAINC="-I$JAVA_HOME/include/win32"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include"
+        ;;
+
+    darwin*)
+        if test -d "$JAVA_HOME/include/darwin"; then
+            JAVAINC="-I$JAVA_HOME/include  -I$JAVA_HOME/include/darwin"
+        else
+            JAVAINC=${ISYSTEM}$FRAMEWORKSHOME/JavaVM.framework/Versions/Current/Headers
+        fi
+        ;;
+
+    dragonfly*)
+        JAVAINC="-I$JAVA_HOME/include"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    freebsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/freebsd"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/bsd"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    k*bsd*-gnu*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    linux-gnu*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/linux"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    *netbsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/netbsd"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+       ;;
+
+    openbsd*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/openbsd"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+
+    solaris*)
+        JAVAINC="-I$JAVA_HOME/include"
+        JAVAINC="$JAVAINC -I$JAVA_HOME/include/solaris"
+        test -d "$JAVA_HOME/include/native_thread" && JAVAINC="$JAVAINC -I$JAVA_HOME/include/native_thread"
+        ;;
+    esac
+fi
+SOLARINC="$SOLARINC $JAVAINC"
+
+if test "$ENABLE_JAVA" != "" -a "$cross_compiling" != "yes"; then
+    JAVA_HOME_FOR_BUILD=$JAVA_HOME
+    JAVAIFLAGS_FOR_BUILD=$JAVAIFLAGS
+    JDK_FOR_BUILD=$JDK
+    JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD=$JDK_SECURITYMANAGER_DISALLOWED
+fi
+
+AC_SUBST(JAVACFLAGS)
+AC_SUBST(JAVACOMPILER)
+AC_SUBST(JAVAINTERPRETER)
+AC_SUBST(JAVAIFLAGS)
+AC_SUBST(JAVAIFLAGS_FOR_BUILD)
+AC_SUBST(JAVA_CLASSPATH_NOT_SET)
+AC_SUBST(JAVA_HOME)
+AC_SUBST(JAVA_HOME_FOR_BUILD)
+AC_SUBST(JDK)
+AC_SUBST(JDK_FOR_BUILD)
+AC_SUBST(JDK_SECURITYMANAGER_DISALLOWED_FOR_BUILD)
+AC_SUBST(JAVA_SOURCE_VER)
+AC_SUBST(JAVA_TARGET_VER)
+
+
+dnl ===================================================================
+dnl Export file validation
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable export file validation])
+if test "$with_export_validation" != "no"; then
+    if test -z "$ENABLE_JAVA"; then
+        if test "$with_export_validation" = "yes"; then
+            AC_MSG_ERROR([requested, but Java is disabled])
+        else
+            AC_MSG_RESULT([no, as Java is disabled])
+        fi
+    elif ! test -d "${SRC_ROOT}/schema"; then
+        if test "$with_export_validation" = "yes"; then
+            AC_MSG_ERROR([requested, but schema directory is missing (it is excluded from tarballs)])
+        else
+            AC_MSG_RESULT([no, schema directory is missing (it is excluded from tarballs)])
+        fi
+    else
+        AC_MSG_RESULT([yes])
+        AC_DEFINE(HAVE_EXPORT_VALIDATION)
+
+        AC_PATH_PROGS(ODFVALIDATOR, odfvalidator)
+        if test -z "$ODFVALIDATOR"; then
+            # remember to download the ODF toolkit with validator later
+            AC_MSG_NOTICE([no odfvalidator found, will download it])
+            BUILD_TYPE="$BUILD_TYPE ODFVALIDATOR"
+            ODFVALIDATOR="$BUILDDIR/bin/odfvalidator.sh"
+
+            # and fetch name of odfvalidator jar name from download.lst
+            ODFVALIDATOR_JAR=`$SED -n -e "s/^ODFVALIDATOR_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+            AC_SUBST(ODFVALIDATOR_JAR)
+
+            if test -z "$ODFVALIDATOR_JAR"; then
+                AC_MSG_ERROR([cannot determine odfvalidator jar location (--with-export-validation)])
+            fi
+        fi
+        if test "$build_os" = "cygwin"; then
+            # In case of Cygwin it will be executed from Windows,
+            # so we need to run bash and absolute path to validator
+            # so instead of "odfvalidator" it will be
+            # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+            ODFVALIDATOR="bash.exe `cygpath -m "$ODFVALIDATOR"`"
+        else
+            ODFVALIDATOR="sh $ODFVALIDATOR"
+        fi
+        AC_SUBST(ODFVALIDATOR)
+
+
+        AC_PATH_PROGS(OFFICEOTRON, officeotron)
+        if test -z "$OFFICEOTRON"; then
+            # remember to download the officeotron with validator later
+            AC_MSG_NOTICE([no officeotron found, will download it])
+            BUILD_TYPE="$BUILD_TYPE OFFICEOTRON"
+            OFFICEOTRON="$BUILDDIR/bin/officeotron.sh"
+
+            # and fetch name of officeotron jar name from download.lst
+            OFFICEOTRON_JAR=`$SED -n -e "s/^OFFICEOTRON_JAR *:= *\(.*\) */\1/p" $SRC_ROOT/download.lst`
+            AC_SUBST(OFFICEOTRON_JAR)
+
+            if test -z "$OFFICEOTRON_JAR"; then
+                AC_MSG_ERROR([cannot determine officeotron jar location (--with-export-validation)])
+            fi
+        else
+            # check version of existing officeotron
+            OFFICEOTRON_VER=`$OFFICEOTRON --version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+            if test 0"$OFFICEOTRON_VER" -lt 704; then
+                AC_MSG_ERROR([officeotron too old])
+            fi
+        fi
+        if test "$build_os" = "cygwin"; then
+            # In case of Cygwin it will be executed from Windows,
+            # so we need to run bash and absolute path to validator
+            # so instead of "odfvalidator" it will be
+            # something like "bash.exe C:\cygwin\opt\lo\bin\odfvalidator"
+            OFFICEOTRON="bash.exe `cygpath -m "$OFFICEOTRON"`"
+        else
+            OFFICEOTRON="sh $OFFICEOTRON"
+        fi
+    fi
+    AC_SUBST(OFFICEOTRON)
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_MSG_CHECKING([for Microsoft Binary File Format Validator])
+if test "$with_bffvalidator" != "no"; then
+    AC_DEFINE(HAVE_BFFVALIDATOR)
+
+    if test "$with_export_validation" = "no"; then
+        AC_MSG_ERROR([Please enable export validation (-with-export-validation)!])
+    fi
+
+    if test "$with_bffvalidator" = "yes"; then
+        BFFVALIDATOR=`win_short_path_for_make "$PROGRAMFILES/Microsoft Office/BFFValidator/BFFValidator.exe"`
+    else
+        BFFVALIDATOR="$with_bffvalidator"
+    fi
+
+    if test "$build_os" = "cygwin"; then
+        if test -n "$BFFVALIDATOR" -a -e "`cygpath $BFFVALIDATOR`"; then
+            AC_MSG_RESULT($BFFVALIDATOR)
+        else
+            AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+        fi
+    elif test -n "$BFFVALIDATOR"; then
+        # We are not in Cygwin but need to run Windows binary with wine
+        AC_PATH_PROGS(WINE, wine)
+
+        # so swap in a shell wrapper that converts paths transparently
+        BFFVALIDATOR_EXE="$BFFVALIDATOR"
+        BFFVALIDATOR="sh $BUILDDIR/bin/bffvalidator.sh"
+        AC_SUBST(BFFVALIDATOR_EXE)
+        AC_MSG_RESULT($BFFVALIDATOR)
+    else
+        AC_MSG_ERROR([bffvalidator not found, but required by --with-bffvalidator])
+    fi
+    AC_SUBST(BFFVALIDATOR)
+else
+    AC_MSG_RESULT([no])
+fi
+
+dnl ===================================================================
+dnl Check for epm (not needed for Windows)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable EPM for packing])
+if test "$enable_epm" = "yes"; then
+    AC_MSG_RESULT([yes])
+    if test "$_os" != "WINNT"; then
+        if test $_os = Darwin; then
+            EPM=internal
+        elif test -n "$with_epm"; then
+            EPM=$with_epm
+        else
+            AC_PATH_PROG(EPM, epm, no)
+        fi
+        if test "$EPM" = "no" -o "$EPM" = "internal"; then
+            AC_MSG_NOTICE([EPM will be built.])
+            BUILD_TYPE="$BUILD_TYPE EPM"
+            EPM=${WORKDIR}/UnpackedTarball/epm/epm
+        else
+            # Gentoo has some epm which is something different...
+            AC_MSG_CHECKING([whether the found epm is the right epm])
+            if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then
+                AC_MSG_RESULT([yes])
+            else
+                AC_MSG_ERROR([no. Install ESP Package Manager (https://jimjag.github.io/epm/) and/or specify the path to the right epm])
+            fi
+            AC_MSG_CHECKING([epm version])
+            EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//`
+            if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \
+               test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then
+                AC_MSG_RESULT([OK, >= 3.7])
+            else
+                AC_MSG_RESULT([too old. epm >= 3.7 is required.])
+                AC_MSG_ERROR([Install ESP Package Manager (https://jimjag.github.io/epm/) and/or specify the path to the right epm])
+            fi
+        fi
+    fi
+
+    if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then
+        AC_MSG_CHECKING([for rpm])
+        for a in "$RPM" rpmbuild rpm; do
+            $a --usage >/dev/null 2> /dev/null
+            if test $? -eq 0; then
+                RPM=$a
+                break
+            else
+                $a --version >/dev/null 2> /dev/null
+                if test $? -eq 0; then
+                    RPM=$a
+                    break
+                fi
+            fi
+        done
+        if test -z "$RPM"; then
+            AC_MSG_ERROR([not found])
+        elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then
+            RPM_PATH=`which $RPM`
+            AC_MSG_RESULT([$RPM_PATH])
+            SCPDEFS="$SCPDEFS -DWITH_RPM"
+        else
+            AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.])
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then
+        AC_PATH_PROG(DPKG, dpkg, no)
+        if test "$DPKG" = "no"; then
+            AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.])
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \
+       echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
+        if test "$with_epm" = "no" -a "$_os" != "Darwin"; then
+            if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then
+                AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs])
+                if grep "Patched for .*Office" $EPM >/dev/null 2>/dev/null; then
+                    AC_MSG_RESULT([yes])
+                else
+                    AC_MSG_RESULT([no])
+                    if echo "$PKGFORMAT" | $GREP -q rpm; then
+                        _pt="rpm"
+                        AC_MSG_WARN([the rpms will need to be installed with --nodeps])
+                        add_warning "the rpms will need to be installed with --nodeps"
+                    else
+                        _pt="pkg"
+                    fi
+                    AC_MSG_WARN([the ${_pt}s will not be relocatable])
+                    add_warning "the ${_pt}s will not be relocatable"
+                    AC_MSG_WARN([if you want to make sure installation without --nodeps and
+                                 relocation will work, you need to patch your epm with the
+                                 patch in epm/epm-3.7.patch or build with
+                                 --with-epm=internal which will build a suitable epm])
+                fi
+            fi
+        fi
+    fi
+    if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then
+        AC_PATH_PROG(PKGMK, pkgmk, no)
+        if test "$PKGMK" = "no"; then
+            AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.])
+        fi
+    fi
+    AC_SUBST(RPM)
+    AC_SUBST(DPKG)
+    AC_SUBST(PKGMK)
+else
+    for i in $PKGFORMAT; do
+        case "$i" in
+        bsd | deb | pkg | rpm | native | portable)
+            AC_MSG_ERROR(
+                [--with-package-format='$PKGFORMAT' requires --enable-epm])
+            ;;
+        esac
+    done
+    AC_MSG_RESULT([no])
+    EPM=NO
+fi
+AC_SUBST(EPM)
+
+ENABLE_LWP=
+if test "$enable_lotuswordpro" = "yes"; then
+    ENABLE_LWP="TRUE"
+fi
+AC_SUBST(ENABLE_LWP)
+
+dnl ===================================================================
+dnl Check for building ODK
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build the ODK])
+if test "$enable_odk" = yes; then
+    if test "$DISABLE_DYNLOADING" = TRUE; then
+        AC_MSG_ERROR([can't build ODK for --disable-dynamic-loading builds])
+    fi
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE ODK"
+else
+    AC_MSG_RESULT([no])
+fi
+
+if test "$enable_odk" != yes; then
+    unset DOXYGEN
+else
+    if test "$with_doxygen" = no; then
+        AC_MSG_CHECKING([for doxygen])
+        unset DOXYGEN
+        AC_MSG_RESULT([no])
+    else
+        if test "$with_doxygen" = yes; then
+            AC_PATH_PROG([DOXYGEN], [doxygen])
+            if test -z "$DOXYGEN"; then
+                AC_MSG_ERROR([doxygen not found in \$PATH; specify its pathname via --with-doxygen=..., or disable its use via --without-doxygen])
+            fi
+            if $DOXYGEN -g - | grep -q "HAVE_DOT *= *YES"; then
+                if ! dot -V 2>/dev/null; then
+                    AC_MSG_ERROR([dot not found in \$PATH but doxygen defaults to HAVE_DOT=YES; install graphviz or disable its use via --without-doxygen])
+                fi
+            fi
+        else
+            AC_MSG_CHECKING([for doxygen])
+            DOXYGEN=$with_doxygen
+            AC_MSG_RESULT([$DOXYGEN])
+        fi
+        if test -n "$DOXYGEN"; then
+            DOXYGEN_VERSION=`$DOXYGEN --version 2>/dev/null`
+            DOXYGEN_NUMVERSION=`echo $DOXYGEN_VERSION | $AWK -F. '{ print \$1*10000 + \$2*100 + \$3 }'`
+            if ! test "$DOXYGEN_NUMVERSION" -ge "10804" ; then
+                AC_MSG_ERROR([found doxygen is too old; need at least version 1.8.4 or specify --without-doxygen])
+            fi
+        fi
+    fi
+fi
+AC_SUBST([DOXYGEN])
+
+dnl ==================================================================
+dnl libfuzzer
+dnl ==================================================================
+AC_MSG_CHECKING([whether to enable fuzzers])
+if test "$enable_fuzzers" != yes; then
+    AC_MSG_RESULT([no])
+else
+    if test -z $LIB_FUZZING_ENGINE; then
+      AC_MSG_ERROR(['LIB_FUZZING_ENGINE' must be set when using --enable-fuzzers. Examples include '-fsanitize=fuzzer'.])
+    fi
+    AC_MSG_RESULT([yes])
+    ENABLE_FUZZERS="TRUE"
+    AC_DEFINE([ENABLE_FUZZERS],1)
+    AC_DEFINE([VCL_FLOAT_DEVICE_PIXEL],1)
+    BUILD_TYPE="$BUILD_TYPE FUZZERS"
+fi
+AC_SUBST(LIB_FUZZING_ENGINE)
+
+dnl ===================================================================
+dnl Check for system zlib
+dnl ===================================================================
+if test "$with_system_zlib" = "auto"; then
+    case "$_os" in
+    WINNT)
+        with_system_zlib="$with_system_libs"
+        ;;
+    *)
+        if test "$enable_fuzzers" != "yes"; then
+            with_system_zlib=yes
+        else
+            with_system_zlib=no
+        fi
+        ;;
+    esac
+fi
+
+dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but macOS is too stupid
+dnl and has no pkg-config for it at least on some tinderboxes,
+dnl so leaving that out for now
+dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib])
+AC_MSG_CHECKING([which zlib to use])
+if test "$with_system_zlib" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_ZLIB=TRUE
+    AC_CHECK_HEADER(zlib.h, [],
+        [AC_MSG_ERROR(zlib.h not found. install zlib)], [])
+    AC_CHECK_LIB(z, deflate, [ ZLIB_LIBS=-lz ],
+        [AC_MSG_ERROR(zlib not found or functional)], [])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_ZLIB=
+    BUILD_TYPE="$BUILD_TYPE ZLIB"
+    ZLIB_CFLAGS="-I${WORKDIR}/UnpackedTarball/zlib"
+    if test "$COM" = "MSC"; then
+        ZLIB_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/zlib.lib"
+    else
+        ZLIB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lzlib"
+    fi
+fi
+AC_SUBST(ZLIB_CFLAGS)
+AC_SUBST(ZLIB_LIBS)
+AC_SUBST(SYSTEM_ZLIB)
+
+dnl ===================================================================
+dnl Check for system jpeg
+dnl ===================================================================
+AC_MSG_CHECKING([which libjpeg to use])
+if test "$with_system_jpeg" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBJPEG=TRUE
+    AC_CHECK_HEADER(jpeglib.h, [ LIBJPEG_CFLAGS= ],
+        [AC_MSG_ERROR(jpeg.h not found. install libjpeg)], [])
+    AC_CHECK_LIB(jpeg, jpeg_resync_to_restart, [ LIBJPEG_LIBS="-ljpeg" ],
+        [AC_MSG_ERROR(jpeg library not found or functional)], [])
+else
+    SYSTEM_LIBJPEG=
+    AC_MSG_RESULT([internal, libjpeg-turbo])
+    BUILD_TYPE="$BUILD_TYPE LIBJPEG_TURBO"
+
+    case "$host_cpu" in
+    x86_64 | amd64 | i*86 | x86 | ia32)
+        AC_CHECK_PROGS(NASM, [nasm nasmw yasm])
+        if test -z "$NASM" -a "$build_os" = "cygwin"; then
+            if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/nasm"; then
+                NASM="$LODE_HOME/opt/bin/nasm"
+            elif test -x "/opt/lo/bin/nasm"; then
+                NASM="/opt/lo/bin/nasm"
+            fi
+        fi
+
+        if test -n "$NASM"; then
+            AC_MSG_CHECKING([for object file format of host system])
+            case "$host_os" in
+              cygwin* | mingw* | pw32* | wsl*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='Win64-COFF'
+                    ;;
+                  *)
+                    objfmt='Win32-COFF'
+                    ;;
+                esac
+              ;;
+              msdosdjgpp* | go32*)
+                objfmt='COFF'
+              ;;
+              os2-emx*) # not tested
+                objfmt='MSOMF' # obj
+              ;;
+              linux*coff* | linux*oldld*)
+                objfmt='COFF' # ???
+              ;;
+              linux*aout*)
+                objfmt='a.out'
+              ;;
+              linux*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='ELF64'
+                    ;;
+                  *)
+                    objfmt='ELF'
+                    ;;
+                esac
+              ;;
+              kfreebsd* | freebsd* | netbsd* | openbsd*)
+                if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+                  objfmt='BSD-a.out'
+                else
+                  case "$host_cpu" in
+                    x86_64 | amd64)
+                      objfmt='ELF64'
+                      ;;
+                    *)
+                      objfmt='ELF'
+                      ;;
+                  esac
+                fi
+              ;;
+              solaris* | sunos* | sysv* | sco*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='ELF64'
+                    ;;
+                  *)
+                    objfmt='ELF'
+                    ;;
+                esac
+              ;;
+              darwin* | rhapsody* | nextstep* | openstep* | macos*)
+                case "$host_cpu" in
+                  x86_64)
+                    objfmt='Mach-O64'
+                    ;;
+                  *)
+                    objfmt='Mach-O'
+                    ;;
+                esac
+              ;;
+              *)
+                objfmt='ELF ?'
+              ;;
+            esac
+
+            AC_MSG_RESULT([$objfmt])
+            if test "$objfmt" = 'ELF ?'; then
+              objfmt='ELF'
+              AC_MSG_WARN([unexpected host system. assumed that the format is $objfmt.])
+            fi
+
+            AC_MSG_CHECKING([for object file format specifier (NAFLAGS) ])
+            case "$objfmt" in
+              MSOMF)      NAFLAGS='-fobj -DOBJ32 -DPIC';;
+              Win32-COFF) NAFLAGS='-fwin32 -DWIN32 -DPIC';;
+              Win64-COFF) NAFLAGS='-fwin64 -DWIN64 -D__x86_64__ -DPIC';;
+              COFF)       NAFLAGS='-fcoff -DCOFF -DPIC';;
+              a.out)      NAFLAGS='-faout -DAOUT -DPIC';;
+              BSD-a.out)  NAFLAGS='-faoutb -DAOUT -DPIC';;
+              ELF)        NAFLAGS='-felf -DELF -DPIC';;
+              ELF64)      NAFLAGS='-felf64 -DELF -D__x86_64__ -DPIC';;
+              RDF)        NAFLAGS='-frdf -DRDF -DPIC';;
+              Mach-O)     NAFLAGS='-fmacho -DMACHO -DPIC';;
+              Mach-O64)   NAFLAGS='-fmacho64 -DMACHO -D__x86_64__ -DPIC';;
+            esac
+            AC_MSG_RESULT([$NAFLAGS])
+
+            AC_MSG_CHECKING([whether the assembler ($NASM $NAFLAGS) works])
+            cat > conftest.asm << EOF
+            [%line __oline__ "configure"
+                    section .text
+                    global  _main,main
+            _main:
+            main:   xor     eax,eax
+                    ret
+            ]
+EOF
+            try_nasm='$NASM $NAFLAGS -o conftest.o conftest.asm'
+            if AC_TRY_EVAL(try_nasm) && test -s conftest.o; then
+              AC_MSG_RESULT(yes)
+            else
+              echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+              cat conftest.asm >&AS_MESSAGE_LOG_FD
+              rm -rf conftest*
+              AC_MSG_RESULT(no)
+              AC_MSG_WARN([installation or configuration problem: assembler cannot create object files.])
+              NASM=""
+            fi
+
+        fi
+
+        if test -z "$NASM"; then
+cat << _EOS
+****************************************************************************
+You need yasm or nasm (Netwide Assembler) to build the internal jpeg library optimally.
+To get one please:
+
+_EOS
+            if test "$build_os" = "cygwin"; then
+cat << _EOS
+install a pre-compiled binary for Win32
+
+mkdir -p /opt/lo/bin
+cd /opt/lo/bin
+wget https://dev-www.libreoffice.org/bin/cygwin/nasm.exe
+chmod +x nasm
+
+or get and install one from https://www.nasm.us/
+
+Then re-run autogen.sh
+
+Note: autogen.sh will try to use /opt/lo/bin/nasm if the environment variable NASM is not already defined.
+Alternatively, you can install the 'new' nasm where ever you want and make sure that \`which nasm\` finds it.
+
+_EOS
+            else
+cat << _EOS
+consult https://github.com/libjpeg-turbo/libjpeg-turbo/blob/main/BUILDING.md
+
+_EOS
+            fi
+            AC_MSG_WARN([no suitable nasm (Netwide Assembler) found])
+            add_warning "no suitable nasm (Netwide Assembler) found for internal libjpeg-turbo"
+        fi
+      ;;
+    esac
+fi
+
+AC_SUBST(NASM)
+AC_SUBST(NAFLAGS)
+AC_SUBST(LIBJPEG_CFLAGS)
+AC_SUBST(LIBJPEG_LIBS)
+AC_SUBST(SYSTEM_LIBJPEG)
+
+dnl ===================================================================
+dnl Check for system clucene
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([clucene],[CLUCENE],[libclucene-core])
+if test "$SYSTEM_CLUCENE" = TRUE; then
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    save_CPPFLAGS=$CPPFLAGS
+    CXXFLAGS="$CXXFLAGS $CLUCENE_CFLAGS"
+    CPPFLAGS="$CPPFLAGS $CLUCENE_CFLAGS"
+    dnl https://sourceforge.net/p/clucene/bugs/200/
+    dnl https://bugzilla.redhat.com/show_bug.cgi?id=794795
+    AC_CHECK_HEADER([CLucene/analysis/cjk/CJKAnalyzer.h], [],
+                 [AC_MSG_ERROR([Your version of libclucene has contribs-lib missing.])], [#include <CLucene.h>])
+    CXXFLAGS=$save_CXXFLAGS
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+    CLUCENE_LIBS="$CLUCENE_LIBS -lclucene-contribs-lib"
+fi
+
+dnl ===================================================================
+dnl Check for system expat
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([expat], [EXPAT], [expat])
+
+dnl ===================================================================
+dnl Check for system xmlsec
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([xmlsec], [XMLSEC], [xmlsec1-nss >= 1.2.35])
+
+AC_MSG_CHECKING([whether to enable Embedded OpenType support])
+if test "$enable_eot" = "yes"; then
+    ENABLE_EOT="TRUE"
+    AC_DEFINE([ENABLE_EOT])
+    AC_MSG_RESULT([yes])
+
+    libo_CHECK_SYSTEM_MODULE([libeot],[LIBEOT],[libeot >= 0.01])
+else
+    ENABLE_EOT=
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_EOT])
+
+dnl ===================================================================
+dnl Check for DLP libs
+dnl ===================================================================
+REVENGE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/librevenge/inc"
+AS_IF([test "$COM" = "MSC"],
+      [librevenge_libdir="${WORKDIR}/LinkTarget/Library"],
+      [librevenge_libdir="${WORKDIR}/UnpackedTarball/librevenge/src/lib/.libs"]
+)
+REVENGE_LIBS_internal="-L${librevenge_libdir} -lrevenge-0.0"
+libo_CHECK_SYSTEM_MODULE([librevenge],[REVENGE],[librevenge-0.0 >= 0.0.1])
+
+libo_CHECK_SYSTEM_MODULE([libodfgen],[ODFGEN],[libodfgen-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libepubgen],[EPUBGEN],[libepubgen-0.1])
+
+WPD_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/libwpd/inc"
+AS_IF([test "$COM" = "MSC"],
+      [libwpd_libdir="${WORKDIR}/LinkTarget/Library"],
+      [libwpd_libdir="${WORKDIR}/UnpackedTarball/libwpd/src/lib/.libs"]
+)
+WPD_LIBS_internal="-L${libwpd_libdir} -lwpd-0.10"
+libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.10])
+
+libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.3])
+
+libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.4])
+libo_PKG_VERSION([WPS], [libwps-0.4], [0.4.12])
+
+libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libmwaw],[MWAW],[libmwaw-0.3 >= 0.3.21])
+libo_PKG_VERSION([MWAW], [libmwaw-0.3], [0.3.21])
+
+libo_CHECK_SYSTEM_MODULE([libetonyek],[ETONYEK],[libetonyek-0.1])
+libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
+
+libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1])
+libo_PKG_VERSION([EBOOK], [libe-book-0.1], [0.1.2])
+
+libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1])
+
+libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libqxp],[QXP],[libqxp-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libzmf],[ZMF],[libzmf-0.0])
+
+libo_CHECK_SYSTEM_MODULE([libstaroffice],[STAROFFICE],[libstaroffice-0.0])
+libo_PKG_VERSION([STAROFFICE], [libstaroffice-0.0], [0.0.7])
+
+dnl ===================================================================
+dnl Check for system lcms2
+dnl ===================================================================
+if test "$with_system_lcms2" != "yes"; then
+    SYSTEM_LCMS2=
+fi
+LCMS2_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/lcms2/include"
+LCMS2_LIBS_internal="-L${WORKDIR}/UnpackedTarball/lcms2/src/.libs -llcms2"
+libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2])
+if test "$GCC" = "yes"; then
+    LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long"
+fi
+if test "$COM" = "MSC"; then # override the above
+    LCMS2_LIBS=${WORKDIR}/UnpackedTarball/lcms2/bin/lcms2.lib
+fi
+
+dnl ===================================================================
+dnl Check for system cppunit
+dnl ===================================================================
+if test "$_os" != "Android" ; then
+    libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.14.0])
+fi
+
+dnl ===================================================================
+dnl Check whether freetype is available
+dnl
+dnl FreeType has 3 different kinds of versions
+dnl * release, like 2.4.10
+dnl * libtool, like 13.0.7 (this what pkg-config returns)
+dnl * soname
+dnl FreeType's docs/VERSION.DLL provides a table mapping between the three
+dnl
+dnl 9.9.3 is 2.2.0
+dnl When the minimal version is at least 2.8.1, remove Skia's check down below.
+dnl ===================================================================
+FREETYPE_CFLAGS_internal="${ISYSTEM}${WORKDIR}/UnpackedTarball/freetype/include"
+if test "x$ac_config_site_64bit_host" = xYES; then
+    FREETYPE_LIBS_internal="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib64 -lfreetype"
+else
+    FREETYPE_LIBS_internal="-L${WORKDIR}/UnpackedTarball/freetype/instdir/lib -lfreetype"
+fi
+libo_CHECK_SYSTEM_MODULE([freetype],[FREETYPE],[freetype2 >= 9.9.3],,system,TRUE)
+
+# ===================================================================
+# Check for system libxslt
+# to prevent incompatibilities between internal libxml2 and external libxslt,
+# or vice versa, use with_system_libxml here
+# ===================================================================
+if test "$with_system_libxml" = "auto"; then
+    case "$_os" in
+    WINNT|iOS|Android)
+        with_system_libxml="$with_system_libs"
+        ;;
+    Emscripten)
+        with_system_libxml=no
+        ;;
+    *)
+        if test "$enable_fuzzers" != "yes"; then
+            with_system_libxml=yes
+        else
+            with_system_libxml=no
+        fi
+        ;;
+    esac
+fi
+
+AC_MSG_CHECKING([which libxslt to use])
+if test "$with_system_libxml" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBXSLT=TRUE
+    if test "$_os" = "Darwin"; then
+        dnl make sure to use SDK path
+        LIBXSLT_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
+        LIBEXSLT_CFLAGS="$LIBXSLT_CFLAGS"
+        dnl omit -L/usr/lib
+        LIBXSLT_LIBS="-lxslt -lxml2 -lz -lpthread -liconv -lm"
+        LIBEXSLT_LIBS="-lexslt $LIBXSLT_LIBS"
+    else
+        PKG_CHECK_MODULES(LIBXSLT, libxslt)
+        LIBXSLT_CFLAGS=$(printf '%s' "$LIBXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBXSLT_LIBS}"
+        LIBXSLT_LIBS="${filteredlibs}"
+        PKG_CHECK_MODULES(LIBEXSLT, libexslt)
+        LIBEXSLT_CFLAGS=$(printf '%s' "$LIBEXSLT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBEXSLT_LIBS}"
+        LIBEXSLT_LIBS=$(printf '%s' "${filteredlibs}" | sed -e "s/-lgpg-error//"  -e "s/-lgcrypt//")
+    fi
+
+    dnl Check for xsltproc
+    AC_PATH_PROG(XSLTPROC, xsltproc, no)
+    if test "$XSLTPROC" = "no"; then
+        AC_MSG_ERROR([xsltproc is required])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBXSLT=
+    BUILD_TYPE="$BUILD_TYPE LIBXSLT"
+fi
+AC_SUBST(SYSTEM_LIBXSLT)
+if test -z "$SYSTEM_LIBXSLT_FOR_BUILD"; then
+    SYSTEM_LIBXSLT_FOR_BUILD="$SYSTEM_LIBXSLT"
+fi
+AC_SUBST(SYSTEM_LIBXSLT_FOR_BUILD)
+
+AC_SUBST(LIBEXSLT_CFLAGS)
+AC_SUBST(LIBEXSLT_LIBS)
+AC_SUBST(LIBXSLT_CFLAGS)
+AC_SUBST(LIBXSLT_LIBS)
+AC_SUBST(XSLTPROC)
+
+# ===================================================================
+# Check for system libxml
+# ===================================================================
+AC_MSG_CHECKING([which libxml to use])
+if test "$with_system_libxml" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBXML=TRUE
+    if test "$_os" = "Darwin"; then
+        dnl make sure to use SDK path
+        LIBXML_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/libxml2"
+        dnl omit -L/usr/lib
+        LIBXML_LIBS="-lxml2 -lz -lpthread -liconv -lm"
+    elif test $_os = iOS; then
+        dnl make sure to use SDK path
+        usr=`echo '#include <stdlib.h>' | $CC -E -MD - | grep usr/include/stdlib.h | head -1 | sed -e 's,# 1 ",,' -e 's,/usr/include/.*,/usr,'`
+        LIBXML_CFLAGS="-I$usr/include/libxml2"
+        LIBXML_LIBS="-L$usr/lib -lxml2 -liconv"
+    else
+        PKG_CHECK_MODULES(LIBXML, libxml-2.0 >= 2.0)
+        LIBXML_CFLAGS=$(printf '%s' "$LIBXML_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${LIBXML_LIBS}"
+        LIBXML_LIBS="${filteredlibs}"
+    fi
+
+    dnl Check for xmllint
+    AC_PATH_PROG(XMLLINT, xmllint, no)
+    if test "$XMLLINT" = "no"; then
+        AC_MSG_ERROR([xmllint is required])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBXML=
+    LIBXML_CFLAGS="-I${WORKDIR}/UnpackedTarball/libxml2/include"
+    if test "$COM" = "MSC"; then
+        LIBXML_CFLAGS="${LIBXML_CFLAGS} -I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
+    fi
+    if test "$COM" = "MSC"; then
+        LIBXML_LIBS="${WORKDIR}/UnpackedTarball/libxml2/win32/bin.msvc/libxml2.lib"
+    else
+        LIBXML_LIBS="-L${WORKDIR}/UnpackedTarball/libxml2/.libs -lxml2"
+        if test "$DISABLE_DYNLOADING" = TRUE; then
+            LIBXML_LIBS="$LIBXML_LIBS -lm"
+        fi
+    fi
+    BUILD_TYPE="$BUILD_TYPE LIBXML2"
+fi
+AC_SUBST(SYSTEM_LIBXML)
+if test -z "$SYSTEM_LIBXML_FOR_BUILD"; then
+    SYSTEM_LIBXML_FOR_BUILD="$SYSTEM_LIBXML"
+fi
+AC_SUBST(SYSTEM_LIBXML_FOR_BUILD)
+AC_SUBST(LIBXML_CFLAGS)
+AC_SUBST(LIBXML_LIBS)
+AC_SUBST(XMLLINT)
+
+# =====================================================================
+# Checking for a Python interpreter with version >= 3.3.
+# Optionally user can pass an option to configure, i. e.
+# ./configure PYTHON=/usr/bin/python
+# =====================================================================
+if test $_os = Darwin -a "$enable_python" != no -a "$enable_python" != fully-internal -a "$enable_python" != internal -a "$enable_python" != system; then
+    # Only allowed choices for macOS are 'no', 'internal' (default), and 'fully-internal'
+    # unless PYTHON is defined as above which allows 'system'
+    enable_python=internal
+fi
+if test "$build_os" != "cygwin" -a "$enable_python" != fully-internal; then
+    if test -n "$PYTHON"; then
+        PYTHON_FOR_BUILD=$PYTHON
+    else
+        # This allows a lack of system python with no error, we use internal one in that case.
+        AM_PATH_PYTHON([3.3],, [:])
+        # Clean PYTHON_VERSION checked below if cross-compiling
+        PYTHON_VERSION=""
+        if test "$PYTHON" != ":"; then
+            PYTHON_FOR_BUILD=$PYTHON
+        fi
+    fi
+fi
+
+# Checks for Python to use for Pyuno
+AC_MSG_CHECKING([which Python to use for Pyuno])
+case "$enable_python" in
+no|disable)
+    if test -z "$PYTHON_FOR_BUILD" -a "$cross_compiling" != yes; then
+        # Python is required to build LibreOffice. In theory we could separate the build-time Python
+        # requirement from the choice whether to include Python stuff in the installer, but why
+        # bother?
+        AC_MSG_ERROR([Python is required at build time.])
+    fi
+    enable_python=no
+    AC_MSG_RESULT([none])
+    ;;
+""|yes|auto)
+    if test "$DISABLE_SCRIPTING" = TRUE; then
+        if test -z "$PYTHON_FOR_BUILD" -a "$cross_compiling" != yes; then
+            AC_MSG_ERROR([Python support can't be disabled without cross-compiling or a system python.])
+        fi
+        AC_MSG_RESULT([none, overridden by --disable-scripting])
+        enable_python=no
+    elif test $build_os = cygwin -o $build_os = wsl; then
+        dnl When building on Windows we don't attempt to use any installed
+        dnl "system"  Python.
+        AC_MSG_RESULT([fully internal])
+        enable_python=internal
+    elif test "$cross_compiling" = yes; then
+        AC_MSG_RESULT([system])
+        enable_python=system
+    else
+        # Unset variables set by the above AM_PATH_PYTHON so that
+        # we actually do check anew.
+        AC_MSG_RESULT([])
+        unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
+        AM_PATH_PYTHON([3.3],, [:])
+        AC_MSG_CHECKING([which Python to use for Pyuno])
+        if test "$PYTHON" = ":"; then
+            if test -z "$PYTHON_FOR_BUILD"; then
+                AC_MSG_RESULT([fully internal])
+            else
+                AC_MSG_RESULT([internal])
+            fi
+            enable_python=internal
+        else
+            AC_MSG_RESULT([system])
+            enable_python=system
+        fi
+    fi
+    ;;
+internal)
+    AC_MSG_RESULT([internal])
+    ;;
+fully-internal)
+    AC_MSG_RESULT([fully internal])
+    enable_python=internal
+    ;;
+system)
+    AC_MSG_RESULT([system])
+    if test "$_os" = Darwin -a -z "$PYTHON"; then
+        AC_MSG_ERROR([--enable-python=system doesn't work on macOS because the version provided is obsolete])
+    fi
+    ;;
+*)
+    AC_MSG_ERROR([Incorrect --enable-python option])
+    ;;
+esac
+
+if test $enable_python != no; then
+    BUILD_TYPE="$BUILD_TYPE PYUNO"
+fi
+
+if test $enable_python = system; then
+    if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then
+        # Fallback: Accept these in the environment, or as set above
+        # for MacOSX.
+        :
+    elif test "$cross_compiling" != yes; then
+        # Unset variables set by the above AM_PATH_PYTHON so that
+        # we actually do check anew.
+        unset PYTHON am_cv_pathless_PYTHON ac_cv_path_PYTHON am_cv_python_version am_cv_python_platform am_cv_python_pythondir am_cv_python_pyexecdir
+        # This causes an error if no python command is found
+        AM_PATH_PYTHON([3.3])
+        python_include=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('INCLUDEPY'));"`
+        python_version=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('VERSION'));"`
+        python_libs=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBS'));"`
+        python_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"`
+        if test -z "$PKG_CONFIG"; then
+            PYTHON_CFLAGS="-I$python_include"
+            PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+        elif $PKG_CONFIG --exists python-$python_version-embed; then
+            PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version-embed`"
+            PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version-embed` $python_libs"
+        elif $PKG_CONFIG --exists python-$python_version; then
+            PYTHON_CFLAGS="`$PKG_CONFIG --cflags python-$python_version`"
+            PYTHON_LIBS="`$PKG_CONFIG --libs python-$python_version` $python_libs"
+        else
+            PYTHON_CFLAGS="-I$python_include"
+            PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs"
+        fi
+        FilterLibs "${PYTHON_LIBS}"
+        PYTHON_LIBS="${filteredlibs}"
+    else
+        dnl How to find out the cross-compilation Python installation path?
+        AC_MSG_CHECKING([for python version])
+        AS_IF([test -n "$PYTHON_VERSION"],
+              [AC_MSG_RESULT([$PYTHON_VERSION])],
+              [AC_MSG_RESULT([not found])
+               AC_MSG_ERROR([no usable python found])])
+        test -n "$PYTHON_CFLAGS" && break
+    fi
+
+    dnl Check if the headers really work
+    save_CPPFLAGS="$CPPFLAGS"
+    CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
+    AC_CHECK_HEADER(Python.h)
+    CPPFLAGS="$save_CPPFLAGS"
+
+    # let the PYTHON_FOR_BUILD match the same python installation that
+    # provides PYTHON_CFLAGS/PYTHON_LDFLAGS for pyuno, which should be
+    # better for PythonTests.
+    PYTHON_FOR_BUILD=$PYTHON
+fi
+
+if test "$with_lxml" != no; then
+    if test -z "$PYTHON_FOR_BUILD"; then
+        case $build_os in
+            cygwin)
+                AC_MSG_WARN([No system-provided python lxml, gla11y will only report widget classes and ids])
+                ;;
+            *)
+                if test "$cross_compiling" != yes ; then
+                    BUILD_TYPE="$BUILD_TYPE LXML"
+                fi
+                ;;
+        esac
+    else
+        AC_MSG_CHECKING([for python lxml])
+        if $PYTHON_FOR_BUILD -c "import lxml.etree as ET" 2> /dev/null ; then
+            AC_MSG_RESULT([yes])
+        else
+            case $build_os in
+                cygwin)
+                    AC_MSG_RESULT([no, gla11y will only report widget classes and ids])
+                    ;;
+                *)
+                    if test "$cross_compiling" != yes -a "x$ac_cv_header_Python_h" = "xyes"; then
+                        if test -n ${SYSTEM_LIBXSLT} -o -n ${SYSTEM_LIBXML}; then
+                            AC_MSG_RESULT([no, and no system libxml/libxslt, gla11y will only report widget classes and ids])
+                        else
+                            BUILD_TYPE="$BUILD_TYPE LXML"
+                            AC_MSG_RESULT([no, using internal lxml])
+                        fi
+                    else
+                        AC_MSG_RESULT([no, and system does not provide python development headers, gla11y will only report widget classes and ids])
+                    fi
+                    ;;
+            esac
+        fi
+    fi
+fi
+
+if test \( "$cross_compiling" = yes -a -z "$PYTHON_FOR_BUILD" \) -o "$enable_python" = internal; then
+    SYSTEM_PYTHON=
+    PYTHON_VERSION_MAJOR=3
+    PYTHON_VERSION_MINOR=8
+    PYTHON_VERSION=${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}.18
+    if ! grep -q -i python.*${PYTHON_VERSION} ${SRC_ROOT}/download.lst; then
+        AC_MSG_ERROR([PYTHON_VERSION ${PYTHON_VERSION} but no matching file in download.lst])
+    fi
+    AC_DEFINE_UNQUOTED([PYTHON_VERSION_STRING], [L"${PYTHON_VERSION}"])
+
+    # Embedded Python dies without Home set
+    if test "$HOME" = ""; then
+        export HOME=""
+    fi
+fi
+
+dnl By now enable_python should be "system", "internal" or "no"
+case $enable_python in
+system)
+    SYSTEM_PYTHON=TRUE
+
+    if test "x$ac_cv_header_Python_h" != "xyes"; then
+       AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])
+    fi
+
+    AC_LANG_PUSH(C)
+    CFLAGS="$CFLAGS $PYTHON_CFLAGS"
+    AC_MSG_CHECKING([for correct python library version])
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <Python.h>
+
+int main(int argc, char **argv) {
+   if ((PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION >= 3)) return 0;
+   else return 1;
+}
+       ]])],[AC_MSG_RESULT([ok])],[AC_MSG_ERROR([Python >= 3.3 is needed when building with Python 3])],[AC_MSG_RESULT([skipped; cross-compiling])])
+    AC_LANG_POP(C)
+
+    dnl FIXME Check if the Python library can be linked with, too?
+    ;;
+
+internal)
+    BUILD_TYPE="$BUILD_TYPE PYTHON"
+    if test "$OS" = LINUX -o "$OS" = WNT ; then
+        BUILD_TYPE="$BUILD_TYPE LIBFFI"
+    fi
+    ;;
+no)
+    DISABLE_PYTHON=TRUE
+    SYSTEM_PYTHON=
+    ;;
+*)
+    AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"])
+    ;;
+esac
+
+AC_SUBST(DISABLE_PYTHON)
+AC_SUBST(SYSTEM_PYTHON)
+AC_SUBST(PYTHON_CFLAGS)
+AC_SUBST(PYTHON_FOR_BUILD)
+AC_SUBST(PYTHON_LIBS)
+AC_SUBST(PYTHON_VERSION)
+AC_SUBST(PYTHON_VERSION_MAJOR)
+AC_SUBST(PYTHON_VERSION_MINOR)
+
+AC_MSG_CHECKING([whether to build LibreLogo])
+case "$enable_python" in
+no|disable)
+    AC_MSG_RESULT([no; Python disabled])
+    ;;
+*)
+    if test "${enable_librelogo}" = "no"; then
+        AC_MSG_RESULT([no])
+    else
+        AC_MSG_RESULT([yes])
+        BUILD_TYPE="${BUILD_TYPE} LIBRELOGO"
+        AC_DEFINE([ENABLE_LIBRELOGO],1)
+    fi
+    ;;
+esac
+AC_SUBST(ENABLE_LIBRELOGO)
+
+ENABLE_MARIADBC=
+MARIADBC_MAJOR=1
+MARIADBC_MINOR=0
+MARIADBC_MICRO=2
+AC_MSG_CHECKING([whether to build the MariaDB/MySQL SDBC driver])
+if test "x$enable_mariadb_sdbc" != "xno" -a "$enable_mpl_subset" != "yes"; then
+    ENABLE_MARIADBC=TRUE
+    AC_MSG_RESULT([yes])
+    BUILD_TYPE="$BUILD_TYPE MARIADBC"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_MARIADBC)
+AC_SUBST(MARIADBC_MAJOR)
+AC_SUBST(MARIADBC_MINOR)
+AC_SUBST(MARIADBC_MICRO)
+
+if test "$ENABLE_MARIADBC" = "TRUE"; then
+    dnl ===================================================================
+    dnl Check for system MariaDB
+    dnl ===================================================================
+    AC_MSG_CHECKING([which MariaDB to use])
+    if test "$with_system_mariadb" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_MARIADB_CONNECTOR_C=TRUE
+        #AC_PATH_PROG(MARIADBCONFIG, [mariadb_config])
+        if test -z "$MARIADBCONFIG"; then
+            AC_PATH_PROG(MARIADBCONFIG, [mysql_config])
+            if test -z "$MARIADBCONFIG"; then
+                AC_MSG_ERROR([mysql_config is missing. Install MySQL client library development package.])
+                #AC_MSG_ERROR([mariadb_config and mysql_config are missing. Install MariaDB or MySQL client library development package.])
+            fi
+        fi
+        AC_MSG_CHECKING([MariaDB version])
+        MARIADB_VERSION=`$MARIADBCONFIG --version`
+        MARIADB_MAJOR=`$MARIADBCONFIG --version | cut -d"." -f1`
+        if test "$MARIADB_MAJOR" -ge "5"; then
+            AC_MSG_RESULT([OK])
+        else
+            AC_MSG_ERROR([too old, use 5.0.x or later])
+        fi
+        AC_MSG_CHECKING([for MariaDB Client library])
+        MARIADB_CFLAGS=`$MARIADBCONFIG --cflags`
+        if test "$COM_IS_CLANG" = TRUE; then
+            MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-fstack-protector-strong//)
+        fi
+        MARIADB_LIBS=`$MARIADBCONFIG --libs_r`
+        dnl At least mariadb-5.5.34-3.fc20.x86_64 plus
+        dnl mariadb-5.5.34-3.fc20.i686 reports 64-bit specific output even under
+        dnl linux32:
+        if test "$OS" = LINUX -a "$CPUNAME" = INTEL; then
+            MARIADB_CFLAGS=$(printf '%s' "$MARIADB_CFLAGS" | sed -e s/-m64//)
+            MARIADB_LIBS=$(printf '%s' "$MARIADB_LIBS" \
+                | sed -e 's|/lib64/|/lib/|')
+        fi
+        FilterLibs "${MARIADB_LIBS}"
+        MARIADB_LIBS="${filteredlibs}"
+        AC_MSG_RESULT([includes '$MARIADB_CFLAGS', libraries '$MARIADB_LIBS'])
+        AC_MSG_CHECKING([whether to bundle the MySQL/MariaDB client library])
+        if test "$enable_bundle_mariadb" = "yes"; then
+            AC_MSG_RESULT([yes])
+            BUNDLE_MARIADB_CONNECTOR_C=TRUE
+            LIBMARIADB=lib$(echo "${MARIADB_LIBS}" | sed -e 's/[[[:space:]]]\{1,\}-l\([[^[:space:]]]\{1,\}\)/\
+\1\
+/g' -e 's/^-l\([[^[:space:]]]\{1,\}\)[[[:space:]]]*/\
+\1\
+/g' | grep -E '(mysqlclient|mariadb)')
+            if test "$_os" = "Darwin"; then
+                LIBMARIADB=${LIBMARIADB}.dylib
+            elif test "$_os" = "WINNT"; then
+                LIBMARIADB=${LIBMARIADB}.dll
+            else
+                LIBMARIADB=${LIBMARIADB}.so
+            fi
+            LIBMARIADB_PATH=$($MARIADBCONFIG --variable=pkglibdir)
+            AC_MSG_CHECKING([for $LIBMARIADB in $LIBMARIADB_PATH])
+            if test -e "$LIBMARIADB_PATH/$LIBMARIADB"; then
+                AC_MSG_RESULT([found.])
+                PathFormat "$LIBMARIADB_PATH"
+                LIBMARIADB_PATH="$formatted_path"
+            else
+                AC_MSG_ERROR([not found.])
+            fi
+        else
+            AC_MSG_RESULT([no])
+            BUNDLE_MARIADB_CONNECTOR_C=
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_MARIADB_CONNECTOR_C=
+        MARIADB_CFLAGS="-I${WORKDIR}/UnpackedTarball/mariadb-connector-c/include"
+        MARIADB_LIBS="-L${WORKDIR}/LinkTarget/StaticLibrary -lmariadb-connector-c"
+        BUILD_TYPE="$BUILD_TYPE MARIADB_CONNECTOR_C"
+    fi
+
+    AC_SUBST(SYSTEM_MARIADB_CONNECTOR_C)
+    AC_SUBST(MARIADB_CFLAGS)
+    AC_SUBST(MARIADB_LIBS)
+    AC_SUBST(LIBMARIADB)
+    AC_SUBST(LIBMARIADB_PATH)
+    AC_SUBST(BUNDLE_MARIADB_CONNECTOR_C)
+fi
+
+dnl ===================================================================
+dnl Check for system hsqldb
+dnl ===================================================================
+if test "$with_java" != "no" -a "$cross_compiling" != "yes"; then
+    AC_MSG_CHECKING([which hsqldb to use])
+    if test "$with_system_hsqldb" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_HSQLDB=TRUE
+        if test -z $HSQLDB_JAR; then
+            HSQLDB_JAR=/usr/share/java/hsqldb.jar
+        fi
+        if ! test -f $HSQLDB_JAR; then
+               AC_MSG_ERROR(hsqldb.jar not found.)
+        fi
+        AC_MSG_CHECKING([whether hsqldb is 1.8.0.x])
+        export HSQLDB_JAR
+        if $PERL -e \
+           'use Archive::Zip;
+            my $file = "$ENV{'HSQLDB_JAR'}";
+            my $zip = Archive::Zip->new( $file );
+            my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
+            if ( $mf =~ m/Specification-Version: 1.8.*/ )
+            {
+                push @l, split(/\n/, $mf);
+                foreach my $line (@l)
+                {
+                    if ($line =~ m/Specification-Version:/)
+                    {
+                        ($t, $version) = split (/:/,$line);
+                        $version =~ s/^\s//;
+                        ($a, $b, $c, $d) = split (/\./,$version);
+                        if ($c == "0" && $d > "8")
+                        {
+                            exit 0;
+                        }
+                        else
+                        {
+                            exit 1;
+                        }
+                    }
+                }
+            }
+            else
+            {
+                exit 1;
+            }'; then
+            AC_MSG_RESULT([yes])
+        else
+            AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_HSQLDB=
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+        NEED_ANT=TRUE
+    fi
+else
+    if test "$with_java" != "no" -a -z "$HSQLDB_JAR"; then
+        BUILD_TYPE="$BUILD_TYPE HSQLDB"
+    fi
+fi
+AC_SUBST(SYSTEM_HSQLDB)
+AC_SUBST(HSQLDB_JAR)
+
+dnl ===================================================================
+dnl Check for PostgreSQL stuff
+dnl ===================================================================
+AC_MSG_CHECKING([whether to build the PostgreSQL SDBC driver])
+if test "x$enable_postgresql_sdbc" != "xno"; then
+    AC_MSG_RESULT([yes])
+    SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
+
+    if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
+    fi
+    if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
+        AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
+    fi
+
+    postgres_interface=""
+    if test "$with_system_postgresql" = "yes"; then
+        postgres_interface="external PostgreSQL"
+        SYSTEM_POSTGRESQL=TRUE
+        if test "$_os" = Darwin; then
+            supp_path=''
+            for d in /Library/PostgreSQL/9.*/bin /sw/opt/postgresql/9.*/bin /opt/local/lib/postgresql9*/bin; do
+                pg_supp_path="$P_SEP$d$pg_supp_path"
+            done
+        fi
+        AC_PATH_PROG(PGCONFIG, pg_config, ,$PATH$pg_supp_path)
+        if test -n "$PGCONFIG"; then
+            POSTGRESQL_INC=-I$(${PGCONFIG} --includedir)
+            POSTGRESQL_LIB="-L$(${PGCONFIG} --libdir)"
+        else
+            PKG_CHECK_MODULES(POSTGRESQL, libpq, [
+              POSTGRESQL_INC=$POSTGRESQL_CFLAGS
+              POSTGRESQL_LIB=$POSTGRESQL_LIBS
+            ],[
+              AC_MSG_ERROR([pg_config or 'pkg-config libpq' needed; set PGCONFIG if not in PATH])
+            ])
+        fi
+        FilterLibs "${POSTGRESQL_LIB}"
+        POSTGRESQL_LIB="${filteredlibs}"
+    else
+        # if/when anything else than PostgreSQL uses Kerberos,
+        # move this out of `test "x$enable_postgresql_sdbc" != "xno"'
+        WITH_KRB5=
+        WITH_GSSAPI=
+        case "$_os" in
+        Darwin)
+            # macOS has system MIT Kerberos 5 since 10.4
+            if test "$with_krb5" != "no"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                # Not sure whether it makes any sense here to search multiple potential libraries; it is not likely
+                # that the libraries where these functions are located on macOS will change, is it?
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" != "no"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                GSSAPI_LIBS=$LIBS
+                LIBS=$save_LIBS
+            fi
+            ;;
+        WINNT)
+            if test "$with_krb5" = "yes" -o "$with_gssapi" = "yes"; then
+                AC_MSG_ERROR([Refusing to enable MIT Kerberos 5 or GSSAPI on Windows.])
+            fi
+            ;;
+        Linux|GNU|*BSD|DragonFly)
+            if test "$with_krb5" != "no"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" != "no"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                GSSAPI_LIBS=$LIBS
+                LIBS=$save_LIBS
+            fi
+            ;;
+        *)
+            if test "$with_krb5" = "yes"; then
+                WITH_KRB5=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(com_err, [com_err 'com_err -lssl -lcrypto' krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'com_err' required for Kerberos 5])])
+                KRB5_LIBS=$LIBS
+                LIBS=$save_LIBS
+                AC_SEARCH_LIBS(krb5_sendauth, [krb5 'krb5 -lcrypto -ldes -lasn1 -lroken'], [],
+                    [AC_MSG_ERROR([could not find function 'krb5_sendauth' required for Kerberos 5])])
+                KRB5_LIBS="$KRB5_LIBS $LIBS"
+                LIBS=$save_LIBS
+            fi
+            if test "$with_gssapi" = "yes"; then
+                WITH_GSSAPI=TRUE
+                save_LIBS=$LIBS
+                AC_SEARCH_LIBS(gss_init_sec_context, [gssapi_krb5 gss 'gssapi -lkrb5 -lcrypto'], [],
+                    [AC_MSG_ERROR([could not find function 'gss_init_sec_context' required for GSSAPI])])
+                LIBS=$save_LIBS
+                GSSAPI_LIBS=$LIBS
+            fi
+        esac
+
+        if test -n "$with_libpq_path"; then
+            SYSTEM_POSTGRESQL=TRUE
+            postgres_interface="external libpq"
+            POSTGRESQL_LIB="-L${with_libpq_path}/lib/"
+            POSTGRESQL_INC=-I"${with_libpq_path}/include/"
+        else
+            SYSTEM_POSTGRESQL=
+            postgres_interface="internal"
+            POSTGRESQL_LIB=""
+            POSTGRESQL_INC="%OVERRIDE_ME%"
+            BUILD_TYPE="$BUILD_TYPE POSTGRESQL"
+        fi
+    fi
+
+    AC_MSG_CHECKING([PostgreSQL C interface])
+    AC_MSG_RESULT([$postgres_interface])
+
+    if test "${SYSTEM_POSTGRESQL}" = "TRUE"; then
+        AC_MSG_NOTICE([checking system PostgreSQL prerequisites])
+        save_CFLAGS=$CFLAGS
+        save_CPPFLAGS=$CPPFLAGS
+        save_LIBS=$LIBS
+        CPPFLAGS="${CPPFLAGS} ${POSTGRESQL_INC}"
+        LIBS="${LIBS} ${POSTGRESQL_LIB}"
+        AC_CHECK_HEADER([libpq-fe.h], [], [AC_MSG_ERROR([libpq-fe.h is needed])], [])
+        AC_CHECK_LIB([pq], [PQconnectdbParams], [:],
+            [AC_MSG_ERROR(libpq not found or too old. Need >= 9.0)], [])
+        CFLAGS=$save_CFLAGS
+        CPPFLAGS=$save_CPPFLAGS
+        LIBS=$save_LIBS
+    fi
+    BUILD_POSTGRESQL_SDBC=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(WITH_KRB5)
+AC_SUBST(WITH_GSSAPI)
+AC_SUBST(GSSAPI_LIBS)
+AC_SUBST(KRB5_LIBS)
+AC_SUBST(BUILD_POSTGRESQL_SDBC)
+AC_SUBST(SYSTEM_POSTGRESQL)
+AC_SUBST(POSTGRESQL_INC)
+AC_SUBST(POSTGRESQL_LIB)
+
+dnl ===================================================================
+dnl Check for Firebird stuff
+dnl ===================================================================
+ENABLE_FIREBIRD_SDBC=
+if test "$enable_firebird_sdbc" = "yes" ; then
+    SCPDEFS="$SCPDEFS -DWITH_FIREBIRD_SDBC"
+
+    dnl ===================================================================
+    dnl Check for system Firebird
+    dnl ===================================================================
+    AC_MSG_CHECKING([which Firebird to use])
+    if test "$with_system_firebird" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_FIREBIRD=TRUE
+        AC_PATH_PROG(FIREBIRDCONFIG, [fb_config])
+        if test -z "$FIREBIRDCONFIG"; then
+            AC_MSG_NOTICE([No fb_config -- using pkg-config])
+            PKG_CHECK_MODULES([FIREBIRD], [fbclient >= 3], [FIREBIRD_PKGNAME=fbclient], [
+                PKG_CHECK_MODULES([FIREBIRD], [fbembed], [FIREBIRD_PKGNAME=fbembed])
+            ])
+            FIREBIRD_VERSION=`pkg-config --modversion "$FIREBIRD_PKGNAME"`
+        else
+            AC_MSG_NOTICE([fb_config found])
+            FIREBIRD_VERSION=`$FIREBIRDCONFIG --version`
+            AC_MSG_CHECKING([for Firebird Client library])
+            FIREBIRD_CFLAGS=`$FIREBIRDCONFIG --cflags`
+            FIREBIRD_LIBS=`$FIREBIRDCONFIG --embedlibs`
+            FilterLibs "${FIREBIRD_LIBS}"
+            FIREBIRD_LIBS="${filteredlibs}"
+        fi
+        AC_MSG_RESULT([includes `$FIREBIRD_CFLAGS', libraries `$FIREBIRD_LIBS'])
+        AC_MSG_CHECKING([Firebird version])
+        if test -n "${FIREBIRD_VERSION}"; then
+            FIREBIRD_MAJOR=`echo $FIREBIRD_VERSION | cut -d"." -f1`
+            if test "$FIREBIRD_MAJOR" -ge "3"; then
+                AC_MSG_RESULT([OK])
+            else
+                AC_MSG_ERROR([Ensure firebird >= 3 is installed])
+            fi
+        else
+            save_CFLAGS="${CFLAGS}"
+            CFLAGS="${CFLAGS} ${FIREBIRD_CFLAGS}"
+            AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <ibase.h>
+#if defined(FB_API_VER) && FB_API_VER == 30
+int fb_api_is_30(void) { return 0; }
+#else
+#error "Wrong Firebird API version"
+#endif]])],AC_MSG_RESULT([OK]),AC_MSG_ERROR([Ensure firebird 3.0.x is installed]))
+            CFLAGS="$save_CFLAGS"
+        fi
+        ENABLE_FIREBIRD_SDBC=TRUE
+        AC_DEFINE([ENABLE_FIREBIRD_SDBC],1)
+    elif test "$enable_database_connectivity" = no; then
+        AC_MSG_RESULT([none])
+    elif test "$cross_compiling" = "yes"; then
+        AC_MSG_RESULT([none])
+    else
+        dnl Embedded Firebird has version 3.0
+        dnl We need libatomic_ops for any non X86/X64 system
+        if test "${CPUNAME}" != INTEL -a "${CPUNAME}" != X86_64; then
+            dnl ===================================================================
+            dnl Check for system libatomic_ops
+            dnl ===================================================================
+            libo_CHECK_SYSTEM_MODULE([libatomic_ops],[LIBATOMIC_OPS],[atomic_ops >= 0.7.2])
+            if test "$with_system_libatomic_ops" = "yes"; then
+                SYSTEM_LIBATOMIC_OPS=TRUE
+                AC_CHECK_HEADERS(atomic_ops.h, [],
+                [AC_MSG_ERROR(atomic_ops.h not found. install libatomic_ops)], [])
+            else
+                SYSTEM_LIBATOMIC_OPS=
+                LIBATOMIC_OPS_CFLAGS="-I${WORKDIR}/UnpackedTarball/libatomic_ops/include"
+                LIBATOMIC_OPS_LIBS="-latomic_ops"
+                BUILD_TYPE="$BUILD_TYPE LIBATOMIC_OPS"
+            fi
+        fi
+
+        AC_MSG_RESULT([internal])
+        SYSTEM_FIREBIRD=
+        FIREBIRD_CFLAGS="-I${WORKDIR}/UnpackedTarball/firebird/gen/Release/firebird/include"
+        FIREBIRD_LIBS="-lfbclient"
+
+        if test "$with_system_libtommath" = "yes"; then
+            SYSTEM_LIBTOMMATH=TRUE
+            dnl check for tommath presence
+            save_LIBS=$LIBS
+            AC_CHECK_HEADER(tommath.h,,AC_MSG_ERROR(Include file for tommath not found - please install development tommath package))
+            AC_CHECK_LIB(tommath, mp_init, LIBTOMMATH_LIBS=-ltommath, AC_MSG_ERROR(Library tommath not found - please install development tommath package))
+            LIBS=$save_LIBS
+        else
+            SYSTEM_LIBTOMMATH=
+            LIBTOMMATH_CFLAGS="-I${WORKDIR}/UnpackedTarball/libtommath"
+            LIBTOMMATH_LIBS="-ltommath"
+            BUILD_TYPE="$BUILD_TYPE LIBTOMMATH"
+        fi
+
+        BUILD_TYPE="$BUILD_TYPE FIREBIRD"
+        ENABLE_FIREBIRD_SDBC=TRUE
+        AC_DEFINE([ENABLE_FIREBIRD_SDBC],1)
+    fi
+fi
+AC_SUBST(ENABLE_FIREBIRD_SDBC)
+AC_SUBST(SYSTEM_LIBATOMIC_OPS)
+AC_SUBST(LIBATOMIC_OPS_CFLAGS)
+AC_SUBST(LIBATOMIC_OPS_LIBS)
+AC_SUBST(SYSTEM_FIREBIRD)
+AC_SUBST(FIREBIRD_CFLAGS)
+AC_SUBST(FIREBIRD_LIBS)
+AC_SUBST(SYSTEM_LIBTOMMATH)
+AC_SUBST(LIBTOMMATH_CFLAGS)
+AC_SUBST(LIBTOMMATH_LIBS)
+
+dnl ===================================================================
+dnl Check for system curl
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([curl],[CURL],[libcurl >= 7.68.0],enabled)
+
+dnl ===================================================================
+dnl Check for system boost
+dnl ===================================================================
+AC_MSG_CHECKING([which boost to use])
+if test "$with_system_boost" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_BOOST=TRUE
+    AX_BOOST_BASE([1.66],,[AC_MSG_ERROR([no suitable Boost found])])
+    AX_BOOST_DATE_TIME
+    AX_BOOST_FILESYSTEM
+    AX_BOOST_IOSTREAMS
+    AX_BOOST_LOCALE
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $BOOST_CPPFLAGS $CXXFLAGS_CXX11"
+    AC_CHECK_HEADER(boost/shared_ptr.hpp, [],
+       [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], [])
+    AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [],
+       [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+    # this is in m4/ax_boost_base.m4
+    FilterLibs "${BOOST_LDFLAGS}"
+    BOOST_LDFLAGS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE BOOST"
+    SYSTEM_BOOST=
+    if test "${COM}" = "GCC" -o "${COM_IS_CLANG}" = "TRUE"; then
+        # use warning-suppressing wrapper headers
+        BOOST_CPPFLAGS="-I${SRC_ROOT}/external/boost/include -I${WORKDIR}/UnpackedTarball/boost"
+    else
+        BOOST_CPPFLAGS="-I${WORKDIR}/UnpackedTarball/boost"
+    fi
+fi
+AC_SUBST(SYSTEM_BOOST)
+
+dnl ===================================================================
+dnl Check for system mdds
+dnl ===================================================================
+MDDS_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/mdds/include"
+libo_CHECK_SYSTEM_MODULE([mdds],[MDDS],[mdds-2.1 >= 2.1.0])
+
+dnl ===================================================================
+dnl Check for system dragonbox
+dnl ===================================================================
+AC_MSG_CHECKING([which dragonbox to use])
+if test "$with_system_dragonbox" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_DRAGONBOX=TRUE
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    # This is where upstream installs to, unfortunately no .pc or so...
+    DRAGONBOX_CFLAGS=-I/usr/include/dragonbox-1.1.3
+    CPPFLAGS="$CPPFLAGS $DRAGONBOX_CFLAGS"
+    AC_CHECK_HEADER([dragonbox/dragonbox.h], [],
+       [AC_MSG_ERROR([dragonbox/dragonbox.h not found. install dragonbox])], [])
+    AC_LANG_POP([C++])
+    CPPFLAGS=$save_CPPFLAGS
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE DRAGONBOX"
+    SYSTEM_DRAGONBOX=
+fi
+AC_SUBST([SYSTEM_DRAGONBOX])
+AC_SUBST([DRAGONBOX_CFLAGS])
+
+dnl ===================================================================
+dnl Check for system frozen
+dnl ===================================================================
+AC_MSG_CHECKING([which frozen to use])
+if test "$with_system_frozen" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_FROZEN=TRUE
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    AC_CHECK_HEADER([frozen/unordered_map.h], [],
+       [AC_MSG_ERROR([frozen/unordered_map.h not found. install frozen headers])], [])
+    AC_LANG_POP([C++])
+    CPPFLAGS=$save_CPPFLAGS
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE FROZEN"
+    SYSTEM_FROZEN=
+fi
+AC_SUBST([SYSTEM_FROZEN])
+AC_SUBST([FROZEN_CFLAGS])
+
+dnl ===================================================================
+dnl Check for system libfixmath
+dnl ===================================================================
+AC_MSG_CHECKING([which libfixmath to use])
+if test "$with_system_libfixmath" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_LIBFIXMATH=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER([libfixmath/fix16.hpp], [],
+       [AC_MSG_ERROR([libfixmath/fix16.hpp not found. install libfixmath])], [])
+    AC_CHECK_LIB([libfixmath], [fix16_mul], [:], [AC_MSG_ERROR(libfixmath lib not found or functional)], [])
+    AC_LANG_POP([C++])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_LIBFIXMATH=
+fi
+AC_SUBST([SYSTEM_LIBFIXMATH])
+
+dnl ===================================================================
+dnl Check for system glm
+dnl ===================================================================
+AC_MSG_CHECKING([which glm to use])
+if test "$with_system_glm" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_GLM=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER([glm/glm.hpp], [],
+       [AC_MSG_ERROR([glm/glm.hpp not found. install glm])], [])
+    AC_LANG_POP([C++])
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE GLM"
+    SYSTEM_GLM=
+    GLM_CFLAGS="${ISYSTEM}${WORKDIR}/UnpackedTarball/glm"
+fi
+AC_SUBST([GLM_CFLAGS])
+AC_SUBST([SYSTEM_GLM])
+
+dnl ===================================================================
+dnl Check for system odbc
+dnl ===================================================================
+AC_MSG_CHECKING([which odbc headers to use])
+if test "$with_system_odbc" = "yes" -o '(' "$with_system_headers" = "yes" -a "$with_system_odbc" = "auto" ')' -o '(' "$_os" = "WINNT" -a  "$with_system_odbc" != "no" ')'; then
+    AC_MSG_RESULT([external])
+    SYSTEM_ODBC_HEADERS=TRUE
+
+    if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+        save_CPPFLAGS=$CPPFLAGS
+        find_winsdk
+        PathFormat "$winsdktest"
+        CPPFLAGS="$CPPFLAGS -I$formatted_path/include/um -I$formatted_path/Include/$winsdklibsubdir/um -I$formatted_path/include -I$formatted_path/include/shared -I$formatted_path/include/$winsdklibsubdir/shared"
+        AC_CHECK_HEADER(sqlext.h, [],
+            [AC_MSG_ERROR(odbc not found. install odbc)],
+            [#include <windows.h>])
+        CPPFLAGS=$save_CPPFLAGS
+    else
+        AC_CHECK_HEADER(sqlext.h, [],
+            [AC_MSG_ERROR(odbc not found. install odbc)],[])
+    fi
+elif test "$enable_database_connectivity" = no; then
+    AC_MSG_RESULT([none])
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_ODBC_HEADERS=
+fi
+AC_SUBST(SYSTEM_ODBC_HEADERS)
+
+dnl ===================================================================
+dnl Check for system NSS
+dnl ===================================================================
+if test "$enable_fuzzers" != "yes" -a "$enable_nss" = "yes"; then
+    libo_CHECK_SYSTEM_MODULE([nss],[NSS],[nss >= 3.9.3 nspr >= 4.8],,system-if-linux)
+    AC_DEFINE(HAVE_FEATURE_NSS)
+    ENABLE_NSS=TRUE
+elif test $_os != iOS -a "$enable_openssl" != "no"; then
+    with_tls=openssl
+fi
+AC_SUBST(ENABLE_NSS)
+
+dnl ===================================================================
+dnl Enable LDAP support
+dnl ===================================================================
+
+if test "$test_openldap" = yes; then
+    AC_MSG_CHECKING([whether to enable LDAP support])
+    if test "$enable_ldap" = yes -a \( "$enable_openssl" = yes -o "$with_system_openldap" = yes \); then
+        AC_MSG_RESULT([yes])
+        ENABLE_LDAP=TRUE
+    else
+        if test "$enable_ldap" != "yes"; then
+            AC_MSG_RESULT([no])
+        else
+            AC_MSG_RESULT([no (needs OPENSSL or system openldap)])
+        fi
+    fi
+
+dnl ===================================================================
+dnl Check for system openldap
+dnl ===================================================================
+
+    if test "$ENABLE_LDAP" = TRUE; then
+        AC_MSG_CHECKING([which openldap library to use])
+        if test "$with_system_openldap" = yes; then
+            AC_MSG_RESULT([external])
+            SYSTEM_OPENLDAP=TRUE
+            AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], [])
+            AC_CHECK_LIB([ldap], [ldap_simple_bind_s], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+            AC_CHECK_LIB([ldap], [ldap_set_option], [:], [AC_MSG_ERROR(openldap lib not found or functional)], [])
+        else
+            AC_MSG_RESULT([internal])
+            BUILD_TYPE="$BUILD_TYPE OPENLDAP"
+        fi
+    fi
+fi
+
+AC_SUBST(ENABLE_LDAP)
+AC_SUBST(SYSTEM_OPENLDAP)
+
+dnl ===================================================================
+dnl Check for TLS/SSL and cryptographic implementation to use
+dnl ===================================================================
+AC_MSG_CHECKING([which TLS/SSL and cryptographic implementation to use])
+if test -n "$with_tls"; then
+    case $with_tls in
+    openssl)
+        AC_DEFINE(USE_TLS_OPENSSL)
+        TLS=OPENSSL
+        AC_MSG_RESULT([$TLS])
+
+        if test "$enable_openssl" != "yes"; then
+            AC_MSG_ERROR(["Disabling OpenSSL was requested, but the requested TLS to use is actually OpenSSL."])
+        fi
+
+        # warn that OpenSSL has been selected but not all TLS code has this option
+        AC_MSG_WARN([TLS/SSL implementation to use is OpenSSL but some code may still depend on NSS])
+        add_warning "TLS/SSL implementation to use is OpenSSL but some code may still depend on NSS"
+        ;;
+    nss)
+        AC_DEFINE(USE_TLS_NSS)
+        TLS=NSS
+        AC_MSG_RESULT([$TLS])
+        ;;
+    no)
+        AC_MSG_RESULT([none])
+        AC_MSG_WARN([Skipping TLS/SSL])
+        ;;
+    *)
+        AC_MSG_RESULT([])
+        AC_MSG_ERROR([unsupported implementation $with_tls. Supported are:
+openssl - OpenSSL
+nss - Mozilla's Network Security Services (NSS)
+    ])
+        ;;
+    esac
+else
+    # default to using NSS, it results in smaller oox lib
+    AC_DEFINE(USE_TLS_NSS)
+    TLS=NSS
+    AC_MSG_RESULT([$TLS])
+fi
+AC_SUBST(TLS)
+
+dnl ===================================================================
+dnl Check for system sane
+dnl ===================================================================
+AC_MSG_CHECKING([which sane header to use])
+if test "$with_system_sane" = "yes"; then
+    AC_MSG_RESULT([external])
+    AC_CHECK_HEADER(sane/sane.h, [],
+      [AC_MSG_ERROR(sane not found. install sane)], [])
+else
+    AC_MSG_RESULT([internal])
+    BUILD_TYPE="$BUILD_TYPE SANE"
+fi
+
+dnl ===================================================================
+dnl Check for system icu
+dnl ===================================================================
+ICU_MAJOR=73
+ICU_MINOR=2
+ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
+ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
+ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
+ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common"
+ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
+libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 4.6])
+if test "$SYSTEM_ICU" = TRUE; then
+    AC_LANG_PUSH([C++])
+    AC_MSG_CHECKING([for unicode/rbbi.h])
+    AC_PREPROC_IFELSE([AC_LANG_SOURCE([[unicode/rbbi.h]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([icu headers not found])])
+    AC_LANG_POP([C++])
+
+    ICU_VERSION=`$PKG_CONFIG --modversion icu-i18n 2>/dev/null`
+    ICU_MAJOR=`echo $ICU_VERSION | cut -d"." -f1`
+    ICU_MINOR=`echo $ICU_VERSION | cut -d"." -f2`
+
+    if test "$ICU_MAJOR" -ge 50; then
+        AC_MSG_NOTICE([Ignore ICU_MINOR as obviously the libraries don't include the minor version in their names any more])
+        ICU_MINOR=
+    fi
+
+    if test "$CROSS_COMPILING" != TRUE; then
+        # using the system icu tools can lead to version confusion, use the
+        # ones from the build environment when cross-compiling
+        AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin])
+        if test -z "$SYSTEM_GENBRK"; then
+            AC_MSG_ERROR([\'genbrk\' not found in \$PATH, install the icu development tool \'genbrk\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCCODE"; then
+            AC_MSG_ERROR([\'genccode\' not found in \$PATH, install the icu development tool \'genccode\'])
+        fi
+        AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
+        if test -z "$SYSTEM_GENCMN"; then
+            AC_MSG_ERROR([\'gencmn\' not found in \$PATH, install the icu development tool \'gencmn\'])
+        fi
+        if test "$ICU_MAJOR" -lt 49; then
+            ICU_RECLASSIFIED_PREPEND_SET_EMPTY=
+            ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER=
+            ICU_RECLASSIFIED_HEBREW_LETTER=
+        fi
+    fi
+fi
+if test "$ICU_MAJOR" -ge "59"; then
+    # As of ICU 59 it defaults to typedef char16_t UChar; which is available
+    # with -std=c++11 but not all external libraries can be built with that,
+    # for those use a bit-compatible typedef uint16_t UChar; see
+    # icu/source/common/unicode/umachine.h
+    ICU_UCHAR_TYPE="-DUCHAR_TYPE=uint16_t"
+else
+    ICU_UCHAR_TYPE=""
+fi
+AC_SUBST(SYSTEM_GENBRK)
+AC_SUBST(SYSTEM_GENCCODE)
+AC_SUBST(SYSTEM_GENCMN)
+AC_SUBST(ICU_MAJOR)
+AC_SUBST(ICU_MINOR)
+AC_SUBST(ICU_RECLASSIFIED_PREPEND_SET_EMPTY)
+AC_SUBST(ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER)
+AC_SUBST(ICU_RECLASSIFIED_HEBREW_LETTER)
+AC_SUBST(ICU_UCHAR_TYPE)
+
+dnl ==================================================================
+dnl Breakpad
+dnl ==================================================================
+DEFAULT_CRASHDUMP_VALUE="true"
+AC_MSG_CHECKING([whether to enable breakpad])
+if test "$enable_breakpad" != yes; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_BREAKPAD="TRUE"
+    AC_DEFINE(ENABLE_BREAKPAD)
+    AC_DEFINE(HAVE_FEATURE_BREAKPAD, 1)
+    BUILD_TYPE="$BUILD_TYPE BREAKPAD"
+
+    AC_MSG_CHECKING([for disable crash dump])
+    if test "$enable_crashdump" = no; then
+        DEFAULT_CRASHDUMP_VALUE="false"
+        AC_MSG_RESULT([yes])
+    else
+       AC_MSG_RESULT([no])
+    fi
+
+    AC_MSG_CHECKING([for crashreport config])
+    if test "$with_symbol_config" = "no"; then
+        BREAKPAD_SYMBOL_CONFIG="invalid"
+        AC_MSG_RESULT([no])
+    else
+        BREAKPAD_SYMBOL_CONFIG="$with_symbol_config"
+        AC_DEFINE(BREAKPAD_SYMBOL_CONFIG)
+        AC_MSG_RESULT([yes])
+    fi
+    AC_SUBST(BREAKPAD_SYMBOL_CONFIG)
+fi
+AC_SUBST(ENABLE_BREAKPAD)
+AC_SUBST(DEFAULT_CRASHDUMP_VALUE)
+
+dnl ===================================================================
+dnl Orcus
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.18 >= 0.18.0])
+if test "$with_system_orcus" != "yes"; then
+    if test "$SYSTEM_BOOST" = "TRUE"; then
+        dnl Link with Boost.System
+        dnl This seems to be necessary since boost 1.50 (1.48 does not need it,
+        dnl 1.49 is untested). The macro BOOST_THREAD_DONT_USE_SYSTEM mentioned
+        dnl in documentation has no effect.
+        AX_BOOST_SYSTEM
+    fi
+fi
+dnl FIXME by renaming SYSTEM_LIBORCUS to SYSTEM_ORCUS in the build system world
+SYSTEM_LIBORCUS=$SYSTEM_ORCUS
+AC_SUBST([BOOST_SYSTEM_LIB])
+AC_SUBST(SYSTEM_LIBORCUS)
+
+dnl ===================================================================
+dnl HarfBuzz
+dnl ===================================================================
+harfbuzz_required_version=5.1.0
+
+GRAPHITE_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/graphite/include -DGRAPHITE2_STATIC"
+HARFBUZZ_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/harfbuzz/src"
+case "$_os" in
+    Linux)
+        GRAPHITE_LIBS_internal="${WORKDIR}/LinkTarget/StaticLibrary/libgraphite.a"
+        HARFBUZZ_LIBS_internal="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.a"
+        ;;
+    *)
+        GRAPHITE_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -lgraphite"
+        HARFBUZZ_LIBS_internal="-L${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs -lharfbuzz"
+        ;;
+esac
+libo_CHECK_SYSTEM_MODULE([graphite],[GRAPHITE],[graphite2 >= 0.9.3])
+libo_CHECK_SYSTEM_MODULE([harfbuzz],[HARFBUZZ],[harfbuzz-icu >= $harfbuzz_required_version])
+
+if test "$COM" = "MSC"; then # override the above
+    GRAPHITE_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/graphite.lib"
+    HARFBUZZ_LIBS="${WORKDIR}/UnpackedTarball/harfbuzz/src/.libs/libharfbuzz.lib"
+fi
+
+if test "$with_system_harfbuzz" = "yes"; then
+    if test "$with_system_graphite" = "no"; then
+        AC_MSG_ERROR([--with-system-graphite must be used when --with-system-harfbuzz is used])
+    fi
+    AC_MSG_CHECKING([whether system Harfbuzz is built with Graphite support])
+    save_LIBS="$LIBS"
+    save_CFLAGS="$CFLAGS"
+    LIBS="$LIBS $HARFBUZZ_LIBS"
+    CFLAGS="$CFLAGS $HARFBUZZ_CFLAGS"
+    AC_CHECK_FUNC(hb_graphite2_face_get_gr_face,,[AC_MSG_ERROR([Harfbuzz needs to be built with Graphite support.])])
+    LIBS="$save_LIBS"
+    CFLAGS="$save_CFLAGS"
+else
+    if test "$with_system_graphite" = "yes"; then
+        AC_MSG_ERROR([--without-system-graphite must be used when --without-system-harfbuzz is used])
+    fi
+fi
+
+if test "$USING_X11" = TRUE; then
+    AC_PATH_X
+    AC_PATH_XTRA
+    CPPFLAGS="$CPPFLAGS $X_CFLAGS"
+
+    if test -z "$x_includes"; then
+        x_includes="default_x_includes"
+    fi
+    if test -z "$x_libraries"; then
+        x_libraries="default_x_libraries"
+    fi
+    CFLAGS="$CFLAGS $X_CFLAGS"
+    LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
+    AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
+else
+    x_includes="no_x_includes"
+    x_libraries="no_x_libraries"
+fi
+
+if test "$USING_X11" = TRUE; then
+    dnl ===================================================================
+    dnl Check for extension headers
+    dnl ===================================================================
+    AC_CHECK_HEADERS(X11/extensions/shape.h,[],[AC_MSG_ERROR([libXext headers not found])],
+     [#include <X11/extensions/shape.h>])
+
+    # vcl needs ICE and SM
+    AC_CHECK_HEADERS(X11/ICE/ICElib.h,[],[AC_MSG_ERROR([libICE headers not found])])
+    AC_CHECK_LIB([ICE], [IceConnectionNumber], [:],
+        [AC_MSG_ERROR(ICE library not found)])
+    AC_CHECK_HEADERS(X11/SM/SMlib.h,[],[AC_MSG_ERROR([libSM headers not found])])
+    AC_CHECK_LIB([SM], [SmcOpenConnection], [:],
+        [AC_MSG_ERROR(SM library not found)])
+fi
+
+if test "$USING_X11" = TRUE -a "$ENABLE_JAVA" != ""; then
+    # bean/native/unix/com_sun_star_comp_beans_LocalOfficeWindow.c needs Xt
+    AC_CHECK_HEADERS(X11/Intrinsic.h,[],[AC_MSG_ERROR([libXt headers not found])])
+fi
+
+dnl ===================================================================
+dnl Check for system Xrender
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use Xrender])
+if test "$USING_X11" = TRUE -a  "$test_xrender" = "yes"; then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(XRENDER, xrender)
+    XRENDER_CFLAGS=$(printf '%s' "$XRENDER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${XRENDER_LIBS}"
+    XRENDER_LIBS="${filteredlibs}"
+    AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
+      [AC_MSG_ERROR(libXrender not found or functional)], [])
+    AC_CHECK_HEADER(X11/extensions/Xrender.h, [],
+      [AC_MSG_ERROR(Xrender not found. install X)], [])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(XRENDER_CFLAGS)
+AC_SUBST(XRENDER_LIBS)
+
+dnl ===================================================================
+dnl Check for XRandr
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable RandR support])
+if test "$USING_X11" = TRUE -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \); then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="")
+    if test "$ENABLE_RANDR" != "TRUE"; then
+        AC_CHECK_HEADER(X11/extensions/Xrandr.h, [],
+                    [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], [])
+        XRANDR_CFLAGS=" "
+        AC_CHECK_LIB([Xrandr], [XRRQueryExtension], [:],
+          [ AC_MSG_ERROR(libXrandr not found or functional) ], [])
+        XRANDR_LIBS="-lXrandr "
+        ENABLE_RANDR="TRUE"
+    fi
+    XRANDR_CFLAGS=$(printf '%s' "$XRANDR_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${XRANDR_LIBS}"
+    XRANDR_LIBS="${filteredlibs}"
+else
+    ENABLE_RANDR=""
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(XRANDR_CFLAGS)
+AC_SUBST(XRANDR_LIBS)
+AC_SUBST(ENABLE_RANDR)
+
+if test -z "$with_webdav"; then
+    with_webdav=$test_webdav
+fi
+
+AC_MSG_CHECKING([for WebDAV support])
+case "$with_webdav" in
+no)
+    AC_MSG_RESULT([no])
+    WITH_WEBDAV=""
+    ;;
+*)
+    AC_MSG_RESULT([yes])
+    # curl is already mandatory (almost) and checked elsewhere
+    if test "$enable_curl" = "no"; then
+        AC_MSG_ERROR(["--with-webdav conflicts with --disable-curl"])
+    fi
+    WITH_WEBDAV=TRUE
+    ;;
+esac
+AC_SUBST(WITH_WEBDAV)
+
+dnl ===================================================================
+dnl Check for disabling cve_tests
+dnl ===================================================================
+AC_MSG_CHECKING([whether to execute CVE tests])
+# If not explicitly enabled or disabled, default
+if test -z "$enable_cve_tests"; then
+    case "$OS" in
+    WNT)
+        # Default cves off for Windows with its wild and wonderful
+        # variety of AV software kicking in and panicking
+        enable_cve_tests=no
+        ;;
+    *)
+        # otherwise yes
+        enable_cve_tests=yes
+        ;;
+    esac
+fi
+if test "$enable_cve_tests" = "no"; then
+    AC_MSG_RESULT([no])
+    DISABLE_CVE_TESTS=TRUE
+    AC_SUBST(DISABLE_CVE_TESTS)
+else
+    AC_MSG_RESULT([yes])
+fi
+
+dnl ===================================================================
+dnl Check for system openssl
+dnl ===================================================================
+ENABLE_OPENSSL=
+AC_MSG_CHECKING([whether to disable OpenSSL usage])
+if test "$enable_openssl" = "yes"; then
+    AC_MSG_RESULT([no])
+    ENABLE_OPENSSL=TRUE
+    if test "$_os" = Darwin ; then
+        # OpenSSL is deprecated when building for 10.7 or later.
+        #
+        # https://stackoverflow.com/questions/7406946/why-is-apple-deprecating-openssl-in-macos-10-7-lion
+        # https://stackoverflow.com/questions/7475914/libcrypto-deprecated-on-mac-os-x-10-7-lion
+
+        with_system_openssl=no
+        libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
+    elif test "$_os" = "FreeBSD" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
+            && test "$with_system_openssl" != "no"; then
+        with_system_openssl=yes
+        SYSTEM_OPENSSL=TRUE
+        OPENSSL_CFLAGS=
+        OPENSSL_LIBS="-lssl -lcrypto"
+    else
+        libo_CHECK_SYSTEM_MODULE([openssl],[OPENSSL],[openssl])
+    fi
+    if test "$with_system_openssl" = "yes"; then
+        AC_MSG_CHECKING([whether openssl supports SHA512])
+        AC_LANG_PUSH([C])
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <openssl/sha.h>]],[[
+            SHA512_CTX context;
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, openssl too old. Need >= 0.9.8.])])
+        AC_LANG_POP(C)
+    fi
+else
+    AC_MSG_RESULT([yes])
+
+    # warn that although OpenSSL is disabled, system libraries may depend on it
+    AC_MSG_WARN([OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies])
+    add_warning "OpenSSL has been disabled. No code compiled here will make use of it but system libraries may create indirect dependencies"
+fi
+
+AC_SUBST([ENABLE_OPENSSL])
+
+if test "$enable_cipher_openssl_backend" = yes && test "$ENABLE_OPENSSL" != TRUE; then
+    if test "$libo_fuzzed_enable_cipher_openssl_backend" = yes; then
+        AC_MSG_NOTICE([Resetting --enable-cipher-openssl-backend=no])
+        enable_cipher_openssl_backend=no
+    else
+        AC_MSG_ERROR([--enable-cipher-openssl-backend needs OpenSSL, but --disable-openssl was given.])
+    fi
+fi
+AC_MSG_CHECKING([whether to enable the OpenSSL backend for rtl/cipher.h])
+ENABLE_CIPHER_OPENSSL_BACKEND=
+if test "$enable_cipher_openssl_backend" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_CIPHER_OPENSSL_BACKEND=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([ENABLE_CIPHER_OPENSSL_BACKEND])
+
+dnl ===================================================================
+dnl Select the crypto backends used by LO
+dnl ===================================================================
+
+if test "$build_crypto" = yes; then
+    if test "$OS" = WNT; then
+        BUILD_TYPE="$BUILD_TYPE CRYPTO_MSCAPI"
+        AC_DEFINE([USE_CRYPTO_MSCAPI])
+    elif test "$ENABLE_NSS" = TRUE; then
+        BUILD_TYPE="$BUILD_TYPE CRYPTO_NSS"
+        AC_DEFINE([USE_CRYPTO_NSS])
+    fi
+fi
+
+dnl ===================================================================
+dnl Check for system redland
+dnl ===================================================================
+dnl redland: versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base)
+dnl raptor2: need at least 2.0.7 for CVE-2012-0037
+libo_CHECK_SYSTEM_MODULE([redland],[REDLAND],[redland >= 1.0.8 raptor2 >= 2.0.7])
+if test "$with_system_redland" = "yes"; then
+    AC_CHECK_LIB([rdf], [librdf_world_set_raptor_init_handler], [:],
+            [AC_MSG_ERROR(librdf too old. Need >= 1.0.16)], [])
+else
+    RAPTOR_MAJOR="0"
+    RASQAL_MAJOR="3"
+    REDLAND_MAJOR="0"
+fi
+AC_SUBST(RAPTOR_MAJOR)
+AC_SUBST(RASQAL_MAJOR)
+AC_SUBST(REDLAND_MAJOR)
+
+dnl ===================================================================
+dnl Check for system hunspell
+dnl ===================================================================
+AC_MSG_CHECKING([which libhunspell to use])
+if test "$with_system_hunspell" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_HUNSPELL=TRUE
+    AC_LANG_PUSH([C++])
+    PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" )
+    if test "$HUNSPELL_PC" != "TRUE"; then
+        AC_CHECK_HEADER(hunspell.hxx, [],
+            [
+            AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ],
+            [AC_MSG_ERROR(hunspell headers not found.)], [])
+            ], [])
+        AC_CHECK_LIB([hunspell], [main], [:],
+           [ AC_MSG_ERROR(hunspell library not found.) ], [])
+        HUNSPELL_LIBS=-lhunspell
+    fi
+    AC_LANG_POP([C++])
+    HUNSPELL_CFLAGS=$(printf '%s' "$HUNSPELL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${HUNSPELL_LIBS}"
+    HUNSPELL_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_HUNSPELL=
+    HUNSPELL_CFLAGS="-I${WORKDIR}/UnpackedTarball/hunspell/src/hunspell"
+    if test "$COM" = "MSC"; then
+        HUNSPELL_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/hunspell.lib"
+    else
+        HUNSPELL_LIBS="-L${WORKDIR}/UnpackedTarball/hunspell/src/hunspell/.libs -lhunspell-1.7"
+    fi
+    BUILD_TYPE="$BUILD_TYPE HUNSPELL"
+fi
+AC_SUBST(SYSTEM_HUNSPELL)
+AC_SUBST(HUNSPELL_CFLAGS)
+AC_SUBST(HUNSPELL_LIBS)
+
+dnl ===================================================================
+dnl Check for system zxing
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use zxing])
+if test "$enable_zxing" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_ZXING=
+    SYSTEM_ZXING=
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_ZXING=TRUE
+    AC_MSG_CHECKING([which libzxing to use])
+    if test "$with_system_zxing" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_ZXING=TRUE
+        ZXING_CFLAGS=
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        save_IFS=$IFS
+        IFS=$P_SEP
+        for i in $CPLUS_INCLUDE_PATH /usr/include; do
+            dnl Reset IFS as soon as possible, to avoid unexpected side effects (and the
+            dnl "/usr/include" fallback makes sure we get here at least once; resetting rather than
+            dnl unsetting follows the advice at <https://git.savannah.gnu.org/gitweb/?p=autoconf.git;
+            dnl a=commitdiff;h=e51c9919f2cf70185b7916ac040bc0bbfd0f743b> "Add recommendation on (not)
+            dnl unsetting IFS."):
+            IFS=$save_IFS
+            dnl TODO: GCC and Clang treat empty paths in CPLUS_INCLUDE_PATH like ".", but we simply
+            dnl ignore them here:
+            if test -z "$i"; then
+                continue
+            fi
+            dnl TODO: White space in $i would cause problems:
+            CXXFLAGS="$save_CXXFLAGS ${CXXFLAGS_CXX11} -I$i/ZXing"
+            AC_CHECK_HEADER(MultiFormatWriter.h, [ZXING_CFLAGS=-I$i/ZXing; break],
+                [unset ac_cv_header_MultiFormatWriter_h], [#include <stdexcept>])
+        done
+        CXXFLAGS=$save_CXXFLAGS
+        if test -z "$ZXING_CFLAGS"; then
+            AC_MSG_ERROR(zxing headers not found.)
+        fi
+        AC_CHECK_LIB([ZXing], [main], [ZXING_LIBS=-lZXing],
+            [ AC_CHECK_LIB([ZXingCore], [main], [ZXING_LIBS=-lZXingCore],
+            [ AC_MSG_ERROR(zxing C++ library not found.) ])], [])
+        AC_LANG_POP([C++])
+        ZXING_CFLAGS=$(printf '%s' "$ZXING_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${ZXING_LIBS}"
+        ZXING_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_ZXING=
+        BUILD_TYPE="$BUILD_TYPE ZXING"
+    fi
+    if test "$ENABLE_ZXING" = TRUE; then
+        AC_DEFINE(ENABLE_ZXING)
+    fi
+fi
+AC_SUBST(SYSTEM_ZXING)
+AC_SUBST(ENABLE_ZXING)
+AC_SUBST(ZXING_CFLAGS)
+AC_SUBST(ZXING_LIBS)
+
+dnl ===================================================================
+dnl Check for system box2d
+dnl ===================================================================
+AC_MSG_CHECKING([which box2d to use])
+if test "$with_system_box2d" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_BOX2D=TRUE
+    AC_LANG_PUSH([C++])
+    AC_CHECK_HEADER(box2d/box2d.h, [BOX2D_H_FOUND='TRUE'],
+        [BOX2D_H_FOUND='FALSE'])
+    if test "$BOX2D_H_FOUND" = "TRUE"; then # 2.4.0+
+        _BOX2D_LIB=box2d
+        AC_DEFINE(BOX2D_HEADER,<box2d/box2d.h>)
+    else
+        # fail this. there's no other alternative to check when we are here.
+        AC_CHECK_HEADER([Box2D/Box2D.h], [],
+            [AC_MSG_ERROR(box2d headers not found.)])
+        _BOX2D_LIB=Box2D
+        AC_DEFINE(BOX2D_HEADER,<Box2D/Box2D.h>)
+    fi
+    AC_CHECK_LIB([$_BOX2D_LIB], [main], [:],
+        [ AC_MSG_ERROR(box2d library not found.) ], [])
+    BOX2D_LIBS=-l$_BOX2D_LIB
+    AC_LANG_POP([C++])
+    BOX2D_CFLAGS=$(printf '%s' "$BOX2D_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${BOX2D_LIBS}"
+    BOX2D_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_BOX2D=
+    BUILD_TYPE="$BUILD_TYPE BOX2D"
+fi
+AC_SUBST(SYSTEM_BOX2D)
+AC_SUBST(BOX2D_CFLAGS)
+AC_SUBST(BOX2D_LIBS)
+
+dnl ===================================================================
+dnl Checking for altlinuxhyph
+dnl ===================================================================
+AC_MSG_CHECKING([which altlinuxhyph to use])
+if test "$with_system_altlinuxhyph" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_HYPH=TRUE
+    AC_CHECK_HEADER(hyphen.h, [],
+       [ AC_MSG_ERROR(altlinuxhyph headers not found.)], [])
+    AC_CHECK_MEMBER(struct _HyphenDict.cset, [],
+       [ AC_MSG_ERROR(no. You are sure you have altlinuyhyph headers?)],
+       [#include <hyphen.h>])
+    AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen],
+        [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    if test -z "$HYPHEN_LIB"; then
+        AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
+    if test -z "$HYPHEN_LIB"; then
+        AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj],
+           [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], [])
+    fi
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_HYPH=
+    BUILD_TYPE="$BUILD_TYPE HYPHEN"
+    if test "$COM" = "MSC"; then
+        HYPHEN_LIB="${WORKDIR}/LinkTarget/StaticLibrary/hyphen.lib"
+    else
+        HYPHEN_LIB="-L${WORKDIR}/UnpackedTarball/hyphen/.libs -lhyphen"
+    fi
+fi
+AC_SUBST(SYSTEM_HYPH)
+AC_SUBST(HYPHEN_LIB)
+
+dnl ===================================================================
+dnl Checking for mythes
+dnl ===================================================================
+AC_MSG_CHECKING([which mythes to use])
+if test "$with_system_mythes" = "yes"; then
+    AC_MSG_RESULT([external])
+    SYSTEM_MYTHES=TRUE
+    AC_LANG_PUSH([C++])
+    PKG_CHECK_MODULES(MYTHES, mythes, MYTHES_PKGCONFIG=yes, MYTHES_PKGCONFIG=no)
+    if test "$MYTHES_PKGCONFIG" = "no"; then
+        AC_CHECK_HEADER(mythes.hxx, [],
+            [ AC_MSG_ERROR(mythes.hxx headers not found.)], [])
+        AC_CHECK_LIB([mythes-1.2], [main], [:],
+            [ MYTHES_FOUND=no], [])
+    if test "$MYTHES_FOUND" = "no"; then
+        AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes],
+                [ MYTHES_FOUND=no], [])
+    fi
+    if test "$MYTHES_FOUND" = "no"; then
+        AC_MSG_ERROR([mythes library not found!.])
+    fi
+    fi
+    AC_LANG_POP([C++])
+    MYTHES_CFLAGS=$(printf '%s' "$MYTHES_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${MYTHES_LIBS}"
+    MYTHES_LIBS="${filteredlibs}"
+else
+    AC_MSG_RESULT([internal])
+    SYSTEM_MYTHES=
+    BUILD_TYPE="$BUILD_TYPE MYTHES"
+    if test "$COM" = "MSC"; then
+        MYTHES_LIBS="${WORKDIR}/LinkTarget/StaticLibrary/mythes.lib"
+    else
+        MYTHES_LIBS="-L${WORKDIR}/UnpackedTarball/mythes/.libs -lmythes-1.2"
+    fi
+fi
+AC_SUBST(SYSTEM_MYTHES)
+AC_SUBST(MYTHES_CFLAGS)
+AC_SUBST(MYTHES_LIBS)
+
+dnl ===================================================================
+dnl How should we build the linear programming solver ?
+dnl ===================================================================
+
+ENABLE_COINMP=
+AC_MSG_CHECKING([whether to build with CoinMP])
+if test "$enable_coinmp" != "no"; then
+    ENABLE_COINMP=TRUE
+    AC_MSG_RESULT([yes])
+    if test "$with_system_coinmp" = "yes"; then
+        SYSTEM_COINMP=TRUE
+        PKG_CHECK_MODULES(COINMP, coinmp coinutils)
+        FilterLibs "${COINMP_LIBS}"
+        COINMP_LIBS="${filteredlibs}"
+    else
+        BUILD_TYPE="$BUILD_TYPE COINMP"
+    fi
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_COINMP)
+AC_SUBST(SYSTEM_COINMP)
+AC_SUBST(COINMP_CFLAGS)
+AC_SUBST(COINMP_LIBS)
+
+ENABLE_LPSOLVE=
+AC_MSG_CHECKING([whether to build with lpsolve])
+if test "$enable_lpsolve" != "no"; then
+    ENABLE_LPSOLVE=TRUE
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_LPSOLVE)
+
+if test "$ENABLE_LPSOLVE" = TRUE; then
+    AC_MSG_CHECKING([which lpsolve to use])
+    if test "$with_system_lpsolve" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_LPSOLVE=TRUE
+        AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
+           [ AC_MSG_ERROR(lpsolve headers not found.)], [])
+        save_LIBS=$LIBS
+        # some systems need this. Like Ubuntu...
+        AC_CHECK_LIB(m, floor)
+        AC_CHECK_LIB(dl, dlopen)
+        AC_CHECK_LIB([lpsolve55], [make_lp], [:],
+            [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
+        LIBS=$save_LIBS
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_LPSOLVE=
+        BUILD_TYPE="$BUILD_TYPE LPSOLVE"
+    fi
+fi
+AC_SUBST(SYSTEM_LPSOLVE)
+
+dnl ===================================================================
+dnl Checking for libexttextcat
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.4.1])
+if test "$with_system_libexttextcat" = "yes"; then
+    SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat`
+fi
+AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA)
+
+dnl ===================================================================
+dnl Checking for libnumbertext
+dnl ===================================================================
+libo_CHECK_SYSTEM_MODULE([libnumbertext],[LIBNUMBERTEXT],[libnumbertext >= 1.0.6])
+if test "$with_system_libnumbertext" = "yes"; then
+    SYSTEM_LIBNUMBERTEXT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libnumbertext`
+    SYSTEM_LIBNUMBERTEXT=YES
+else
+    SYSTEM_LIBNUMBERTEXT=
+fi
+AC_SUBST(SYSTEM_LIBNUMBERTEXT)
+AC_SUBST(SYSTEM_LIBNUMBERTEXT_DATA)
+
+dnl ***************************************
+dnl testing libc version for Linux...
+dnl ***************************************
+if test "$_os" = "Linux"; then
+    AC_MSG_CHECKING([whether the libc is recent enough])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    #include <features.h>
+    #if defined(__GNU_LIBRARY__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 1))
+    #error glibc >= 2.1 is required
+    #endif
+    ]])],, [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no, upgrade libc])])
+fi
+
+dnl =========================================
+dnl Check for uuidgen
+dnl =========================================
+if test "$_os" = "WINNT"; then
+    # we must use the uuidgen from the Windows SDK, which will be in the LO_PATH, but isn't in
+    # the PATH for AC_PATH_PROG. It is already tested above in the WINDOWS_SDK_HOME check.
+    UUIDGEN=uuidgen.exe
+    AC_SUBST(UUIDGEN)
+else
+    AC_PATH_PROG([UUIDGEN], [uuidgen])
+    if test -z "$UUIDGEN"; then
+        AC_MSG_WARN([uuid is needed for building installation sets])
+    fi
+fi
+
+dnl ***************************************
+dnl Checking for bison and flex
+dnl ***************************************
+AC_PATH_PROG(BISON, bison)
+if test -z "$BISON"; then
+    AC_MSG_ERROR([no bison found in \$PATH, install it])
+else
+    AC_MSG_CHECKING([the bison version])
+    _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`
+    _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'`
+    dnl Accept newer than 2.0; for --enable-compiler-plugins at least 2.3 is known to be bad and
+    dnl cause
+    dnl
+    dnl   idlc/source/parser.y:222:15: error: externally available entity 'YYSTYPE' is not previously declared in an included file (if it is only used in this translation unit, put it in an unnamed namespace; otherwise, provide a declaration of it in an included file) [loplugin:external]
+    dnl   typedef union YYSTYPE
+    dnl           ~~~~~~^~~~~~~
+    dnl
+    dnl while at least 3.4.1 is know to be good:
+    if test "$COMPILER_PLUGINS" = TRUE; then
+        if test "$_bison_longver" -lt 2004; then
+            AC_MSG_ERROR([failed ($BISON $_bison_version need 2.4+ for --enable-compiler-plugins)])
+        fi
+    else
+        if test "$_bison_longver" -lt 2000; then
+            AC_MSG_ERROR([failed ($BISON $_bison_version need 2.0+)])
+        fi
+    fi
+fi
+AC_SUBST([BISON])
+
+AC_PATH_PROG(FLEX, flex)
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    FLEX=`cygpath -m $FLEX`
+fi
+if test -z "$FLEX"; then
+    AC_MSG_ERROR([no flex found in \$PATH, install it])
+else
+    AC_MSG_CHECKING([the flex version])
+    _flex_version=$($FLEX --version | $SED -e 's/^.*\([[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\.[[[:digit:]]]\{1,\}\).*$/\1/')
+    if test $(echo $_flex_version | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}') -lt 2006000; then
+        AC_MSG_ERROR([failed ($FLEX $_flex_version found, but need at least 2.6.0)])
+    fi
+fi
+AC_SUBST([FLEX])
+
+AC_PATH_PROG(DIFF, diff)
+if test -z "$DIFF"; then
+    AC_MSG_ERROR(["diff" not found in \$PATH, install it])
+fi
+AC_SUBST([DIFF])
+
+AC_PATH_PROG(UNIQ, uniq)
+if test -z "$UNIQ"; then
+    AC_MSG_ERROR(["uniq" not found in \$PATH, install it])
+fi
+AC_SUBST([UNIQ])
+
+dnl ***************************************
+dnl Checking for patch
+dnl ***************************************
+AC_PATH_PROG(PATCH, patch)
+if test -z "$PATCH"; then
+    AC_MSG_ERROR(["patch" not found in \$PATH, install it])
+fi
+
+dnl On Solaris or macOS, check if --with-gnu-patch was used
+if test "$_os" = "SunOS" -o "$_os" = "Darwin"; then
+    if test -z "$with_gnu_patch"; then
+        GNUPATCH=$PATCH
+    else
+        if test -x "$with_gnu_patch"; then
+            GNUPATCH=$with_gnu_patch
+        else
+            AC_MSG_ERROR([--with-gnu-patch did not point to an executable])
+        fi
+    fi
+
+    AC_MSG_CHECKING([whether $GNUPATCH is GNU patch])
+    if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then
+        AC_MSG_RESULT([yes])
+    else
+        if $GNUPATCH --version | grep "2\.0-.*-Apple" >/dev/null 2>/dev/null; then
+            AC_MSG_RESULT([no, but accepted (Apple patch)])
+            add_warning "patch utility is not GNU patch. Apple's patch should work OK, but it might experience issues where GNU patch doesn't."
+        else
+            AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it])
+        fi
+    fi
+else
+    GNUPATCH=$PATCH
+fi
+
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GNUPATCH=`cygpath -m $GNUPATCH`
+fi
+
+dnl We also need to check for --with-gnu-cp
+
+if test -z "$with_gnu_cp"; then
+    # check the place where the good stuff is hidden on Solaris...
+    if test -x /usr/gnu/bin/cp; then
+        GNUCP=/usr/gnu/bin/cp
+    else
+        AC_PATH_PROGS(GNUCP, gnucp cp)
+    fi
+    if test -z $GNUCP; then
+        AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it])
+    fi
+else
+    if test -x "$with_gnu_cp"; then
+        GNUCP=$with_gnu_cp
+    else
+        AC_MSG_ERROR([--with-gnu-cp did not point to an executable])
+    fi
+fi
+
+if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+    GNUCP=`cygpath -m $GNUCP`
+fi
+
+AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support])
+if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then
+    AC_MSG_RESULT([yes])
+elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then
+    AC_MSG_RESULT([yes])
+else
+    case "$build_os" in
+    darwin*|netbsd*|openbsd*|freebsd*|dragonfly*)
+        x_GNUCP=[\#]
+        GNUCP=''
+        AC_MSG_RESULT([no gnucp found - using the system's cp command])
+        ;;
+    *)
+        AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it])
+        ;;
+    esac
+fi
+
+AC_SUBST(GNUPATCH)
+AC_SUBST(GNUCP)
+AC_SUBST(x_GNUCP)
+
+dnl ***************************************
+dnl testing assembler path
+dnl ***************************************
+ML_EXE=""
+if test "$_os" = "WINNT"; then
+    case "$WIN_HOST_ARCH" in
+    x86) assembler=ml.exe ;;
+    x64) assembler=ml64.exe ;;
+    arm64) assembler=armasm64.exe ;;
+    esac
+
+    AC_MSG_CHECKING([for the MSVC assembler ($assembler)])
+    if test -f "$MSVC_HOST_PATH/$assembler"; then
+        ML_EXE=`win_short_path_for_make "$MSVC_HOST_PATH/$assembler"`
+        AC_MSG_RESULT([$ML_EXE])
+    else
+        AC_MSG_ERROR([not found in $MSVC_HOST_PATH])
+    fi
+fi
+
+AC_SUBST(ML_EXE)
+
+dnl ===================================================================
+dnl We need zip and unzip
+dnl ===================================================================
+AC_PATH_PROG(ZIP, zip)
+test -z "$ZIP" && AC_MSG_ERROR([zip is required])
+if ! "$ZIP" --filesync < /dev/null 2>/dev/null > /dev/null; then
+    AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install it and make sure it is the one found first in PATH],,)
+fi
+
+AC_PATH_PROG(UNZIP, unzip)
+test -z "$UNZIP" && AC_MSG_ERROR([unzip is required])
+
+dnl ===================================================================
+dnl Zip must be a specific type for different build types.
+dnl ===================================================================
+if test $build_os = cygwin; then
+    if test -n "`$ZIP -h | $GREP -i WinNT`"; then
+        AC_MSG_ERROR([$ZIP is not the required Cygwin version of Info-ZIP's zip.exe.])
+    fi
+fi
+
+dnl ===================================================================
+dnl We need touch with -h option support.
+dnl ===================================================================
+AC_PATH_PROG(TOUCH, touch)
+test -z "$TOUCH" && AC_MSG_ERROR([touch is required])
+touch "$WARNINGS_FILE"
+if ! "$TOUCH" -h "$WARNINGS_FILE" 2>/dev/null > /dev/null; then
+    AC_MSG_ERROR([touch version with -h option support is required to build, please install it and make sure it is the one found first in PATH],,)
+fi
+
+dnl ===================================================================
+dnl Check for system epoxy
+dnl ===================================================================
+EPOXY_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/epoxy/include"
+libo_CHECK_SYSTEM_MODULE([epoxy], [EPOXY], [epoxy >= 1.2])
+
+dnl ===================================================================
+dnl Set vcl option: coordinate device in double or sal_Int32
+dnl ===================================================================
+
+AC_MSG_CHECKING([Type to use for Device Pixel coordinates])
+if test "$enable_float_device_pixel" = yes; then
+    AC_DEFINE(VCL_FLOAT_DEVICE_PIXEL)
+    AC_MSG_RESULT([double])
+else
+    AC_MSG_RESULT([sal_Int32])
+fi
+
+dnl ===================================================================
+dnl Show which vclplugs will be built.
+dnl ===================================================================
+R=""
+
+libo_ENABLE_VCLPLUG([gen])
+libo_ENABLE_VCLPLUG([gtk3])
+libo_ENABLE_VCLPLUG([gtk3_kde5])
+libo_ENABLE_VCLPLUG([gtk4])
+libo_ENABLE_VCLPLUG([kf5])
+libo_ENABLE_VCLPLUG([qt5])
+libo_ENABLE_VCLPLUG([qt6])
+
+if test "$_os" = "WINNT"; then
+    R="$R win"
+elif test "$_os" = "Darwin"; then
+    R="$R osx"
+elif test "$_os" = "iOS"; then
+    R="ios"
+elif test "$_os" = Android; then
+    R="android"
+fi
+
+build_vcl_plugins="$R"
+if test -z "$build_vcl_plugins"; then
+    build_vcl_plugins=" none"
+fi
+AC_MSG_NOTICE([VCLplugs to be built:${build_vcl_plugins}])
+VCL_PLUGIN_INFO=$R
+AC_SUBST([VCL_PLUGIN_INFO])
+
+if test "$DISABLE_DYNLOADING" = TRUE -a -z "$DISABLE_GUI" -a \( -z "$R" -o $(echo "$R" | wc -w) -ne 1 \); then
+    AC_MSG_ERROR([Can't build --disable-dynamic-loading without --disable-gui and a single VCL plugin"])
+fi
+
+dnl ===================================================================
+dnl Check for GTK libraries
+dnl ===================================================================
+
+GTK3_CFLAGS=""
+GTK3_LIBS=""
+ENABLE_GTKTILEDVIEWER=""
+if test "$test_gtk3" = yes -a "x$enable_gtk3" = "xyes" -o "x$enable_gtk3_kde5" = "xyes"; then
+    if test "$with_system_cairo" = no; then
+        add_warning 'Non-system cairo combined with gtk3 is known to cause trouble (eg. broken image in the splashscreen). Use --with-system-cairo unless you know what you are doing.'
+    fi
+    : ${with_system_cairo:=yes}
+    PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.20 gtk+-unix-print-3.0 gmodule-no-export-2.0 glib-2.0 >= 2.38 atk >= 2.28.1 cairo)
+    GTK3_CFLAGS=$(printf '%s' "$GTK3_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK3_LIBS}"
+    GTK3_LIBS="${filteredlibs}"
+
+    dnl We require egl only for the gtk3 plugin. Otherwise we use glx.
+    if test "$with_system_epoxy" != "yes"; then
+        AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.]))
+        AC_CHECK_HEADER(EGL/eglplatform.h, [],
+                        [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
+    fi
+elif test -n "$with_gtk3_build" -a "$OS" = "WNT"; then
+    PathFormat "${with_gtk3_build}/lib/pkgconfig"
+    if test "$build_os" = "cygwin"; then
+        dnl cygwin's pkg-config does not recognize "C:/..."-style paths, only "/cygdrive/c/..."
+        formatted_path_unix=`cygpath -au "$formatted_path_unix"`
+    fi
+
+    PKG_CONFIG_PATH="$formatted_path_unix"; export PKG_CONFIG_PATH
+    PKG_CHECK_MODULES(GTK3, cairo gdk-3.0 gio-2.0 glib-2.0 gobject-2.0 gtk+-3.0)
+    GTK3_CFLAGS="$GTK3_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK3_LIBS}"
+    GTK3_LIBS="${filteredlibs}"
+    ENABLE_GTKTILEDVIEWER="yes"
+fi
+AC_SUBST(GTK3_LIBS)
+AC_SUBST(GTK3_CFLAGS)
+AC_SUBST(ENABLE_GTKTILEDVIEWER)
+
+GTK4_CFLAGS=""
+GTK4_LIBS=""
+if test "$test_gtk4" = yes -a "x$enable_gtk4" = "xyes"; then
+    if test "$with_system_cairo" = no; then
+        add_warning 'Non-system cairo combined with gtk4 is assumed to cause trouble; proceed at your own risk.'
+    fi
+    : ${with_system_cairo:=yes}
+    PKG_CHECK_MODULES(GTK4, gtk4 gmodule-no-export-2.0 glib-2.0 >= 2.38 cairo atk)
+    GTK4_CFLAGS=$(printf '%s' "$GTK4_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    GTK4_CFLAGS="$GTK4_CFLAGS -DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+    FilterLibs "${GTK4_LIBS}"
+    GTK4_LIBS="${filteredlibs}"
+
+    dnl We require egl only for the gtk4 plugin. Otherwise we use glx.
+    if test "$with_system_epoxy" != "yes"; then
+        AC_CHECK_LIB(EGL, eglMakeCurrent, [:], AC_MSG_ERROR([libEGL required.]))
+        AC_CHECK_HEADER(EGL/eglplatform.h, [],
+                        [AC_MSG_ERROR(EGL headers not found. install mesa-libEGL-devel)], [])
+    fi
+fi
+AC_SUBST(GTK4_LIBS)
+AC_SUBST(GTK4_CFLAGS)
+
+if test "$enable_introspection" = yes; then
+    if test "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
+        GOBJECT_INTROSPECTION_REQUIRE(INTROSPECTION_REQUIRED_VERSION)
+    else
+        AC_MSG_ERROR([--enable-introspection requires --enable-gtk3])
+    fi
+fi
+
+dnl ===================================================================
+dnl check for dbus support
+dnl ===================================================================
+ENABLE_DBUS=""
+DBUS_CFLAGS=""
+DBUS_LIBS=""
+DBUS_GLIB_CFLAGS=""
+DBUS_GLIB_LIBS=""
+DBUS_HAVE_GLIB=""
+
+if test "$enable_dbus" = "no"; then
+    test_dbus=no
+fi
+
+AC_MSG_CHECKING([whether to enable DBUS support])
+if test "$test_dbus" = "yes"; then
+    ENABLE_DBUS="TRUE"
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(DBUS, dbus-1 >= 0.60)
+    AC_DEFINE(ENABLE_DBUS)
+    DBUS_CFLAGS=$(printf '%s' "$DBUS_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${DBUS_LIBS}"
+    DBUS_LIBS="${filteredlibs}"
+
+    # Glib is needed for BluetoothServer
+    # Sets also DBUS_GLIB_CFLAGS/DBUS_GLIB_LIBS if successful.
+    PKG_CHECK_MODULES(DBUS_GLIB,[glib-2.0 >= 2.4],
+        [
+            DBUS_HAVE_GLIB="TRUE"
+            AC_DEFINE(DBUS_HAVE_GLIB,1)
+        ],
+        AC_MSG_WARN([[No Glib found, Bluetooth support will be disabled]])
+    )
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_DBUS)
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+AC_SUBST(DBUS_GLIB_CFLAGS)
+AC_SUBST(DBUS_GLIB_LIBS)
+AC_SUBST(DBUS_HAVE_GLIB)
+
+AC_MSG_CHECKING([whether to enable Impress remote control])
+if test -n "$enable_sdremote" -a "$enable_sdremote" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SDREMOTE=TRUE
+    SDREMOTE_ENTITLEMENT="	<key>com.apple.security.network.server</key>
+	<true/>"
+    AC_MSG_CHECKING([whether to enable Bluetooth support in Impress remote control])
+
+    if test $OS = MACOSX && test "$MACOSX_SDK_VERSION" -ge 101500; then
+        # The Bluetooth code doesn't compile with macOS SDK 10.15
+        if test "$enable_sdremote_bluetooth" = yes; then
+            AC_MSG_ERROR([macOS SDK $macosx_sdk does not currently support --enable-sdremote-bluetooth])
+        fi
+        add_warning "not building the bluetooth part of the sdremote - used api was removed from macOS SDK 10.15"
+        enable_sdremote_bluetooth=no
+    fi
+    # If not explicitly enabled or disabled, default
+    if test -z "$enable_sdremote_bluetooth"; then
+        case "$OS" in
+        LINUX|MACOSX|WNT)
+            # Default to yes for these
+            enable_sdremote_bluetooth=yes
+            ;;
+        *)
+            # otherwise no
+            enable_sdremote_bluetooth=no
+            ;;
+        esac
+    fi
+    # $enable_sdremote_bluetooth is guaranteed non-empty now
+
+    if test "$enable_sdremote_bluetooth" != "no"; then
+        if test "$OS" = "LINUX"; then
+            if test "$ENABLE_DBUS" = "TRUE" -a "$DBUS_HAVE_GLIB" = "TRUE"; then
+                AC_MSG_RESULT([yes])
+                ENABLE_SDREMOTE_BLUETOOTH=TRUE
+                dnl ===================================================================
+                dnl Check for system bluez
+                dnl ===================================================================
+                AC_MSG_CHECKING([which Bluetooth header to use])
+                if test "$with_system_bluez" = "yes"; then
+                    AC_MSG_RESULT([external])
+                    AC_CHECK_HEADER(bluetooth/bluetooth.h, [],
+                        [AC_MSG_ERROR(bluetooth.h not found. install bluez)], [])
+                    SYSTEM_BLUEZ=TRUE
+                else
+                    AC_MSG_RESULT([internal])
+                    SYSTEM_BLUEZ=
+                fi
+            else
+                AC_MSG_RESULT([no, dbus disabled])
+                ENABLE_SDREMOTE_BLUETOOTH=
+                SYSTEM_BLUEZ=
+            fi
+        else
+            AC_MSG_RESULT([yes])
+            ENABLE_SDREMOTE_BLUETOOTH=TRUE
+            SYSTEM_BLUEZ=
+            SDREMOTE_ENTITLEMENT="$SDREMOTE_ENTITLEMENT
+	<key>com.apple.security.device.bluetooth</key>
+	<true/>"
+        fi
+    else
+        AC_MSG_RESULT([no])
+        ENABLE_SDREMOTE_BLUETOOTH=
+        SYSTEM_BLUEZ=
+    fi
+else
+    ENABLE_SDREMOTE=
+    SYSTEM_BLUEZ=
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_SDREMOTE)
+AC_SUBST(ENABLE_SDREMOTE_BLUETOOTH)
+AC_SUBST(SDREMOTE_ENTITLEMENT)
+AC_SUBST(SYSTEM_BLUEZ)
+
+dnl ===================================================================
+dnl Check whether to enable GIO support
+dnl ===================================================================
+if test "$ENABLE_GTK4" = "TRUE" -o "$ENABLE_GTK3" = "TRUE" -o "$ENABLE_GTK3_KDE5" = "TRUE"; then
+    AC_MSG_CHECKING([whether to enable GIO support])
+    if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then
+        dnl Need at least 2.26 for the dbus support.
+        PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26],
+                          [ENABLE_GIO="TRUE"], [ENABLE_GIO=""])
+        if test "$ENABLE_GIO" = "TRUE"; then
+            AC_DEFINE(ENABLE_GIO)
+            GIO_CFLAGS=$(printf '%s' "$GIO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+            FilterLibs "${GIO_LIBS}"
+            GIO_LIBS="${filteredlibs}"
+        fi
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_GIO)
+AC_SUBST(GIO_CFLAGS)
+AC_SUBST(GIO_LIBS)
+
+
+dnl ===================================================================
+
+SPLIT_APP_MODULES=""
+if test "$enable_split_app_modules" = "yes"; then
+    SPLIT_APP_MODULES="TRUE"
+fi
+AC_SUBST(SPLIT_APP_MODULES)
+
+SPLIT_OPT_FEATURES=""
+if test "$enable_split_opt_features" = "yes"; then
+    SPLIT_OPT_FEATURES="TRUE"
+fi
+AC_SUBST(SPLIT_OPT_FEATURES)
+
+dnl ===================================================================
+dnl Check whether the GStreamer libraries are available.
+dnl ===================================================================
+
+ENABLE_GSTREAMER_1_0=""
+
+if test "$test_gstreamer_1_0" = yes; then
+
+    AC_MSG_CHECKING([whether to enable the GStreamer 1.0 avmedia backend])
+    if test "$enable_avmedia" = yes -a "$enable_gstreamer_1_0" != no; then
+        ENABLE_GSTREAMER_1_0="TRUE"
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_MODULES( [GSTREAMER_1_0], [gstreamer-1.0 gstreamer-plugins-base-1.0 gstreamer-pbutils-1.0 gstreamer-video-1.0] )
+        GSTREAMER_1_0_CFLAGS=$(printf '%s' "$GSTREAMER_1_0_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${GSTREAMER_1_0_LIBS}"
+        GSTREAMER_1_0_LIBS="${filteredlibs}"
+        AC_DEFINE(ENABLE_GSTREAMER_1_0)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(GSTREAMER_1_0_CFLAGS)
+AC_SUBST(GSTREAMER_1_0_LIBS)
+AC_SUBST(ENABLE_GSTREAMER_1_0)
+
+ENABLE_OPENGL_TRANSITIONS=
+ENABLE_OPENGL_CANVAS=
+if test $_os = iOS -o $_os = Android -o "$ENABLE_FUZZERS" = "TRUE"; then
+   : # disable
+elif test "$_os" = "Darwin"; then
+    # We use frameworks on macOS, no need for detail checks
+    ENABLE_OPENGL_TRANSITIONS=TRUE
+    AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+    ENABLE_OPENGL_CANVAS=TRUE
+elif test $_os = WINNT; then
+    ENABLE_OPENGL_TRANSITIONS=TRUE
+    AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+    ENABLE_OPENGL_CANVAS=TRUE
+else
+    if test "$USING_X11" = TRUE; then
+        AC_CHECK_LIB(GL, glBegin, [:], AC_MSG_ERROR([libGL required.]))
+        ENABLE_OPENGL_TRANSITIONS=TRUE
+        AC_DEFINE(HAVE_FEATURE_OPENGL,1)
+        ENABLE_OPENGL_CANVAS=TRUE
+    fi
+fi
+
+AC_SUBST(ENABLE_OPENGL_TRANSITIONS)
+AC_SUBST(ENABLE_OPENGL_CANVAS)
+
+dnl =================================================
+dnl Check whether to build with OpenCL support.
+dnl =================================================
+
+if test $_os != iOS -a $_os != Android -a "$ENABLE_FUZZERS" != "TRUE" -a "$enable_opencl" = "yes"; then
+    # OPENCL in BUILD_TYPE and HAVE_FEATURE_OPENCL tell that OpenCL is potentially available on the
+    # platform (optional at run-time, used through clew).
+    BUILD_TYPE="$BUILD_TYPE OPENCL"
+    AC_DEFINE(HAVE_FEATURE_OPENCL)
+fi
+
+dnl =================================================
+dnl Check whether to build with dconf support.
+dnl =================================================
+
+if test $_os != Android -a $_os != iOS -a "$enable_dconf" != no; then
+    PKG_CHECK_MODULES([DCONF], [dconf >= 0.40.0], [], [
+        if test "$enable_dconf" = yes; then
+            AC_MSG_ERROR([dconf not found])
+        else
+            enable_dconf=no
+        fi])
+fi
+AC_MSG_CHECKING([whether to enable dconf])
+if test $_os = Android -o $_os = iOS -o "$enable_dconf" = no; then
+    DCONF_CFLAGS=
+    DCONF_LIBS=
+    ENABLE_DCONF=
+    AC_MSG_RESULT([no])
+else
+    ENABLE_DCONF=TRUE
+    AC_DEFINE(ENABLE_DCONF)
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST([DCONF_CFLAGS])
+AC_SUBST([DCONF_LIBS])
+AC_SUBST([ENABLE_DCONF])
+
+# pdf import?
+AC_MSG_CHECKING([whether to build the PDF import feature])
+ENABLE_PDFIMPORT=
+if test -z "$enable_pdfimport" -o "$enable_pdfimport" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PDFIMPORT=TRUE
+    AC_DEFINE(HAVE_FEATURE_PDFIMPORT)
+else
+    AC_MSG_RESULT([no])
+fi
+
+# Pdfium?
+AC_MSG_CHECKING([whether to build PDFium])
+ENABLE_PDFIUM=
+if test \( -z "$enable_pdfium" -a "$ENABLE_PDFIMPORT" = "TRUE" \) -o "$enable_pdfium" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_PDFIUM=TRUE
+    BUILD_TYPE="$BUILD_TYPE PDFIUM"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_PDFIUM)
+
+if test "$ENABLE_PDFIUM" = "TRUE"; then
+    AC_MSG_CHECKING([which OpenJPEG library to use])
+    if test "$with_system_openjpeg" = "yes"; then
+        SYSTEM_OPENJPEG2=TRUE
+        AC_MSG_RESULT([external])
+        PKG_CHECK_MODULES( OPENJPEG2, libopenjp2 )
+        OPENJPEG2_CFLAGS=$(printf '%s' "$OPENJPEG2_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${OPENJPEG2_LIBS}"
+        OPENJPEG2_LIBS="${filteredlibs}"
+    else
+        SYSTEM_OPENJPEG2=FALSE
+        AC_MSG_RESULT([internal])
+    fi
+
+    AC_MSG_CHECKING([which Abseil library to use])
+    if test "$with_system_abseil" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_ABSEIL=TRUE
+        AC_LANG_PUSH([C++])
+        AC_CHECK_HEADER(absl/types/bad_optional_access.h, [],
+                        [AC_MSG_ERROR(abseil headers not found.)], [])
+        AC_CHECK_HEADER(absl/types/bad_variant_access.h, [],
+                        [AC_MSG_ERROR(abseil headers not found.)], [])
+        AC_CHECK_LIB([absl_bad_optional_access], [main], [],
+                     [AC_MSG_ERROR([libabsl_bad_optional_access library not found.])])
+        AC_CHECK_LIB([absl_bad_variant_access], [main], [],
+                     [AC_MSG_ERROR([libabsl_bad_variant_access library not found.])])
+	ABSEIL_LIBS="-labsl_bad_optional_access -labsl_bad_variant_access"
+        AC_LANG_POP([C++])
+        ABSEIL_CFLAGS=$(printf '%s' "$ABSEIL_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${ABSEIL_LIBS}"
+        ABSEIL_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+    fi
+fi
+AC_SUBST(SYSTEM_OPENJPEG2)
+AC_SUBST(SYSTEM_ABSEIL)
+AC_SUBST(ABSEIL_CFLAGS)
+AC_SUBST(ABSEIL_LIBS)
+
+dnl ===================================================================
+dnl Check for poppler
+dnl ===================================================================
+ENABLE_POPPLER=
+AC_MSG_CHECKING([whether to build Poppler])
+if test \( -z "$enable_poppler" -a "$ENABLE_PDFIMPORT" = "TRUE" -a $_os != Android \) -o "$enable_poppler" = yes; then
+    AC_MSG_RESULT([yes])
+    ENABLE_POPPLER=TRUE
+    AC_DEFINE(HAVE_FEATURE_POPPLER)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_POPPLER)
+
+if test "$ENABLE_PDFIMPORT" = "TRUE" -a "$ENABLE_POPPLER" != "TRUE" -a "$ENABLE_PDFIUM" != "TRUE"; then
+    AC_MSG_ERROR([Cannot import PDF without either Pdfium or Poppler; please enable either of them.])
+fi
+
+if test "$ENABLE_PDFIMPORT" != "TRUE" -a \( "$ENABLE_POPPLER" = "TRUE" -o "$ENABLE_PDFIUM" = "TRUE" \); then
+    AC_MSG_ERROR([Cannot enable Pdfium or Poppler when PDF importing is disabled; please enable PDF import first.])
+fi
+
+if test "$ENABLE_PDFIMPORT" = "TRUE" -a "$ENABLE_POPPLER" = "TRUE"; then
+    dnl ===================================================================
+    dnl Check for system poppler
+    dnl ===================================================================
+    AC_MSG_CHECKING([which PDF import poppler to use])
+    if test "$with_system_poppler" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_POPPLER=TRUE
+        PKG_CHECK_MODULES(POPPLER,[poppler >= 0.14 poppler-cpp])
+        POPPLER_CFLAGS=$(printf '%s' "$POPPLER_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${POPPLER_LIBS}"
+        POPPLER_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_POPPLER=
+        BUILD_TYPE="$BUILD_TYPE POPPLER"
+    fi
+    AC_DEFINE([ENABLE_PDFIMPORT],1)
+fi
+AC_SUBST(ENABLE_PDFIMPORT)
+AC_SUBST(SYSTEM_POPPLER)
+AC_SUBST(POPPLER_CFLAGS)
+AC_SUBST(POPPLER_LIBS)
+
+# Skia?
+ENABLE_SKIA=
+if test "$enable_skia" != "no" -a "$build_skia" = "yes" -a -z "$DISABLE_GUI"; then
+    # Skia now requires at least freetype2 >= 2.8.1, which is less that what LO requires as system freetype.
+    if test "$SYSTEM_FREETYPE" = TRUE; then
+        PKG_CHECK_EXISTS(freetype2 >= 21.0.15, # 21.0.15 = 2.8.1
+            [skia_freetype_ok=yes],
+            [skia_freetype_ok=no])
+    else # internal is ok
+        skia_freetype_ok=yes
+    fi
+    AC_MSG_CHECKING([whether to build Skia])
+    if test "$skia_freetype_ok" = "yes"; then
+        if test "$enable_skia" = "debug"; then
+            AC_MSG_RESULT([yes (debug)])
+            ENABLE_SKIA_DEBUG=TRUE
+        else
+            AC_MSG_RESULT([yes])
+            ENABLE_SKIA_DEBUG=
+        fi
+        ENABLE_SKIA=TRUE
+	if test "$ENDIANNESS" = "big" && test "$ENABLE_SKIA" = "TRUE"; then
+		AC_MSG_ERROR([skia doesn't work/isn't supported upstream on big-endian. Use --disable-skia])
+	fi
+
+        AC_DEFINE(HAVE_FEATURE_SKIA)
+        BUILD_TYPE="$BUILD_TYPE SKIA"
+
+        if test "$OS" = "MACOSX"; then
+            AC_DEFINE(SK_SUPPORT_GPU,1)
+            AC_DEFINE(SK_METAL,1)
+            SKIA_GPU=METAL
+            AC_SUBST(SKIA_GPU)
+        else
+            AC_DEFINE(SK_SUPPORT_GPU,1)
+            AC_DEFINE(SK_VULKAN,1)
+            SKIA_GPU=VULKAN
+            AC_SUBST(SKIA_GPU)
+        fi
+    else
+        AC_MSG_RESULT([no (freetype too old)])
+        add_warning "freetype version is too old for Skia library, at least 2.8.1 required, Skia support disabled"
+    fi
+
+else
+    AC_MSG_CHECKING([whether to build Skia])
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_SKIA)
+AC_SUBST(ENABLE_SKIA_DEBUG)
+
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE2=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE41=
+LO_CLANG_CXXFLAGS_INTRINSICS_SSE42=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX2=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX512=
+LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F=
+LO_CLANG_CXXFLAGS_INTRINSICS_F16C=
+LO_CLANG_CXXFLAGS_INTRINSICS_FMA=
+HAVE_LO_CLANG_DLLEXPORTINLINES=
+
+if test "$ENABLE_SKIA" = TRUE -a "$COM_IS_CLANG" != TRUE; then
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+        AC_MSG_CHECKING([for Clang])
+        AC_MSG_RESULT([$LO_CLANG_CC / $LO_CLANG_CXX])
+    else
+        if test "$_os" = "WINNT"; then
+            AC_MSG_CHECKING([for clang-cl])
+            if test -x "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"; then
+                LO_CLANG_CC=`win_short_path_for_make "$VC_PRODUCT_DIR/Tools/Llvm/bin/clang-cl.exe"`
+            elif test -n "$PROGRAMFILES" -a -x "$(cygpath -u "$PROGRAMFILES/LLVM/bin/clang-cl.exe")"; then
+                LO_CLANG_CC=`win_short_path_for_make "$PROGRAMFILES/LLVM/bin/clang-cl.exe"`
+            elif test -x "$(cygpath -u "c:/Program Files/LLVM/bin/clang-cl.exe")"; then
+                LO_CLANG_CC=`win_short_path_for_make "c:/Program Files/LLVM/bin/clang-cl.exe"`
+            fi
+            if test -n "$LO_CLANG_CC"; then
+                dnl explicitly set -m32/-m64
+                LO_CLANG_CC="$LO_CLANG_CC -m$WIN_HOST_BITS"
+                LO_CLANG_CXX="$LO_CLANG_CC"
+                AC_MSG_RESULT([$LO_CLANG_CC])
+            else
+                AC_MSG_RESULT([no])
+            fi
+
+            AC_MSG_CHECKING([the dependency generation prefix (clang.exe -showIncludes)])
+            echo "#include <stdlib.h>" > conftest.c
+            LO_CLANG_SHOWINCLUDES_PREFIX=`VSLANG=1033 $LO_CLANG_CC $CFLAGS -c -showIncludes conftest.c 2>/dev/null | \
+                grep 'stdlib\.h' | head -n1 | sed 's/ [[[:alpha:]]]:.*//'`
+            rm -f conftest.c conftest.obj
+            if test -z "$LO_CLANG_SHOWINCLUDES_PREFIX"; then
+                AC_MSG_ERROR([cannot determine the -showIncludes prefix])
+            else
+                AC_MSG_RESULT(["$LO_CLANG_SHOWINCLUDES_PREFIX"])
+            fi
+        else
+            AC_CHECK_PROG(LO_CLANG_CC,clang,clang,[])
+            AC_CHECK_PROG(LO_CLANG_CXX,clang++,clang++,[])
+        fi
+    fi
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+        clang2_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $LO_CLANG_CC -E - | tail -1 | sed 's/ //g'`
+        clang2_ver=`echo "$clang2_version" | $AWK -F. '{ print \$1*10000+(\$2<100?\$2:99)*100+(\$3<100?\$3:99) }'`
+        if test "$clang2_ver" -lt 50002; then
+            AC_MSG_WARN(["$clang2_version" is too old or unrecognized, must be at least Clang 5.0.2])
+            LO_CLANG_CC=
+            LO_CLANG_CXX=
+        fi
+    fi
+    if test -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX" -a "$_os" = "WINNT"; then
+        save_CXX="$CXX"
+        CXX="$LO_CLANG_CXX"
+        AC_MSG_CHECKING([whether $CXX supports -Zc:dllexportInlines-])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS -Werror -Zc:dllexportInlines-"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE()], [
+                HAVE_LO_CLANG_DLLEXPORTINLINES=TRUE
+                AC_MSG_RESULT([yes])
+            ], [AC_MSG_RESULT([no])])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_LANG_POP([C++])
+        CXX="$save_CXX"
+        if test -z "$HAVE_LO_CLANG_DLLEXPORTINLINES"; then
+            AC_MSG_ERROR([Clang compiler does not support -Zc:dllexportInlines-. The Skia library needs to be built using a newer Clang version, or use --disable-skia.])
+        fi
+    fi
+    if test -z "$LO_CLANG_CC" -o -z "$LO_CLANG_CXX"; then
+        # Skia is the default on Windows and Mac, so hard-require Clang.
+        # Elsewhere it's used just by the 'gen' VCL backend which is rarely used.
+        if test "$_os" = "WINNT" -o "$_os" = "Darwin"; then
+            AC_MSG_ERROR([Clang compiler not found. The Skia library needs to be built using Clang, or use --disable-skia.])
+        else
+            AC_MSG_WARN([Clang compiler not found.])
+        fi
+    else
+
+        save_CXX="$CXX"
+        CXX="$LO_CLANG_CXX"
+        # copy&paste (and adjust) of intrinsics checks, since MSVC's -arch doesn't work well for Clang-cl
+        flag_sse2=-msse2
+        flag_ssse3=-mssse3
+        flag_sse41=-msse4.1
+        flag_sse42=-msse4.2
+        flag_avx=-mavx
+        flag_avx2=-mavx2
+        flag_avx512="-mavx512f -mavx512vl -mavx512bw -mavx512dq -mavx512cd"
+        flag_avx512f=-mavx512f
+        flag_f16c=-mf16c
+        flag_fma=-mfma
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse2"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <emmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_xor_si128 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse2=yes],
+            [can_compile_sse2=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse2}])
+        if test "${can_compile_sse2}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE2="$flag_sse2"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSSE3 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_ssse3"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <tmmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_maddubs_epi16 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_ssse3=yes],
+            [can_compile_ssse3=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_ssse3}])
+        if test "${can_compile_ssse3}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3="$flag_ssse3"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE4.1 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse41"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <smmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_cmpeq_epi64 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse41=yes],
+            [can_compile_sse41=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse41}])
+        if test "${can_compile_sse41}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE41="$flag_sse41"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile SSE4.2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_sse42"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <nmmintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0), b = _mm_set1_epi32 (0), c;
+                c = _mm_cmpgt_epi64 (a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_sse42=yes],
+            [can_compile_sse42=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_sse42}])
+        if test "${can_compile_sse42}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_SSE42="$flag_sse42"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c;
+                c = _mm256_xor_ps(a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_avx=yes],
+            [can_compile_avx=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx}])
+        if test "${can_compile_avx}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX="$flag_avx"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX2 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx2"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256i a = _mm256_set1_epi32 (0), b = _mm256_set1_epi32 (0), c;
+                c = _mm256_maddubs_epi16(a, b);
+                return 0;
+            }
+            ])],
+            [can_compile_avx2=yes],
+            [can_compile_avx2=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx2}])
+        if test "${can_compile_avx2}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX2="$flag_avx2"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile AVX512 intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_avx512"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m512i a = _mm512_loadu_si512(0);
+                __m512d v1 = _mm512_load_pd(0);
+                // https://gcc.gnu.org/git/?p=gcc.git;a=commit;f=gcc/config/i386/avx512fintrin.h;h=23bce99cbe7016a04e14c2163ed3fe6a5a64f4e2
+                __m512d v2 = _mm512_abs_pd(v1);
+                return 0;
+            }
+            ])],
+            [can_compile_avx512=yes],
+            [can_compile_avx512=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_avx512}])
+        if test "${can_compile_avx512}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX512="$flag_avx512"
+            LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F="$flag_avx512f"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile F16C intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_f16c"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m128i a = _mm_set1_epi32 (0);
+                __m128 c;
+                c = _mm_cvtph_ps(a);
+                return 0;
+            }
+            ])],
+            [can_compile_f16c=yes],
+            [can_compile_f16c=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_f16c}])
+        if test "${can_compile_f16c}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_F16C="$flag_f16c"
+        fi
+
+        AC_MSG_CHECKING([whether $CXX can compile FMA intrinsics])
+        AC_LANG_PUSH([C++])
+        save_CXXFLAGS=$CXXFLAGS
+        CXXFLAGS="$CXXFLAGS $flag_fma"
+        AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+            #include <immintrin.h>
+            int main () {
+                __m256 a = _mm256_set1_ps (0.0f), b = _mm256_set1_ps (0.0f), c = _mm256_set1_ps (0.0f), d;
+                d = _mm256_fmadd_ps(a, b, c);
+                return 0;
+            }
+            ])],
+            [can_compile_fma=yes],
+            [can_compile_fma=no])
+        AC_LANG_POP([C++])
+        CXXFLAGS=$save_CXXFLAGS
+        AC_MSG_RESULT([${can_compile_fma}])
+        if test "${can_compile_fma}" = "yes" ; then
+            LO_CLANG_CXXFLAGS_INTRINSICS_FMA="$flag_fma"
+        fi
+
+        CXX="$save_CXX"
+    fi
+fi
+#
+# prefix LO_CLANG_CC/LO_CLANG_CXX with ccache if needed
+#
+if test "$CCACHE" != "" -a -n "$LO_CLANG_CC" -a -n "$LO_CLANG_CXX"; then
+    AC_MSG_CHECKING([whether $LO_CLANG_CC is already ccached])
+    AC_LANG_PUSH([C])
+    save_CC="$CC"
+    CC="$LO_CLANG_CC"
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS --ccache-skip -O2 -Werror"
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    CFLAGS=$save_CFLAGS
+    CC=$save_CC
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        LO_CLANG_CC="$CCACHE $LO_CLANG_CC"
+        AC_MSG_RESULT([no])
+    fi
+    AC_LANG_POP([C])
+
+    AC_MSG_CHECKING([whether $LO_CLANG_CXX is already ccached])
+    AC_LANG_PUSH([C++])
+    save_CXX="$CXX"
+    CXX="$LO_CLANG_CXX"
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS --ccache-skip -O2 -Werror"
+    dnl an empty program will do, we're checking the compiler flags
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
+                      [use_ccache=yes], [use_ccache=no])
+    if test $use_ccache = yes -a "${CCACHE/*sccache*/}" != ""; then
+        AC_MSG_RESULT([yes])
+    else
+        LO_CLANG_CXX="$CCACHE $LO_CLANG_CXX"
+        AC_MSG_RESULT([no])
+    fi
+    CXXFLAGS=$save_CXXFLAGS
+    CXX=$save_CXX
+    AC_LANG_POP([C++])
+fi
+
+AC_SUBST(LO_CLANG_CC)
+AC_SUBST(LO_CLANG_CXX)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE2)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSSE3)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE41)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_SSE42)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX2)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_AVX512F)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_F16C)
+AC_SUBST(LO_CLANG_CXXFLAGS_INTRINSICS_FMA)
+AC_SUBST(LO_CLANG_SHOWINCLUDES_PREFIX)
+AC_SUBST(CLANG_USE_LD)
+AC_SUBST([HAVE_LO_CLANG_DLLEXPORTINLINES])
+
+SYSTEM_GPGMEPP=
+
+AC_MSG_CHECKING([whether to enable gpgmepp])
+if test "$enable_gpgmepp" = no; then
+    AC_MSG_RESULT([no])
+elif test "$enable_mpl_subset" = "yes"; then
+    AC_MSG_RESULT([no (MPL only])
+elif test "$enable_fuzzers" = "yes"; then
+    AC_MSG_RESULT([no (oss-fuzz)])
+elif test \( \( "$_os" = "Linux" -o "$_os" = "Darwin" \) -a "$ENABLE_NSS" = TRUE \) -o "$_os" = "WINNT" ; then
+    AC_MSG_RESULT([yes])
+    dnl ===================================================================
+    dnl Check for system gpgme
+    dnl ===================================================================
+    AC_MSG_CHECKING([which gpgmepp to use])
+    if test "$with_system_gpgmepp" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_GPGMEPP=TRUE
+
+        # C++ library doesn't come with fancy gpgmepp-config, check for headers the old-fashioned way
+        AC_CHECK_HEADER(gpgme++/gpgmepp_version.h, [ GPGMEPP_CFLAGS=-I/usr/include/gpgme++ ],
+            [AC_MSG_ERROR([gpgmepp headers not found, install gpgmepp >= 1.14 development package])], [])
+        AC_CHECK_HEADER(gpgme.h, [],
+            [AC_MSG_ERROR([gpgme headers not found, install gpgme development package])], [])
+        AC_CHECK_LIB(gpgmepp, main, [],
+            [AC_MSG_ERROR(gpgmepp not found or not functional)], [])
+	GPGMEPP_LIBS=-lgpgmepp
+    else
+        AC_MSG_RESULT([internal])
+        BUILD_TYPE="$BUILD_TYPE LIBGPGERROR LIBASSUAN GPGMEPP"
+
+        GPG_ERROR_CFLAGS="-I${WORKDIR}/UnpackedTarball/libgpg-error/src"
+        LIBASSUAN_CFLAGS="-I${WORKDIR}/UnpackedTarball/libassuan/src"
+        if test "$_os" != "WINNT"; then
+            GPG_ERROR_LIBS="-L${WORKDIR}/UnpackedTarball/libgpg-error/src/.libs -lgpg-error"
+            LIBASSUAN_LIBS="-L${WORKDIR}/UnpackedTarball/libassuan/src/.libs -lassuan"
+        fi
+    fi
+    ENABLE_GPGMEPP=TRUE
+    AC_DEFINE([HAVE_FEATURE_GPGME])
+    AC_PATH_PROG(GPG, gpg)
+    # TODO: Windows's cygwin gpg does not seem to work with our gpgme,
+    # so let's exclude that manually for the moment
+    if test -n "$GPG" -a "$_os" != "WINNT"; then
+        # make sure we not only have a working gpgme, but a full working
+        # gpg installation to run OpenPGP signature verification
+        AC_DEFINE([HAVE_FEATURE_GPGVERIFY])
+    fi
+    if test "$_os" = "Linux"; then
+      uid=`id -u`
+      AC_MSG_CHECKING([for /run/user/$uid])
+      if test -d /run/user/$uid; then
+        AC_MSG_RESULT([yes])
+        AC_PATH_PROG(GPGCONF, gpgconf)
+
+        # Older versions of gpgconf are not working as expected, since
+        # `gpgconf --remove-socketdir` fails to exit any gpg-agent daemon operating
+        # on that socket dir that has (indirectly) been started by the tests in xmlsecurity/qa/unit/signing/signing.cxx
+        # (see commit message of f0305ec0a7d199e605511844d9d6af98b66d4bfd%5E )
+        AC_MSG_CHECKING([whether version of gpgconf is suitable ... ])
+        GPGCONF_VERSION=`"$GPGCONF" --version | "$AWK" '/^gpgconf \(GnuPG\)/{print $3}'`
+        GPGCONF_NUMVER=`echo $GPGCONF_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
+        if test "$GPGCONF_VERSION" = "2.2_OOo" -o "$GPGCONF_NUMVER" -ge "020200"; then
+          AC_MSG_RESULT([yes, $GPGCONF_VERSION])
+          AC_MSG_CHECKING([for gpgconf --create-socketdir... ])
+          if $GPGCONF --dump-options > /dev/null ; then
+            if $GPGCONF --dump-options | grep -q create-socketdir ; then
+              AC_MSG_RESULT([yes])
+              AC_DEFINE([HAVE_GPGCONF_SOCKETDIR])
+              AC_DEFINE_UNQUOTED([GPGME_GPGCONF], ["$GPGCONF"])
+            else
+              AC_MSG_RESULT([no])
+            fi
+          else
+            AC_MSG_RESULT([no. missing or broken gpgconf?])
+          fi
+        else
+          AC_MSG_RESULT([no, $GPGCONF_VERSION])
+        fi
+      else
+        AC_MSG_RESULT([no])
+     fi
+   fi
+else
+    AC_MSG_RESULT([no (unsupported OS or missing NSS)])
+fi
+AC_SUBST(ENABLE_GPGMEPP)
+AC_SUBST(SYSTEM_GPGMEPP)
+AC_SUBST(GPG_ERROR_CFLAGS)
+AC_SUBST(GPG_ERROR_LIBS)
+AC_SUBST(LIBASSUAN_CFLAGS)
+AC_SUBST(LIBASSUAN_LIBS)
+AC_SUBST(GPGMEPP_CFLAGS)
+AC_SUBST(GPGMEPP_LIBS)
+
+AC_MSG_CHECKING([whether to build the Wiki Publisher extension])
+if test "x$enable_ext_wiki_publisher" = "xyes" -a "x$enable_extension_integration" != "xno" -a "$with_java" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_MEDIAWIKI=TRUE
+    BUILD_TYPE="$BUILD_TYPE XSLTML"
+    if test  "x$with_java" = "xno"; then
+        AC_MSG_ERROR([Wiki Publisher requires Java! Enable Java if you want to build it.])
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_MEDIAWIKI=
+    SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_MEDIAWIKI"
+fi
+AC_SUBST(ENABLE_MEDIAWIKI)
+
+AC_MSG_CHECKING([whether to build the Report Builder])
+if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_REPORTBUILDER=TRUE
+    AC_MSG_CHECKING([which jfreereport libs to use])
+    if test "$with_system_jfreereport" = "yes"; then
+        SYSTEM_JFREEREPORT=TRUE
+        AC_MSG_RESULT([external])
+        if test -z $SAC_JAR; then
+            SAC_JAR=/usr/share/java/sac.jar
+        fi
+        if ! test -f $SAC_JAR; then
+             AC_MSG_ERROR(sac.jar not found.)
+        fi
+
+        if test -z $LIBXML_JAR; then
+            if test -f /usr/share/java/libxml-1.0.0.jar; then
+                LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar
+            elif test -f /usr/share/java/libxml.jar; then
+                LIBXML_JAR=/usr/share/java/libxml.jar
+            else
+                AC_MSG_ERROR(libxml.jar replacement not found.)
+            fi
+        elif ! test -f $LIBXML_JAR; then
+            AC_MSG_ERROR(libxml.jar not found.)
+        fi
+
+        if test -z $FLUTE_JAR; then
+            if test -f /usr/share/java/flute-1.3.0.jar; then
+                FLUTE_JAR=/usr/share/java/flute-1.3.0.jar
+            elif test -f /usr/share/java/flute.jar; then
+                FLUTE_JAR=/usr/share/java/flute.jar
+            else
+                AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)
+            fi
+        elif ! test -f $FLUTE_JAR; then
+            AC_MSG_ERROR(flute-1.3.0.jar not found.)
+        fi
+
+        if test -z $JFREEREPORT_JAR; then
+            if test -f /usr/share/java/flow-engine-0.9.2.jar; then
+                JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar
+            elif test -f /usr/share/java/flow-engine.jar; then
+                JFREEREPORT_JAR=/usr/share/java/flow-engine.jar
+            else
+                AC_MSG_ERROR(jfreereport.jar replacement not found.)
+            fi
+        elif ! test -f  $JFREEREPORT_JAR; then
+                AC_MSG_ERROR(jfreereport.jar not found.)
+        fi
+
+        if test -z $LIBLAYOUT_JAR; then
+            if test -f /usr/share/java/liblayout-0.2.9.jar; then
+                LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar
+            elif test -f /usr/share/java/liblayout.jar; then
+                LIBLAYOUT_JAR=/usr/share/java/liblayout.jar
+            else
+                AC_MSG_ERROR(liblayout.jar replacement not found.)
+            fi
+        elif ! test -f $LIBLAYOUT_JAR; then
+                AC_MSG_ERROR(liblayout.jar not found.)
+        fi
+
+        if test -z $LIBLOADER_JAR; then
+            if test -f /usr/share/java/libloader-1.0.0.jar; then
+                LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar
+            elif test -f /usr/share/java/libloader.jar; then
+                LIBLOADER_JAR=/usr/share/java/libloader.jar
+            else
+                AC_MSG_ERROR(libloader.jar replacement not found.)
+            fi
+        elif ! test -f  $LIBLOADER_JAR; then
+            AC_MSG_ERROR(libloader.jar not found.)
+        fi
+
+        if test -z $LIBFORMULA_JAR; then
+            if test -f /usr/share/java/libformula-0.2.0.jar; then
+                LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar
+            elif test -f /usr/share/java/libformula.jar; then
+                LIBFORMULA_JAR=/usr/share/java/libformula.jar
+            else
+                AC_MSG_ERROR(libformula.jar replacement not found.)
+            fi
+        elif ! test -f $LIBFORMULA_JAR; then
+                AC_MSG_ERROR(libformula.jar not found.)
+        fi
+
+        if test -z $LIBREPOSITORY_JAR; then
+            if test -f /usr/share/java/librepository-1.0.0.jar; then
+                LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar
+            elif test -f /usr/share/java/librepository.jar; then
+                LIBREPOSITORY_JAR=/usr/share/java/librepository.jar
+            else
+                AC_MSG_ERROR(librepository.jar replacement not found.)
+            fi
+        elif ! test -f $LIBREPOSITORY_JAR; then
+            AC_MSG_ERROR(librepository.jar not found.)
+        fi
+
+        if test -z $LIBFONTS_JAR; then
+            if test -f /usr/share/java/libfonts-1.0.0.jar; then
+                LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar
+            elif test -f /usr/share/java/libfonts.jar; then
+                LIBFONTS_JAR=/usr/share/java/libfonts.jar
+            else
+                AC_MSG_ERROR(libfonts.jar replacement not found.)
+            fi
+        elif ! test -f $LIBFONTS_JAR; then
+                AC_MSG_ERROR(libfonts.jar not found.)
+        fi
+
+        if test -z $LIBSERIALIZER_JAR; then
+            if test -f /usr/share/java/libserializer-1.0.0.jar; then
+                LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar
+            elif test -f /usr/share/java/libserializer.jar; then
+                LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar
+            else
+                AC_MSG_ERROR(libserializer.jar replacement not found.)
+            fi
+        elif ! test -f $LIBSERIALIZER_JAR; then
+                AC_MSG_ERROR(libserializer.jar not found.)
+        fi
+
+        if test -z $LIBBASE_JAR; then
+            if test -f /usr/share/java/libbase-1.0.0.jar; then
+                LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar
+            elif test -f /usr/share/java/libbase.jar; then
+                LIBBASE_JAR=/usr/share/java/libbase.jar
+            else
+                AC_MSG_ERROR(libbase.jar replacement not found.)
+            fi
+        elif ! test -f $LIBBASE_JAR; then
+            AC_MSG_ERROR(libbase.jar not found.)
+        fi
+
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_JFREEREPORT=
+        BUILD_TYPE="$BUILD_TYPE JFREEREPORT"
+        NEED_ANT=TRUE
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_REPORTBUILDER=
+    SYSTEM_JFREEREPORT=
+fi
+AC_SUBST(ENABLE_REPORTBUILDER)
+AC_SUBST(SYSTEM_JFREEREPORT)
+AC_SUBST(SAC_JAR)
+AC_SUBST(LIBXML_JAR)
+AC_SUBST(FLUTE_JAR)
+AC_SUBST(JFREEREPORT_JAR)
+AC_SUBST(LIBBASE_JAR)
+AC_SUBST(LIBLAYOUT_JAR)
+AC_SUBST(LIBLOADER_JAR)
+AC_SUBST(LIBFORMULA_JAR)
+AC_SUBST(LIBREPOSITORY_JAR)
+AC_SUBST(LIBFONTS_JAR)
+AC_SUBST(LIBSERIALIZER_JAR)
+
+# scripting provider for BeanShell?
+AC_MSG_CHECKING([whether to build support for scripts in BeanShell])
+if test "${enable_scripting_beanshell}" != "no" -a "x$with_java" != "xno"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SCRIPTING_BEANSHELL=TRUE
+
+    dnl ===================================================================
+    dnl Check for system beanshell
+    dnl ===================================================================
+    AC_MSG_CHECKING([which beanshell to use])
+    if test "$with_system_beanshell" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_BSH=TRUE
+        if test -z $BSH_JAR; then
+            BSH_JAR=/usr/share/java/bsh.jar
+        fi
+        if ! test -f $BSH_JAR; then
+            AC_MSG_ERROR(bsh.jar not found.)
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_BSH=
+        BUILD_TYPE="$BUILD_TYPE BSH"
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_SCRIPTING_BEANSHELL=
+    SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_BEANSHELL"
+fi
+AC_SUBST(ENABLE_SCRIPTING_BEANSHELL)
+AC_SUBST(SYSTEM_BSH)
+AC_SUBST(BSH_JAR)
+
+# scripting provider for JavaScript?
+AC_MSG_CHECKING([whether to build support for scripts in JavaScript])
+if test "${enable_scripting_javascript}" != "no" -a "x$with_java" != "xno"; then
+    AC_MSG_RESULT([yes])
+    ENABLE_SCRIPTING_JAVASCRIPT=TRUE
+
+    dnl ===================================================================
+    dnl Check for system rhino
+    dnl ===================================================================
+    AC_MSG_CHECKING([which rhino to use])
+    if test "$with_system_rhino" = "yes"; then
+        AC_MSG_RESULT([external])
+        SYSTEM_RHINO=TRUE
+        if test -z $RHINO_JAR; then
+            RHINO_JAR=/usr/share/java/js.jar
+        fi
+        if ! test -f $RHINO_JAR; then
+            AC_MSG_ERROR(js.jar not found.)
+        fi
+    else
+        AC_MSG_RESULT([internal])
+        SYSTEM_RHINO=
+        BUILD_TYPE="$BUILD_TYPE RHINO"
+        NEED_ANT=TRUE
+    fi
+else
+    AC_MSG_RESULT([no])
+    ENABLE_SCRIPTING_JAVASCRIPT=
+    SCPDEFS="$SCPDEFS -DWITHOUT_SCRIPTING_JAVASCRIPT"
+fi
+AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
+AC_SUBST(SYSTEM_RHINO)
+AC_SUBST(RHINO_JAR)
+
+# This is only used in Qt5/Qt6/KF5 checks to determine if /usr/lib64
+# paths should be added to library search path. So lets put all 64-bit
+# platforms there.
+supports_multilib=
+case "$host_cpu" in
+x86_64 | powerpc64 | powerpc64le | s390x | aarch64 | mips64 | mips64el | loongarch64 | riscv64)
+    if test "$SAL_TYPES_SIZEOFLONG" = "8"; then
+        supports_multilib="yes"
+    fi
+    ;;
+*)
+    ;;
+esac
+
+dnl ===================================================================
+dnl QT5 Integration
+dnl ===================================================================
+
+QT5_CFLAGS=""
+QT5_LIBS=""
+QMAKE5="qmake"
+MOC5="moc"
+QT5_GOBJECT_CFLAGS=""
+QT5_GOBJECT_LIBS=""
+QT5_HAVE_GOBJECT=""
+QT5_PLATFORMS_SRCDIR=""
+if test \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) -o \
+        \( "$test_qt5" = "yes" -a "$ENABLE_QT5" = "TRUE" \) -o \
+        \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \)
+then
+    qt5_incdirs="$QT5INC /usr/include/qt5 /usr/include $x_includes"
+    qt5_libdirs="$QT5LIB /usr/lib/qt5 /usr/lib $x_libraries"
+
+    if test -n "$supports_multilib"; then
+        qt5_libdirs="$qt5_libdirs /usr/lib64/qt5 /usr/lib64/qt /usr/lib64"
+    fi
+
+    qt5_test_include="QtWidgets/qapplication.h"
+    if test "$_os" = "Emscripten"; then
+        qt5_test_library="libQt5Widgets.a"
+    else
+        qt5_test_library="libQt5Widgets.so"
+    fi
+
+    dnl Check for qmake5
+    if test -n "$QT5DIR"; then
+        AC_PATH_PROG(QMAKE5, [qmake], no, [$QT5DIR/bin])
+    else
+        AC_PATH_PROGS(QMAKE5, [qmake-qt5 qmake], no)
+    fi
+    if test "$QMAKE5" = "no"; then
+        AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    else
+        qmake5_test_ver="`$QMAKE5 -v 2>&1 | $SED -n -e 's/^Using Qt version \(5\.[[0-9.]]\+\).*$/\1/p'`"
+        if test -z "$qmake5_test_ver"; then
+            AC_MSG_ERROR([Wrong qmake for Qt5 found. Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+        fi
+        qmake5_minor_version="`echo $qmake5_test_ver | cut -d. -f2`"
+        qt5_minimal_minor="6"
+        if test "$qmake5_minor_version" -lt "$qt5_minimal_minor"; then
+            AC_MSG_ERROR([The minimal supported Qt5 version is 5.${qt5_minimal_minor}, but your 'qmake -v' reports Qt5 version $qmake5_test_ver.])
+        else
+            AC_MSG_NOTICE([Detected Qt5 version: $qmake5_test_ver])
+        fi
+    fi
+
+    qt5_incdirs="`$QMAKE5 -query QT_INSTALL_HEADERS` $qt5_incdirs"
+    qt5_libdirs="`$QMAKE5 -query QT_INSTALL_LIBS` $qt5_libdirs"
+    qt5_platformsdir="`$QMAKE5 -query QT_INSTALL_PLUGINS`/platforms"
+    QT5_PLATFORMS_SRCDIR="$qt5_platformsdir"
+
+    AC_MSG_CHECKING([for Qt5 headers])
+    qt5_incdir="no"
+    for inc_dir in $qt5_incdirs; do
+        if test -r "$inc_dir/$qt5_test_include"; then
+            qt5_incdir="$inc_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt5_incdir])
+    if test "x$qt5_incdir" = "xno"; then
+        AC_MSG_ERROR([Qt5 headers not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    fi
+    # check for scenario: qt5-qtbase-devel-*.86_64 installed but host is i686
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} -I${qt5_incdir}"
+    AC_CHECK_HEADER(QtCore/qconfig.h, [],
+        [AC_MSG_ERROR(qconfig.h header not found.)], [])
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([for Qt5 libraries])
+    qt5_libdir="no"
+    for lib_dir in $qt5_libdirs; do
+        if test -r "$lib_dir/$qt5_test_library"; then
+            qt5_libdir="$lib_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt5_libdir])
+    if test "x$qt5_libdir" = "xno"; then
+        AC_MSG_ERROR([Qt5 libraries not found.  Please specify the root of your Qt5 installation by exporting QT5DIR before running "configure".])
+    fi
+
+    if test "$_os" = "Emscripten"; then
+        if test ! -f "$QT5_PLATFORMS_SRCDIR"/wasm_shell.html ; then
+            QT5_PLATFORMS_SRCDIR="${QT5_PLATFORMS_SRCDIR/plugins/src\/plugins}/wasm"
+        fi
+        if test ! -f "${qt5_platformsdir}"/libqwasm.a -o ! -f "$QT5_PLATFORMS_SRCDIR"/wasm_shell.html; then
+            AC_MSG_ERROR([No Qt5 WASM QPA plugin found in ${qt5_platformsdir} or ${QT5_PLATFORMS_SRCDIR}])
+        fi
+
+        EMSDK_LLVM_NM="$(em-config LLVM_ROOT)"/llvm-nm
+        if ! test -x "$EMSDK_LLVM_NM"; then
+            AC_MSG_ERROR([Missing llvm-nm expected to be found at "$EMSDK_LLVM_NM".])
+        fi
+        if test ! -f "${qt5_libdir}"/libQt5Gui.a; then
+            AC_MSG_ERROR([No Qt5 WASM libQt5Gui.a in ${qt5_libdir}])
+        fi
+        QT5_WASM_SJLJ="`${EMSDK_LLVM_NM} "${qt5_libdir}"/libQt5Gui.a 2>/dev/null | $GREP emscripten_longjmp`"
+        if test "$ENABLE_WASM_EXCEPTIONS" = TRUE -a -n "$QT5_WASM_SJLJ"; then
+            AC_MSG_ERROR(['emscripten_longjmp' symbol found in libQt5Gui.a (missing '-s SUPPORT_LONGJMP=wasm'). See static/README.wasm.md.])
+        fi
+        if test "$ENABLE_WASM_EXCEPTIONS" != TRUE -a -z "$QT5_WASM_SJLJ"; then
+            AC_MSG_ERROR(['emscripten_longjmp' symbol not found in libQt5Gui.a. You probably use an incompatible Qt build with '-s SUPPORT_LONGJMP=wasm'.])
+        fi
+    fi
+
+    QT5_CFLAGS="-I$qt5_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    QT5_CFLAGS=$(printf '%s' "$QT5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    QT5_LIBS="-L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
+    if test "$_os" = "Emscripten"; then
+        QT5_LIBS="$QT5_LIBS -lqtpcre2 -lQt5EventDispatcherSupport -lQt5FontDatabaseSupport -L${qt5_platformsdir} -lqwasm"
+    fi
+
+    if test "$USING_X11" = TRUE; then
+        PKG_CHECK_MODULES(QT5_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which is needed for correct app grouping in X11.])])
+        PKG_CHECK_MODULES(QT5_XCB_ICCCM,[xcb-icccm],[
+            QT5_HAVE_XCB_ICCCM=1
+            AC_DEFINE(QT5_HAVE_XCB_ICCCM)
+        ],[
+            AC_MSG_WARN([XCB ICCCM not found, which is needed for old Qt versions (< 5.12) on some WMs to correctly group dialogs (like QTBUG-46626)])
+            add_warning "XCB ICCCM not found, which is needed for Qt versions (< 5.12) on some WMs to correctly group dialogs (like QTBUG-46626)"
+        ])
+        QT5_CFLAGS="$QT5_CFLAGS $QT5_XCB_CFLAGS $QT5_XCB_ICCCM_CFLAGS"
+        QT5_LIBS="$QT5_LIBS $QT5_XCB_LIBS $QT5_XCB_ICCCM_LIBS -lQt5X11Extras"
+        QT5_USING_X11=1
+        AC_DEFINE(QT5_USING_X11)
+    fi
+
+    dnl Check for Meta Object Compiler
+
+    AC_PATH_PROGS( MOC5, [moc-qt5 moc], no, [`dirname $qt5_libdir`/bin:$QT5DIR/bin:$PATH])
+    if test "$MOC5" = "no"; then
+        AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
+the root of your Qt installation by exporting QT5DIR before running "configure".])
+    fi
+
+    if test "$test_gstreamer_1_0" = yes; then
+        PKG_CHECK_MODULES(QT5_GOBJECT,[gobject-2.0], [
+                QT5_HAVE_GOBJECT=1
+                AC_DEFINE(QT5_HAVE_GOBJECT)
+            ],
+            AC_MSG_WARN([[No GObject found, can't use QWidget GStreamer sink on wayland!]])
+        )
+    fi
+fi
+AC_SUBST(QT5_CFLAGS)
+AC_SUBST(QT5_LIBS)
+AC_SUBST(MOC5)
+AC_SUBST(QT5_GOBJECT_CFLAGS)
+AC_SUBST(QT5_GOBJECT_LIBS)
+AC_SUBST(QT5_HAVE_GOBJECT)
+AC_SUBST(QT5_PLATFORMS_SRCDIR)
+
+dnl ===================================================================
+dnl QT6 Integration
+dnl ===================================================================
+
+QT6_CFLAGS=""
+QT6_LIBS=""
+QMAKE6="qmake"
+MOC6="moc"
+QT6_PLATFORMS_SRCDIR=""
+if test \( "$test_qt6" = "yes" -a "$ENABLE_QT6" = "TRUE" \)
+then
+    qt6_incdirs="$QT6INC /usr/include/qt6 /usr/include $x_includes"
+    qt6_libdirs="$QT6LIB /usr/lib/qt6 /usr/lib $x_libraries"
+
+    if test -n "$supports_multilib"; then
+        qt6_libdirs="$qt6_libdirs /usr/lib64/qt6 /usr/lib64/qt /usr/lib64"
+    fi
+
+    qt6_test_include="QtWidgets/qapplication.h"
+    if test "$_os" = "Emscripten"; then
+        qt6_test_library="libQt6Widgets.a"
+    else
+        qt6_test_library="libQt6Widgets.so"
+    fi
+
+    dnl Check for qmake6
+    if test -n "$QT6DIR"; then
+        AC_PATH_PROG(QMAKE6, [qmake], no, [$QT6DIR/bin])
+    else
+        AC_PATH_PROGS(QMAKE6, [qmake-qt6 qmake6 qmake], no)
+    fi
+    if test "$QMAKE6" = "no"; then
+        AC_MSG_ERROR([Qmake not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    else
+        qmake6_test_ver="`$QMAKE6 -v 2>&1 | $SED -n -e 's/^Using Qt version \(6\.[[0-9.]]\+\).*$/\1/p'`"
+        if test -z "$qmake6_test_ver"; then
+            AC_MSG_ERROR([Wrong qmake for Qt6 found. Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+        fi
+        AC_MSG_NOTICE([Detected Qt6 version: $qmake6_test_ver])
+    fi
+
+    qt6_incdirs="`$QMAKE6 -query QT_INSTALL_HEADERS` $qt6_incdirs"
+    qt6_libdirs="`$QMAKE6 -query QT_INSTALL_LIBS` $qt6_libdirs"
+    qt6_platformsdir="`$QMAKE6 -query QT_INSTALL_PLUGINS`/platforms"
+    QT6_PLATFORMS_SRCDIR="$qt6_platformsdir"
+
+    AC_MSG_CHECKING([for Qt6 headers])
+    qt6_incdir="no"
+    for inc_dir in $qt6_incdirs; do
+        if test -r "$inc_dir/$qt6_test_include"; then
+            qt6_incdir="$inc_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt6_incdir])
+    if test "x$qt6_incdir" = "xno"; then
+        AC_MSG_ERROR([Qt6 headers not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    fi
+    # check for scenario: qt6-qtbase-devel-*.86_64 installed but host is i686
+    AC_LANG_PUSH([C++])
+    save_CPPFLAGS=$CPPFLAGS
+    CPPFLAGS="${CPPFLAGS} -I${qt6_incdir}"
+    AC_CHECK_HEADER(QtCore/qconfig.h, [],
+        [AC_MSG_ERROR(qconfig.h header not found.)], [])
+    CPPFLAGS=$save_CPPFLAGS
+    AC_LANG_POP([C++])
+
+    AC_MSG_CHECKING([for Qt6 libraries])
+    qt6_libdir="no"
+    for lib_dir in $qt6_libdirs; do
+        if test -r "$lib_dir/$qt6_test_library"; then
+            qt6_libdir="$lib_dir"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$qt6_libdir])
+    if test "x$qt6_libdir" = "xno"; then
+        AC_MSG_ERROR([Qt6 libraries not found.  Please specify the root of your Qt6 installation by exporting QT6DIR before running "configure".])
+    fi
+
+    if test "$_os" = "Emscripten"; then
+        if test ! -f "$QT6_PLATFORMS_SRCDIR"/wasm_shell.html ; then
+            QT6_PLATFORMS_SRCDIR="${QT6_PLATFORMS_SRCDIR/plugins/src\/plugins}/wasm"
+        fi
+        if test ! -f "${qt6_platformsdir}"/libqwasm.a -o ! -f "$QT6_PLATFORMS_SRCDIR"/wasm_shell.html; then
+            AC_MSG_ERROR([No Qt6 WASM QPA plugin found in ${qt6_platformsdir} or ${QT6_PLATFORMS_SRCDIR}])
+        fi
+    fi
+
+    QT6_CFLAGS="-I$qt6_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    QT6_CFLAGS=$(printf '%s' "$QT6_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    QT6_LIBS="-L$qt6_libdir -lQt6Core -lQt6Gui -lQt6Widgets -lQt6Network"
+    if test "$_os" = "Emscripten"; then
+        QT6_LIBS="$QT6_LIBS -lqtpcre2 -lQt6EventDispatcherSupport -lQt6FontDatabaseSupport -L${qt6_platformsdir} -lqwasm"
+    fi
+
+    if test "$USING_X11" = TRUE; then
+        PKG_CHECK_MODULES(QT6_XCB,[xcb],,[AC_MSG_ERROR([XCB not found, which is needed for key modifier handling in X11.])])
+        QT6_CFLAGS="$QT6_CFLAGS $QT6_XCB_CFLAGS"
+        QT6_LIBS="$QT6_LIBS $QT6_XCB_LIBS"
+        QT6_USING_X11=1
+        AC_DEFINE(QT6_USING_X11)
+    fi
+
+    dnl Check for Meta Object Compiler
+
+    for lib_dir in $qt6_libdirs; do
+        if test -z "$qt6_libexec_dirs"; then
+            qt6_libexec_dirs="$lib_dir/libexec"
+        else
+            qt6_libexec_dirs="$qt6_libexec_dirs:$lib_dir/libexec"
+        fi
+    done
+    AC_PATH_PROGS( MOC6, [moc-qt6 moc], no, [`dirname $qt6_libdir`/libexec:$QT6DIR/libexec:$qt6_libexec_dirs:`echo $qt6_libdirs | $SED -e 's/ /:/g'`:$PATH])
+    if test "$MOC6" = "no"; then
+        AC_MSG_ERROR([Qt Meta Object Compiler not found.  Please specify
+the root of your Qt installation by exporting QT6DIR before running "configure".])
+    else
+        moc6_test_ver="`$MOC6 -v 2>&1 | $SED -n -e 's/^moc \(6.*\)/\1/p'`"
+        if test -z "$moc6_test_ver"; then
+            AC_MSG_ERROR([Wrong moc for Qt6 found.])
+        fi
+        AC_MSG_NOTICE([Detected moc version: $moc_test_ver])
+    fi
+fi
+AC_SUBST(QT6_CFLAGS)
+AC_SUBST(QT6_LIBS)
+AC_SUBST(MOC6)
+AC_SUBST(QT6_PLATFORMS_SRCDIR)
+
+dnl ===================================================================
+dnl KF5 Integration
+dnl ===================================================================
+
+KF5_CFLAGS=""
+KF5_LIBS=""
+KF5_CONFIG="kf5-config"
+if test \( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \) -o \
+        \( "$test_gtk3_kde5" = "yes" -a "$ENABLE_GTK3_KDE5" = "TRUE" \)
+then
+    if test "$OS" = "HAIKU"; then
+        haiku_arch="`echo $RTL_ARCH | tr X x`"
+        kf5_haiku_incdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_HEADERS_DIRECTORY`"
+        kf5_haiku_libdirs="`findpaths -c ' ' -a $haiku_arch B_FIND_PATH_DEVELOP_LIB_DIRECTORY`"
+    fi
+
+    kf5_incdirs="$KF5INC /usr/include $kf5_haiku_incdirs $x_includes"
+    kf5_libdirs="$KF5LIB /usr/lib /usr/lib/kf5 /usr/lib/kf5/devel $kf5_haiku_libdirs $x_libraries"
+    if test -n "$supports_multilib"; then
+        kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel"
+    fi
+
+    kf5_test_include="KF5/KIOFileWidgets/KFileWidget"
+    kf5_test_library="libKF5KIOFileWidgets.so"
+    kf5_libdirs="$qt5_libdir $kf5_libdirs"
+
+    dnl kf5 KDE4 support compatibility installed
+    AC_PATH_PROG( KF5_CONFIG, $KF5_CONFIG, no, )
+    if test "$KF5_CONFIG" != "no"; then
+        kf5_incdirs="`$KF5_CONFIG --path include` $kf5_incdirs"
+        kf5_libdirs="`$KF5_CONFIG --path lib` $kf5_libdirs"
+    fi
+
+    dnl Check for KF5 headers
+    AC_MSG_CHECKING([for KF5 headers])
+    kf5_incdir="no"
+    for kf5_check in $kf5_incdirs; do
+        if test -r "$kf5_check/$kf5_test_include"; then
+            kf5_incdir="$kf5_check/KF5"
+            break
+        fi
+    done
+    AC_MSG_RESULT([$kf5_incdir])
+    if test "x$kf5_incdir" = "xno"; then
+        AC_MSG_ERROR([KF5 headers not found.  Please specify the root of your KF5 installation by exporting KF5DIR before running "configure".])
+    fi
+
+    dnl Check for KF5 libraries
+    AC_MSG_CHECKING([for KF5 libraries])
+    kf5_libdir="no"
+    for kf5_check in $kf5_libdirs; do
+        if test -r "$kf5_check/$kf5_test_library"; then
+            kf5_libdir="$kf5_check"
+            break
+        fi
+    done
+
+    AC_MSG_RESULT([$kf5_libdir])
+    if test "x$kf5_libdir" = "xno"; then
+        AC_MSG_ERROR([KF5 libraries not found.  Please specify the root of your KF5 installation by exporting KF5DIR before running "configure".])
+    fi
+
+    KF5_CFLAGS="-I$kf5_incdir -I$kf5_incdir/KCoreAddons -I$kf5_incdir/KI18n -I$kf5_incdir/KConfigCore -I$kf5_incdir/KWindowSystem -I$kf5_incdir/KIOCore -I$kf5_incdir/KIOWidgets -I$kf5_incdir/KIOFileWidgets -I$qt5_incdir -I$qt5_incdir/QtCore -I$qt5_incdir/QtGui -I$qt5_incdir/QtWidgets -I$qt5_incdir/QtNetwork -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT -DQT_NO_VERSION_TAGGING"
+    KF5_LIBS="-L$kf5_libdir -lKF5CoreAddons -lKF5I18n -lKF5ConfigCore -lKF5WindowSystem -lKF5KIOCore -lKF5KIOWidgets -lKF5KIOFileWidgets -L$qt5_libdir -lQt5Core -lQt5Gui -lQt5Widgets -lQt5Network"
+    KF5_CFLAGS=$(printf '%s' "$KF5_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+
+    if test "$USING_X11" = TRUE; then
+        KF5_LIBS="$KF5_LIBS -lQt5X11Extras"
+    fi
+
+    AC_LANG_PUSH([C++])
+    save_CXXFLAGS=$CXXFLAGS
+    CXXFLAGS="$CXXFLAGS $KF5_CFLAGS"
+    AC_MSG_CHECKING([whether KDE is >= 5.0])
+       AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <kcoreaddons_version.h>
+
+int main(int argc, char **argv) {
+       if (KCOREADDONS_VERSION_MAJOR == 5 && KCOREADDONS_VERSION_MINOR >= 0) return 0;
+       else return 1;
+}
+       ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([KDE version too old])],[])
+    CXXFLAGS=$save_CXXFLAGS
+    AC_LANG_POP([C++])
+fi
+AC_SUBST(KF5_CFLAGS)
+AC_SUBST(KF5_LIBS)
+
+dnl ===================================================================
+dnl Test whether to include Evolution 2 support
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable evolution 2 support])
+if test "$enable_evolution2" = yes; then
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES(GOBJECT, gobject-2.0)
+    GOBJECT_CFLAGS=$(printf '%s' "$GOBJECT_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${GOBJECT_LIBS}"
+    GOBJECT_LIBS="${filteredlibs}"
+    ENABLE_EVOAB2="TRUE"
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_EVOAB2)
+AC_SUBST(GOBJECT_CFLAGS)
+AC_SUBST(GOBJECT_LIBS)
+
+dnl ===================================================================
+dnl Test which themes to include
+dnl ===================================================================
+AC_MSG_CHECKING([which themes to include])
+# if none given use default subset of available themes
+if test "x$with_theme" = "x" -o "x$with_theme" = "xyes"; then
+    with_theme="breeze breeze_dark breeze_dark_svg breeze_svg colibre colibre_svg colibre_dark colibre_dark_svg elementary elementary_svg karasa_jaga karasa_jaga_svg sifr sifr_svg sifr_dark sifr_dark_svg sukapura sukapura_dark sukapura_dark_svg sukapura_svg"
+fi
+
+WITH_THEMES=""
+if test "x$with_theme" != "xno"; then
+    for theme in $with_theme; do
+        case $theme in
+        breeze|breeze_dark|breeze_dark_svg|breeze_svg|colibre|colibre_svg|colibre_dark|colibre_dark_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg|sifr|sifr_svg|sifr_dark|sifr_dark_svg|sukapura|sukapura_dark|sukapura_dark_svg|sukapura_svg) real_theme="$theme" ;;
+        default) real_theme=colibre ;;
+        *) AC_MSG_ERROR([Unknown value for --with-theme: $theme]) ;;
+        esac
+        WITH_THEMES=`echo "$WITH_THEMES $real_theme"|tr '\ ' '\n'|sort|uniq|tr '\n' '\ '`
+    done
+fi
+AC_MSG_RESULT([$WITH_THEMES])
+AC_SUBST([WITH_THEMES])
+# FIXME: remove this, and the convenience default->colibre remapping after a grace period
+for theme in $with_theme; do
+    case $theme in
+    default) AC_MSG_WARN([--with-theme=default is deprecated and will be removed, use --with-theme=colibre]) ;;
+    *) ;;
+    esac
+done
+
+###############################################################################
+# Extensions checking
+###############################################################################
+AC_MSG_CHECKING([for extensions integration])
+if test "x$enable_extension_integration" != "xno"; then
+    WITH_EXTENSION_INTEGRATION=TRUE
+    SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION"
+    AC_MSG_RESULT([yes, use integration])
+else
+    WITH_EXTENSION_INTEGRATION=
+    AC_MSG_RESULT([no, do not integrate])
+fi
+AC_SUBST(WITH_EXTENSION_INTEGRATION)
+
+dnl Should any extra extensions be included?
+dnl There are standalone tests for each of these below.
+WITH_EXTRA_EXTENSIONS=
+AC_SUBST([WITH_EXTRA_EXTENSIONS])
+
+libo_CHECK_EXTENSION([Numbertext],[NUMBERTEXT],[numbertext],[numbertext],[b7cae45ad2c23551fd6ccb8ae2c1f59e-numbertext_0.9.5.oxt])
+if test "x$with_java" != "xno"; then
+    libo_CHECK_EXTENSION([NLPSolver],[NLPSOLVER],[nlpsolver],[nlpsolver],[])
+fi
+
+AC_MSG_CHECKING([whether to build opens___.ttf])
+if test "$enable_build_opensymbol" = "yes"; then
+    AC_MSG_RESULT([yes])
+    AC_PATH_PROG(FONTFORGE, fontforge)
+    if test -z "$FONTFORGE"; then
+        AC_MSG_ERROR([fontforge not installed])
+    fi
+else
+    AC_MSG_RESULT([no])
+    BUILD_TYPE="$BUILD_TYPE OPENSYMBOL"
+fi
+AC_SUBST(FONTFORGE)
+
+dnl ===================================================================
+dnl Test whether to include fonts
+dnl ===================================================================
+AC_MSG_CHECKING([whether to include third-party fonts])
+if test "$with_fonts" != "no"; then
+    AC_MSG_RESULT([yes])
+    WITH_FONTS=TRUE
+    BUILD_TYPE="$BUILD_TYPE MORE_FONTS"
+    AC_DEFINE(HAVE_MORE_FONTS)
+else
+    AC_MSG_RESULT([no])
+    WITH_FONTS=
+    SCPDEFS="$SCPDEFS -DWITHOUT_FONTS"
+fi
+AC_SUBST(WITH_FONTS)
+
+
+dnl ===================================================================
+dnl Test whether to enable online update service
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable online update])
+ENABLE_ONLINE_UPDATE=
+ENABLE_ONLINE_UPDATE_MAR=
+UPDATE_CONFIG=
+if test "$enable_online_update" = ""; then
+    AC_MSG_RESULT([no])
+else
+    if test "$enable_online_update" = "mar"; then
+        AC_MSG_RESULT([yes - MAR-based online update])
+        ENABLE_ONLINE_UPDATE_MAR="TRUE"
+        if test "$with_update_config" = ""; then
+            AC_MSG_ERROR([mar based online updater needs an update config specified with "with-update-config])
+        fi
+        UPDATE_CONFIG="$with_update_config"
+        AC_DEFINE(HAVE_FEATURE_UPDATE_MAR)
+    elif test "$enable_online_update" = "yes"; then
+        AC_MSG_RESULT([yes])
+        ENABLE_ONLINE_UPDATE="TRUE"
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+AC_SUBST(ENABLE_ONLINE_UPDATE)
+AC_SUBST(ENABLE_ONLINE_UPDATE_MAR)
+AC_SUBST(UPDATE_CONFIG)
+
+
+PRIVACY_POLICY_URL="$with_privacy_policy_url"
+if test "$ENABLE_ONLINE_UPDATE" = TRUE -o "$ENABLE_BREAKPAD" = "TRUE"; then
+    if test "x$with_privacy_policy_url" = "xundefined"; then
+        AC_MSG_FAILURE([online update or breakpad/crashreporting are enabled, but no --with-privacy-policy-url=... was provided])
+    fi
+fi
+AC_SUBST(PRIVACY_POLICY_URL)
+dnl ===================================================================
+dnl Test whether we need bzip2
+dnl ===================================================================
+SYSTEM_BZIP2=
+if test "$ENABLE_ONLINE_UPDATE_MAR" = "TRUE"; then
+    AC_MSG_CHECKING([whether to use system bzip2])
+    if test "$with_system_bzip2" = yes; then
+        SYSTEM_BZIP2=TRUE
+        AC_MSG_RESULT([yes])
+        PKG_CHECK_MODULES(BZIP2, bzip2)
+        FilterLibs "${BZIP2_LIBS}"
+        BZIP2_LIBS="${filteredlibs}"
+    else
+        AC_MSG_RESULT([no])
+        BUILD_TYPE="$BUILD_TYPE BZIP2"
+    fi
+fi
+AC_SUBST(SYSTEM_BZIP2)
+AC_SUBST(BZIP2_CFLAGS)
+AC_SUBST(BZIP2_LIBS)
+
+dnl ===================================================================
+dnl Test whether to enable extension update
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable extension update])
+ENABLE_EXTENSION_UPDATE=
+if test "x$enable_extension_update" = "xno"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_EXTENSION_UPDATE="TRUE"
+    AC_DEFINE(ENABLE_EXTENSION_UPDATE)
+    SCPDEFS="$SCPDEFS -DENABLE_EXTENSION_UPDATE"
+fi
+AC_SUBST(ENABLE_EXTENSION_UPDATE)
+
+
+dnl ===================================================================
+dnl Test whether to create MSI with LIMITUI=1 (silent install)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to create MSI with LIMITUI=1 (silent install)])
+if test "$enable_silent_msi" = "" -o "$enable_silent_msi" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_SILENT_MSI=
+else
+    AC_MSG_RESULT([yes])
+    ENABLE_SILENT_MSI=TRUE
+    SCPDEFS="$SCPDEFS -DENABLE_SILENT_MSI"
+fi
+AC_SUBST(ENABLE_SILENT_MSI)
+
+dnl ===================================================================
+dnl Check for WiX tools.
+dnl ===================================================================
+if test "$enable_wix" = "" -o "enable_wix" = "no"; then
+    AC_MSG_RESULT([no])
+    ENABLE_WIX=
+else
+    AC_MSG_RESULT([yes])
+    if ! which candle  >/dev/null 2>&1; then
+      AC_MSG_ERROR([WiX requested but WiX toolset not found.])
+    fi
+    ENABLE_WIX=TRUE
+fi
+AC_SUBST(ENABLE_SILENT_MSI)
+
+AC_MSG_CHECKING([whether and how to use Xinerama])
+if test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
+    if test "$x_libraries" = "default_x_libraries"; then
+        XINERAMALIB=`$PKG_CONFIG --variable=libdir xinerama`
+        if test "x$XINERAMALIB" = x; then
+           XINERAMALIB="/usr/lib"
+        fi
+    else
+        XINERAMALIB="$x_libraries"
+    fi
+    if test -e "$XINERAMALIB/libXinerama.so" -a -e "$XINERAMALIB/libXinerama.a"; then
+        # we have both versions, let the user decide but use the dynamic one
+        # per default
+        USE_XINERAMA=TRUE
+        if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
+            XINERAMA_LINK=dynamic
+        else
+            XINERAMA_LINK=static
+        fi
+    elif test -e "$XINERAMALIB/libXinerama.so" -a ! -e "$XINERAMALIB/libXinerama.a"; then
+        # we have only the dynamic version
+        USE_XINERAMA=TRUE
+        XINERAMA_LINK=dynamic
+    elif test -e "$XINERAMALIB/libXinerama.a"; then
+        # static version
+        if echo $host_cpu | $GREP -E 'i[[3456]]86' 2>/dev/null >/dev/null; then
+            USE_XINERAMA=TRUE
+            XINERAMA_LINK=static
+        else
+            USE_XINERAMA=
+            XINERAMA_LINK=none
+        fi
+    else
+        # no Xinerama
+        USE_XINERAMA=
+        XINERAMA_LINK=none
+    fi
+    if test "$USE_XINERAMA" = "TRUE"; then
+        AC_MSG_RESULT([yes, with $XINERAMA_LINK linking])
+        AC_CHECK_HEADER(X11/extensions/Xinerama.h, [],
+            [AC_MSG_ERROR(Xinerama header not found.)], [])
+        XEXTLIBS=`$PKG_CONFIG --variable=libs xext`
+        if test "x$XEXTLIB" = x; then
+           XEXTLIBS="-L$XLIB -L$XINERAMALIB -lXext"
+        fi
+        XINERAMA_EXTRA_LIBS="$XEXTLIBS"
+        if test "$_os" = "FreeBSD"; then
+            XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt"
+        fi
+        if test "$_os" = "Linux"; then
+            XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl"
+        fi
+        AC_CHECK_LIB([Xinerama], [XineramaIsActive], [:],
+            [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS])
+    else
+        AC_MSG_RESULT([no, libXinerama not found or wrong architecture.])
+    fi
+else
+    USE_XINERAMA=
+    XINERAMA_LINK=none
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(USE_XINERAMA)
+AC_SUBST(XINERAMA_LINK)
+
+dnl ===================================================================
+dnl Test whether to build cairo or rely on the system version
+dnl ===================================================================
+
+if test "$test_cairo" = "yes"; then
+    AC_MSG_CHECKING([whether to use the system cairo])
+
+    : ${with_system_cairo:=$with_system_libs}
+    if test "$with_system_cairo" = "yes"; then
+        SYSTEM_CAIRO=TRUE
+        AC_MSG_RESULT([yes])
+
+        PKG_CHECK_MODULES( CAIRO, cairo >= 1.12.0 )
+        CAIRO_CFLAGS=$(printf '%s' "$CAIRO_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+        FilterLibs "${CAIRO_LIBS}"
+        CAIRO_LIBS="${filteredlibs}"
+
+        if test "$test_xrender" = "yes"; then
+            AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
+            AC_LANG_PUSH([C])
+            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
+#ifdef PictStandardA8
+#else
+      return fail;
+#endif
+]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
+
+            AC_LANG_POP([C])
+        fi
+    else
+        AC_MSG_RESULT([no])
+        BUILD_TYPE="$BUILD_TYPE CAIRO"
+    fi
+
+    if test "$enable_cairo_canvas" != no; then
+        AC_DEFINE(ENABLE_CAIRO_CANVAS)
+        ENABLE_CAIRO_CANVAS=TRUE
+    fi
+fi
+
+AC_SUBST(CAIRO_CFLAGS)
+AC_SUBST(CAIRO_LIBS)
+AC_SUBST(ENABLE_CAIRO_CANVAS)
+AC_SUBST(SYSTEM_CAIRO)
+
+dnl ===================================================================
+dnl Test whether to use avahi
+dnl ===================================================================
+if test "$_os" = "WINNT"; then
+    # Windows uses bundled mDNSResponder
+    BUILD_TYPE="$BUILD_TYPE MDNSRESPONDER"
+elif test "$_os" != "Darwin" -a "$enable_avahi" = "yes"; then
+    PKG_CHECK_MODULES([AVAHI], [avahi-client >= 0.6.10],
+                      [ENABLE_AVAHI="TRUE"])
+    AC_DEFINE(HAVE_FEATURE_AVAHI)
+    AVAHI_CFLAGS=$(printf '%s' "$AVAHI_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${AVAHI_LIBS}"
+    AVAHI_LIBS="${filteredlibs}"
+fi
+
+AC_SUBST(ENABLE_AVAHI)
+AC_SUBST(AVAHI_CFLAGS)
+AC_SUBST(AVAHI_LIBS)
+
+dnl ===================================================================
+dnl Test whether to use liblangtag
+dnl ===================================================================
+SYSTEM_LIBLANGTAG=
+AC_MSG_CHECKING([whether to use system liblangtag])
+if test "$with_system_liblangtag" = yes; then
+    SYSTEM_LIBLANGTAG=TRUE
+    AC_MSG_RESULT([yes])
+    PKG_CHECK_MODULES( LIBLANGTAG, liblangtag >= 0.4.0)
+    dnl cf. <https://bitbucket.org/tagoh/liblangtag/commits/9324836a0d1c> "Fix a build issue with inline keyword"
+    PKG_CHECK_EXISTS([liblangtag >= 0.5.5], [], [AC_DEFINE([LIBLANGTAG_INLINE_FIX])])
+    LIBLANGTAG_CFLAGS=$(printf '%s' "$LIBLANGTAG_CFLAGS" | sed -e "s/-I/${ISYSTEM?}/g")
+    FilterLibs "${LIBLANGTAG_LIBS}"
+    LIBLANGTAG_LIBS="${filteredlibs}"
+else
+    SYSTEM_LIBLANGTAG=
+    AC_MSG_RESULT([no])
+    BUILD_TYPE="$BUILD_TYPE LIBLANGTAG"
+    LIBLANGTAG_CFLAGS="-I${WORKDIR}/UnpackedTarball/liblangtag"
+    if test "$COM" = "MSC"; then
+        LIBLANGTAG_LIBS="${WORKDIR}/UnpackedTarball/liblangtag/liblangtag/.libs/liblangtag.lib"
+    else
+        LIBLANGTAG_LIBS="-L${WORKDIR}/UnpackedTarball/liblangtag/liblangtag/.libs -llangtag"
+    fi
+fi
+AC_SUBST(SYSTEM_LIBLANGTAG)
+AC_SUBST(LIBLANGTAG_CFLAGS)
+AC_SUBST(LIBLANGTAG_LIBS)
+
+dnl ===================================================================
+dnl Test whether to build libpng or rely on the system version
+dnl ===================================================================
+
+LIBPNG_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/libpng"
+LIBPNG_LIBS_internal="-L${WORKDIR}/LinkTarget/StaticLibrary -llibpng"
+libo_CHECK_SYSTEM_MODULE([libpng],[LIBPNG],[libpng])
+
+dnl ===================================================================
+dnl Test whether to build libtiff or rely on the system version
+dnl ===================================================================
+
+libo_CHECK_SYSTEM_MODULE([libtiff],[LIBTIFF],[libtiff-4])
+
+dnl ===================================================================
+dnl Test whether to build libwebp or rely on the system version
+dnl ===================================================================
+
+libo_CHECK_SYSTEM_MODULE([libwebp],[LIBWEBP],[libwebp])
+
+dnl ===================================================================
+dnl Check for runtime JVM search path
+dnl ===================================================================
+if test "$ENABLE_JAVA" != ""; then
+    AC_MSG_CHECKING([whether to use specific JVM search path at runtime])
+    if test -n "$with_jvm_path" -a "$with_jvm_path" != "no"; then
+        AC_MSG_RESULT([yes])
+        if ! test -d "$with_jvm_path"; then
+            AC_MSG_ERROR(["$with_jvm_path" not a directory])
+        fi
+        if ! test -d "$with_jvm_path"jvm; then
+            AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm])
+        fi
+        JVM_ONE_PATH_CHECK="$with_jvm_path"
+        AC_SUBST(JVM_ONE_PATH_CHECK)
+    else
+        AC_MSG_RESULT([no])
+    fi
+fi
+
+dnl ===================================================================
+dnl Test for the presence of Ant and that it works
+dnl ===================================================================
+
+if test "$ENABLE_JAVA" != "" -a "$NEED_ANT" = "TRUE" -a "$cross_compiling" != "yes"; then
+    ANT_HOME=; export ANT_HOME
+    WITH_ANT_HOME=; export WITH_ANT_HOME
+    if test -z "$with_ant_home" -a -n "$LODE_HOME" ; then
+        if test -x "$LODE_HOME/opt/ant/bin/ant" ; then
+            if test "$_os" = "WINNT"; then
+                with_ant_home="`cygpath -m $LODE_HOME/opt/ant`"
+            else
+                with_ant_home="$LODE_HOME/opt/ant"
+            fi
+        elif test -x  "$LODE_HOME/opt/bin/ant" ; then
+            with_ant_home="$LODE_HOME/opt/ant"
+        fi
+    fi
+    if test -z "$with_ant_home"; then
+        AC_PATH_PROGS(ANT, [ant ant.sh ant.bat ant.cmd])
+    else
+        if test "$_os" = "WINNT"; then
+            # AC_PATH_PROGS needs unix path
+            with_ant_home=`cygpath -u "$with_ant_home"`
+        fi
+        AbsolutePath "$with_ant_home"
+        with_ant_home=$absolute_path
+        AC_PATH_PROGS(ANT, [ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH)
+        WITH_ANT_HOME=$with_ant_home
+        ANT_HOME=$with_ant_home
+    fi
+
+    if test -z "$ANT"; then
+        AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home])
+    else
+        # resolve relative or absolute symlink
+        while test -h "$ANT"; do
+            a_cwd=`pwd`
+            a_basename=`basename "$ANT"`
+            a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"`
+            cd "`dirname "$ANT"`"
+            cd "`dirname "$a_script"`"
+            ANT="`pwd`"/"`basename "$a_script"`"
+            cd "$a_cwd"
+        done
+
+        AC_MSG_CHECKING([if $ANT works])
+        mkdir -p conftest.dir
+        a_cwd=$(pwd)
+        cd conftest.dir
+        cat > conftest.java << EOF
+        public class conftest {
+            int testmethod(int a, int b) {
+                    return a + b;
+            }
+        }
+EOF
+
+        cat > conftest.xml << EOF
+        <project name="conftest" default="conftest">
+        <target name="conftest">
+            <javac srcdir="." includes="conftest.java">
+            </javac>
+        </target>
+        </project>
+EOF
+
+        AC_TRY_COMMAND("$ANT" -buildfile conftest.xml 1>&2)
+        if test $? = 0 -a -f ./conftest.class; then
+            AC_MSG_RESULT([Ant works])
+            if test -z "$WITH_ANT_HOME"; then
+                ANT_HOME=`"$ANT" -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"`
+                if test -z "$ANT_HOME"; then
+                    ANT_HOME=`echo "$ANT" | $SED -n "s/\/bin\/ant.*\$//p"`
+                fi
+            else
+                ANT_HOME="$WITH_ANT_HOME"
+            fi
+        else
+            echo "configure: Ant test failed" >&5
+            cat conftest.java >&5
+            cat conftest.xml >&5
+            AC_MSG_ERROR([Ant does not work - Some Java projects will not build!])
+        fi
+        cd "$a_cwd"
+        rm -fr conftest.dir
+    fi
+    if test -z "$ANT_HOME"; then
+        ANT_HOME="NO_ANT_HOME"
+    else
+        PathFormat "$ANT_HOME"
+        ANT_HOME="$formatted_path"
+        PathFormat "$ANT"
+        ANT="$formatted_path"
+    fi
+
+    dnl Checking for ant.jar
+    if test "$ANT_HOME" != "NO_ANT_HOME"; then
+        AC_MSG_CHECKING([Ant lib directory])
+        if test -f $ANT_HOME/lib/ant.jar; then
+            ANT_LIB="$ANT_HOME/lib"
+        else
+            if test -f $ANT_HOME/ant.jar; then
+                ANT_LIB="$ANT_HOME"
+            else
+                if test -f /usr/share/java/ant.jar; then
+                    ANT_LIB=/usr/share/java
+                else
+                    if test -f /usr/share/ant-core/lib/ant.jar; then
+                        ANT_LIB=/usr/share/ant-core/lib
+                    else
+                        if test -f $ANT_HOME/lib/ant/ant.jar; then
+                            ANT_LIB="$ANT_HOME/lib/ant"
+                        else
+                            if test -f /usr/share/lib/ant/ant.jar; then
+                                ANT_LIB=/usr/share/lib/ant
+                            else
+                                AC_MSG_ERROR([Ant libraries not found!])
+                            fi
+                        fi
+                    fi
+                fi
+            fi
+        fi
+        PathFormat "$ANT_LIB"
+        ANT_LIB="$formatted_path"
+        AC_MSG_RESULT([Ant lib directory found.])
+    fi
+
+    ant_minver=1.6.0
+    ant_minminor1=`echo $ant_minver | cut -d"." -f2`
+
+    AC_MSG_CHECKING([whether Ant is >= $ant_minver])
+    ant_version=`"$ANT" -version | $AWK '$3 == "version" { print $4; }'`
+    ant_version_major=`echo $ant_version | cut -d. -f1`
+    ant_version_minor=`echo $ant_version | cut -d. -f2`
+    echo "configure: ant_version $ant_version " >&5
+    echo "configure: ant_version_major $ant_version_major " >&5
+    echo "configure: ant_version_minor $ant_version_minor " >&5
+    if test "$ant_version_major" -ge "2"; then
+        AC_MSG_RESULT([yes, $ant_version])
+    elif test "$ant_version_major" = "1" -a "$ant_version_minor" -ge "$ant_minminor1"; then
+        AC_MSG_RESULT([yes, $ant_version])
+    else
+        AC_MSG_ERROR([no, you need at least Ant >= $ant_minver])
+    fi
+
+    rm -f conftest* core core.* *.core
+fi
+AC_SUBST(ANT)
+AC_SUBST(ANT_HOME)
+AC_SUBST(ANT_LIB)
+
+OOO_JUNIT_JAR=
+HAMCREST_JAR=
+if test "$ENABLE_JAVA" != "" -a "$with_junit" != "no" -a "$cross_compiling" != "yes"; then
+    AC_MSG_CHECKING([for JUnit 4])
+    if test "$with_junit" = "yes"; then
+        if test -n "$LODE_HOME" -a -e "$LODE_HOME/opt/share/java/junit.jar" ; then
+            OOO_JUNIT_JAR="$LODE_HOME/opt/share/java/junit.jar"
+        elif test -e /usr/share/java/junit4.jar; then
+            OOO_JUNIT_JAR=/usr/share/java/junit4.jar
+        else
+           if test -e /usr/share/lib/java/junit.jar; then
+              OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar
+           else
+              OOO_JUNIT_JAR=/usr/share/java/junit.jar
+           fi
+        fi
+    else
+        OOO_JUNIT_JAR=$with_junit
+    fi
+    if test "$_os" = "WINNT"; then
+        OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"`
+    fi
+    printf 'import org.junit.Before;' > conftest.java
+    if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+        AC_MSG_RESULT([$OOO_JUNIT_JAR])
+    else
+        AC_MSG_ERROR(
+[cannot find JUnit 4 jar; please install one in the default location (/usr/share/java),
+ specify its pathname via --with-junit=..., or disable it via --without-junit])
+    fi
+    rm -f conftest.class conftest.java
+    if test $OOO_JUNIT_JAR != ""; then
+        BUILD_TYPE="$BUILD_TYPE QADEVOOO"
+    fi
+
+    AC_MSG_CHECKING([for included Hamcrest])
+    printf 'import org.hamcrest.BaseDescription;' > conftest.java
+    if "$JAVACOMPILER" -classpath "$OOO_JUNIT_JAR" conftest.java >&5 2>&5; then
+        AC_MSG_RESULT([Included in $OOO_JUNIT_JAR])
+    else
+        AC_MSG_RESULT([Not included])
+        AC_MSG_CHECKING([for standalone hamcrest jar.])
+        if test "$with_hamcrest" = "yes"; then
+            if test -e /usr/share/lib/java/hamcrest.jar; then
+                HAMCREST_JAR=/usr/share/lib/java/hamcrest.jar
+            elif test -e /usr/share/java/hamcrest/core.jar; then
+                HAMCREST_JAR=/usr/share/java/hamcrest/core.jar
+            elif test -e /usr/share/java/hamcrest/hamcrest.jar; then
+                HAMCREST_JAR=/usr/share/java/hamcrest/hamcrest.jar
+            else
+                HAMCREST_JAR=/usr/share/java/hamcrest.jar
+            fi
+        else
+            HAMCREST_JAR=$with_hamcrest
+        fi
+        if test "$_os" = "WINNT"; then
+            HAMCREST_JAR=`cygpath -m "$HAMCREST_JAR"`
+        fi
+        if "$JAVACOMPILER" -classpath "$HAMCREST_JAR" conftest.java >&5 2>&5; then
+            AC_MSG_RESULT([$HAMCREST_JAR])
+        else
+            AC_MSG_ERROR([junit does not contain hamcrest; please use a junit jar that includes hamcrest, install a hamcrest jar in the default location (/usr/share/java),
+                          specify its path with --with-hamcrest=..., or disable junit with --without-junit])
+        fi
+    fi
+    rm -f conftest.class conftest.java
+fi
+AC_SUBST(OOO_JUNIT_JAR)
+AC_SUBST(HAMCREST_JAR)
+
+
+AC_SUBST(SCPDEFS)
+
+#
+# check for wget and curl
+#
+WGET=
+CURL=
+
+if test "$enable_fetch_external" != "no"; then
+
+CURL=`which curl 2>/dev/null`
+
+for i in wget /usr/bin/wget /usr/local/bin/wget /usr/sfw/bin/wget /opt/sfw/bin/wget /opt/local/bin/wget; do
+    # wget new enough?
+    $i --help 2> /dev/null | $GREP no-use-server-timestamps 2>&1 > /dev/null
+    if test $? -eq 0; then
+        WGET=$i
+        break
+    fi
+done
+
+if test -z "$WGET" -a -z "$CURL"; then
+    AC_MSG_ERROR([neither wget nor curl found!])
+fi
+
+fi
+
+AC_SUBST(WGET)
+AC_SUBST(CURL)
+
+#
+# check for sha256sum
+#
+SHA256SUM=
+
+for i in shasum /usr/local/bin/shasum /usr/sfw/bin/shasum /opt/sfw/bin/shasum /opt/local/bin/shasum; do
+    eval "$i -a 256 --version" > /dev/null 2>&1
+    ret=$?
+    if test $ret -eq 0; then
+        SHA256SUM="$i -a 256"
+        break
+    fi
+done
+
+if test -z "$SHA256SUM"; then
+    for i in sha256sum /usr/local/bin/sha256sum /usr/sfw/bin/sha256sum /opt/sfw/bin/sha256sum /opt/local/bin/sha256sum; do
+        eval "$i --version" > /dev/null 2>&1
+        ret=$?
+        if test $ret -eq 0; then
+            SHA256SUM=$i
+            break
+        fi
+    done
+fi
+
+if test -z "$SHA256SUM"; then
+    AC_MSG_ERROR([no sha256sum found!])
+fi
+
+AC_SUBST(SHA256SUM)
+
+dnl ===================================================================
+dnl Dealing with l10n options
+dnl ===================================================================
+AC_MSG_CHECKING([which languages to be built])
+# get list of all languages
+# generate shell variable from completelangiso= from solenv/inc/langlist.mk
+# the sed command does the following:
+#   + if a line ends with a backslash, append the next line to it
+#   + adds " on the beginning of the value (after =)
+#   + adds " at the end of the value
+#   + removes en-US; we want to put it on the beginning
+#   + prints just the section starting with 'completelangiso=' and ending with the " at the end of line
+[eval $(sed -e :a -e '/\\$/N; s/\\\n//; ta' -n -e 's/=/="/;s/\([^\\]\)$/\1"/;s/en-US//;/^completelangiso/p' $SRC_ROOT/solenv/inc/langlist.mk)]
+ALL_LANGS="en-US $completelangiso"
+# check the configured localizations
+WITH_LANG="$with_lang"
+
+# Check for --without-lang which turns up as $with_lang being "no". Luckily there is no language with code "no".
+# (Norwegian is "nb" and "nn".)
+if test "$WITH_LANG" = "no"; then
+    WITH_LANG=
+fi
+
+if test -z "$WITH_LANG" -o "$WITH_LANG" = "en-US"; then
+    AC_MSG_RESULT([en-US])
+else
+    AC_MSG_RESULT([$WITH_LANG])
+    GIT_NEEDED_SUBMODULES="translations $GIT_NEEDED_SUBMODULES"
+    if test -z "$MSGFMT"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/msgfmt" ; then
+            MSGFMT="$LODE_HOME/opt/bin/msgfmt"
+        elif test -x "/opt/lo/bin/msgfmt"; then
+            MSGFMT="/opt/lo/bin/msgfmt"
+        else
+            AC_CHECK_PROGS(MSGFMT, [msgfmt])
+            if test -z "$MSGFMT"; then
+                AC_MSG_ERROR([msgfmt not found. Install GNU gettext, or re-run without languages.])
+            fi
+        fi
+    fi
+    if test -z "$MSGUNIQ"; then
+        if test -n "$LODE_HOME" -a -x "$LODE_HOME/opt/bin/msguniq" ; then
+            MSGUNIQ="$LODE_HOME/opt/bin/msguniq"
+        elif test -x "/opt/lo/bin/msguniq"; then
+            MSGUNIQ="/opt/lo/bin/msguniq"
+        else
+            AC_CHECK_PROGS(MSGUNIQ, [msguniq])
+            if test -z "$MSGUNIQ"; then
+                AC_MSG_ERROR([msguniq not found. Install GNU gettext, or re-run without languages.])
+            fi
+        fi
+    fi
+fi
+AC_SUBST(MSGFMT)
+AC_SUBST(MSGUNIQ)
+# check that the list is valid
+for lang in $WITH_LANG; do
+    test "$lang" = "ALL" && continue
+    # need to check for the exact string, so add space before and after the list of all languages
+    for vl in $ALL_LANGS; do
+        if test "$vl" = "$lang"; then
+           break
+        fi
+    done
+    if test "$vl" != "$lang"; then
+        # if you're reading this - you prolly quoted your languages remove the quotes ...
+        AC_MSG_ERROR([invalid language: '$lang' (vs '$v1'); supported languages are: $ALL_LANGS])
+    fi
+done
+if test -n "$WITH_LANG" -a "$WITH_LANG" != "ALL"; then
+    echo $WITH_LANG | grep -q en-US
+    test $? -ne 1 || WITH_LANG=`echo $WITH_LANG en-US`
+fi
+# list with substituted ALL
+WITH_LANG_LIST=`echo $WITH_LANG | sed "s/ALL/$ALL_LANGS/"`
+test -z "$WITH_LANG_LIST" && WITH_LANG_LIST="en-US"
+test "$WITH_LANG" = "en-US" && WITH_LANG=
+if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then
+    test "$WITH_LANG_LIST" = "en-US" || WITH_LANG_LIST=`echo $WITH_LANG_LIST qtz`
+    ALL_LANGS=`echo $ALL_LANGS qtz`
+fi
+AC_SUBST(ALL_LANGS)
+AC_DEFINE_UNQUOTED(WITH_LANG,"$WITH_LANG")
+AC_SUBST(WITH_LANG)
+AC_SUBST(WITH_LANG_LIST)
+AC_SUBST(GIT_NEEDED_SUBMODULES)
+
+WITH_POOR_HELP_LOCALIZATIONS=
+if test -d "$SRC_ROOT/translations/source"; then
+    for l in `ls -1 $SRC_ROOT/translations/source`; do
+        if test ! -d "$SRC_ROOT/translations/source/$l/helpcontent2"; then
+            WITH_POOR_HELP_LOCALIZATIONS="$WITH_POOR_HELP_LOCALIZATIONS $l"
+        fi
+    done
+fi
+AC_SUBST(WITH_POOR_HELP_LOCALIZATIONS)
+
+if test -n "$with_locales" -a "$with_locales" != ALL; then
+    WITH_LOCALES="$with_locales"
+
+    just_langs="`echo $WITH_LOCALES | sed -e 's/_[A-Z]*//g'`"
+    # Only languages and scripts for which we actually have ifdefs need to be handled. Also see
+    # config_host/config_locales.h.in
+    for locale in $WITH_LOCALES; do
+        lang=${locale%_*}
+
+        AC_DEFINE_UNQUOTED(WITH_LOCALE_$lang, 1)
+
+        case $lang in
+        hi|mr*ne)
+            AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Deva)
+            ;;
+        bg|ru)
+            AC_DEFINE(WITH_LOCALE_FOR_SCRIPT_Cyrl)
+            ;;
+        esac
+    done
+else
+    AC_DEFINE(WITH_LOCALE_ALL)
+fi
+AC_SUBST(WITH_LOCALES)
+
+dnl git submodule update --reference
+dnl ===================================================================
+if test -n "${GIT_REFERENCE_SRC}"; then
+    for repo in ${GIT_NEEDED_SUBMODULES}; do
+        if ! test -d "${GIT_REFERENCE_SRC}"/${repo}; then
+            AC_MSG_ERROR([referenced git: required repository does not exist: ${GIT_REFERENCE_SRC}/${repo}])
+        fi
+    done
+fi
+AC_SUBST(GIT_REFERENCE_SRC)
+
+dnl git submodules linked dirs
+dnl ===================================================================
+if test -n "${GIT_LINK_SRC}"; then
+    for repo in ${GIT_NEEDED_SUBMODULES}; do
+        if ! test -d "${GIT_LINK_SRC}"/${repo}; then
+            AC_MSG_ERROR([linked git: required repository does not exist: ${GIT_LINK_SRC}/${repo}])
+        fi
+    done
+fi
+AC_SUBST(GIT_LINK_SRC)
+
+dnl branding
+dnl ===================================================================
+AC_MSG_CHECKING([for alternative branding images directory])
+# initialize mapped arrays
+BRAND_INTRO_IMAGES="intro.png intro-highres.png"
+brand_files="$BRAND_INTRO_IMAGES logo.svg logo_inverted.svg logo-sc.svg logo-sc_inverted.svg about.svg"
+
+if test -z "$with_branding" -o "$with_branding" = "no"; then
+    AC_MSG_RESULT([none])
+    DEFAULT_BRAND_IMAGES="$brand_files"
+else
+    if ! test -d $with_branding ; then
+        AC_MSG_ERROR([No directory $with_branding, falling back to default branding])
+    else
+        AC_MSG_RESULT([$with_branding])
+        CUSTOM_BRAND_DIR="$with_branding"
+        for lfile in $brand_files
+        do
+            if ! test -f $with_branding/$lfile ; then
+                AC_MSG_WARN([Branded file $lfile does not exist, using the default one])
+                DEFAULT_BRAND_IMAGES="$DEFAULT_BRAND_IMAGES $lfile"
+            else
+                CUSTOM_BRAND_IMAGES="$CUSTOM_BRAND_IMAGES $lfile"
+            fi
+        done
+        check_for_progress="yes"
+    fi
+fi
+AC_SUBST([BRAND_INTRO_IMAGES])
+AC_SUBST([CUSTOM_BRAND_DIR])
+AC_SUBST([CUSTOM_BRAND_IMAGES])
+AC_SUBST([DEFAULT_BRAND_IMAGES])
+
+
+AC_MSG_CHECKING([for 'intro' progress settings])
+PROGRESSBARCOLOR=
+PROGRESSSIZE=
+PROGRESSPOSITION=
+PROGRESSFRAMECOLOR=
+PROGRESSTEXTCOLOR=
+PROGRESSTEXTBASELINE=
+
+if test "$check_for_progress" = "yes" -a -f "$with_branding/progress.conf" ; then
+    source "$with_branding/progress.conf"
+    AC_MSG_RESULT([settings found in $with_branding/progress.conf])
+else
+    AC_MSG_RESULT([none])
+fi
+
+AC_SUBST(PROGRESSBARCOLOR)
+AC_SUBST(PROGRESSSIZE)
+AC_SUBST(PROGRESSPOSITION)
+AC_SUBST(PROGRESSFRAMECOLOR)
+AC_SUBST(PROGRESSTEXTCOLOR)
+AC_SUBST(PROGRESSTEXTBASELINE)
+
+
+dnl ===================================================================
+dnl Custom build version
+dnl ===================================================================
+AC_MSG_CHECKING([for extra build ID])
+if test -n "$with_extra_buildid" -a "$with_extra_buildid" != "yes" ; then
+    EXTRA_BUILDID="$with_extra_buildid"
+fi
+# in tinderboxes, it is easier to set EXTRA_BUILDID via the environment variable instead of configure switch
+if test -n "$EXTRA_BUILDID" ; then
+    AC_MSG_RESULT([$EXTRA_BUILDID])
+else
+    AC_MSG_RESULT([not set])
+fi
+AC_DEFINE_UNQUOTED([EXTRA_BUILDID], ["$EXTRA_BUILDID"])
+
+OOO_VENDOR=
+AC_MSG_CHECKING([for vendor])
+if test -z "$with_vendor" -o "$with_vendor" = "no"; then
+    OOO_VENDOR="$USERNAME"
+
+    if test -z "$OOO_VENDOR"; then
+        OOO_VENDOR="$USER"
+    fi
+
+    if test -z "$OOO_VENDOR"; then
+        OOO_VENDOR="`id -u -n`"
+    fi
+
+    AC_MSG_RESULT([not set, using $OOO_VENDOR])
+else
+    OOO_VENDOR="$with_vendor"
+    AC_MSG_RESULT([$OOO_VENDOR])
+fi
+AC_DEFINE_UNQUOTED(OOO_VENDOR,"$OOO_VENDOR")
+AC_SUBST(OOO_VENDOR)
+
+if test "$_os" = "Android" ; then
+    ANDROID_PACKAGE_NAME=
+    AC_MSG_CHECKING([for Android package name])
+    if test -z "$with_android_package_name" -o "$with_android_package_name" = "no"; then
+        if test -n "$ENABLE_DEBUG"; then
+            # Default to the package name that makes ndk-gdb happy.
+            ANDROID_PACKAGE_NAME="org.libreoffice"
+        else
+            ANDROID_PACKAGE_NAME="org.example.libreoffice"
+        fi
+
+        AC_MSG_RESULT([not set, using $ANDROID_PACKAGE_NAME])
+    else
+        ANDROID_PACKAGE_NAME="$with_android_package_name"
+        AC_MSG_RESULT([$ANDROID_PACKAGE_NAME])
+    fi
+    AC_SUBST(ANDROID_PACKAGE_NAME)
+fi
+
+AC_MSG_CHECKING([whether to install the compat oo* wrappers])
+if test "$with_compat_oowrappers" = "yes"; then
+    WITH_COMPAT_OOWRAPPERS=TRUE
+    AC_MSG_RESULT(yes)
+else
+    WITH_COMPAT_OOWRAPPERS=
+    AC_MSG_RESULT(no)
+fi
+AC_SUBST(WITH_COMPAT_OOWRAPPERS)
+
+INSTALLDIRNAME=`echo AC_PACKAGE_NAME | $AWK '{print tolower($0)}'`
+AC_MSG_CHECKING([for install dirname])
+if test -n "$with_install_dirname" -a "$with_install_dirname" != "no" -a "$with_install_dirname" != "yes"; then
+    INSTALLDIRNAME="$with_install_dirname"
+fi
+AC_MSG_RESULT([$INSTALLDIRNAME])
+AC_SUBST(INSTALLDIRNAME)
+
+AC_MSG_CHECKING([for prefix])
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+PREFIXDIR="$prefix"
+AC_MSG_RESULT([$PREFIXDIR])
+AC_SUBST(PREFIXDIR)
+
+LIBDIR=[$(eval echo $(eval echo $libdir))]
+AC_SUBST(LIBDIR)
+
+DATADIR=[$(eval echo $(eval echo $datadir))]
+AC_SUBST(DATADIR)
+
+MANDIR=[$(eval echo $(eval echo $mandir))]
+AC_SUBST(MANDIR)
+
+DOCDIR=[$(eval echo $(eval echo $docdir))]
+AC_SUBST(DOCDIR)
+
+BINDIR=[$(eval echo $(eval echo $bindir))]
+AC_SUBST(BINDIR)
+
+INSTALLDIR="$LIBDIR/$INSTALLDIRNAME"
+AC_SUBST(INSTALLDIR)
+
+TESTINSTALLDIR="${BUILDDIR}/test-install"
+AC_SUBST(TESTINSTALLDIR)
+
+
+# ===================================================================
+# OAuth2 id and secrets
+# ===================================================================
+
+AC_MSG_CHECKING([for Google Drive client id and secret])
+if test "$with_gdrive_client_id" = "no" -o -z "$with_gdrive_client_id"; then
+    AC_MSG_RESULT([not set])
+    GDRIVE_CLIENT_ID="\"\""
+    GDRIVE_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    GDRIVE_CLIENT_ID="\"$with_gdrive_client_id\""
+    GDRIVE_CLIENT_SECRET="\"$with_gdrive_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_ID, $GDRIVE_CLIENT_ID)
+AC_DEFINE_UNQUOTED(GDRIVE_CLIENT_SECRET, $GDRIVE_CLIENT_SECRET)
+
+AC_MSG_CHECKING([for Alfresco Cloud client id and secret])
+if test "$with_alfresco_cloud_client_id" = "no" -o -z "$with_alfresco_cloud_client_id"; then
+    AC_MSG_RESULT([not set])
+    ALFRESCO_CLOUD_CLIENT_ID="\"\""
+    ALFRESCO_CLOUD_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    ALFRESCO_CLOUD_CLIENT_ID="\"$with_alfresco_cloud_client_id\""
+    ALFRESCO_CLOUD_CLIENT_SECRET="\"$with_alfresco_cloud_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_ID, $ALFRESCO_CLOUD_CLIENT_ID)
+AC_DEFINE_UNQUOTED(ALFRESCO_CLOUD_CLIENT_SECRET, $ALFRESCO_CLOUD_CLIENT_SECRET)
+
+AC_MSG_CHECKING([for OneDrive client id and secret])
+if test "$with_onedrive_client_id" = "no" -o -z "$with_onedrive_client_id"; then
+    AC_MSG_RESULT([not set])
+    ONEDRIVE_CLIENT_ID="\"\""
+    ONEDRIVE_CLIENT_SECRET="\"\""
+else
+    AC_MSG_RESULT([set])
+    ONEDRIVE_CLIENT_ID="\"$with_onedrive_client_id\""
+    ONEDRIVE_CLIENT_SECRET="\"$with_onedrive_client_secret\""
+fi
+AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_ID, $ONEDRIVE_CLIENT_ID)
+AC_DEFINE_UNQUOTED(ONEDRIVE_CLIENT_SECRET, $ONEDRIVE_CLIENT_SECRET)
+
+
+dnl ===================================================================
+dnl Hook up LibreOffice's nodep environmental variable to automake's equivalent
+dnl --enable-dependency-tracking configure option
+dnl ===================================================================
+AC_MSG_CHECKING([whether to enable dependency tracking])
+if test "$enable_dependency_tracking" = "no"; then
+    nodep=TRUE
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST(nodep)
+
+dnl ===================================================================
+dnl Number of CPUs to use during the build
+dnl ===================================================================
+AC_MSG_CHECKING([for number of processors to use])
+# plain --with-parallelism is just the default
+if test -n "$with_parallelism" -a "$with_parallelism" != "yes"; then
+    if test "$with_parallelism" = "no"; then
+        PARALLELISM=0
+    else
+        PARALLELISM=$with_parallelism
+    fi
+else
+    if test "$enable_icecream" = "yes"; then
+        PARALLELISM="40"
+    else
+        case `uname -s` in
+
+        Darwin|FreeBSD|NetBSD|OpenBSD)
+            PARALLELISM=`sysctl -n hw.ncpu`
+            ;;
+
+        Linux)
+            PARALLELISM=`getconf _NPROCESSORS_ONLN`
+        ;;
+        # what else than above does profit here *and* has /proc?
+        *)
+            PARALLELISM=`grep $'^processor\t*:' /proc/cpuinfo | wc -l`
+            ;;
+        esac
+
+        # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an
+        # unexpected format, 'wc -l' will have returned 0 (and we won't use -j at all).
+    fi
+fi
+
+if test $PARALLELISM -eq 0; then
+    AC_MSG_RESULT([explicit make -j option needed])
+else
+    AC_MSG_RESULT([$PARALLELISM])
+fi
+AC_SUBST(PARALLELISM)
+
+#
+# Set up ILIB for MSVC build
+#
+ILIB1=
+if test "$build_os" = "cygwin" -o "$build_os" = "wsl"; then
+    ILIB="."
+    if test -n "$JAVA_HOME"; then
+        ILIB="$ILIB;$JAVA_HOME/lib"
+    fi
+    ILIB1=-link
+    PathFormat "${COMPATH}/lib/$WIN_HOST_ARCH"
+    ILIB="$ILIB;$formatted_path"
+    ILIB1="$ILIB1 -LIBPATH:$formatted_path"
+    ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$WIN_HOST_ARCH"
+    ILIB1="$ILIB1 -LIBPATH:$WINDOWS_SDK_HOME/lib/$WIN_HOST_ARCH"
+    if test $WINDOWS_SDK_VERSION = 80 -o $WINDOWS_SDK_VERSION = 81 -o $WINDOWS_SDK_VERSION = 10; then
+        ILIB="$ILIB;$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_HOST_ARCH"
+        ILIB1="$ILIB1 -LIBPATH:$WINDOWS_SDK_HOME/lib/$winsdklibsubdir/um/$WIN_HOST_ARCH"
+    fi
+    PathFormat "${UCRTSDKDIR}lib/$UCRTVERSION/ucrt/$WIN_HOST_ARCH"
+    ucrtlibpath_formatted=$formatted_path
+    ILIB="$ILIB;$ucrtlibpath_formatted"
+    ILIB1="$ILIB1 -LIBPATH:$ucrtlibpath_formatted"
+    if test -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then
+        PathFormat "$DOTNET_FRAMEWORK_HOME/lib"
+        ILIB="$ILIB;$formatted_path"
+    else
+        PathFormat "$DOTNET_FRAMEWORK_HOME/Lib/um/$WIN_HOST_ARCH"
+        ILIB="$ILIB;$formatted_path"
+    fi
+
+    if test "$cross_compiling" != "yes"; then
+        ILIB_FOR_BUILD="$ILIB"
+    fi
+fi
+AC_SUBST(ILIB)
+AC_SUBST(ILIB_FOR_BUILD)
+
+AC_MSG_CHECKING([whether $CXX_BASE supports a working C++20 consteval])
+dnl ...that does not suffer from <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96994> "Missing code
+dnl from consteval constructor initializing const variable",
+dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98752> "wrong 'error: ‘this’ is not a constant
+dnl expression' with consteval constructor", <https://bugs.llvm.org/show_bug.cgi?id=50063> "code
+dnl using consteval: 'clang/lib/CodeGen/Address.h:38: llvm::Value*
+dnl clang::CodeGen::Address::getPointer() const: Assertion `isValid()' failed.'" (which should be
+dnl fixed since Clang 14), <https://developercommunity.visualstudio.com/t/1581879> "Bogus error
+dnl C7595 with consteval constructor in ternary expression (/std:c++latest)", or
+dnl <https://github.com/llvm/llvm-project/issues/54612> "C++20, consteval, anonymous union:
+dnl llvm/lib/IR/Instructions.cpp:1491: void llvm::StoreInst::AssertOK(): Assertion
+dnl `cast<PointerType>(getOperand(1)->getType())->isOpaqueOrPointeeTypeMatches(getOperand(0)->getType())
+dnl && "Ptr must be a pointer to Val type!"' failed." (which should be fixed since Clang 17):
+AC_LANG_PUSH([C++])
+save_CXX=$CXX
+if test "$COM" = MSC && test "$COM_IS_CLANG" != TRUE; then
+    CXX="env LIB=$ILIB $CXX"
+fi
+save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="$CXXFLAGS $CXXFLAGS_CXX11"
+AC_RUN_IFELSE([AC_LANG_PROGRAM([
+        struct S {
+            consteval S() { i = 1; }
+            int i = 0;
+        };
+        S const s;
+
+        struct S1 { consteval S1(int) {} };
+        struct S2 {
+            S1 x;
+            S2(): x(0) {}
+        };
+
+        struct S3 {
+            consteval S3() {}
+            union {
+                int a;
+                unsigned b = 0;
+            };
+        };
+        void f() { S3(); }
+
+        struct S4 { consteval S4() = default; };
+        void f4(bool b) { b ? S4() : S4(); }
+
+        struct S5 {
+            consteval S5() { c = 0; }
+            char * f() { return &c; }
+            union {
+                char c;
+                int i;
+            };
+        };
+        auto s5 = S5().f();
+    ], [
+        return (s.i == 1) ? 0 : 1;
+    ])], [
+        AC_DEFINE([HAVE_CPP_CONSTEVAL],[1])
+        AC_MSG_RESULT([yes])
+    ], [AC_MSG_RESULT([no])], [AC_MSG_RESULT([assumed no (cross compiling)])])
+CXX=$save_CXX
+CXXFLAGS=$save_CXXFLAGS
+AC_LANG_POP([C++])
+
+# ===================================================================
+# Creating bigger shared library to link against
+# ===================================================================
+AC_MSG_CHECKING([whether to create huge library])
+MERGELIBS=
+
+if test $_os = iOS -o $_os = Android; then
+    # Never any point in mergelibs for these as we build just static
+    # libraries anyway...
+    enable_mergelibs=no
+fi
+
+if test -n "$enable_mergelibs" -a "$enable_mergelibs" != "no"; then
+    if test $_os != Linux -a $_os != WINNT; then
+        add_warning "--enable-mergelibs is not tested for this platform"
+    fi
+    MERGELIBS="TRUE"
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_MERGELIBS)
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST([MERGELIBS])
+
+dnl ===================================================================
+dnl icerun is a wrapper that stops us spawning tens of processes
+dnl locally - for tools that can't be executed on the compile cluster
+dnl this avoids a dozen javac's ganging up on your laptop to kill it.
+dnl ===================================================================
+AC_MSG_CHECKING([whether to use icerun wrapper])
+ICECREAM_RUN=
+if test "$enable_icecream" = "yes" && which icerun >/dev/null 2>&1 ; then
+    ICECREAM_RUN=icerun
+    AC_MSG_RESULT([yes])
+else
+    AC_MSG_RESULT([no])
+fi
+AC_SUBST(ICECREAM_RUN)
+
+dnl ===================================================================
+dnl Setup the ICECC_VERSION for the build the same way it was set for
+dnl configure, so that CC/CXX and ICECC_VERSION are in sync
+dnl ===================================================================
+x_ICECC_VERSION=[\#]
+if test -n "$ICECC_VERSION" ; then
+    x_ICECC_VERSION=
+fi
+AC_SUBST(x_ICECC_VERSION)
+AC_SUBST(ICECC_VERSION)
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([MPL subset])
+MPL_SUBSET=
+
+if test "$enable_mpl_subset" = "yes"; then
+    warn_report=false
+    if test "$enable_report_builder" != "no" -a "$with_java" != "no"; then
+        warn_report=true
+    elif test "$ENABLE_REPORTBUILDER" = "TRUE"; then
+        warn_report=true
+    fi
+    if test "$warn_report" = "true"; then
+        AC_MSG_ERROR([need to --disable-report-builder - extended database report builder.])
+    fi
+    if test "x$enable_postgresql_sdbc" != "xno"; then
+        AC_MSG_ERROR([need to --disable-postgresql-sdbc - the PostgreSQL database backend.])
+    fi
+    if test "$enable_lotuswordpro" = "yes"; then
+        AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.])
+    fi
+    if test -n "$ENABLE_POPPLER"; then
+        if test "x$SYSTEM_POPPLER" = "x"; then
+            AC_MSG_ERROR([need to disable PDF import via poppler or use system library])
+        fi
+    fi
+    # cf. m4/libo_check_extension.m4
+    if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then
+        AC_MSG_ERROR([need to disable extra extensions '$WITH_EXTRA_EXTENSIONS'])
+    fi
+    for theme in $WITH_THEMES; do
+        case $theme in
+        breeze|breeze_dark|breeze_dark_svg|breeze_svg|elementary|elementary_svg|karasa_jaga|karasa_jaga_svg) #denylist of icon themes under GPL or LGPL
+            AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=colibre]) ;;
+        *) : ;;
+        esac
+    done
+
+    ENABLE_OPENGL_TRANSITIONS=
+
+    if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" = "xTRUE"; then
+        AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.])
+    fi
+
+    MPL_SUBSET="TRUE"
+    AC_DEFINE(MPL_HAVE_SUBSET)
+    AC_MSG_RESULT([only])
+else
+    AC_MSG_RESULT([no restrictions])
+fi
+AC_SUBST(MPL_SUBSET)
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([formula logger])
+ENABLE_FORMULA_LOGGER=
+
+if test "x$enable_formula_logger" = "xyes"; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_FORMULA_LOGGER)
+    ENABLE_FORMULA_LOGGER=TRUE
+elif test -n "$ENABLE_DBGUTIL" ; then
+    AC_MSG_RESULT([yes])
+    AC_DEFINE(ENABLE_FORMULA_LOGGER)
+    ENABLE_FORMULA_LOGGER=TRUE
+else
+    AC_MSG_RESULT([no])
+fi
+
+AC_SUBST(ENABLE_FORMULA_LOGGER)
+
+dnl ===================================================================
+dnl Checking for active Antivirus software.
+dnl ===================================================================
+
+if test $_os = WINNT -a -f "$SRC_ROOT/antivirusDetection.vbs" ; then
+    AC_MSG_CHECKING([for active Antivirus software])
+    PathFormat "$SRC_ROOT/antivirusDetection.vbs"
+    ANTIVIRUS_LIST=`cscript.exe //Nologo ${formatted_path}`
+    if [ [ "$ANTIVIRUS_LIST" != "NULL" ] ]; then
+        if [ [ "$ANTIVIRUS_LIST" != "NOT_FOUND" ] ]; then
+            AC_MSG_RESULT([found])
+            EICAR_STRING='X5O!P%@AP@<:@4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
+            echo $EICAR_STRING > $SRC_ROOT/eicar
+            EICAR_TEMP_FILE_CONTENTS=`cat $SRC_ROOT/eicar`
+            rm $SRC_ROOT/eicar
+            if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+                AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+            fi
+            echo $EICAR_STRING > $BUILDDIR/eicar
+            EICAR_TEMP_FILE_CONTENTS=`cat $BUILDDIR/eicar`
+            rm $BUILDDIR/eicar
+            if [ [ "$EICAR_STRING" != "$EICAR_TEMP_FILE_CONTENTS" ] ]; then
+                AC_MSG_ERROR([Exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST])
+            fi
+            add_warning "To speed up builds and avoid failures in unit tests, it is highly recommended that you exclude the build and source directories associated with LibreOffice in the following Antivirus software: $ANTIVIRUS_LIST"
+        else
+            AC_MSG_RESULT([not found])
+        fi
+    else
+        AC_MSG_RESULT([n/a])
+    fi
+fi
+
+dnl ===================================================================
+
+AC_MSG_CHECKING([for coredumpctl support])
+if test -z "$with_coredumpctl" && test $_os != Linux; then
+    with_coredumpctl=no
+fi
+if test "$with_coredumpctl" = no; then
+    WITH_COREDUMPCTL=
+else
+    AC_PATH_PROG(COREDUMPCTL, coredumpctl)
+    AC_PATH_PROG(JQ, jq)
+    AC_PATH_PROG(SYSTEMD_ESCAPE, systemd-escape)
+    AC_PATH_PROG(SYSTEMD_RUN, systemd-run)
+    if test -z "$COREDUMPCTL" || test -z "$JQ" || test -z "$SYSTEMD_ESCAPE" \
+        || test -z "$SYSTEMD_RUN"
+    then
+        if test -z "$with_coredumpctl"; then
+            WITH_COREDUMPCTL=
+        else
+            if test -z "$COREDUMPCTL"; then
+                AC_MSG_ERROR([coredumpctl not found])
+            fi
+            if test -z "$JQ"; then
+                AC_MSG_ERROR([jq not found])
+            fi
+            if test -z "$SYSTEMD_ESCAPE"; then
+                AC_MSG_ERROR([systemd-escape not found])
+            fi
+            if test -z "$SYSTEMD_RUN"; then
+                AC_MSG_ERROR([systemd-run not found])
+            fi
+        fi
+    else
+        WITH_COREDUMPCTL=TRUE
+    fi
+fi
+if test -z "$WITH_COREDUMPCTL"; then
+    AC_MSG_RESULT([no])
+else
+    AC_MSG_RESULT([yes])
+fi
+AC_SUBST(COREDUMPCTL)
+AC_SUBST(JQ)
+AC_SUBST(SYSTEMD_ESCAPE)
+AC_SUBST(SYSTEMD_RUN)
+AC_SUBST(WITH_COREDUMPCTL)
+
+dnl ===================================================================
+dnl Setting up the environment.
+dnl ===================================================================
+AC_MSG_NOTICE([setting up the build environment variables...])
+
+AC_SUBST(COMPATH)
+
+if test "$build_os" = "cygwin" -o "$build_os" = wsl; then
+    if test -d "$COMPATH/atlmfc/lib/spectre"; then
+        ATL_LIB="$COMPATH/atlmfc/lib/spectre"
+        ATL_INCLUDE="$COMPATH/atlmfc/include"
+    elif test -d "$COMPATH/atlmfc/lib"; then
+        ATL_LIB="$COMPATH/atlmfc/lib"
+        ATL_INCLUDE="$COMPATH/atlmfc/include"
+    else
+        ATL_LIB="$WINDOWS_SDK_HOME/lib" # Doesn't exist for VSE
+        ATL_INCLUDE="$WINDOWS_SDK_HOME/include/atl"
+    fi
+    ATL_LIB="$ATL_LIB/$WIN_HOST_ARCH"
+    ATL_LIB=`win_short_path_for_make "$ATL_LIB"`
+    ATL_INCLUDE=`win_short_path_for_make "$ATL_INCLUDE"`
+fi
+
+if test "$build_os" = "cygwin"; then
+    # sort.exe and find.exe also exist in C:/Windows/system32 so need /usr/bin/
+    PathFormat "/usr/bin/find.exe"
+    FIND="$formatted_path"
+    PathFormat "/usr/bin/sort.exe"
+    SORT="$formatted_path"
+    PathFormat "/usr/bin/grep.exe"
+    WIN_GREP="$formatted_path"
+    PathFormat "/usr/bin/ls.exe"
+    WIN_LS="$formatted_path"
+    PathFormat "/usr/bin/touch.exe"
+    WIN_TOUCH="$formatted_path"
+else
+    FIND=find
+    SORT=sort
+fi
+
+AC_SUBST(ATL_INCLUDE)
+AC_SUBST(ATL_LIB)
+AC_SUBST(FIND)
+AC_SUBST(SORT)
+AC_SUBST(WIN_GREP)
+AC_SUBST(WIN_LS)
+AC_SUBST(WIN_TOUCH)
+
+AC_SUBST(BUILD_TYPE)
+
+AC_SUBST(SOLARINC)
+
+PathFormat "$PERL"
+PERL="$formatted_path"
+AC_SUBST(PERL)
+
+if test -n "$TMPDIR"; then
+    TEMP_DIRECTORY="$TMPDIR"
+else
+    TEMP_DIRECTORY="/tmp"
+fi
+CYGWIN_BASH="C:/cygwin64/bin/bash.exe"
+if test "$build_os" = "cygwin"; then
+    TEMP_DIRECTORY=`cygpath -m "$TEMP_DIRECTORY"`
+    CYGWIN_BASH=`cygpath -m /usr/bin/bash`
+fi
+AC_SUBST(TEMP_DIRECTORY)
+AC_SUBST(CYGWIN_BASH)
+
+# setup the PATH for the environment
+if test -n "$LO_PATH_FOR_BUILD"; then
+    LO_PATH="$LO_PATH_FOR_BUILD"
+    case "$host_os" in
+    cygwin*|wsl*)
+        pathmunge "$MSVC_HOST_PATH" "before"
+        ;;
+    esac
+else
+    LO_PATH="$PATH"
+
+    case "$host_os" in
+
+    dragonfly*|freebsd*|linux-gnu*|*netbsd*|openbsd*)
+        if test "$ENABLE_JAVA" != ""; then
+            pathmunge "$JAVA_HOME/bin" "after"
+        fi
+        ;;
+
+    cygwin*|wsl*)
+        # Win32 make needs native paths
+        if test "$GNUMAKE_WIN_NATIVE" = "TRUE" ; then
+            LO_PATH=`cygpath -p -m "$PATH"`
+        fi
+        if test "$WIN_BUILD_ARCH" = "x64"; then
+            # needed for msi packaging
+            pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/x86" "before"
+        fi
+        if test "$WIN_BUILD_ARCH" = "arm64"; then
+            # needed for msi packaging - as of 10.0.22621 SDK no arm64 ones yet
+            # the x86 ones probably would work just as well...
+            pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/arm" "before"
+        fi
+        # .NET 4.6 and higher don't have bin directory
+        if test -f "$DOTNET_FRAMEWORK_HOME/bin"; then
+            pathmunge "$DOTNET_FRAMEWORK_HOME/bin" "before"
+        fi
+        pathmunge "$WINDOWS_SDK_HOME/bin" "before"
+        pathmunge "$CSC_PATH" "before"
+        pathmunge "$MIDL_PATH" "before"
+        pathmunge "$AL_PATH" "before"
+        pathmunge "$MSVC_MULTI_PATH" "before"
+        pathmunge "$MSVC_BUILD_PATH" "before"
+        if test -n "$MSBUILD_PATH" ; then
+            pathmunge "$MSBUILD_PATH" "before"
+        fi
+        pathmunge "$WINDOWS_SDK_BINDIR_NO_ARCH/$WIN_BUILD_ARCH" "before"
+        if test "$ENABLE_JAVA" != ""; then
+            if test -d "$JAVA_HOME/jre/bin/client"; then
+                pathmunge "$JAVA_HOME/jre/bin/client" "before"
+            fi
+            if test -d "$JAVA_HOME/jre/bin/hotspot"; then
+                pathmunge "$JAVA_HOME/jre/bin/hotspot" "before"
+            fi
+            pathmunge "$JAVA_HOME/bin" "before"
+        fi
+        pathmunge "$MSVC_HOST_PATH" "before"
+        ;;
+
+    solaris*)
+        pathmunge "/usr/css/bin" "before"
+        if test "$ENABLE_JAVA" != ""; then
+            pathmunge "$JAVA_HOME/bin" "after"
+        fi
+        ;;
+    esac
+fi
+
+AC_SUBST(LO_PATH)
+
+# Allow to pass LO_ELFCHECK_ALLOWLIST from autogen.input to bin/check-elf-dynamic-objects:
+if test "$LO_ELFCHECK_ALLOWLIST" = x || test "${LO_ELFCHECK_ALLOWLIST-x}" != x; then
+    x_LO_ELFCHECK_ALLOWLIST=
+else
+    x_LO_ELFCHECK_ALLOWLIST=[\#]
+fi
+AC_SUBST(x_LO_ELFCHECK_ALLOWLIST)
+AC_SUBST(LO_ELFCHECK_ALLOWLIST)
+
+libo_FUZZ_SUMMARY
+
+# Generate a configuration sha256 we can use for deps
+if test -f config_host.mk; then
+    config_sha256=`$SHA256SUM config_host.mk | sed "s/ .*//"`
+fi
+if test -f config_host_lang.mk; then
+    config_lang_sha256=`$SHA256SUM config_host_lang.mk | sed "s/ .*//"`
+fi
+
+CFLAGS=$my_original_CFLAGS
+CXXFLAGS=$my_original_CXXFLAGS
+CPPFLAGS=$my_original_CPPFLAGS
+
+AC_CONFIG_LINKS([include:include])
+
+# Keep in sync with list of files far up, at AC_MSG_CHECKING([for
+# BUILD platform configuration] - otherwise breaks cross building
+AC_CONFIG_FILES([config_host.mk
+                 config_host_lang.mk
+                 Makefile
+                 lo.xcent
+                 bin/bffvalidator.sh
+                 bin/odfvalidator.sh
+                 bin/officeotron.sh
+                 hardened_runtime.xcent
+                 instsetoo_native/util/openoffice.lst
+                 sysui/desktop/macosx/Info.plist
+                 vs-code.code-workspace.template:.vscode/vs-code-template.code-workspace.in])
+
+AC_CONFIG_HEADERS([config_host/config_buildconfig.h])
+AC_CONFIG_HEADERS([config_host/config_buildid.h])
+AC_CONFIG_HEADERS([config_host/config_box2d.h])
+AC_CONFIG_HEADERS([config_host/config_clang.h])
+AC_CONFIG_HEADERS([config_host/config_crypto.h])
+AC_CONFIG_HEADERS([config_host/config_dconf.h])
+AC_CONFIG_HEADERS([config_host/config_eot.h])
+AC_CONFIG_HEADERS([config_host/config_extensions.h])
+AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
+AC_CONFIG_HEADERS([config_host/config_cxxabi.h])
+AC_CONFIG_HEADERS([config_host/config_dbus.h])
+AC_CONFIG_HEADERS([config_host/config_features.h])
+AC_CONFIG_HEADERS([config_host/config_feature_desktop.h])
+AC_CONFIG_HEADERS([config_host/config_feature_opencl.h])
+AC_CONFIG_HEADERS([config_host/config_firebird.h])
+AC_CONFIG_HEADERS([config_host/config_folders.h])
+AC_CONFIG_HEADERS([config_host/config_fonts.h])
+AC_CONFIG_HEADERS([config_host/config_fuzzers.h])
+AC_CONFIG_HEADERS([config_host/config_gio.h])
+AC_CONFIG_HEADERS([config_host/config_global.h])
+AC_CONFIG_HEADERS([config_host/config_gpgme.h])
+AC_CONFIG_HEADERS([config_host/config_java.h])
+AC_CONFIG_HEADERS([config_host/config_langs.h])
+AC_CONFIG_HEADERS([config_host/config_lgpl.h])
+AC_CONFIG_HEADERS([config_host/config_libcxx.h])
+AC_CONFIG_HEADERS([config_host/config_liblangtag.h])
+AC_CONFIG_HEADERS([config_host/config_locales.h])
+AC_CONFIG_HEADERS([config_host/config_mpl.h])
+AC_CONFIG_HEADERS([config_host/config_oox.h])
+AC_CONFIG_HEADERS([config_host/config_options.h])
+AC_CONFIG_HEADERS([config_host/config_options_calc.h])
+AC_CONFIG_HEADERS([config_host/config_zxing.h])
+AC_CONFIG_HEADERS([config_host/config_skia.h])
+AC_CONFIG_HEADERS([config_host/config_typesizes.h])
+AC_CONFIG_HEADERS([config_host/config_validation.h])
+AC_CONFIG_HEADERS([config_host/config_vendor.h])
+AC_CONFIG_HEADERS([config_host/config_vcl.h])
+AC_CONFIG_HEADERS([config_host/config_vclplug.h])
+AC_CONFIG_HEADERS([config_host/config_version.h])
+AC_CONFIG_HEADERS([config_host/config_oauth2.h])
+AC_CONFIG_HEADERS([config_host/config_poppler.h])
+AC_CONFIG_HEADERS([config_host/config_python.h])
+AC_CONFIG_HEADERS([config_host/config_writerperfect.h])
+AC_CONFIG_HEADERS([config_host/config_wasm_strip.h])
+AC_CONFIG_HEADERS([solenv/lockfile/autoconf.h])
+AC_OUTPUT
+
+if test "$CROSS_COMPILING" = TRUE; then
+    (echo; echo export BUILD_TYPE_FOR_HOST=$BUILD_TYPE) >>config_build.mk
+fi
+
+# touch the config timestamp file
+if test ! -f config_host.mk.stamp; then
+    echo > config_host.mk.stamp
+elif test "$config_sha256" = `$SHA256SUM config_host.mk | sed "s/ .*//"`; then
+    echo "Host Configuration unchanged - avoiding scp2 stamp update"
+else
+    echo > config_host.mk.stamp
+fi
+
+# touch the config lang timestamp file
+if test ! -f config_host_lang.mk.stamp; then
+    echo > config_host_lang.mk.stamp
+elif test "$config_lang_sha256" = `$SHA256SUM config_host_lang.mk | sed "s/ .*//"`; then
+    echo "Language Configuration unchanged - avoiding scp2 stamp update"
+else
+    echo > config_host_lang.mk.stamp
+fi
+
+
+if test \( "$STALE_MAKE" = "TRUE" \) \
+        -a "$build_os" = "cygwin"; then
+
+cat << _EOS
+****************************************************************************
+WARNING:
+Your make version is known to be horribly slow, and hard to debug
+problems with. To get a reasonably functional make please do:
+
+to install a pre-compiled binary make for Win32
+
+ mkdir -p /opt/lo/bin
+ cd /opt/lo/bin
+ wget https://dev-www.libreoffice.org/bin/cygwin/make-4.2.1-msvc.exe
+ cp make-4.2.1-msvc.exe make
+ chmod +x make
+
+to install from source:
+place yourself in a working directory of you choice.
+
+ git clone git://git.savannah.gnu.org/make.git
+
+ [go to Start menu, open "Visual Studio 2019" or "Visual Studio 2022", and then click "x86 Native Tools Command Prompt" or "x64 Native Tools Command Prompt"]
+ set PATH=%PATH%;C:\Cygwin\bin
+ [or Cygwin64, if that is what you have]
+ cd path-to-make-repo-you-cloned-above
+ build_w32.bat --without-guile
+
+should result in a WinRel/gnumake.exe.
+Copy it to the Cygwin /opt/lo/bin directory as make.exe
+
+Then re-run autogen.sh
+
+Note: autogen.sh will try to use /opt/lo/bin/make if the environment variable GNUMAKE is not already defined.
+Alternatively, you can install the 'new' make where ever you want and make sure that `which make` finds it.
+
+_EOS
+fi
+
+
+cat << _EOF
+****************************************************************************
+
+To show information on various make targets and make flags, run:
+$GNUMAKE help
+
+To just build, run:
+$GNUMAKE
+
+_EOF
+
+if test $_os != WINNT -a "$CROSS_COMPILING" != TRUE; then
+    cat << _EOF
+After the build has finished successfully, you can immediately run what you built using the command:
+_EOF
+
+    if test $_os = Darwin; then
+        echo open instdir/$PRODUCTNAME_WITHOUT_SPACES.app
+    else
+        echo instdir/program/soffice
+    fi
+    cat << _EOF
+
+If you want to run the unit tests, run:
+$GNUMAKE check
+
+_EOF
+fi
+
+if test -s "$WARNINGS_FILE_FOR_BUILD"; then
+    echo "BUILD / cross-toolset config, repeated ($WARNINGS_FILE_FOR_BUILD)"
+    cat "$WARNINGS_FILE_FOR_BUILD"
+    echo
+fi
+
+if test -s "$WARNINGS_FILE"; then
+    echo "HOST config ($WARNINGS_FILE)"
+    cat "$WARNINGS_FILE"
+fi
+
+# Remove unneeded emconfigure artifacts
+rm -f a.out a.wasm a.out.js a.out.wasm
+
+dnl vim:set shiftwidth=4 softtabstop=4 expandtab:
Index: libreoffice/create-7.6.2.1-odk-idl-patch/create.patch.sh
===================================================================
--- libreoffice/create-7.6.2.1-odk-idl-patch/create.patch.sh	(nonexistent)
+++ libreoffice/create-7.6.2.1-odk-idl-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=7.6.2.1
+
+tar --files-from=file.list -xJvf ../libreoffice-$VERSION.tar.xz
+mv libreoffice-$VERSION libreoffice-$VERSION-orig
+
+cp -rf ./libreoffice-$VERSION-new ./libreoffice-$VERSION
+
+diff --unified -Nr  libreoffice-$VERSION-orig  libreoffice-$VERSION > libreoffice-$VERSION-odk-idl.patch
+
+mv libreoffice-$VERSION-odk-idl.patch ../patches
+
+rm -rf ./libreoffice-$VERSION
+rm -rf ./libreoffice-$VERSION-orig

Property changes on: libreoffice/create-7.6.2.1-odk-idl-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/create-7.6.2.1-odk-idl-patch/file.list
===================================================================
--- libreoffice/create-7.6.2.1-odk-idl-patch/file.list	(nonexistent)
+++ libreoffice/create-7.6.2.1-odk-idl-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+libreoffice-7.6.2.1/bin/distro-install-sdk
Index: libreoffice/create-7.6.2.1-odk-idl-patch/libreoffice-7.6.2.1-new/bin/distro-install-sdk
===================================================================
--- libreoffice/create-7.6.2.1-odk-idl-patch/libreoffice-7.6.2.1-new/bin/distro-install-sdk	(nonexistent)
+++ libreoffice/create-7.6.2.1-odk-idl-patch/libreoffice-7.6.2.1-new/bin/distro-install-sdk	(revision 385)
@@ -0,0 +1,86 @@
+#!/bin/sh
+
+if test -z "${SRC_ROOT}"; then
+    echo "distro-install-clean-up: No environment set!"
+    exit 1
+fi
+
+if test -d $DESTDIR$INSTALLDIR/sdk ; then
+
+    echo "SDK installation clean up"
+
+    # bin potential .orig files
+    find $DESTDIR$INSTALLDIR/sdk -name "*.orig" -exec rm -f {} \;
+
+    # move some SDK directories to the right place according to FHS
+    # note that examples must stay in $DESTDIR$INSTALLDIR/sdk because there are used
+    # relative paths to $DESTDIR$INSTALLDIR/sdk/setting and it does not work via
+    # a symlink
+    mkdir -p $DESTDIR$PREFIXDIR/include
+    mkdir -p $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+    mkdir -p $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk
+    mkdir -p $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/sdk/include      $DESTDIR$PREFIXDIR/include/$INSTALLDIRNAME
+    if [ -d $DESTDIR$INSTALLDIR/sdk/classes ]; then
+        mv $DESTDIR$INSTALLDIR/sdk/classes      $DESTDIR$DATADIR/$INSTALLDIRNAME/sdk/classes
+    fi
+    if [ -d $DESTDIR$INSTALLDIR/sdk/idl ]; then
+        mv $DESTDIR$INSTALLDIR/sdk/idl          $DESTDIR$DATADIR/idl/$INSTALLDIRNAME
+    fi
+    mv $DESTDIR$INSTALLDIR/sdk/docs         $DESTDIR$DOCDIR/sdk
+    mv $DESTDIR$INSTALLDIR/sdk/share/readme $DESTDIR$DOCDIR/sdk/readme
+    mv $DESTDIR$INSTALLDIR/sdk/index.html   $DESTDIR$DOCDIR/sdk
+
+    # compat symlinks
+    ln -sf $PREFIXDIR/include/$INSTALLDIRNAME                        $DESTDIR$INSTALLDIR/sdk/include
+    ln -sf $DATADIR/$INSTALLDIRNAME/sdk/classes                      $DESTDIR$INSTALLDIR/sdk/classes
+    ln -sf $DATADIR/idl/$INSTALLDIRNAME                              $DESTDIR$INSTALLDIR/sdk/idl
+    ln -sf $DOCDIR/sdk/docs                                          $DESTDIR$INSTALLDIR/sdk/
+    ln -sf $DOCDIR/sdk/index.html                                    $DESTDIR$INSTALLDIR/sdk/index.html
+    ln -sf $INSTALLDIR/sdk/examples         $DESTDIR$DOCDIR/sdk/examples
+
+    # fix file list
+    sed -e "s|^\(%dir \)\?$INSTALLDIR/sdk/include|\1$PREFIXDIR/include/$INSTALLDIRNAME|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/classes|\1$DATADIR/$INSTALLDIRNAME/sdk/classes|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/idl|\1$DATADIR/idl/$INSTALLDIRNAME|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/docs|\1$DOCDIR/sdk/docs|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share/readme|\1$DOCDIR/sdk/readme|" \
+	-e "s|^$INSTALLDIR/sdk/index.html$|$DOCDIR/sdk/index.html|" \
+	-e "s|^\(%dir \)\?$INSTALLDIR/sdk/share.*$||" \
+	-e "/\.orig$/D" \
+	-e "/^$/D" \
+	$DESTDIR/gid_Module_Root_SDK | sort -u \
+	>$DESTDIR/gid_Module_Root_SDK.new
+    mv $DESTDIR/gid_Module_Root_SDK.new $DESTDIR/gid_Module_Root_SDK
+    #
+    echo "%dir $DATADIR/$INSTALLDIRNAME/sdk"                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/$INSTALLDIRNAME"                        >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DATADIR/idl"                                    >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk/docs"                                >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR/sdk"                                     >>$DESTDIR/gid_Module_Root_SDK
+    echo "%dir $DOCDIR"                                         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/include"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/classes"     >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/idl"         >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/docs"        >>$DESTDIR/gid_Module_Root_SDK
+    echo "$INSTALLDIR/sdk/index.html"  >>$DESTDIR/gid_Module_Root_SDK
+    echo "$DOCDIR/sdk/examples"                                 >>$DESTDIR/gid_Module_Root_SDK
+
+    # generate default profiles
+    sed -e "s,@OO_SDK_NAME@,libreoffice${PRODUCTVERSION}_sdk," \
+        -e "s,@OO_SDK_HOME@,$INSTALLDIR/sdk," \
+        -e "s,@OFFICE_HOME@,$INSTALLDIR," \
+        -e "s,@OO_SDK_MAKE_HOME@,$(dirname $(command -v make))," \
+        -e "s,@OO_SDK_ZIP_HOME@,$(dirname $(command -v zip))," \
+        -e "s,@OO_SDK_CPP_HOME@,$(dirname $(command -v cpp))," \
+        -e "s,@OO_SDK_SED_HOME@,$(dirname $(command -v sed))," \
+        -e "s,@OO_SDK_CAT_HOME@,$(dirname $(command -v cat))," \
+        -e "s,@OO_SDK_JAVA_HOME@,$JAVA_HOME," \
+        -e "s,@OO_SDK_OUTPUT_DIR@,\$HOME," \
+        -e "s,@SDK_AUTO_DEPLOYMENT@,NO," \
+            $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh.in \
+        > $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh
+    chmod 755 $DESTDIR$INSTALLDIR/sdk/setsdkenv_unix.sh
+    echo $INSTALLDIR/sdk/setsdkenv_unix.sh >>$DESTDIR/gid_Module_Root_SDK
+
+fi

Property changes on: libreoffice/create-7.6.2.1-odk-idl-patch/libreoffice-7.6.2.1-new/bin/distro-install-sdk
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: libreoffice/patches/README
===================================================================
--- libreoffice/patches/README	(nonexistent)
+++ libreoffice/patches/README	(revision 385)
@@ -0,0 +1,18 @@
+
+/* begin *
+
+   libreoffice-24.2.0.3-isystem.patch - Do not use -isystem option for system includes.
+
+   libreoffice-24.2.0.3-odk-idl.patch - The SDK no longer ships an idl/ sub-directory
+                                        containing the udkap and offapi .idl files (as,
+                                        unlike idlc, unoidl-write does not need them).
+                                        odk/config/cfgWin.js had to be adapted to look
+                                        (somewhat arbitrarily) for an examples/
+                                        sub-directory instead of idl/ when checking for
+                                        'an sdk folder'.  gb_UnoApi_package_idlfiles
+                                        became unused and has been removed.
+   See:
+   ---
+   https://wiki.documentfoundation.org/ReleaseNotes/7.5#Feature_Removal_/_Deprecation
+
+ * end */
Index: libreoffice/patches
===================================================================
--- libreoffice/patches	(nonexistent)
+++ libreoffice/patches	(revision 385)

Property changes on: libreoffice/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libreoffice
===================================================================
--- libreoffice	(nonexistent)
+++ libreoffice	(revision 385)

Property changes on: libreoffice
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libspiro/Makefile
===================================================================
--- libspiro/Makefile	(nonexistent)
+++ libspiro/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libspiro
+
+versions    = 20221101
+pkgname     = libspiro
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libspiro
===================================================================
--- libspiro	(nonexistent)
+++ libspiro	(revision 385)

Property changes on: libspiro
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libwmf/Makefile
===================================================================
--- libwmf/Makefile	(nonexistent)
+++ libwmf/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libwmf
+
+versions    = 0.2.13
+pkgname     = libwmf
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libwmf
===================================================================
--- libwmf	(nonexistent)
+++ libwmf	(revision 385)

Property changes on: libwmf
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libwpe/Makefile
===================================================================
--- libwpe/Makefile	(nonexistent)
+++ libwpe/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libwpe
+
+versions    = 1.14.1
+pkgname     = libwpe
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libwpe
===================================================================
--- libwpe	(nonexistent)
+++ libwpe	(revision 385)

Property changes on: libwpe
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: libxklavier/Makefile
===================================================================
--- libxklavier/Makefile	(nonexistent)
+++ libxklavier/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/libxklavier
+
+versions    = 5.4
+pkgname     = libxklavier
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: libxklavier
===================================================================
--- libxklavier	(nonexistent)
+++ libxklavier	(revision 385)

Property changes on: libxklavier
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: lightdm/Makefile
===================================================================
--- lightdm/Makefile	(nonexistent)
+++ lightdm/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: lightdm/lightdm/Makefile
===================================================================
--- lightdm/lightdm/Makefile	(nonexistent)
+++ lightdm/lightdm/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/lightdm/lightdm
+
+versions    = 1.32.0
+pkgname     = lightdm
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: lightdm/lightdm
===================================================================
--- lightdm/lightdm	(nonexistent)
+++ lightdm/lightdm	(revision 385)

Property changes on: lightdm/lightdm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: lightdm/lightdm-gtk-greeter/Makefile
===================================================================
--- lightdm/lightdm-gtk-greeter/Makefile	(nonexistent)
+++ lightdm/lightdm-gtk-greeter/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/lightdm/lightdm-gtk-greeter
+
+versions    = 2.0.8
+pkgname     = lightdm-gtk-greeter
+suffix      = tar.gz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: lightdm/lightdm-gtk-greeter
===================================================================
--- lightdm/lightdm-gtk-greeter	(nonexistent)
+++ lightdm/lightdm-gtk-greeter	(revision 385)

Property changes on: lightdm/lightdm-gtk-greeter
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: lightdm
===================================================================
--- lightdm	(nonexistent)
+++ lightdm	(revision 385)

Property changes on: lightdm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: lxmenu-data/Makefile
===================================================================
--- lxmenu-data/Makefile	(nonexistent)
+++ lxmenu-data/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/lxmenu-data
+
+versions    = 0.1.5
+pkgname     = lxmenu-data
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: lxmenu-data
===================================================================
--- lxmenu-data	(nonexistent)
+++ lxmenu-data	(revision 385)

Property changes on: lxmenu-data
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: menu-cache/Makefile
===================================================================
--- menu-cache/Makefile	(nonexistent)
+++ menu-cache/Makefile	(revision 385)
@@ -0,0 +1,58 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/menu-cache
+
+versions    = 1.1.0
+pkgname     = menu-cache
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/menu-cache-1.1.0-gcc10.patch
+patches    += $(CURDIR)/patches/menu-cache-1.1.0-memory-leaks.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-1.1.0-gcc10-patch        ; ./create.patch.sh ) ; \
+	 ( cd create-1.1.0-memory-leaks-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: menu-cache/create-1.1.0-gcc10-patch/create.patch.sh
===================================================================
--- menu-cache/create-1.1.0-gcc10-patch/create.patch.sh	(nonexistent)
+++ menu-cache/create-1.1.0-gcc10-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.1.0
+
+tar --files-from=file.list -xJvf ../menu-cache-$VERSION.tar.xz
+mv menu-cache-$VERSION menu-cache-$VERSION-orig
+
+cp -rf ./menu-cache-$VERSION-new ./menu-cache-$VERSION
+
+diff --unified -Nr  menu-cache-$VERSION-orig  menu-cache-$VERSION > menu-cache-$VERSION-gcc10.patch
+
+mv menu-cache-$VERSION-gcc10.patch ../patches
+
+rm -rf ./menu-cache-$VERSION
+rm -rf ./menu-cache-$VERSION-orig

Property changes on: menu-cache/create-1.1.0-gcc10-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: menu-cache/create-1.1.0-gcc10-patch/file.list
===================================================================
--- menu-cache/create-1.1.0-gcc10-patch/file.list	(nonexistent)
+++ menu-cache/create-1.1.0-gcc10-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+menu-cache-1.1.0/menu-cache-gen/menu-tags.h
Index: menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h
===================================================================
--- menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h	(nonexistent)
+++ menu-cache/create-1.1.0-gcc10-patch/menu-cache-1.1.0-new/menu-cache-gen/menu-tags.h	(revision 385)
@@ -0,0 +1,163 @@
+/*
+ *      Copyright 2014 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
+ *
+ *      This file is a part of libmenu-cache package and created program
+ *      should be not used without the library.
+ *
+ *      This library is free software; you can redistribute it and/or
+ *      modify it under the terms of the GNU Lesser General Public
+ *      License as published by the Free Software Foundation; either
+ *      version 2.1 of the License, or (at your option) any later version.
+ *
+ *      This library is distributed in the hope that it will be useful,
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *      Lesser General Public License for more details.
+ *
+ *      You should have received a copy of the GNU Lesser General Public
+ *      License along with this library; if not, write to the Free Software
+ *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include <libfm/fm-extra.h>
+#include <menu-cache.h>
+
+extern FmXmlFileTag menuTag_AppDir;
+extern FmXmlFileTag menuTag_DirectoryDir;
+extern FmXmlFileTag menuTag_Include;
+extern FmXmlFileTag menuTag_Exclude;
+extern FmXmlFileTag menuTag_Filename;
+extern FmXmlFileTag menuTag_Or;
+extern FmXmlFileTag menuTag_And;
+extern FmXmlFileTag menuTag_Not;
+extern FmXmlFileTag menuTag_Category;
+extern FmXmlFileTag menuTag_All;
+extern FmXmlFileTag menuTag_LegacyDir;
+
+typedef enum {
+    MERGE_NONE, /* starting value */
+    MERGE_FILES, /* first set */
+    MERGE_MENUS,
+    MERGE_ALL, /* only set */
+    MERGE_FILES_MENUS, /* second set */
+    MERGE_MENUS_FILES
+} MenuMergeType;
+
+typedef struct {
+    MenuCacheType type : 2; /* used by MenuMenu, MENU_CACHE_TYPE_DIR */
+    gboolean only_unallocated : 1; /* for Menuname: TRUE if show_empty is set */
+    gboolean is_set : 1; /* used by MenuMenu, for Menuname: TRUE if allow_inline is set */
+    gboolean show_empty : 1;
+    gboolean allow_inline : 1;
+    gboolean inline_header : 1;
+    gboolean inline_alias : 1;
+    gboolean inline_header_is_set : 1; /* for Menuname */
+    gboolean inline_alias_is_set : 1; /* for Menuname */
+    gboolean inline_limit_is_set : 1; /* for Menuname; for MenuMenu is Legacy mark */
+    gboolean nodisplay : 1;
+    GList *items; /* items are MenuItem : Menuname or Filename or Separator or Merge */
+    int inline_limit;
+} MenuLayout;
+
+/* Menuname item */
+typedef struct {
+    MenuLayout layout;
+    char *name;
+} MenuMenuname;
+
+/* Filename item in layout */
+typedef struct {
+    MenuCacheType type : 2; /* MENU_CACHE_TYPE_APP */
+    char *id;
+} MenuFilename;
+
+/* Separator item */
+typedef struct {
+    MenuCacheType type : 2; /* MENU_CACHE_TYPE_SEP */
+} MenuSep;
+
+/* Merge item */
+typedef struct {
+    MenuCacheType type : 2; /* MENU_CACHE_TYPE_NONE */
+    MenuMergeType merge_type;
+} MenuMerge;
+
+/* Menu item */
+typedef struct {
+    MenuLayout layout; /* copied from hash on </Menu> */
+    char *name;
+    /* next fields are only for Menu */
+    char *key; /* for sorting */
+    GList *id; /* <Directory> for <Menu>, may be NULL, first is most relevant */
+    /* next fields are only for composer */
+    GList *children; /* items are MenuItem : MenuApp, MenuMenu, MenuSep, MenuRule */
+    char *title;
+    char *comment;
+    char *icon;
+    const char *dir;
+} MenuMenu;
+
+/* File item in menu */
+typedef struct {
+    MenuCacheType type : 2; /* MENU_CACHE_TYPE_APP */
+    gboolean excluded : 1;
+    gboolean allocated : 1;
+    gboolean matched : 1;
+    gboolean use_terminal : 1;
+    gboolean use_notification : 1;
+    gboolean hidden : 1;
+    GList *dirs; /* can be reordered until allocated */
+    GList *menus;
+    char *filename; /* if NULL then is equal to id */
+    char *key; /* for sorting */
+    char *id;
+    char *title;
+    char *comment;
+    char *icon;
+    char *generic_name;
+    char *exec;
+    char *try_exec;
+    char *wd;
+    const char **categories; /* all char ** keep interned values */
+    const char **keywords;
+    const char **show_in;
+    const char **hide_in;
+} MenuApp;
+
+/* a placeholder for matching */
+typedef struct {
+    MenuCacheType type : 2; /* MENU_CACHE_TYPE_NONE */
+    FmXmlFileItem *rule;
+} MenuRule;
+
+/* requested language(s) */
+extern char **languages;
+
+/* list of menu files to monitor */
+extern GSList *MenuFiles;
+
+/* list of menu dirs to monitor */
+extern GSList *MenuDirs;
+
+/* list of available app dirs */
+extern GSList *AppDirs;
+
+/* list of available dir dirs */
+extern GSList *DirDirs;
+
+/* parse and merge menu files */
+MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error);
+
+/* parse all files into layout and save cache file */
+gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *file,
+                         gboolean with_hidden);
+
+/* free MenuLayout data */
+void _free_layout_items(GList *data);
+
+/* verbosity level */
+extern gint verbose;
+
+#define DBG if (verbose) g_debug
+#define VDBG if (verbose > 1) g_debug
+#define VVDBG if (verbose > 2) g_debug
Index: menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh
===================================================================
--- menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh	(nonexistent)
+++ menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.1.0
+
+tar --files-from=file.list -xJvf ../menu-cache-$VERSION.tar.xz
+mv menu-cache-$VERSION menu-cache-$VERSION-orig
+
+cp -rf ./menu-cache-$VERSION-new ./menu-cache-$VERSION
+
+diff --unified -Nr  menu-cache-$VERSION-orig  menu-cache-$VERSION > menu-cache-$VERSION-memory-leaks.patch
+
+mv menu-cache-$VERSION-memory-leaks.patch ../patches
+
+rm -rf ./menu-cache-$VERSION
+rm -rf ./menu-cache-$VERSION-orig

Property changes on: menu-cache/create-1.1.0-memory-leaks-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: menu-cache/create-1.1.0-memory-leaks-patch/file.list
===================================================================
--- menu-cache/create-1.1.0-memory-leaks-patch/file.list	(nonexistent)
+++ menu-cache/create-1.1.0-memory-leaks-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+menu-cache-1.1.0/libmenu-cache/menu-cache.c
Index: menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c
===================================================================
--- menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c	(nonexistent)
+++ menu-cache/create-1.1.0-memory-leaks-patch/menu-cache-1.1.0-new/libmenu-cache/menu-cache.c	(revision 385)
@@ -0,0 +1,2261 @@
+/*
+ *      menu-cache.c
+ *
+ *      Copyright 2008 PCMan <pcman.tw@gmail.com>
+ *      Copyright 2009 Jürgen Hötzel <juergen@archlinux.org>
+ *      Copyright 2012-2017 Andriy Grytsenko (LStranger) <andrej@rep.kiev.ua>
+ *
+ *      This library is free software; you can redistribute it and/or
+ *      modify it under the terms of the GNU Lesser General Public
+ *      License as published by the Free Software Foundation; either
+ *      version 2.1 of the License, or (at your option) any later version.
+ *
+ *      This library is distributed in the hope that it will be useful,
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *      Lesser General Public License for more details.
+ *
+ *      You should have received a copy of the GNU Lesser General Public
+ *      License along with this library; if not, write to the Free Software
+ *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include "version.h"
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <time.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+#include <sys/fcntl.h>
+#include <errno.h>
+#include <sys/wait.h>
+
+#include <gio/gio.h>
+
+#include "menu-cache.h"
+
+#ifdef G_ENABLE_DEBUG
+#define DEBUG(...)  g_debug(__VA_ARGS__)
+#else
+#define DEBUG(...)
+#endif
+
+#if GLIB_CHECK_VERSION(2, 32, 0)
+static GRecMutex _cache_lock;
+#  define MENU_CACHE_LOCK       g_rec_mutex_lock(&_cache_lock)
+#  define MENU_CACHE_UNLOCK     g_rec_mutex_unlock(&_cache_lock)
+/* for sync lookup */
+static GMutex sync_run_mutex;
+static GCond sync_run_cond;
+#define SET_CACHE_READY(_cache_) do { \
+    g_mutex_lock(&sync_run_mutex); \
+    _cache_->ready = TRUE; \
+    g_cond_broadcast(&sync_run_cond); \
+    g_mutex_unlock(&sync_run_mutex); } while(0)
+#else
+/* before 2.32 GLib had another entity for statically allocated mutexes */
+static GStaticRecMutex _cache_lock = G_STATIC_REC_MUTEX_INIT;
+#  define MENU_CACHE_LOCK       g_static_rec_mutex_lock(&_cache_lock)
+#  define MENU_CACHE_UNLOCK     g_static_rec_mutex_unlock(&_cache_lock)
+/* for sync lookup */
+static GMutex *sync_run_mutex = NULL;
+static GCond *sync_run_cond = NULL;
+#define SET_CACHE_READY(_cache_) do { \
+    g_mutex_lock(sync_run_mutex); \
+    _cache_->ready = TRUE; \
+    if(sync_run_cond) g_cond_broadcast(sync_run_cond); \
+    g_mutex_unlock(sync_run_mutex); } while(0)
+#endif
+
+typedef struct
+{
+    char *dir;
+    gint n_ref;
+} MenuCacheFileDir;
+
+struct _MenuCacheItem
+{
+    guint n_ref;
+    MenuCacheType type;
+    char* id;
+    char* name;
+    char* comment;
+    char* icon;
+    MenuCacheFileDir* file_dir;
+    char* file_name;
+    MenuCacheDir* parent;
+};
+
+struct _MenuCacheDir
+{
+    MenuCacheItem item;
+    GSList* children;
+    guint32 flags;
+};
+
+struct _MenuCacheApp
+{
+    MenuCacheItem item;
+    char* generic_name;
+    char* exec;
+    char* working_dir;
+    guint32 show_in_flags;
+    guint32 flags;
+    char* try_exec;
+    const char **categories;
+    char* keywords;
+};
+
+struct _MenuCache
+{
+    guint n_ref;
+    MenuCacheDir* root_dir;
+    char* menu_name;
+    char* reg; /* includes md5 sum */
+    char* md5; /* link inside of reg */
+    char* cache_file;
+    char** known_des;
+    GSList* notifiers;
+    GThread* thr;
+    GCancellable* cancellable;
+    guint version;
+    guint reload_id;
+    gboolean ready : 1; /* used for sync access */
+};
+
+static int server_fd = -1;
+G_LOCK_DEFINE(connect); /* for server_fd */
+
+static GHashTable* hash = NULL;
+
+/* Don't call this API directly. Use menu_cache_lookup instead. */
+static MenuCache* menu_cache_new( const char* cache_file );
+
+static gboolean connect_server(GCancellable* cancellable);
+static gboolean register_menu_to_server(MenuCache* cache);
+static void unregister_menu_from_server( MenuCache* cache );
+
+/* keep them for backward compatibility */
+#ifdef G_DISABLE_DEPRECATED
+MenuCacheDir* menu_cache_get_root_dir( MenuCache* cache );
+MenuCacheDir* menu_cache_item_get_parent( MenuCacheItem* item );
+MenuCacheDir* menu_cache_get_dir_from_path( MenuCache* cache, const char* path );
+GSList* menu_cache_dir_get_children( MenuCacheDir* dir );
+#endif
+
+void menu_cache_init(int flags)
+{
+#if !GLIB_CHECK_VERSION(2, 36, 0)
+    g_type_init();
+#endif
+}
+
+static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache,
+                                MenuCacheFileDir** all_used_files, int n_all_used_files);
+
+/* functions read_dir(), read_app(), and read_item() should be called for
+   items that aren't accessible yet, therefore no lock is required */
+static void read_dir(GDataInputStream* f, MenuCacheDir* dir, MenuCache* cache,
+                     MenuCacheFileDir** all_used_files, int n_all_used_files)
+{
+    MenuCacheItem* item;
+    char *line;
+    gsize len;
+
+    /* nodisplay flag */
+    if (cache->version >= 2)
+    {
+        line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+        if (G_UNLIKELY(line == NULL))
+            return;
+        dir->flags = (guint32)atoi(line);
+        g_free(line);
+    }
+
+    /* load child items in the dir */
+    while( (item = read_item( f, cache, all_used_files, n_all_used_files )) )
+    {
+        /* menu_cache_ref shouldn't be called here for dir.
+         * Otherwise, circular reference will happen. */
+        item->parent = dir;
+        dir->children = g_slist_prepend( dir->children, item );
+    }
+
+    dir->children = g_slist_reverse( dir->children );
+
+    /* set flag by children if working with old cache generator */
+    if (cache->version == 1)
+    {
+        if (dir->children == NULL)
+            dir->flags = FLAG_IS_NODISPLAY;
+        else if ((line = menu_cache_item_get_file_path(MENU_CACHE_ITEM(dir))) != NULL)
+        {
+            GKeyFile *kf = g_key_file_new();
+            if (g_key_file_load_from_file(kf, line, G_KEY_FILE_NONE, NULL) &&
+                g_key_file_get_boolean(kf, G_KEY_FILE_DESKTOP_GROUP,
+                                       G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY, NULL))
+                dir->flags = FLAG_IS_NODISPLAY;
+            g_key_file_free(kf);
+            g_free(line);
+        }
+    }
+}
+
+static char *_unescape_lf(char *str)
+{
+    char *c, *p = str;
+    gsize len = 0;
+
+    while ((c = strchr(p, '\\')) != NULL)
+    {
+        if (p != &str[len])
+            memmove(&str[len], p, c - p);
+        len += (c - p);
+        if (c[1] == 'n')
+        {
+            str[len++] = '\n';
+            c++;
+        }
+        else if (c != &str[len])
+            str[len++] = *c;
+        p = &c[1];
+    }
+    if (p != &str[len])
+        memmove(&str[len], p, strlen(p) + 1);
+    return str;
+}
+
+static void read_app(GDataInputStream* f, MenuCacheApp* app, MenuCache* cache)
+{
+    char *line;
+    gsize len;
+    GString *str;
+
+    /* generic name */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return;
+    if(G_LIKELY(len > 0))
+        app->generic_name = _unescape_lf(line);
+    else
+        g_free(line);
+
+    /* exec */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return;
+    if(G_LIKELY(len > 0))
+        app->exec = _unescape_lf(line);
+    else
+        g_free(line);
+
+    /* terminal / startup notify */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return;
+    app->flags = (guint32)atoi(line);
+    g_free(line);
+
+    /* ShowIn flags */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return;
+    app->show_in_flags = (guint32)atol(line);
+    g_free(line);
+
+    if (cache->version < 2)
+        return;
+
+    /* TryExec */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if (G_UNLIKELY(line == NULL))
+        return;
+    if (G_LIKELY(len > 0))
+        app->try_exec = g_strchomp(line);
+    else
+        g_free(line);
+
+    /* Path */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if (G_UNLIKELY(line == NULL))
+        return;
+    if (G_LIKELY(len > 0))
+        app->working_dir = line;
+    else
+        g_free(line);
+
+    /* Categories */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if (G_UNLIKELY(line == NULL))
+        return;
+    if (G_LIKELY(len > 0))
+    {
+        const char **x;
+
+        /* split and intern all the strings so categories can be processed
+           later for search doing g_quark_try_string()+g_quark_to_string() */
+        app->categories = x = (const char **)g_strsplit(line, ";", 0);
+        while (*x != NULL)
+        {
+            char *cat = (char *)*x;
+            *x = g_intern_string(cat);
+            g_free(cat);
+            x++;
+        }
+    }
+    g_free(line);
+
+    /* Keywords */
+    str = g_string_new(MENU_CACHE_ITEM(app)->name);
+    if (G_LIKELY(app->exec != NULL))
+    {
+        char *sp = strchr(app->exec, ' ');
+        char *bn = strrchr(app->exec, G_DIR_SEPARATOR);
+
+        g_string_append_c(str, ',');
+        if (bn == NULL && sp == NULL)
+            g_string_append(str, app->exec);
+        else if (bn == NULL || (sp != NULL && sp < bn))
+            g_string_append_len(str, app->exec, sp - app->exec);
+        else if (sp == NULL)
+            g_string_append(str, &bn[1]);
+        else
+            g_string_append_len(str, &bn[1], sp - &bn[1]);
+    }
+    if (app->generic_name != NULL)
+    {
+        g_string_append_c(str, ',');
+        g_string_append(str, app->generic_name);
+    }
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if (G_UNLIKELY(line == NULL))
+        return;
+    if (len > 0)
+    {
+        g_string_append_c(str, ',');
+        g_string_append(str, line);
+    }
+    app->keywords = g_utf8_casefold(str->str, str->len);
+    g_string_free(str, TRUE);
+    g_free(line);
+}
+
+static MenuCacheItem* read_item(GDataInputStream* f, MenuCache* cache,
+                                MenuCacheFileDir** all_used_files, int n_all_used_files)
+{
+    MenuCacheItem* item;
+    char *line;
+    gsize len;
+    gint idx;
+
+    /* desktop/menu id */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return NULL;
+
+    if( G_LIKELY(len >= 1) )
+    {
+        if( line[0] == '+' ) /* menu dir */
+        {
+            item = (MenuCacheItem*)g_slice_new0( MenuCacheDir );
+            item->n_ref = 1;
+            item->type = MENU_CACHE_TYPE_DIR;
+        }
+        else if( line[0] == '-' ) /* menu item */
+        {
+            item = (MenuCacheItem*)g_slice_new0( MenuCacheApp );
+            item->n_ref = 1;
+            if( G_LIKELY( len > 1 ) ) /* application item */
+                item->type = MENU_CACHE_TYPE_APP;
+            else /* separator */
+            {
+                item->type = MENU_CACHE_TYPE_SEP;
+                g_free(line);
+                return item;
+            }
+        }
+        else
+        {
+            g_free(line);
+            return NULL;
+        }
+
+        item->id = g_strndup( line + 1, len - 1 );
+        g_free(line);
+    }
+    else
+    {
+        g_free(line);
+        return NULL;
+    }
+
+    /* name */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        goto _fail;
+    if(G_LIKELY(len > 0))
+        item->name = _unescape_lf(line);
+    else
+        g_free(line);
+
+    /* comment */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        goto _fail;
+    if(G_LIKELY(len > 0))
+        item->comment = _unescape_lf(line);
+    else
+        g_free(line);
+
+    /* icon */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        goto _fail;
+    if(G_LIKELY(len > 0))
+        item->icon = line;
+    else
+        g_free(line);
+
+    /* file dir/basename */
+
+    /* file name */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        goto _fail;
+    if(G_LIKELY(len > 0))
+        item->file_name = line;
+    else if( item->type == MENU_CACHE_TYPE_APP )
+    {
+        /* When file name is the same as desktop_id, which is
+         * quite common in desktop files, we use this trick to
+         * save memory usage. */
+        item->file_name = item->id;
+        g_free(line);
+    }
+    else
+        g_free(line);
+
+    /* desktop file dir */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+    {
+_fail:
+        g_free(item->id);
+        g_free(item->name);
+        g_free(item->comment);
+        g_free(item->icon);
+        if(item->file_name && item->file_name != item->id)
+            g_free(item->file_name);
+        if(item->type == MENU_CACHE_TYPE_DIR)
+            g_slice_free(MenuCacheDir, MENU_CACHE_DIR(item));
+        else
+            g_slice_free(MenuCacheApp, MENU_CACHE_APP(item));
+        return NULL;
+    }
+    idx = atoi( line );
+    g_free(line);
+    if( G_LIKELY( idx >=0 && idx < n_all_used_files ) )
+    {
+        item->file_dir = all_used_files[ idx ];
+        g_atomic_int_inc(&item->file_dir->n_ref);
+    }
+
+    if( item->type == MENU_CACHE_TYPE_DIR )
+        read_dir( f, MENU_CACHE_DIR(item), cache, all_used_files, n_all_used_files );
+    else if( item->type == MENU_CACHE_TYPE_APP )
+        read_app( f, MENU_CACHE_APP(item), cache );
+
+    return item;
+}
+
+static void menu_cache_file_dir_unref(MenuCacheFileDir *file_dir)
+{
+    if (file_dir && g_atomic_int_dec_and_test(&file_dir->n_ref))
+    {
+        g_free(file_dir->dir);
+        g_free(file_dir);
+    }
+}
+
+static gint read_all_used_files(GDataInputStream* f, MenuCache* cache,
+                                MenuCacheFileDir*** all_used_files)
+{
+    char *line;
+    gsize len;
+    int i, n;
+    MenuCacheFileDir** dirs;
+
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return -1;
+
+    n = atoi( line );
+    g_free(line);
+    if (G_UNLIKELY(n <= 0))
+        return n;
+
+    dirs = g_new0( MenuCacheFileDir *, n );
+
+    for( i = 0; i < n; ++i )
+    {
+        line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+        if(G_UNLIKELY(line == NULL))
+        {
+            while (i-- > 0)
+                menu_cache_file_dir_unref(dirs[i]);
+            g_free(dirs);
+            return -1;
+        }
+        dirs[i] = g_new(MenuCacheFileDir, 1);
+        dirs[i]->n_ref = 1;
+        dirs[i]->dir = line; /* don't include \n */
+    }
+    *all_used_files = dirs;
+    return n;
+}
+
+static gboolean read_all_known_des(GDataInputStream* f, MenuCache* cache)
+{
+    char *line;
+    gsize len;
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        return FALSE;
+    cache->known_des = g_strsplit_set( line, ";\n", 0 );
+    g_free(line);
+    return TRUE;
+}
+
+static MenuCache* menu_cache_new( const char* cache_file )
+{
+    MenuCache* cache;
+    cache = g_slice_new0( MenuCache );
+    cache->cache_file = g_strdup( cache_file );
+    cache->n_ref = 1;
+    return cache;
+}
+
+/**
+ * menu_cache_ref
+ * @cache: a menu cache descriptor
+ *
+ * Increases reference counter on @cache.
+ *
+ * Returns: @cache.
+ *
+ * Since: 0.1.0
+ */
+MenuCache* menu_cache_ref(MenuCache* cache)
+{
+    g_atomic_int_inc( &cache->n_ref );
+    return cache;
+}
+
+/**
+ * menu_cache_unref
+ * @cache: a menu cache descriptor
+ *
+ * Descreases reference counter on @cache. When reference count becomes 0
+ * then resources associated with @cache will be freed.
+ *
+ * Since: 0.1.0
+ */
+void menu_cache_unref(MenuCache* cache)
+{
+    /* DEBUG("cache_unref: %d", cache->n_ref); */
+    /* we need a lock here unfortunately because item in hash isn't protected
+       by reference therefore another thread may get access to it right now */
+    MENU_CACHE_LOCK;
+    if( g_atomic_int_dec_and_test(&cache->n_ref) )
+    {
+        /* g_assert(cache->reload_id != 0); */
+        unregister_menu_from_server( cache );
+        /* DEBUG("unregister to server"); */
+        g_hash_table_remove( hash, cache->menu_name );
+        if( g_hash_table_size(hash) == 0 )
+        {
+            /* DEBUG("destroy hash"); */
+            g_hash_table_destroy(hash);
+
+            /* DEBUG("disconnect from server"); */
+            G_LOCK(connect);
+            shutdown(server_fd, SHUT_RDWR); /* the IO thread will terminate itself */
+            server_fd = -1;
+            G_UNLOCK(connect);
+            hash = NULL;
+        }
+        MENU_CACHE_UNLOCK;
+
+        if(G_LIKELY(cache->thr))
+        {
+            g_cancellable_cancel(cache->cancellable);
+            g_thread_join(cache->thr);
+        }
+        g_object_unref(cache->cancellable);
+        if( G_LIKELY(cache->root_dir) )
+        {
+            /* DEBUG("unref root dir"); */
+            menu_cache_item_unref( MENU_CACHE_ITEM(cache->root_dir) );
+            /* DEBUG("unref root dir finished"); */
+        }
+        g_free( cache->cache_file );
+        g_free( cache->menu_name );
+        g_free(cache->reg);
+        /* g_free( cache->menu_file_path ); */
+        g_strfreev(cache->known_des);
+        g_slist_free(cache->notifiers);
+        g_slice_free( MenuCache, cache );
+    }
+    else
+        MENU_CACHE_UNLOCK;
+}
+
+/**
+ * menu_cache_get_root_dir
+ * @cache: a menu cache instance
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_dup_root_dir() instead.
+ */
+MenuCacheDir* menu_cache_get_root_dir( MenuCache* cache )
+{
+    MenuCacheDir* dir = menu_cache_dup_root_dir(cache);
+    /* NOTE: this is very ugly hack but cache->root_dir may be changed by
+       cache reload in server-io thread, so we should keep it alive :( */
+    if(dir)
+        g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref, dir);
+    return dir;
+}
+
+/**
+ * menu_cache_dup_root_dir
+ * @cache: a menu cache instance
+ *
+ * Retrieves root directory for @cache. Returned data should be freed
+ * with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): root item or %NULL in case of error.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheDir* menu_cache_dup_root_dir( MenuCache* cache )
+{
+    MenuCacheDir* dir;
+    MENU_CACHE_LOCK;
+    dir = cache->root_dir;
+    if(G_LIKELY(dir))
+        menu_cache_item_ref(MENU_CACHE_ITEM(dir));
+    MENU_CACHE_UNLOCK;
+    return dir;
+}
+
+/**
+ * menu_cache_item_ref
+ * @item: a menu cache item
+ *
+ * Increases reference counter on @item.
+ *
+ * Returns: @item.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheItem* menu_cache_item_ref(MenuCacheItem* item)
+{
+    g_atomic_int_inc( &item->n_ref );
+    /* DEBUG("item_ref %s: %d -> %d", item->id, item->n_ref-1, item->n_ref); */
+    return item;
+}
+
+static gboolean menu_cache_reload_idle(gpointer cache)
+{
+    /* do reload once */
+    if (!g_source_is_destroyed(g_main_current_source()))
+        menu_cache_reload(cache);
+    return FALSE;
+}
+
+typedef struct _CacheReloadNotifier
+{
+    MenuCacheReloadNotify func;
+    gpointer user_data;
+}CacheReloadNotifier;
+
+struct _MenuCacheNotifyId
+{
+    GSList l;
+};
+
+/**
+ * menu_cache_add_reload_notify
+ * @cache: a menu cache instance
+ * @func: callback to call when menu cache is reloaded
+ * @user_data: user data provided for @func
+ *
+ * Adds a @func to list of callbacks that are called each time menu cache
+ * is loaded.
+ *
+ * Returns: an ID of added callback.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheNotifyId menu_cache_add_reload_notify(MenuCache* cache, MenuCacheReloadNotify func, gpointer user_data)
+{
+    GSList* l = g_slist_alloc();
+    CacheReloadNotifier* n = g_slice_new(CacheReloadNotifier);
+    gboolean is_first;
+    n->func = func;
+    n->user_data = user_data;
+    l->data = n;
+    MENU_CACHE_LOCK;
+    is_first = (cache->root_dir == NULL && cache->notifiers == NULL);
+    cache->notifiers = g_slist_concat( cache->notifiers, l );
+    /* reload existing file first so it will be ready right away */
+    if(is_first && cache->reload_id == 0)
+        cache->reload_id = g_idle_add_full(G_PRIORITY_HIGH_IDLE,
+                                           menu_cache_reload_idle,
+                                           menu_cache_ref(cache),
+                                           (GDestroyNotify)menu_cache_unref);
+    MENU_CACHE_UNLOCK;
+    return (MenuCacheNotifyId)l;
+}
+
+/**
+ * menu_cache_remove_reload_notify
+ * @cache: a menu cache instance
+ * @notify_id: an ID of callback
+ *
+ * Removes @notify_id from list of callbacks added for @cache by previous
+ * call to menu_cache_add_reload_notify().
+ *
+ * Since: 0.1.0
+ */
+void menu_cache_remove_reload_notify(MenuCache* cache, MenuCacheNotifyId notify_id)
+{
+    MENU_CACHE_LOCK;
+    g_slice_free( CacheReloadNotifier, ((GSList*)notify_id)->data );
+    cache->notifiers = g_slist_delete_link( cache->notifiers, (GSList*)notify_id );
+    MENU_CACHE_UNLOCK;
+}
+
+static gboolean reload_notify(gpointer data)
+{
+    MenuCache* cache = (MenuCache*)data;
+    GSList* l;
+    MENU_CACHE_LOCK;
+    /* we have it referenced and there is no source removal so no check */
+    for( l = cache->notifiers; l; l = l->next )
+    {
+        CacheReloadNotifier* n = (CacheReloadNotifier*)l->data;
+        if(n->func)
+            n->func( cache, n->user_data );
+    }
+    MENU_CACHE_UNLOCK;
+    return FALSE;
+}
+
+/**
+ * menu_cache_reload
+ * @cache: a menu cache instance
+ *
+ * Reloads menu cache from file generated by menu-cached.
+ *
+ * Returns: %TRUE if reload was successful.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_reload( MenuCache* cache )
+{
+    char* line;
+    gsize len;
+    GFile* file;
+    GFileInputStream* istr = NULL;
+    GDataInputStream* f;
+    MenuCacheFileDir** all_used_files;
+    int i, n;
+    int ver_maj, ver_min;
+
+    MENU_CACHE_LOCK;
+    if (cache->reload_id)
+        g_source_remove(cache->reload_id);
+    cache->reload_id = 0;
+    MENU_CACHE_UNLOCK;
+    file = g_file_new_for_path(cache->cache_file);
+    if(!file)
+        return FALSE;
+    istr = g_file_read(file, cache->cancellable, NULL);
+    g_object_unref(file);
+    if(!istr)
+        return FALSE;
+    f = g_data_input_stream_new(G_INPUT_STREAM(istr));
+    g_object_unref(istr);
+    if( ! f )
+        return FALSE;
+
+    /* the first line is version number */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_LIKELY(line))
+    {
+        len = sscanf(line, "%d.%d", &ver_maj, &ver_min);
+        g_free(line);
+        if(len < 2)
+            goto _fail;
+        if( ver_maj != VER_MAJOR ||
+            ver_min > VER_MINOR || ver_min < VER_MINOR_SUPPORTED )
+            goto _fail;
+    }
+    else
+        goto _fail;
+
+    g_debug("menu cache: got file version 1.%d", ver_min);
+    /* the second line is menu name */
+    line = g_data_input_stream_read_line(f, &len, cache->cancellable, NULL);
+    if(G_UNLIKELY(line == NULL))
+        goto _fail;
+    g_free(line);
+
+    /* FIXME: this may lock other threads for some time */
+    MENU_CACHE_LOCK;
+    if(cache->notifiers == NULL)
+    {
+        /* nobody aware of reloads, stupid clients may think root is forever */
+        MENU_CACHE_UNLOCK;
+        goto _fail;
+    }
+
+    /* get all used files */
+    n = read_all_used_files( f, cache, &all_used_files );
+    if (n <= 0)
+    {
+        MENU_CACHE_UNLOCK;
+        goto _fail;
+    }
+
+    /* read known DEs */
+    g_strfreev( cache->known_des );
+    if( ! read_all_known_des( f, cache ) )
+    {
+        cache->known_des = NULL;
+        MENU_CACHE_UNLOCK;
+        for (i = 0; i < n; i++)
+            menu_cache_file_dir_unref(all_used_files[i]);
+        g_free(all_used_files);
+_fail:
+        g_object_unref(f);
+        return FALSE;
+    }
+    cache->version = ver_min;
+
+    if(cache->root_dir)
+        menu_cache_item_unref( MENU_CACHE_ITEM(cache->root_dir) );
+
+    cache->root_dir = (MenuCacheDir*)read_item( f, cache, all_used_files, n );
+    g_object_unref(f);
+
+    g_idle_add_full(G_PRIORITY_HIGH_IDLE, reload_notify, menu_cache_ref(cache),
+                    (GDestroyNotify)menu_cache_unref);
+    MENU_CACHE_UNLOCK;
+
+    for (i = 0; i < n; i++)
+        menu_cache_file_dir_unref(all_used_files[i]);
+    g_free(all_used_files);
+
+    return TRUE;
+}
+
+/**
+ * menu_cache_item_unref
+ * @item: a menu cache item
+ *
+ * Decreases reference counter on @item. When reference count becomes 0
+ * then resources associated with @item will be freed.
+ *
+ * Returns: %FALSE (since 0.5.0)
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_item_unref(MenuCacheItem* item)
+{
+    /* DEBUG("item_unref(%s): %d", item->id, item->n_ref); */
+    /* We need a lock here unfortunately since another thread may have access
+       to it via some child->parent which isn't protected by reference */
+    MENU_CACHE_LOCK; /* lock may be recursive here */
+    if( g_atomic_int_dec_and_test( &item->n_ref ) )
+    {
+        /* DEBUG("free item: %s", item->id); */
+        g_free( item->id );
+        g_free( item->name );
+        g_free( item->comment );
+        g_free( item->icon );
+
+        menu_cache_file_dir_unref(item->file_dir);
+
+        if( item->file_name && item->file_name != item->id )
+            g_free( item->file_name );
+
+        if( item->parent )
+        {
+            /* DEBUG("remove %s from parent %s", item->id, MENU_CACHE_ITEM(item->parent)->id); */
+            /* remove ourselve from the parent node. */
+            item->parent->children = g_slist_remove(item->parent->children, item);
+        }
+
+        if( item->type == MENU_CACHE_TYPE_DIR )
+        {
+            MenuCacheDir* dir = MENU_CACHE_DIR(item);
+            GSList* l;
+            for(l = dir->children; l; )
+            {
+                MenuCacheItem* child = MENU_CACHE_ITEM(l->data);
+                /* remove ourselve from the children. */
+                child->parent = NULL;
+                l = l->next;
+                menu_cache_item_unref(child);
+            }
+            g_slist_free( dir->children );
+            g_slice_free( MenuCacheDir, dir );
+        }
+        else
+        {
+            MenuCacheApp* app = MENU_CACHE_APP(item);
+            g_free(app->generic_name);
+            g_free( app->exec );
+            g_free(app->try_exec);
+            g_free(app->working_dir);
+            g_free(app->categories);
+            g_free(app->keywords);
+            g_slice_free( MenuCacheApp, app );
+        }
+    }
+    MENU_CACHE_UNLOCK;
+    return FALSE;
+}
+
+/**
+ * menu_cache_item_get_type
+ * @item: a menu cache item
+ *
+ * Checks type of @item.
+ *
+ * Returns: type of @item.
+ *
+ * Since: 0.1.0
+ */
+MenuCacheType menu_cache_item_get_type( MenuCacheItem* item )
+{
+    return item->type;
+}
+
+/**
+ * menu_cache_item_get_id
+ * @item: a menu cache item
+ *
+ * Retrieves ID (short name such as 'application.desktop') of @item.
+ * Returned data are owned by menu cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item ID.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_id( MenuCacheItem* item )
+{
+    return item->id;
+}
+
+/**
+ * menu_cache_item_get_name
+ * @item: a menu cache item
+ *
+ * Retrieves display name of @item. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item display name or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_name( MenuCacheItem* item )
+{
+    return item->name;
+}
+
+/**
+ * menu_cache_item_get_comment
+ * @item: a menu cache item
+ *
+ * Retrieves comment of @item. The comment can be used to show tooltip
+ * on @item. Returned data are owned by menu cache and should be not
+ * freed by caller.
+ *
+ * Returns: (transfer none): @item comment or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_comment( MenuCacheItem* item )
+{
+    return item->comment;
+}
+
+/**
+ * menu_cache_item_get_icon
+ * @item: a menu cache item
+ *
+ * Retrieves name of icon of @item. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item icon name or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_item_get_icon( MenuCacheItem* item )
+{
+    return item->icon;
+}
+
+/**
+ * menu_cache_item_get_file_basename
+ * @item: a menu cache item
+ *
+ * Retrieves basename of @item. This API can return %NULL if @item is a
+ * directory and have no directory desktop entry file. Returned data are
+ * owned by menu cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): @item file basename or %NULL.
+ *
+ * Since: 0.2.0
+ */
+const char* menu_cache_item_get_file_basename( MenuCacheItem* item )
+{
+    return item->file_name;
+}
+
+/**
+ * menu_cache_item_get_file_dirname
+ * @item: a menu cache item
+ *
+ * Retrieves path to directory where @item desktop enrty file is located.
+ * This API can return %NULL if @item is a directory and have no
+ * desktop entry file. Returned data are owned by menu cache and should
+ * be not freed by caller.
+ *
+ * Returns: (transfer none): @item file parent directory path or %NULL.
+ *
+ * Since: 0.2.0
+ */
+const char* menu_cache_item_get_file_dirname( MenuCacheItem* item )
+{
+    return item->file_dir ? item->file_dir->dir + 1 : NULL;
+}
+
+/**
+ * menu_cache_item_get_file_path
+ * @item: a menu cache item
+ *
+ * Retrieves path to @item desktop enrty file. This API can return %NULL
+ * if @item is a directory and have no desktop entry file. Returned data
+ * should be freed with g_free() after usage.
+ *
+ * Returns: (transfer full): @item file path or %NULL.
+ *
+ * Since: 0.2.0
+ */
+char* menu_cache_item_get_file_path( MenuCacheItem* item )
+{
+    if( ! item->file_name || ! item->file_dir )
+        return NULL;
+    return g_build_filename( item->file_dir->dir + 1, item->file_name, NULL );
+}
+
+/**
+ * menu_cache_item_get_parent
+ * @item: a menu cache item
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_item_dup_parent() instead.
+ */
+MenuCacheDir* menu_cache_item_get_parent( MenuCacheItem* item )
+{
+    MenuCacheDir* dir = menu_cache_item_dup_parent(item);
+    /* NOTE: this is very ugly hack but parent may be changed by item freeing
+       so we should keep it alive :( */
+    if(dir)
+        g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref, dir);
+    return dir;
+}
+
+/**
+ * menu_cache_item_dup_parent
+ * @item: a menu item
+ *
+ * Retrieves parent (directory) for @item. Returned data should be freed
+ * with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): parent item or %NULL in case of error.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheDir* menu_cache_item_dup_parent( MenuCacheItem* item )
+{
+    MenuCacheDir* dir;
+    MENU_CACHE_LOCK;
+    dir = item->parent;
+    if(G_LIKELY(dir))
+        menu_cache_item_ref(MENU_CACHE_ITEM(dir));
+    MENU_CACHE_UNLOCK;
+    return dir;
+}
+
+/**
+ * menu_cache_dir_get_children
+ * @dir: a menu cache item
+ *
+ * Retrieves list of items contained in @dir. Returned data are owned by
+ * menu cache and should be not freed by caller.
+ * This API is thread unsafe and should be never called from outside of
+ * default main loop.
+ *
+ * Returns: (transfer none) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.4.0: Use menu_cache_dir_list_children() instead.
+ */
+GSList* menu_cache_dir_get_children( MenuCacheDir* dir )
+{
+    /* NOTE: this is very ugly hack but dir may be freed by cache reload
+       in server-io thread, so we should keep it alive :( */
+    g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unref,
+                          menu_cache_item_ref(MENU_CACHE_ITEM(dir)));
+    return dir->children;
+}
+
+/**
+ * menu_cache_dir_list_children
+ * @dir: a menu cache item
+ *
+ * Retrieves list of items contained in @dir. Returned data should be
+ * freed with g_slist_free_full(list, menu_cache_item_unref) after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.4.0
+ */
+GSList* menu_cache_dir_list_children(MenuCacheDir* dir)
+{
+    GSList *children, *l;
+
+    if(MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR)
+        return NULL;
+    MENU_CACHE_LOCK;
+    children = g_slist_copy(dir->children);
+    for(l = children; l; l = l->next)
+        menu_cache_item_ref(l->data);
+    MENU_CACHE_UNLOCK;
+    return children;
+}
+
+/**
+ * menu_cache_find_child_by_id
+ * @dir: a menu cache item
+ * @id: a string to find
+ *
+ * Checks if @dir has a child with given @id. Returned data should be
+ * freed with menu_cache_item_unref() when no longer needed.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_child_by_id(MenuCacheDir *dir, const char *id)
+{
+    GSList *child;
+    MenuCacheItem *item = NULL;
+
+    if (MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR || id == NULL)
+        return NULL;
+    MENU_CACHE_LOCK;
+    for (child = dir->children; child; child = child->next)
+        if (g_strcmp0(MENU_CACHE_ITEM(child->data)->id, id) == 0)
+        {
+            item = menu_cache_item_ref(child->data);
+            break;
+        }
+    MENU_CACHE_UNLOCK;
+    return item;
+}
+
+/**
+ * menu_cache_find_child_by_name
+ * @dir: a menu cache item
+ * @name: a string to find
+ *
+ * Checks if @dir has a child with given @name. Returned data should be
+ * freed with menu_cache_item_unref() when no longer needed.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_child_by_name(MenuCacheDir *dir, const char *name)
+{
+    GSList *child;
+    MenuCacheItem *item = NULL;
+
+    if (MENU_CACHE_ITEM(dir)->type != MENU_CACHE_TYPE_DIR || name == NULL)
+        return NULL;
+    MENU_CACHE_LOCK;
+    for (child = dir->children; child; child = child->next)
+        if (g_strcmp0(MENU_CACHE_ITEM(child->data)->name, name) == 0)
+        {
+            item = menu_cache_item_ref(child->data);
+            break;
+        }
+    MENU_CACHE_UNLOCK;
+    return item;
+}
+
+/**
+ * menu_cache_dir_is_visible
+ * @dir: a menu cache item
+ *
+ * Checks if @dir should be visible.
+ *
+ * Returns: %TRUE if @dir is visible.
+ *
+ * Since: 0.5.0
+ */
+gboolean menu_cache_dir_is_visible(MenuCacheDir *dir)
+{
+    return ((dir->flags & FLAG_IS_NODISPLAY) == 0);
+}
+
+/**
+ * menu_cache_app_get_generic_name
+ * @app: a menu cache item
+ *
+ * Retrieves generic name for @app. Returned data are owned by menu
+ * cache and should not be freed by caller.
+ *
+ * Returns: (transfer none): app's generic name or %NULL.
+ *
+ * Since: 1.0.3
+ */
+const char* menu_cache_app_get_generic_name( MenuCacheApp* app )
+{
+	return app->generic_name;
+}
+
+/**
+ * menu_cache_app_get_exec
+ * @app: a menu cache item
+ *
+ * Retrieves execution string for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item execution string or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_app_get_exec( MenuCacheApp* app )
+{
+    return app->exec;
+}
+
+/**
+ * menu_cache_app_get_working_dir
+ * @app: a menu cache item
+ *
+ * Retrieves working directory for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): item working directory or %NULL.
+ *
+ * Since: 0.1.0
+ */
+const char* menu_cache_app_get_working_dir( MenuCacheApp* app )
+{
+    return app->working_dir;
+}
+
+/**
+ * menu_cache_app_get_categories
+ * @app: a menu cache item
+ *
+ * Retrieves list of categories for @app. Returned data are owned by menu
+ * cache and should be not freed by caller.
+ *
+ * Returns: (transfer none): list of categories or %NULL.
+ *
+ * Since: 1.0.0
+ */
+const char * const * menu_cache_app_get_categories(MenuCacheApp* app)
+{
+    return app->categories;
+}
+
+/**
+ * menu_cache_app_get_use_terminal
+ * @app: a menu cache item
+ *
+ * Checks if @app should be ran in terminal.
+ *
+ * Returns: %TRUE if @app requires terminal to run.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_app_get_use_terminal( MenuCacheApp* app )
+{
+    return ( (app->flags & FLAG_USE_TERMINAL) != 0 );
+}
+
+/**
+ * menu_cache_app_get_use_sn
+ * @app: a menu cache item
+ *
+ * Checks if @app wants startup notification.
+ *
+ * Returns: %TRUE if @app wants startup notification.
+ *
+ * Since: 0.1.0
+ */
+gboolean menu_cache_app_get_use_sn( MenuCacheApp* app )
+{
+    return ( (app->flags & FLAG_USE_SN) != 0 );
+}
+
+/**
+ * menu_cache_app_get_show_flags
+ * @app: a menu cache item
+ *
+ * Retrieves list of desktop environments where @app should be visible.
+ *
+ * Returns: bit mask of DE.
+ *
+ * Since: 0.2.0
+ */
+guint32 menu_cache_app_get_show_flags( MenuCacheApp* app )
+{
+    return app->show_in_flags;
+}
+
+static gboolean _can_be_exec(MenuCacheApp *app)
+{
+    char *path;
+
+    if (app->try_exec == NULL)
+        return TRUE;
+    path = g_find_program_in_path(app->try_exec);
+    g_free(path);
+    return (path != NULL);
+}
+
+/**
+ * menu_cache_app_get_is_visible
+ * @app: a menu cache item
+ * @de_flags: bit mask of DE to test
+ *
+ * Checks if @app should be visible in any of desktop environments
+ * @de_flags.
+ *
+ * Returns: %TRUE if @app is visible.
+ *
+ * Since: 0.2.0
+ */
+gboolean menu_cache_app_get_is_visible( MenuCacheApp* app, guint32 de_flags )
+{
+    if(app->flags & FLAG_IS_NODISPLAY)
+        return FALSE;
+    return (!app->show_in_flags || (app->show_in_flags & de_flags)) &&
+           _can_be_exec(app);
+}
+
+/*
+MenuCacheApp* menu_cache_find_app_by_exec( const char* exec )
+{
+    return NULL;
+}
+*/
+
+/**
+ * menu_cache_get_dir_from_path
+ * @cache: a menu cache instance
+ * @path: item path
+ *
+ * Since: 0.1.0
+ *
+ * Deprecated: 0.3.4: Use menu_cache_item_from_path() instead.
+ */
+MenuCacheDir* menu_cache_get_dir_from_path( MenuCache* cache, const char* path )
+{
+    char** names = g_strsplit( path + 1, "/", -1 );
+    int i = 0;
+    MenuCacheDir* dir = NULL;
+
+    if( !names )
+        return NULL;
+
+    if( G_UNLIKELY(!names[0]) )
+    {
+        g_strfreev(names);
+        return NULL;
+    }
+    /* the topmost dir of the path should be the root menu dir. */
+    MENU_CACHE_LOCK;
+    dir = cache->root_dir;
+    if (G_UNLIKELY(dir == NULL) || strcmp(names[0], MENU_CACHE_ITEM(dir)->id))
+    {
+        MENU_CACHE_UNLOCK;
+        return NULL;
+    }
+
+    for( ++i; names[i]; ++i )
+    {
+        GSList* l;
+        for( l = dir->children; l; l = l->next )
+        {
+            MenuCacheItem* item = MENU_CACHE_ITEM(l->data);
+            if( item->type == MENU_CACHE_TYPE_DIR && 0 == strcmp( item->id, names[i] ) )
+                dir = MENU_CACHE_DIR(item);
+        }
+        /* FIXME: we really should ref it on return since other thread may
+           destroy the parent at this time and returned data become invalid.
+           Therefore this call isn't thread-safe! */
+        if( ! dir )
+        {
+            MENU_CACHE_UNLOCK;
+            return NULL;
+        }
+    }
+    MENU_CACHE_UNLOCK;
+    return dir;
+}
+
+/**
+ * menu_cache_item_from_path
+ * @cache: cache to inspect
+ * @path: item path
+ *
+ * Searches item @path in the @cache. The @path consists of item IDs
+ * separated by slash ('/'). Returned data should be freed with
+ * menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): found item or %NULL if no item found.
+ *
+ * Since: 0.3.4
+ */
+MenuCacheItem* menu_cache_item_from_path( MenuCache* cache, const char* path )
+{
+    char** names = g_strsplit( path + 1, "/", -1 );
+    int i;
+    MenuCacheDir* dir;
+    MenuCacheItem* item = NULL;
+
+    if( !names )
+        return NULL;
+
+    if( G_UNLIKELY(!names[0]) )
+    {
+        g_strfreev(names);
+        return NULL;
+    }
+    /* the topmost dir of the path should be the root menu dir. */
+    MENU_CACHE_LOCK;
+    dir = cache->root_dir;
+    if( G_UNLIKELY(!dir) || strcmp(names[0], MENU_CACHE_ITEM(dir)->id) != 0 )
+        goto _end;
+
+    for( i = 1; names[i]; ++i )
+    {
+        GSList* l;
+        item = NULL;
+        if( !dir )
+            break;
+        l = dir->children;
+        dir = NULL;
+        for( ; l; l = l->next )
+        {
+            item = MENU_CACHE_ITEM(l->data);
+            if( g_strcmp0( item->id, names[i] ) == 0 )
+            {
+                if( item->type == MENU_CACHE_TYPE_DIR )
+                    dir = MENU_CACHE_DIR(item);
+                break;
+            }
+            item = NULL;
+        }
+        if( !item )
+            break;
+    }
+    if(item)
+        menu_cache_item_ref(item);
+_end:
+    MENU_CACHE_UNLOCK;
+    g_strfreev(names);
+    return item;
+}
+
+/**
+ * menu_cache_dir_make_path
+ * @dir: a menu cache item
+ *
+ * Retrieves path of @dir. The path consists of item IDs separated by
+ * slash ('/'). Returned data should be freed with g_free() after usage.
+ *
+ * Returns: (transfer full): item path.
+ *
+ * Since: 0.1.0
+ */
+char* menu_cache_dir_make_path( MenuCacheDir* dir )
+{
+    GString* path = g_string_sized_new(1024);
+    MenuCacheItem* it;
+
+    MENU_CACHE_LOCK;
+    while( (it = MENU_CACHE_ITEM(dir)) ) /* this is not top dir */
+    {
+        g_string_prepend( path, menu_cache_item_get_id(it) );
+        g_string_prepend_c( path, '/' );
+        /* FIXME: if parent is already unref'd by another thread then
+           path being made will be broken. Is there any way to avoid that? */
+        dir = it->parent;
+    }
+    MENU_CACHE_UNLOCK;
+    return g_string_free( path, FALSE );
+}
+
+static void get_socket_name( char* buf, int len )
+{
+    char* dpy = g_strdup(g_getenv("DISPLAY"));
+    if(dpy && *dpy)
+    {
+        char* p = strchr(dpy, ':');
+        for(++p; *p && *p != '.' && *p != '\n';)
+            ++p;
+        if(*p)
+            *p = '\0';
+    }
+#if GLIB_CHECK_VERSION(2, 28, 0)
+    g_snprintf( buf, len, "%s/menu-cached-%s", g_get_user_runtime_dir(),
+                dpy ? dpy : ":0" );
+#else
+    g_snprintf( buf, len, "%s/.menu-cached-%s-%s", g_get_tmp_dir(),
+                dpy ? dpy : ":0", g_get_user_name() );
+#endif
+    g_free(dpy);
+}
+
+#define MAX_RETRIES 25
+
+static gboolean fork_server(const char *path)
+{
+    int ret, pid, status;
+
+    if (!g_file_test (MENUCACHE_LIBEXECDIR "/menu-cached", G_FILE_TEST_IS_EXECUTABLE))
+    {
+        g_error("failed to find menu-cached");
+    }
+
+    /* Start daemon */
+    pid = fork();
+    if (pid == 0)
+    {
+        execl(MENUCACHE_LIBEXECDIR "/menu-cached", MENUCACHE_LIBEXECDIR "/menu-cached",
+              path, NULL);
+        g_print("failed to exec %s %s\n", MENUCACHE_LIBEXECDIR "/menu-cached", path);
+    }
+
+    /*
+     * do a waitpid on the intermediate process to avoid zombies.
+     */
+retry_wait:
+    ret = waitpid(pid, &status, 0);
+    if (ret < 0) {
+        if (errno == EINTR)
+            goto retry_wait;
+    }
+    return TRUE;
+}
+
+/* this thread is started by connect_server() */
+static gpointer server_io_thread(gpointer data)
+{
+    char buf[1024]; /* protocol has a lot shorter strings */
+    ssize_t sz;
+    size_t ptr = 0;
+    int fd = GPOINTER_TO_INT(data);
+    GHashTableIter it;
+    char* menu_name;
+    MenuCache* cache;
+
+    while(fd >= 0)
+    {
+        sz = read(fd, &buf[ptr], sizeof(buf) - ptr);
+        if(sz <= 0) /* socket error or EOF */
+        {
+            MENU_CACHE_LOCK;
+            ptr = hash ? g_hash_table_size(hash) : 0;
+            MENU_CACHE_UNLOCK;
+            if (ptr == 0) /* don't need it anymore */
+                break;
+            G_LOCK(connect);
+            if(fd != server_fd) /* someone replaced us?! go out immediately! */
+            {
+                G_UNLOCK(connect);
+                break;
+            }
+            server_fd = -1;
+            G_UNLOCK(connect);
+            DEBUG("connect failed, trying reconnect");
+            sleep(1);
+            if( ! connect_server(NULL) )
+            {
+                g_critical("fail to re-connect to the server.");
+                MENU_CACHE_LOCK;
+                if(hash)
+                {
+                    g_hash_table_iter_init(&it, hash);
+                    while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+                        SET_CACHE_READY(cache);
+                }
+                MENU_CACHE_UNLOCK;
+                break;
+            }
+            DEBUG("successfully reconnected server, re-register menus.");
+            /* re-register all menu caches */
+            MENU_CACHE_LOCK;
+            if(hash)
+            {
+                g_hash_table_iter_init(&it, hash);
+                while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+                    register_menu_to_server(cache);
+                    /* FIXME: need we remove it from hash if failed? */
+            }
+            MENU_CACHE_UNLOCK;
+            break; /* next thread will do it */
+        }
+        while(sz > 0)
+        {
+            while(sz > 0)
+            {
+                if(buf[ptr] == '\n')
+                    break;
+                sz--;
+                ptr++;
+            }
+            if(ptr == sizeof(buf)) /* EOB reached, seems we got garbage */
+            {
+                g_warning("menu cache: got garbage from server, break connect");
+                shutdown(fd, SHUT_RDWR); /* drop connection */
+                break; /* we handle it above */
+            }
+            else if(sz == 0) /* incomplete line, wait for data again */
+                break;
+            /* we got a line, let check what we got */
+            buf[ptr] = '\0';
+            if(memcmp(buf, "REL:", 4) == 0) /* reload */
+            {
+                DEBUG("server ask us to reload cache: %s", &buf[4]);
+                MENU_CACHE_LOCK;
+                if(hash)
+                {
+                    g_hash_table_iter_init(&it, hash);
+                    while(g_hash_table_iter_next(&it, (gpointer*)&menu_name, (gpointer*)&cache))
+                    {
+                        if(memcmp(cache->md5, &buf[4], 32) == 0)
+                        {
+                            DEBUG("RELOAD!");
+                            menu_cache_reload(cache);
+                            SET_CACHE_READY(cache);
+                            break;
+                        }
+                    }
+                }
+                MENU_CACHE_UNLOCK;
+                /* DEBUG("cache reloaded"); */
+            }
+            else
+                g_warning("menu cache: unrecognized input: %s", buf);
+            /* go to next line */
+            sz--;
+            if(sz > 0)
+                memmove(buf, &buf[ptr+1], sz);
+            ptr = 0;
+        }
+    }
+    G_LOCK(connect);
+    if (fd == server_fd)
+        server_fd = -1;
+    G_UNLOCK(connect);
+    close(fd);
+    /* DEBUG("server io thread terminated"); */
+#if GLIB_CHECK_VERSION(2, 32, 0)
+    g_thread_unref(g_thread_self());
+#endif
+    return NULL;
+}
+
+static gboolean connect_server(GCancellable* cancellable)
+{
+    int fd, rc;
+    struct sockaddr_un addr;
+    int retries = 0;
+
+    G_LOCK(connect);
+    if(server_fd != -1 || (cancellable && g_cancellable_is_cancelled(cancellable)))
+    {
+        G_UNLOCK(connect);
+        return TRUE;
+    }
+
+retry:
+    fd = socket(PF_UNIX, SOCK_STREAM, 0);
+    if (fd < 0)
+    {
+        g_print("Failed to create socket\n");
+        G_UNLOCK(connect);
+        return FALSE;
+    }
+
+    fcntl (fd, F_SETFD, FD_CLOEXEC);
+
+    memset(&addr, 0, sizeof(addr));
+    addr.sun_family = AF_UNIX;
+
+    get_socket_name( addr.sun_path, sizeof( addr.sun_path ) );
+
+    if( connect(fd, (struct sockaddr*)&addr, sizeof(addr)) < 0)
+    {
+        rc = errno;
+        close(fd);
+        if(cancellable && g_cancellable_is_cancelled(cancellable))
+        {
+            G_UNLOCK(connect);
+            return TRUE;
+        }
+        if((rc == ECONNREFUSED || rc == ENOENT) && retries == 0)
+        {
+            DEBUG("no running server found, starting it");
+            fork_server(addr.sun_path);
+            ++retries;
+            goto retry;
+        }
+        if(retries < MAX_RETRIES)
+        {
+            usleep(50000);
+            ++retries;
+            goto retry;
+        }
+        g_print("Unable to connect\n");
+        G_UNLOCK(connect);
+        return FALSE;
+    }
+    server_fd = fd;
+    G_UNLOCK(connect);
+#if GLIB_CHECK_VERSION(2, 32, 0)
+    g_thread_new("menu-cache-io", server_io_thread, GINT_TO_POINTER(fd));
+#else
+    g_thread_create(server_io_thread, GINT_TO_POINTER(fd), FALSE, NULL);
+#endif
+    return TRUE;
+}
+
+#define CACHE_VERSION __num2str(VER_MAJOR) "." __num2str(VER_MINOR)
+#define __num2str(s) __def2str(s)
+#define __def2str(s) #s
+
+static inline char *_validate_env(const char *env)
+{
+    char *res, *c;
+
+    if (env)
+        res = g_strdup(env);
+    else
+        res = g_strdup("");
+    for (c = res; *c; c++)
+        if (*c == '\n' || *c == '\t')
+            *c = ' ';
+    return res;
+}
+
+static MenuCache* menu_cache_create(const char* menu_name)
+{
+    MenuCache* cache;
+    const gchar * const * langs = g_get_language_names();
+    const char* xdg_cfg_env = g_getenv("XDG_CONFIG_DIRS");
+    const char* xdg_prefix_env = g_getenv("XDG_MENU_PREFIX");
+    const char* xdg_data_env = g_getenv("XDG_DATA_DIRS");
+    const char* xdg_cfg_home_env = g_getenv("XDG_CONFIG_HOME");
+    const char* xdg_data_home_env = g_getenv("XDG_DATA_HOME");
+    const char* xdg_cache_home_env = g_getenv("XDG_CACHE_HOME");
+    char *xdg_cfg, *xdg_prefix, *xdg_data, *xdg_cfg_home, *xdg_data_home, *xdg_cache_home;
+    char* buf;
+    const char* md5;
+    char* file_name;
+    int len = 0;
+    GChecksum *sum;
+    char *langs_list;
+
+    xdg_cfg = _validate_env(xdg_cfg_env);
+    xdg_prefix = _validate_env(xdg_prefix_env);
+    xdg_data = _validate_env(xdg_data_env);
+    xdg_cfg_home = _validate_env(xdg_cfg_home_env);
+    xdg_data_home = _validate_env(xdg_data_home_env);
+    xdg_cache_home = _validate_env(xdg_cache_home_env);
+
+    /* reconstruct languages list in form as it should be in $LANGUAGES */
+    langs_list = g_strjoinv(":", (char **)langs);
+    for (buf = langs_list; *buf; buf++) /* reusing buf var as char pointer */
+        if (*buf == '\n' || *buf == '\t')
+            *buf = ' ';
+
+    buf = g_strdup_printf( "REG:%s\t%s\t%s\t%s\t%s\t%s\t%s\t%s\t" CACHE_VERSION
+                           "\t00000000000000000000000000000000\n",
+                            menu_name,
+                            langs_list,
+                            xdg_cache_home,
+                            xdg_cfg,
+                            xdg_prefix,
+                            xdg_data,
+                            xdg_cfg_home,
+                            xdg_data_home );
+
+    /* calculate the md5 sum of menu name + lang + all environment variables */
+    sum = g_checksum_new(G_CHECKSUM_MD5);
+    len = strlen(buf);
+    g_checksum_update(sum, (guchar*)buf + 4, len - 38);
+    md5 = g_checksum_get_string(sum);
+    file_name = g_build_filename( g_get_user_cache_dir(), "menus", md5, NULL );
+    DEBUG("cache file_name = %s", file_name);
+    cache = menu_cache_new( file_name );
+    cache->reg = buf;
+    cache->md5 = buf + len - 33;
+    memcpy( cache->md5, md5, 32 );
+    cache->menu_name = g_strdup(menu_name);
+    g_free( file_name );
+    g_free(langs_list);
+    g_free(xdg_cfg);
+    g_free(xdg_prefix);
+    g_free(xdg_data);
+    g_free(xdg_cfg_home);
+    g_free(xdg_data_home);
+    g_free(xdg_cache_home);
+
+    g_checksum_free(sum); /* md5 is also freed here */
+
+    MENU_CACHE_LOCK;
+    g_hash_table_insert( hash, g_strdup(menu_name), cache );
+    MENU_CACHE_UNLOCK;
+
+    return cache;
+}
+
+static gboolean register_menu_to_server(MenuCache* cache)
+{
+    ssize_t len = strlen(cache->reg);
+    /* FIXME: do unblocking I/O */
+    if(write(server_fd, cache->reg, len) < len)
+    {
+        DEBUG("register_menu_to_server: sending failed");
+        return FALSE; /* socket write failed */
+    }
+    return TRUE;
+}
+
+static void unregister_menu_from_server( MenuCache* cache )
+{
+    char buf[38];
+    g_snprintf( buf, 38, "UNR:%s\n", cache->md5 );
+    /* FIXME: do unblocking I/O */
+    if(write( server_fd, buf, 37 ) <= 0)
+    {
+        DEBUG("unregister_menu_from_server: sending failed");
+    }
+}
+
+static gpointer menu_cache_loader_thread(gpointer data)
+{
+    MenuCache* cache = (MenuCache*)data;
+
+    /* try to connect server now */
+    if(!connect_server(cache->cancellable))
+    {
+        g_print("unable to connect to menu-cached.\n");
+        SET_CACHE_READY(cache);
+        return NULL;
+    }
+    /* and request update from server */
+    if ((cache->cancellable && g_cancellable_is_cancelled(cache->cancellable)) ||
+        !register_menu_to_server(cache))
+        SET_CACHE_READY(cache);
+    return NULL;
+}
+
+/**
+ * menu_cache_lookup
+ * @menu_name: a menu name
+ *
+ * Searches for connection to menu-cached for @menu_name. If there is no
+ * such connection exist then creates new one. Caller can be notified
+ * when cache is (re)loaded by adding callback. Caller should check if
+ * the cache is already loaded trying to retrieve its root.
+ *
+ * See also: menu_cache_add_reload_notify(), menu_cache_item_dup_parent().
+ *
+ * Returns: (transfer full): menu cache descriptor.
+ *
+ * Since: 0.1.0
+ */
+MenuCache* menu_cache_lookup( const char* menu_name )
+{
+    MenuCache* cache;
+
+    /* lookup in a hash table for already loaded menus */
+    MENU_CACHE_LOCK;
+#if !GLIB_CHECK_VERSION(2, 32, 0)
+    /* FIXME: destroy them on application exit? */
+    if(!sync_run_mutex)
+        sync_run_mutex = g_mutex_new();
+    if(!sync_run_cond)
+        sync_run_cond = g_cond_new();
+#endif
+    if( G_UNLIKELY( ! hash ) )
+        hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL );
+    else
+    {
+        cache = (MenuCache*)g_hash_table_lookup(hash, menu_name);
+        if( cache )
+        {
+            menu_cache_ref(cache);
+            MENU_CACHE_UNLOCK;
+            return cache;
+        }
+    }
+    MENU_CACHE_UNLOCK;
+
+    cache = menu_cache_create(menu_name);
+    cache->cancellable = g_cancellable_new();
+#if GLIB_CHECK_VERSION(2, 32, 0)
+    cache->thr = g_thread_new(menu_name, menu_cache_loader_thread, cache);
+#else
+    cache->thr = g_thread_create(menu_cache_loader_thread, cache, TRUE, NULL);
+#endif
+    return cache;
+}
+
+/**
+ * menu_cache_lookup_sync
+ * @menu_name: a menu name
+ *
+ * Searches for data from menu-cached for @menu_name. If no connection
+ * exists yet then creates new one and retrieves all data.
+ *
+ * Returns: (transfer full): menu cache descriptor.
+ *
+ * Since: 0.3.1
+ */
+MenuCache* menu_cache_lookup_sync( const char* menu_name )
+{
+    MenuCache* mc = menu_cache_lookup(menu_name);
+    MenuCacheDir* root_dir = menu_cache_dup_root_dir(mc);
+    /* ensure that the menu cache is loaded */
+    if(root_dir)
+        menu_cache_item_unref(MENU_CACHE_ITEM(root_dir));
+    else /* if it's not yet loaded */
+    {
+        MenuCacheNotifyId notify_id;
+        /* add stub */
+        notify_id = menu_cache_add_reload_notify(mc, NULL, NULL);
+#if GLIB_CHECK_VERSION(2, 32, 0)
+        g_mutex_lock(&sync_run_mutex);
+        while(!mc->ready)
+            g_cond_wait(&sync_run_cond, &sync_run_mutex);
+        g_mutex_unlock(&sync_run_mutex);
+#else
+        g_mutex_lock(sync_run_mutex);
+        g_debug("menu_cache_lookup_sync: enter wait %p", mc);
+        while(!mc->ready)
+            g_cond_wait(sync_run_cond, sync_run_mutex);
+        g_debug("menu_cache_lookup_sync: leave wait");
+        g_mutex_unlock(sync_run_mutex);
+#endif
+        menu_cache_remove_reload_notify(mc, notify_id);
+    }
+    return mc;
+}
+
+static GSList* list_app_in_dir(MenuCacheDir* dir, GSList* list)
+{
+    GSList* l;
+    for( l = dir->children; l; l = l->next )
+    {
+        MenuCacheItem* item = MENU_CACHE_ITEM(l->data);
+        switch( menu_cache_item_get_type(item) )
+        {
+        case MENU_CACHE_TYPE_DIR:
+            list = list_app_in_dir( MENU_CACHE_DIR(item), list );
+            break;
+        case MENU_CACHE_TYPE_APP:
+            list = g_slist_prepend(list, menu_cache_item_ref(item));
+            break;
+        case MENU_CACHE_TYPE_NONE:
+        case MENU_CACHE_TYPE_SEP:
+            break;
+        }
+    }
+    return list;
+}
+
+/**
+ * menu_cache_list_all_apps
+ * @cache: a menu cache descriptor
+ *
+ * Retrieves full list of applications in menu cache. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 0.1.2
+ */
+GSList* menu_cache_list_all_apps(MenuCache* cache)
+{
+    GSList* list;
+    MENU_CACHE_LOCK;
+    if (G_UNLIKELY(!cache->root_dir)) /* empty cache */
+        list = NULL;
+    else
+        list = list_app_in_dir(cache->root_dir, NULL);
+    MENU_CACHE_UNLOCK;
+    return list;
+}
+
+/**
+ * menu_cache_get_desktop_env_flag
+ * @cache: a menu cache descriptor
+ * @desktop_env: desktop environment name
+ *
+ * Makes bit mask of desktop environment from its name. The @desktop_env
+ * may be simple string or colon separated list of compatible session
+ * names according to XDG_CURRENT_DESKTOP freedesktop.org specification.
+ *
+ * Returns: DE bit mask.
+ *
+ * Since: 0.2.0
+ */
+guint32 menu_cache_get_desktop_env_flag( MenuCache* cache, const char* desktop_env )
+{
+    char** de;
+    char **envs;
+    guint32 flags = 0;
+    int j;
+
+    if (desktop_env == NULL || desktop_env[0] == '\0')
+        return flags;
+
+    envs = g_strsplit(desktop_env, ":", -1);
+    MENU_CACHE_LOCK;
+    de = cache->known_des;
+    for (j = 0; envs[j]; j++)
+    {
+        if( de )
+        {
+            int i;
+            for( i = 0; de[i]; ++i )
+                if (strcmp(envs[j], de[i]) == 0)
+                    break;
+            if (de[i])
+            {
+                flags |= 1 << (i + N_KNOWN_DESKTOPS);
+                continue;
+            }
+        }
+        if (strcmp(envs[j], "GNOME") == 0)
+            flags |= SHOW_IN_GNOME;
+        else if (strcmp(envs[j], "KDE") == 0)
+            flags |= SHOW_IN_KDE;
+        else if (strcmp(envs[j], "XFCE") == 0)
+            flags |= SHOW_IN_XFCE;
+        else if (strcmp(envs[j], "LXDE") == 0)
+            flags |= SHOW_IN_LXDE;
+        else if (strcmp(envs[j], "ROX") == 0)
+            flags |= SHOW_IN_ROX;
+    }
+    MENU_CACHE_UNLOCK;
+    g_strfreev(envs);
+    return flags;
+}
+
+static MenuCacheItem *_scan_by_id(MenuCacheItem *item, const char *id)
+{
+    GSList *l;
+
+    if (item)
+        switch (menu_cache_item_get_type(item))
+        {
+            case MENU_CACHE_TYPE_DIR:
+                for (l = MENU_CACHE_DIR(item)->children; l; l = l->next)
+                {
+                    item = _scan_by_id(MENU_CACHE_ITEM(l->data), id);
+                    if (item)
+                        return item;
+                }
+                break;
+            case MENU_CACHE_TYPE_APP:
+                if (g_strcmp0(menu_cache_item_get_id(item), id) == 0)
+                    return item;
+                break;
+            default: ;
+        }
+    return NULL;
+}
+
+/**
+ * menu_cache_find_item_by_id
+ * @cache: a menu cache descriptor
+ * @id: item ID (name such as 'application.desktop')
+ *
+ * Searches if @id already exists within @cache and returns found item.
+ * Returned data should be freed with menu_cache_item_unref() after usage.
+ *
+ * Returns: (transfer full): found item or %NULL.
+ *
+ * Since: 0.5.0
+ */
+MenuCacheItem *menu_cache_find_item_by_id(MenuCache *cache, const char *id)
+{
+    MenuCacheItem *item = NULL;
+
+    MENU_CACHE_LOCK;
+    if (cache && id)
+        item = _scan_by_id(MENU_CACHE_ITEM(cache->root_dir), id);
+    if (item)
+        menu_cache_item_ref(item);
+    MENU_CACHE_UNLOCK;
+    return item;
+}
+
+static GSList* list_app_in_dir_for_cat(MenuCacheDir *dir, GSList *list, const char *id)
+{
+    const char **cat;
+    GSList *l;
+
+    for (l = dir->children; l; l = l->next)
+    {
+        MenuCacheItem *item = MENU_CACHE_ITEM(l->data);
+        switch (item->type)
+        {
+        case MENU_CACHE_TYPE_DIR:
+            list = list_app_in_dir_for_cat(MENU_CACHE_DIR(item), list, id);
+            break;
+        case MENU_CACHE_TYPE_APP:
+            cat = MENU_CACHE_APP(item)->categories;
+            if (cat) while (*cat)
+                if (*cat++ == id)
+                {
+                    list = g_slist_prepend(list, menu_cache_item_ref(item));
+                    break;
+                }
+            break;
+        case MENU_CACHE_TYPE_NONE:
+        case MENU_CACHE_TYPE_SEP:
+            break;
+        }
+    }
+    return list;
+}
+
+/**
+ * menu_cache_list_all_for_category
+ * @cache: a menu cache descriptor
+ * @category: category to list items
+ *
+ * Retrieves list of applications in menu cache which have @category in
+ * their list of categories. The search is case-sensitive. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 1.0.0
+ */
+GSList *menu_cache_list_all_for_category(MenuCache* cache, const char *category)
+{
+    GQuark q;
+    GSList *list;
+
+    g_return_val_if_fail(cache != NULL && category != NULL, NULL);
+    q = g_quark_try_string(category);
+    if (q == 0)
+        return NULL;
+    MENU_CACHE_LOCK;
+    if (G_UNLIKELY(cache->root_dir == NULL))
+        list = NULL;
+    else
+        list = list_app_in_dir_for_cat(cache->root_dir, NULL, g_quark_to_string(q));
+    MENU_CACHE_UNLOCK;
+    return list;
+}
+
+static GSList* list_app_in_dir_for_kw(MenuCacheDir *dir, GSList *list, const char *kw)
+{
+    GSList *l;
+
+    for (l = dir->children; l; l = l->next)
+    {
+        MenuCacheItem *item = MENU_CACHE_ITEM(l->data);
+        switch (item->type)
+        {
+        case MENU_CACHE_TYPE_DIR:
+            list = list_app_in_dir_for_kw(MENU_CACHE_DIR(item), list, kw);
+            break;
+        case MENU_CACHE_TYPE_APP:
+            if (strstr(MENU_CACHE_APP(item)->keywords, kw) != NULL)
+                list = g_slist_prepend(list, menu_cache_item_ref(item));
+            break;
+        case MENU_CACHE_TYPE_NONE:
+        case MENU_CACHE_TYPE_SEP:
+            break;
+        }
+    }
+    return list;
+}
+
+/**
+ * menu_cache_list_all_for_keyword
+ * @cache: a menu cache descriptor
+ * @keyword: a keyword to search
+ *
+ * Retrieves list of applications in menu cache which have a @keyword
+ * as either a word or part of word in exec command, name, generic name
+ * or defined keywords. The search is case-insensitive. Returned list
+ * should be freed with g_slist_free_full(list, menu_cache_item_unref)
+ * after usage.
+ *
+ * Returns: (transfer full) (element-type MenuCacheItem): list of items.
+ *
+ * Since: 1.0.0
+ */
+GSList *menu_cache_list_all_for_keyword(MenuCache* cache, const char *keyword)
+{
+    char *casefolded = g_utf8_casefold(keyword, -1);
+    GSList *list;
+
+    g_return_val_if_fail(cache != NULL && keyword != NULL, NULL);
+    MENU_CACHE_LOCK;
+    if (G_UNLIKELY(cache->root_dir == NULL))
+        list = NULL;
+    else
+        list = list_app_in_dir_for_kw(cache->root_dir, NULL, casefolded);
+    MENU_CACHE_UNLOCK;
+    g_free(casefolded);
+    return list;
+}
Index: menu-cache/patches/README
===================================================================
--- menu-cache/patches/README	(nonexistent)
+++ menu-cache/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: menu-cache/patches
===================================================================
--- menu-cache/patches	(nonexistent)
+++ menu-cache/patches	(revision 385)

Property changes on: menu-cache/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: menu-cache
===================================================================
--- menu-cache	(nonexistent)
+++ menu-cache	(revision 385)

Property changes on: menu-cache
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/file.list
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/file.list	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/file.list	(nonexistent)
@@ -1,2 +0,0 @@
-mesa-22.3.4/meson.build
-mesa-22.3.4/src/gallium/targets/opencl/meson.build
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl/meson.build
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl/meson.build	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl/meson.build	(nonexistent)
@@ -1,138 +0,0 @@
-# Copyright © 2017 Intel Corporation
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-opencl_link_args = []
-opencl_link_deps = []
-opencl_version = '1'
-
-if with_ld_version_script
-  opencl_link_args += [
-    '-Wl,--version-script', join_paths(meson.current_source_dir(), 'opencl.sym')
-  ]
-  opencl_link_deps += files('opencl.sym')
-endif
-
-llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
-opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
-
-polly_dep = null_dep
-polly_isl_dep = null_dep
-if dep_llvm.version().version_compare('>=10.0.0')
-  polly_dep = cpp.find_library('Polly', dirs : llvm_libdir, required : false)
-  polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
-endif
-
-dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
-
-# meson will return clang-cpp from system dirs if it's not found in llvm_libdir
-linker_rpath_arg = '-Wl,--rpath=@0@'.format(llvm_libdir)
-clang_test_code = '''
-  #include <clang/Basic/Version.h>
-  int main (void) {
-    size_t found_pos = clang::getClangFullVersion().find(CLANG_VERSION_STRING);
-    return found_pos == ::std::string::npos ? 1 : 0;
-  }
-'''
-can_check_clang = (not meson.is_cross_build() or meson.has_exe_wrapper()) and cpp.has_link_argument(linker_rpath_arg)
-can_check_clang = false
-if can_check_clang
-  test_run = cpp.run(clang_test_code, name : 'dep-clang-usable',
-                     dependencies : [dep_llvm, dep_clang], args : linker_rpath_arg)
-  dep_clang_usable = test_run.compiled() and test_run.returncode() == 0
-else
-  dep_clang_usable = true
-endif
-if not _shared_llvm or not (dep_clang.found() and dep_clang_usable)
-  dep_clang = [
-    cpp.find_library('clangCodeGen', dirs : llvm_libdir),
-    cpp.find_library('clangFrontendTool', dirs : llvm_libdir),
-    cpp.find_library('clangFrontend', dirs : llvm_libdir),
-    cpp.find_library('clangDriver', dirs : llvm_libdir),
-    cpp.find_library('clangSerialization', dirs : llvm_libdir),
-    cpp.find_library('clangParse', dirs : llvm_libdir),
-    cpp.find_library('clangSema', dirs : llvm_libdir),
-    cpp.find_library('clangAnalysis', dirs : llvm_libdir),
-    cpp.find_library('clangAST', dirs : llvm_libdir),
-    cpp.find_library('clangASTMatchers', dirs : llvm_libdir),
-    cpp.find_library('clangEdit', dirs : llvm_libdir),
-    cpp.find_library('clangLex', dirs : llvm_libdir),
-    cpp.find_library('clangBasic', dirs : llvm_libdir),
-    polly_dep, polly_isl_dep,
-  ]
-  if dep_llvm.version().version_compare('>= 15.0')
-    dep_clang += cpp.find_library('clangSupport', dirs : llvm_libdir)
-  endif
-
-  # check clang once more
-  if can_check_clang
-    test_run = cpp.run(clang_test_code, name : 'dep-clang-usable',
-                       dependencies : [dep_llvm, dep_clang], args : linker_rpath_arg)
-    if not test_run.compiled() or test_run.returncode() != 0
-      error('No usable clang found!')
-    endif
-  endif
-endif
-
-ocldef_in = files(opencl_libname + '.def.in')[0]
-ocldef = custom_target(
-  'ocldef.def',
-  input: ocldef_in,
-  output : 'ocldef.def',
-  command : gen_vs_module_defs_normal_command,
-)
-
-libopencl = shared_library(
-  opencl_libname,
-  [],
-  vs_module_defs : ocldef,
-  link_args : [ld_args_gc_sections, opencl_link_args],
-  link_depends : opencl_link_deps,
-  link_whole : libclover,
-  link_with : [libpipe_loader_dynamic, libgallium],
-  dependencies : [
-    idep_mesautil,
-    dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang, dep_version
-  ],
-  name_prefix : host_machine.system() == 'windows' ? '' : 'lib',  # otherwise mingw will create libOpenCL-1.dll or libMesaOpenCL-1.dll
-  version : '@0@.0.0'.format(opencl_version),
-  soversion : host_machine.system() == 'windows' ? '' : opencl_version,
-  install : true,
-)
-
-if with_opencl_icd
-  _config = configuration_data()
-  _config.set('OPENCL_LIBNAME', 'MesaOpenCL')
-  _config.set('OPENCL_VERSION', opencl_version)
-  configure_file(
-    configuration : _config,
-    input : 'mesa.icd.in',
-    output : 'mesa.icd',
-    install : true,
-    install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
-  )
-
-  if meson.version().version_compare('>= 0.58')
-    # .so is hardcoded in the icd as well
-    devenv.prepend(
-      'OCL_ICD_FILENAMES',
-      meson.current_build_dir() / 'libMesaOpenCL.so.@0@'.format(opencl_version)
-    )
-  endif
-endif
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets/opencl
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium/targets
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src/gallium
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/src
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/meson.build
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/meson.build	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new/meson.build	(nonexistent)
@@ -1,2428 +0,0 @@
-# Copyright © 2017-2020 Intel Corporation
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-project(
-  'mesa',
-  ['c', 'cpp'],
-  version : run_command(
-    [find_program('python3', 'python'), 'bin/meson_get_version.py'],
-    check : true
-  ).stdout(),
-  license : 'MIT',
-  meson_version : '>= 0.53',
-  default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++17', 'rust_std=2021']
-)
-
-# In recent versions, meson can inject some extra arguments to get richer
-# results from gtest based tests.  Feature was added in 0.55, but requiring
-# 0.59.2 to include an important fix.  See https://github.com/mesonbuild/meson/pull/9283.
-gtest_test_protocol = 'exitcode'
-if meson.version().version_compare('>= 0.59.2')
-  gtest_test_protocol = 'gtest'
-endif
-
-cc = meson.get_compiler('c')
-cpp = meson.get_compiler('cpp')
-
-null_dep = dependency('', required : false)
-
-if get_option('layout') != 'mirror'
-  error('`mirror` is the only build directory layout supported')
-endif
-
-# Arguments for the preprocessor, put these in a separate array from the C and
-# C++ (cpp in meson terminology) arguments since they need to be added to the
-# default arguments for both C and C++.
-pre_args = [
-  '-D__STDC_CONSTANT_MACROS',
-  '-D__STDC_FORMAT_MACROS',
-  '-D__STDC_LIMIT_MACROS',
-  '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
-  '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"',
-]
-c_args = []
-cpp_args = []
-
-with_moltenvk_dir = get_option('moltenvk-dir')
-with_vulkan_icd_dir = get_option('vulkan-icd-dir')
-with_tests = get_option('build-tests')
-with_glcpp_tests = get_option('enable-glcpp-tests')
-with_aco_tests = get_option('build-aco-tests')
-with_glx_read_only_text = get_option('glx-read-only-text')
-with_glx_direct = get_option('glx-direct')
-with_osmesa = get_option('osmesa')
-with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay')
-with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select')
-with_tools = get_option('tools')
-if with_tools.contains('all')
-  with_tools = [
-    'drm-shim',
-    'dlclose-skip',
-    'etnaviv',
-    'freedreno',
-    'glsl',
-    'intel',
-    'intel-ui',
-    'lima',
-    'nir',
-    'nouveau',
-    'asahi',
-    'imagination',
-  ]
-endif
-
-with_any_vulkan_layers = get_option('vulkan-layers').length() != 0
-with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
-with_imgui = with_intel_tools or with_vulkan_overlay_layer
-
-dri_drivers_path = get_option('dri-drivers-path')
-if dri_drivers_path == ''
-  dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
-endif
-dri_search_path = get_option('dri-search-path')
-if dri_search_path == ''
-  dri_search_path = dri_drivers_path
-endif
-
-gbm_backends_path = get_option('gbm-backends-path')
-if gbm_backends_path == ''
-  gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
-endif
-
-with_gles1 = get_option('gles1')
-if with_gles1 == 'true'
-  with_gles1 = 'enabled'
-  warning('gles1 option "true" deprecated, please use "enabled" instead.')
-elif with_gles1 == 'false'
-  with_gles1 = 'disabled'
-  warning('gles1 option "false" deprecated, please use "disabled" instead.')
-endif
-with_gles2 = get_option('gles2')
-if with_gles2 == 'true'
-  with_gles2 = 'enabled'
-  warning('gles2 option "true" deprecated, please use "enabled" instead.')
-elif with_gles2 == 'false'
-  with_gles2 = 'disabled'
-  warning('gles2 option "false" deprecated, please use "disabled" instead.')
-endif
-if host_machine.system() == 'windows'
-  if with_gles1 == 'auto'
-    with_gles1 = 'disabled'
-  endif
-  if with_gles2 == 'auto'
-    with_gles2 = 'disabled'
-  endif
-endif
-with_opengl = get_option('opengl')
-
-# Default shared glapi off for windows, on elsewhere.
-_sg = get_option('shared-glapi')
-if _sg == 'true'
-  _sg = 'enabled'
-  warning('shared-glapi option "true" deprecated, please use "enabled" instead.')
-elif _sg == 'false'
-  _sg = 'disabled'
-  warning('shared-glapi option "false" deprecated, please use "disabled" instead.')
-endif
-if _sg == 'auto'
-  with_shared_glapi = host_machine.system() != 'windows'
-else
-  with_shared_glapi = _sg == 'enabled'
-endif
-
-# shared-glapi is required if at least two OpenGL APIs are being built
-if not with_shared_glapi
-  if ((with_gles1 == 'enabled' and with_gles2 == 'enabled') or
-      (with_gles1 == 'enabled' and with_opengl) or
-      (with_gles2 == 'enabled' and with_opengl))
-    error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
-  endif
-  with_gles1 = 'disabled'
-  with_gles2 = 'disabled'
-endif
-
-# We require OpenGL for OpenGL ES
-if not with_opengl
-  if (with_gles1 == 'enabled' or with_gles2 == 'enabled') and not with_opengl
-    error('building OpenGL ES without OpenGL is not supported.')
-  endif
-  with_gles1 = 'disabled'
-  with_gles2 = 'disabled'
-endif
-
-with_gles1 = with_gles1 != 'disabled'
-with_gles2 = with_gles2 != 'disabled'
-with_any_opengl = with_opengl or with_gles1 or with_gles2
-# Only build shared_glapi if at least one OpenGL API is enabled
-with_shared_glapi = with_shared_glapi and with_any_opengl
-
-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system())
-
-with_freedreno_kgsl = get_option('freedreno-kgsl')
-if with_freedreno_kgsl
-  system_has_kms_drm = false
-endif
-
-dri_drivers = get_option('dri-drivers')
-if dri_drivers.length() != 0
-  error('Mesa\'s main branch no longer has any "classic" drivers, use the "amber" branch instead.')
-endif
-
-gallium_drivers = get_option('gallium-drivers')
-if gallium_drivers.contains('auto')
-  if system_has_kms_drm
-    # TODO: PPC, Sparc
-    if ['x86', 'x86_64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast',
-        'iris', 'crocus', 'i915'
-      ]
-    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga',
-        'tegra', 'virgl', 'lima', 'panfrost', 'swrast'
-      ]
-    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast'
-      ]
-    else
-      error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-            host_machine.cpu_family()))
-    endif
-  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
-    gallium_drivers = ['swrast']
-  else
-    error('Unknown OS @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-with_gallium_radeonsi = gallium_drivers.contains('radeonsi')
-with_gallium_r300 = gallium_drivers.contains('r300')
-with_gallium_r600 = gallium_drivers.contains('r600')
-with_gallium_nouveau = gallium_drivers.contains('nouveau')
-with_gallium_freedreno = gallium_drivers.contains('freedreno')
-with_gallium_softpipe = gallium_drivers.contains('swrast')
-with_gallium_vc4 = gallium_drivers.contains('vc4')
-with_gallium_v3d = gallium_drivers.contains('v3d')
-with_gallium_panfrost = gallium_drivers.contains('panfrost')
-with_gallium_etnaviv = gallium_drivers.contains('etnaviv')
-with_gallium_tegra = gallium_drivers.contains('tegra')
-with_gallium_crocus = gallium_drivers.contains('crocus')
-with_gallium_iris = gallium_drivers.contains('iris')
-with_gallium_i915 = gallium_drivers.contains('i915')
-with_gallium_svga = gallium_drivers.contains('svga')
-with_gallium_virgl = gallium_drivers.contains('virgl')
-with_gallium_lima = gallium_drivers.contains('lima')
-with_gallium_zink = gallium_drivers.contains('zink')
-with_gallium_d3d12 = gallium_drivers.contains('d3d12')
-with_gallium_asahi = gallium_drivers.contains('asahi')
-foreach gallium_driver : gallium_drivers
-  pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
-endforeach
-
-with_gallium = gallium_drivers.length() != 0
-with_gallium_kmsro = with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_panfrost or with_gallium_lima or with_gallium_freedreno or with_gallium_asahi
-
-if not system_has_kms_drm
-   with_gallium_kmsro = false
-endif
-
-with_dri = false
-if with_gallium and system_has_kms_drm
-  _glx = get_option('glx')
-  _egl = get_option('egl')
-  if _glx == 'dri' or _egl == 'enabled' or (_glx == 'disabled' and _egl != 'disabled')
-    with_dri = true
-  endif
-endif
-
-_vulkan_drivers = get_option('vulkan-drivers')
-if _vulkan_drivers.contains('auto')
-  if system_has_kms_drm
-    if host_machine.cpu_family().startswith('x86')
-      _vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast']
-    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
-      _vulkan_drivers = ['swrast']
-    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
-      _vulkan_drivers = ['amd', 'swrast']
-    else
-      error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-            host_machine.cpu_family()))
-    endif
-  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
-    # No vulkan driver supports windows or macOS currently
-    _vulkan_drivers = []
-  else
-    error('Unknown OS @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-
-with_intel_vk = _vulkan_drivers.contains('intel')
-with_intel_hasvk = _vulkan_drivers.contains('intel_hasvk')
-with_amd_vk = _vulkan_drivers.contains('amd')
-with_freedreno_vk = _vulkan_drivers.contains('freedreno')
-with_panfrost_vk = _vulkan_drivers.contains('panfrost')
-with_swrast_vk = _vulkan_drivers.contains('swrast')
-with_virtio_vk = _vulkan_drivers.contains('virtio-experimental')
-with_freedreno_virtio = get_option('freedreno-virtio')
-with_broadcom_vk = _vulkan_drivers.contains('broadcom')
-with_imagination_vk = _vulkan_drivers.contains('imagination-experimental')
-with_imagination_srv = get_option('imagination-srv')
-with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
-with_any_vk = _vulkan_drivers.length() != 0
-
-with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk
-with_any_intel = with_intel_vk or with_intel_hasvk or with_gallium_iris or with_gallium_crocus or with_intel_tools
-
-if with_swrast_vk and not with_gallium_softpipe
-  error('swrast vulkan requires gallium swrast')
-endif
-if with_gallium_tegra and not with_gallium_nouveau
-  error('tegra driver requires nouveau driver')
-endif
-if with_aco_tests and not with_amd_vk
-  error('ACO tests require Radv')
-endif
-
-with_microsoft_clc = get_option('microsoft-clc').enabled()
-if ['x86_64'].contains(host_machine.cpu_family())
-  with_intel_clc = get_option('intel-clc').enabled()
-  with_intel_vk_rt = with_intel_vk and with_intel_clc
-else
-  with_intel_clc = false
-  with_intel_vk_rt = false
-endif
-with_clc = with_microsoft_clc or with_intel_clc
-with_libclc = with_clc
-with_spirv_to_dxil = get_option('spirv-to-dxil')
-
-if host_machine.system() == 'darwin'
-  with_dri_platform = 'apple'
-  pre_args += '-DBUILDING_MESA'
-elif ['windows', 'cygwin'].contains(host_machine.system())
-  with_dri_platform = 'windows'
-elif system_has_kms_drm
-  with_dri_platform = 'drm'
-else
-  # FIXME: haiku doesn't use dri, and xlib doesn't use dri, probably should
-  # assert here that one of those cases has been met.
-  # FIXME: illumos ends up here as well
-  with_dri_platform = 'none'
-endif
-
-with_vulkan_beta = get_option('vulkan-beta')
-if with_vulkan_beta
-  pre_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-endif
-
-_codecs = get_option('video-codecs')
-foreach c : ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc']
-   pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
-endforeach
-
-_platforms = get_option('platforms')
-if _platforms.contains('auto')
-  if system_has_kms_drm
-    _platforms = ['x11', 'wayland']
-  elif ['darwin', 'cygwin'].contains(host_machine.system())
-    _platforms = ['x11']
-  elif ['haiku'].contains(host_machine.system())
-    _platforms = ['haiku']
-  elif host_machine.system() == 'windows'
-    _platforms = ['windows']
-  else
-    error('Unknown OS @0@. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-
-with_platform_android = _platforms.contains('android')
-with_platform_x11 = _platforms.contains('x11')
-with_platform_wayland = _platforms.contains('wayland')
-with_platform_haiku = _platforms.contains('haiku')
-with_platform_windows = _platforms.contains('windows')
-
-with_glx = get_option('glx')
-if with_glx == 'auto'
-  if with_platform_android
-    with_glx = 'disabled'
-  elif with_dri
-    with_glx = 'dri'
-  elif with_platform_haiku
-    with_glx = 'disabled'
-  elif host_machine.system() == 'windows'
-    with_glx = 'disabled'
-  elif with_gallium
-    # Even when building just gallium drivers the user probably wants dri
-    with_glx = 'dri'
-  elif with_platform_x11 and with_any_opengl and not with_any_vk
-    # The automatic behavior should not be to turn on xlib based glx when
-    # building only vulkan drivers
-    with_glx = 'xlib'
-  else
-    with_glx = 'disabled'
-  endif
-endif
-if with_glx == 'dri'
-   if with_gallium
-      with_dri = true
-   endif
-endif
-
-if not (with_dri or with_gallium or with_glx != 'disabled')
-  with_gles1 = false
-  with_gles2 = false
-  with_opengl = false
-  with_any_opengl = false
-  with_shared_glapi = false
-endif
-
-_gbm = get_option('gbm')
-if _gbm == 'true'
-  _gbm = 'enabled'
-  warning('gbm option "true" deprecated, please use "enabled" instead.')
-elif _gbm == 'false'
-  _gbm = 'disabled'
-  warning('gbm option "false" deprecated, please use "disabled" instead.')
-endif
-if _gbm == 'auto'
-  with_gbm = system_has_kms_drm and with_dri
-else
-  with_gbm = _gbm == 'enabled'
-endif
-if with_gbm and not system_has_kms_drm
-  error('GBM only supports DRM/KMS platforms')
-endif
-
-_xlib_lease = get_option('xlib-lease')
-if _xlib_lease == 'true'
-  _xlib_lease = 'enabled'
-  warning('xlib_lease option "true" deprecated, please use "enabled" instead.')
-elif _xlib_lease == 'false'
-  _xlib_lease = 'disabled'
-  warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
-endif
-if _xlib_lease == 'auto'
-  with_xlib_lease = with_platform_x11 and system_has_kms_drm
-else
-  with_xlib_lease = _xlib_lease == 'enabled'
-endif
-
-if with_platform_wayland
-  c_args += '-DVK_USE_PLATFORM_WAYLAND_KHR'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_WAYLAND_KHR'
-endif
-if with_platform_x11
-  c_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR']
-  #add this once aco and other places can build with it
-  #cpp_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR']
-endif
-if with_platform_windows
-  c_args += '-DVK_USE_PLATFORM_WIN32_KHR'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_WIN32_KHR'
-endif
-if with_platform_android
-  c_args += '-DVK_USE_PLATFORM_ANDROID_KHR'
-  cpp_args += '-DVK_USE_PLATFORM_ANDROID_KHR'
-endif
-if with_xlib_lease
-  c_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
-endif
-if system_has_kms_drm and not with_platform_android
-  c_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
-  cpp_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
-endif
-if host_machine.system() == 'darwin'
-  c_args += '-DVK_USE_PLATFORM_MACOS_MVK'
-  cpp_args += '-DVK_USE_PLATFORM_MACOS_MVK'
-  c_args += '-DVK_USE_PLATFORM_METAL_EXT'
-  cpp_args += '-DVK_USE_PLATFORM_METAL_EXT'
-  #macOS seems to need beta extensions to build for now:
-  c_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-  cpp_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-endif
-
-_egl = get_option('egl')
-if _egl == 'true'
-  _egl = 'enabled'
-  warning('egl option "true" deprecated, please use "enabled" instead.')
-elif _egl == 'false'
-  _egl = 'disabled'
-  warning('egl option "false" deprecated, please use "disabled" instead.')
-endif
-if _egl == 'auto'
-  with_egl = (
-    host_machine.system() != 'darwin' and
-    (with_platform_windows or with_dri) and
-    with_shared_glapi
-  )
-elif _egl == 'enabled'
-  if not with_dri and not with_platform_haiku and not with_platform_windows
-    error('EGL requires dri, haiku, or windows')
-  elif not with_shared_glapi
-    error('EGL requires shared-glapi')
-  elif not ['disabled', 'dri'].contains(with_glx)
-    error('EGL requires dri, but a GLX is being built without dri')
-  elif host_machine.system() == 'darwin'
-    error('EGL is not available on MacOS')
-  endif
-  with_egl = true
-else
-  with_egl = false
-endif
-
-if with_egl
-  _platforms += 'surfaceless'
-  if with_gbm and not with_platform_android
-    _platforms += 'drm'
-  endif
-
-  egl_native_platform = get_option('egl-native-platform')
-  if egl_native_platform.contains('auto')
-    egl_native_platform = _platforms[0]
-  endif
-endif
-
-if with_egl and not _platforms.contains(egl_native_platform)
-  error('-Degl-native-platform does not specify an enabled platform')
-endif
-
-if 'x11' in _platforms
-  _platforms += 'xcb'
-endif
-
-foreach platform : _platforms
-  pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
-endforeach
-
-if with_platform_android and get_option('platform-sdk-version') >= 29
-  # By default the NDK compiler, at least, emits emutls references instead of
-  # ELF TLS, even when building targeting newer API levels.  Make it actually do
-  # ELF TLS instead.
-  c_args += '-fno-emulated-tls'
-  cpp_args += '-fno-emulated-tls'
-endif
-
-# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
-# full toolchain (including libc) support.
-have_mtls_dialect = false
-foreach c_arg : get_option('c_args')
-  if c_arg.startswith('-mtls-dialect=')
-    have_mtls_dialect = true
-    break
-  endif
-endforeach
-if not have_mtls_dialect
-  # need .run to check libc support. meson aborts when calling .run when
-  # cross-compiling, but because this is just an optimization we can skip it
-  if meson.is_cross_build() and not meson.has_exe_wrapper()
-    warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
-  else
-    # -fpic to force dynamic tls, otherwise TLS relaxation defeats check
-    gnu2_test = cc.run('int __thread x; int main() { return x; }',
-                       args: ['-mtls-dialect=gnu2', '-fpic'],
-                       name: '-mtls-dialect=gnu2')
-    if gnu2_test.returncode() == 0 and (
-          # check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
-          host_machine.cpu_family() != 'x86_64' or
-          # get_linker_id misses LDFLAGS=-fuse-ld=lld: https://github.com/mesonbuild/meson/issues/6377
-          #cc.get_linker_id() != 'ld.lld' or
-          cc.links('''int __thread x; int y; int main() { __asm__(
-                "leaq x@TLSDESC(%rip), %rax\n"
-                "movq y@GOTPCREL(%rip), %rdx\n"
-                "call *x@TLSCALL(%rax)\n"); }''', name: 'split TLSDESC')
-          )
-      c_args += '-mtls-dialect=gnu2'
-      cpp_args += '-mtls-dialect=gnu2'
-    endif
-  endif
-endif
-
-if with_glx != 'disabled'
-  if not (with_platform_x11 and with_any_opengl)
-    error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
-  elif with_glx == 'xlib'
-    if not with_gallium
-      error('xlib based GLX requires at least one gallium driver')
-    elif not with_gallium_softpipe
-      error('xlib based GLX requires softpipe or llvmpipe.')
-    elif with_dri
-      error('xlib conflicts with any dri driver')
-    endif
-  elif with_glx == 'dri'
-    if not with_shared_glapi
-      error('dri based GLX requires shared-glapi')
-    endif
-  endif
-endif
-
-with_glvnd = get_option('glvnd')
-glvnd_vendor_name = get_option('glvnd-vendor-name')
-if with_glvnd
-  if with_platform_windows
-    error('glvnd cannot be used on Windows')
-  elif with_glx == 'xlib'
-    error('Cannot build glvnd support for GLX that is not DRI based.')
-  elif with_glx == 'disabled' and not with_egl
-    error('glvnd requires DRI based GLX and/or EGL')
-  endif
-  if get_option('egl-lib-suffix') != ''
-    error('''EGL lib suffix can't be used with libglvnd''')
-  endif
-endif
-
-if with_vulkan_icd_dir == ''
-  with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
-endif
-
-# GNU/Hurd includes egl_dri2, without drm.
-with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
-  host_machine.system() == 'gnu')
-_dri3 = get_option('dri3')
-if _dri3 == 'true'
-  _dri3 = 'enabled'
-  warning('dri3 option "true" deprecated, please use "enabled" instead.')
-elif _dri3 == 'false'
-  _dri3 = 'disabled'
-  warning('dri3 option "false" deprecated, please use "disabled" instead.')
-endif
-if _dri3 == 'auto'
-  with_dri3 = system_has_kms_drm and with_dri2
-else
-  with_dri3 = _dri3 == 'enabled'
-endif
-
-if with_any_vk and (with_platform_x11 and not with_dri3)
-  error('Vulkan drivers require dri3 for X11 support')
-endif
-if with_dri
-  if with_glx == 'disabled' and not with_egl and not with_gbm
-    error('building dri drivers require at least one windowing system')
-  endif
-endif
-
-if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
-  error('kmsro requires dri3 for X11 support')
-endif
-
-dep_dxheaders = null_dep
-if with_gallium_d3d12 or with_microsoft_clc or with_microsoft_vk
-  dep_dxheaders = dependency('directx-headers', required : false)
-  if not dep_dxheaders.found()
-    dep_dxheaders = dependency('DirectX-Headers',
-      version : '>= 1.606.4',
-      fallback : ['DirectX-Headers', 'dep_dxheaders'],
-      required : with_gallium_d3d12 or with_microsoft_vk
-    )
-  endif
-endif
-
-_with_gallium_d3d12_video = get_option('gallium-d3d12-video')
-with_gallium_d3d12_video = false
-if with_gallium_d3d12 and not _with_gallium_d3d12_video.disabled()
-  with_gallium_d3d12_video = true
-  pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO'
-endif
-
-_vdpau = get_option('gallium-vdpau')
-if _vdpau == 'true'
-  _vdpau = 'enabled'
-  warning('gallium-vdpau option "true" deprecated, please use "enabled" instead.')
-elif _vdpau == 'false'
-  _vdpau = 'disabled'
-  warning('gallium-vdpau option "false" deprecated, please use "disabled" instead.')
-endif
-if not system_has_kms_drm
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker can only be build on unix-like OSes.')
-  else
-    _vdpau = 'disabled'
-  endif
-elif not with_platform_x11
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker requires X11 support.')
-  else
-    _vdpau = 'disabled'
-  endif
-elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
-          with_gallium_nouveau or with_gallium_d3d12_video or with_gallium_virgl)
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker requires at least one of the following gallium drivers: r300, r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).')
-  else
-    _vdpau = 'disabled'
-  endif
-endif
-dep_vdpau = null_dep
-with_gallium_vdpau = false
-if _vdpau != 'disabled'
-  dep_vdpau = dependency('vdpau', version : '>= 1.1', required : _vdpau == 'enabled')
-  if dep_vdpau.found()
-    dep_vdpau = dep_vdpau.partial_dependency(compile_args : true)
-    with_gallium_vdpau = true
-  endif
-endif
-
-if with_gallium_vdpau
-  pre_args += '-DHAVE_ST_VDPAU'
-endif
-vdpau_drivers_path = get_option('vdpau-libs-path')
-if vdpau_drivers_path == ''
-  vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau')
-endif
-
-if with_vulkan_overlay_layer or with_aco_tests or with_amd_vk
-  prog_glslang = find_program('glslangValidator')
-  if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
-    glslang_quiet = ['--quiet']
-  else
-    glslang_quiet = []
-  endif
-endif
-
-dep_xv = null_dep
-_omx = get_option('gallium-omx')
-if not system_has_kms_drm
-  if ['auto', 'disabled'].contains(_omx)
-    _omx = 'disabled'
-  else
-    error('OMX state tracker can only be built on unix-like OSes.')
-  endif
-elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
-  if ['auto', 'disabled'].contains(_omx)
-    _omx = 'disabled'
-  else
-    error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
-  endif
-endif
-with_gallium_omx = _omx
-dep_omx = null_dep
-dep_omx_other = []
-if ['auto', 'bellagio'].contains(_omx)
-  dep_omx = dependency(
-    'libomxil-bellagio', required : _omx == 'bellagio'
-  )
-  if dep_omx.found()
-    with_gallium_omx = 'bellagio'
-  endif
-endif
-if ['auto', 'tizonia'].contains(_omx)
-  if with_dri and with_egl
-    dep_omx = dependency(
-      'libtizonia', version : '>= 0.10.0',
-      required : _omx == 'tizonia',
-    )
-    dep_omx_other = [
-      dependency('libtizplatform', required : _omx == 'tizonia'),
-      dependency('tizilheaders', required : _omx == 'tizonia'),
-    ]
-    if dep_omx.found() and dep_omx_other[0].found() and dep_omx_other[1].found()
-      with_gallium_omx = 'tizonia'
-    endif
-  elif _omx == 'tizonia'
-    error('OMX-Tizonia state tracker requires dri and egl')
-  endif
-endif
-if _omx == 'auto'
-  with_gallium_omx = 'disabled'
-else
-  with_gallium_omx = _omx
-endif
-
-pre_args += [
-  '-DENABLE_ST_OMX_BELLAGIO=' + (with_gallium_omx == 'bellagio' ? '1' : '0'),
-  '-DENABLE_ST_OMX_TIZONIA=' + (with_gallium_omx == 'tizonia' ? '1' : '0'),
-]
-
-
-omx_drivers_path = get_option('omx-libs-path')
-
-if with_gallium_omx != 'disabled'
-  # Figure out where to put the omx driver.
-  # FIXME: this could all be vastly simplified by adding a 'defined_variable'
-  # argument to meson's get_variable method.
-  if omx_drivers_path == ''
-    _omx_libdir = dep_omx.get_variable(pkgconfig : 'libdir')
-    _omx_drivers_dir = dep_omx.get_variable(pkgconfig : 'pluginsdir')
-    if _omx_libdir == get_option('libdir')
-      omx_drivers_path = _omx_drivers_dir
-    else
-      _omx_base_dir = []
-      # This will fail on windows. Does OMX run on windows?
-      _omx_libdir = _omx_libdir.split('/')
-      _omx_drivers_dir = _omx_drivers_dir.split('/')
-      foreach o : _omx_drivers_dir
-        if not _omx_libdir.contains(o)
-          _omx_base_dir += o
-        endif
-      endforeach
-      omx_drivers_path = join_paths(get_option('libdir'), _omx_base_dir)
-    endif
-  endif
-endif
-
-_va = get_option('gallium-va')
-if _va == 'true'
-  _va = 'enabled'
-  warning('gallium-va option "true" deprecated, please use "enabled" instead.')
-elif _va == 'false'
-  _va = 'disabled'
-  warning('gallium-va option "false" deprecated, please use "disabled" instead.')
-endif
-if not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau or with_gallium_d3d12_video or with_gallium_virgl)
-  if _va == 'enabled'
-    error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
-  else
-    _va = 'disabled'
-  endif
-endif
-with_gallium_va = false
-dep_va = null_dep
-if _va != 'disabled'
-  _dep_va_name = 'libva'
-  if host_machine.system() == 'windows'
-    _dep_va_name = 'libva-win32'
-  endif
-  dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va == 'enabled')
-  if dep_va.found()
-    dep_va_headers = dep_va.partial_dependency(compile_args : true)
-    with_gallium_va = true
-    if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
-                            dependencies: dep_va_headers)
-      pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
-    endif
-  endif
-endif
-
-va_drivers_path = get_option('va-libs-path')
-if va_drivers_path == ''
-  va_drivers_path = join_paths(get_option('libdir'), 'dri')
-endif
-
-_xa = get_option('gallium-xa')
-if _xa == 'true'
-  _xa = 'enabled'
-  warning('gallium-xa option "true" deprecated, please use "enabled" instead.')
-elif _xa == 'false'
-  _xa = 'disabled'
-  warning('gallium-xa option "false" deprecated, please use "disabled" instead.')
-endif
-if not system_has_kms_drm
-  if _xa == 'enabled'
-    error('XA state tracker can only be built on unix-like OSes.')
-  else
-    _xa = 'disabled'
-  endif
-elif not (with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915
-          or with_gallium_svga)
-  if _xa == 'enabled'
-    error('XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.')
-  else
-    _xa = 'disabled'
-  endif
-endif
-with_gallium_xa = _xa != 'disabled'
-
-d3d_drivers_path = get_option('d3d-drivers-path')
-if d3d_drivers_path == ''
-  d3d_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'd3d')
-endif
-
-with_gallium_st_nine =  get_option('gallium-nine')
-if with_gallium_st_nine
-  if not with_gallium_softpipe
-    error('The nine state tracker requires gallium softpipe/llvmpipe.')
-  elif not (with_gallium_radeonsi or with_gallium_nouveau or with_gallium_r600
-            or with_gallium_r300 or with_gallium_svga or with_gallium_i915
-            or with_gallium_iris or with_gallium_crocus or with_gallium_zink)
-    error('The nine state tracker requires at least one non-swrast gallium driver.')
-  endif
-  if not with_dri3
-    error('Using nine with wine requires dri3')
-  endif
-endif
-with_gallium_st_d3d10umd =  get_option('gallium-d3d10umd')
-if with_gallium_st_d3d10umd
-  if not with_gallium_softpipe
-    error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.')
-  endif
-endif
-_power8 = get_option('power8')
-if _power8 == 'true'
-  _power8 = 'enabled'
-  warning('power8 option "true" deprecated, please use "enabled" instead.')
-elif _power8 == 'false'
-  _power8 = 'disabled'
-  warning('power8 option "false" deprecated, please use "disabled" instead.')
-endif
-if _power8 != 'disabled'
-  if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
-    if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
-      error('Altivec is not supported with gcc version < 4.8.')
-    endif
-    if cc.compiles('''
-        #include <altivec.h>
-        int main() {
-          vector unsigned char r;
-          vector unsigned int v = vec_splat_u32 (1);
-          r = __builtin_vec_vgbbd ((vector unsigned char) v);
-          return 0;
-        }''',
-        args : '-mpower8-vector',
-        name : 'POWER8 intrinsics')
-      pre_args += ['-D_ARCH_PWR8', '-mpower8-vector']
-    elif get_option('power8') == 'enabled'
-      error('POWER8 intrinsic support required but not found.')
-    endif
-  endif
-endif
-
-if get_option('vmware-mks-stats')
-  if not with_gallium_svga
-    error('vmware-mks-stats requires gallium VMware/svga driver.')
-  endif
-  pre_args += '-DVMX86_STATS=1'
-endif
-
-_opencl = get_option('gallium-opencl')
-_rtti = get_option('cpp_rtti')
-if _opencl != 'disabled'
-  if not with_gallium
-    error('OpenCL Clover implementation requires at least one gallium driver.')
-  endif
-  if not _rtti
-    error('The Clover OpenCL state tracker requires rtti')
-  endif
-
-  with_libclc = true
-  with_gallium_opencl = true
-  with_opencl_icd = _opencl == 'icd'
-else
-  with_gallium_opencl = false
-  with_opencl_icd = false
-endif
-
-with_gallium_rusticl = get_option('gallium-rusticl')
-if with_gallium_rusticl
-  if not with_gallium
-    error('rusticl requires at least one gallium driver.')
-  endif
-
-  if meson.version().version_compare('< 0.61.4')
-    error('rusticl requires meson 0.61.4 or newer')
-  endif
-
-  add_languages('rust', required: true)
-
-  with_clc = true
-  with_libclc = true
-endif
-
-dep_clc = null_dep
-if with_libclc
-  dep_clc = dependency('libclc')
-endif
-
-gl_pkgconfig_c_flags = []
-if with_platform_x11
-  if with_glx == 'xlib'
-    pre_args += '-DUSE_XSHM'
-  else
-    pre_args += '-DGLX_INDIRECT_RENDERING'
-    if with_glx_direct
-      pre_args += '-DGLX_DIRECT_RENDERING'
-    endif
-    if with_dri_platform == 'drm'
-      pre_args += '-DGLX_USE_DRM'
-    elif with_dri_platform == 'apple'
-      pre_args += '-DGLX_USE_APPLEGL'
-    elif with_dri_platform == 'windows'
-      pre_args += '-DGLX_USE_WINDOWSGL'
-    endif
-  endif
-endif
-
-with_android_stub = get_option('android-stub')
-if with_android_stub and not with_platform_android
-  error('`-D android-stub=true` makes no sense without `-D platforms=android`')
-endif
-
-if with_platform_android
-  dep_android_mapper4 = null_dep
-  if not with_android_stub
-    dep_android = [
-      dependency('cutils'),
-      dependency('hardware'),
-      dependency('sync'),
-      dependency('backtrace')
-    ]
-    if get_option('platform-sdk-version') >= 26
-      dep_android += dependency('nativewindow')
-    endif
-    if get_option('platform-sdk-version') >= 30
-      dep_android_mapper4 = dependency('android.hardware.graphics.mapper', version : '>= 4.0', required : false)
-    endif
-  endif
-  pre_args += [
-    '-DANDROID',
-    '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string()
-  ]
-endif
-
-prog_python = import('python').find_installation('python3')
-has_mako = run_command(
-  prog_python, '-c',
-  '''
-from distutils.version import StrictVersion
-import mako
-assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
-  ''', check: false)
-if has_mako.returncode() != 0
-  error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
-endif
-
-if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
-  error('When using GCC, version 4.4.6 or later is required.')
-endif
-
-# Support systems without ETIME (e.g. FreeBSD)
-if cc.get_define('ETIME', prefix : '#include <errno.h>') == ''
-  pre_args += '-DETIME=ETIMEDOUT'
-endif
-
-# Define DEBUG for debug builds only (debugoptimized is not included on this one)
-if get_option('buildtype') == 'debug'
-  pre_args += '-DDEBUG'
-endif
-
-with_shader_cache = false
-_shader_cache = get_option('shader-cache')
-if _shader_cache == 'true'
-  _shader_cache = 'enabled'
-  warning('shader_cache option "true" deprecated, please use "enabled" instead.')
-elif _shader_cache == 'false'
-  _shader_cache = 'disabled'
-  warning('shader_cache option "false" deprecated, please use "disabled" instead.')
-endif
-if _shader_cache != 'disabled'
-  if host_machine.system() == 'windows'
-    if _shader_cache == 'enabled'
-      error('Shader Cache does not currently work on Windows')
-    endif
-  else
-    pre_args += '-DENABLE_SHADER_CACHE'
-    if not get_option('shader-cache-default')
-      pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
-    endif
-    with_shader_cache = true
-  endif
-endif
-
-if with_shader_cache
-  shader_cache_max_size = get_option('shader-cache-max-size')
-  if shader_cache_max_size != ''
-    pre_args += '-DMESA_SHADER_CACHE_MAX_SIZE="@0@"'.format(shader_cache_max_size)
-  endif
-endif
-
-# Check for GCC style builtins
-foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs',
-             'ffsll', 'popcount', 'popcountll', 'unreachable', 'types_compatible_p']
-  if cc.has_function(b)
-    pre_args += '-DHAVE___BUILTIN_@0@'.format(b.to_upper())
-  endif
-endforeach
-
-# check for GCC __attribute__
-_attributes = [
-  'const', 'flatten', 'malloc', 'pure', 'unused', 'warn_unused_result',
-  'weak', 'format', 'packed', 'returns_nonnull', 'alias', 'noreturn',
-]
-foreach a : cc.get_supported_function_attributes(_attributes)
-  pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
-endforeach
-if cc.has_function_attribute('visibility:hidden')
-  pre_args += '-DHAVE_FUNC_ATTRIBUTE_VISIBILITY'
-endif
-if cc.compiles('__uint128_t foo(void) { return 0; }',
-               name : '__uint128_t')
-  pre_args += '-DHAVE_UINT128'
-endif
-
-if cc.has_function('reallocarray')
-   pre_args += '-DHAVE_REALLOCARRAY'
-endif
-
-# TODO: this is very incomplete
-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
-  pre_args += '-D_GNU_SOURCE'
-elif host_machine.system() == 'sunos'
-  pre_args += '-D__EXTENSIONS__'
-elif host_machine.system() == 'windows'
-  pre_args += [
-    '-D_WINDOWS', '-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00',
-    '-DPIPE_SUBSYSTEM_WINDOWS_USER',
-    '-D_USE_MATH_DEFINES',  # XXX: scons didn't use this for mingw
-  ]
-  if cc.get_argument_syntax() == 'msvc'
-    pre_args += [
-      '-DVC_EXTRALEAN',
-      '-D_CRT_SECURE_NO_WARNINGS',
-      '-D_CRT_SECURE_NO_DEPRECATE',
-      '-D_SCL_SECURE_NO_WARNINGS',
-      '-D_SCL_SECURE_NO_DEPRECATE',
-      '-D_ALLOW_KEYWORD_MACROS',
-      '-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
-      '-DNOMINMAX',
-    ]
-  else
-    # When the target is not mingw/ucrt
-    # NOTE: clang's stddef.h are conflict with mingw/ucrt's stddef.h
-    # So do not include headers that defined in clang for detecting
-    # _UCRT
-    if cc.compiles('''
-      #include <string.h>
-      #if defined(__MINGW32__) && defined(_UCRT)
-      #error
-      #endif
-      int main(void) { return 0; }''')
-      pre_args += ['-D__MSVCRT_VERSION__=0x0700']
-    endif
-  endif
-elif host_machine.system() == 'openbsd'
-  pre_args += '-D_ISOC11_SOURCE'
-endif
-
-# Check for generic C arguments
-c_msvc_compat_args = []
-no_override_init_args = []
-cpp_msvc_compat_args = []
-if cc.get_argument_syntax() == 'msvc'
-  _trial = [
-    '/wd4018',  # signed/unsigned mismatch
-    '/wd4056',  # overflow in floating-point constant arithmetic
-    '/wd4244',  # conversion from 'type1' to 'type2', possible loss of data
-    '/wd4267',  # 'var' : conversion from 'size_t' to 'type', possible loss of data
-    '/wd4305',  # trancation from 'type1' to 'type2'
-    '/wd4351',  # new behavior: elements of array 'array' will be default initialized
-    '/wd4756',  # overflow in constant arithmetic
-    '/wd4800',  # forcing value to bool 'true' or 'false' (performance warning)
-    '/wd4996',  # disabled deprecated POSIX name warnings
-    '/wd4291',  # no matching operator delete found
-    '/wd4146',  # unary minus operator applied to unsigned type, result still unsigned
-    '/wd4200',  # nonstandard extension used: zero-sized array in struct/union
-    '/wd4624',  # destructor was implicitly defined as deleted [from LLVM]
-    '/wd4309',  # 'initializing': truncation of constant value
-    '/wd4838',  # conversion from 'int' to 'const char' requires a narrowing conversion
-    '/wd5105',  # macro expansion producing 'defined' has undefined behavior (winbase.h, need Windows SDK upgrade)
-    '/we4020',  # Error when passing the wrong number of parameters
-    '/we4024',  # Error when passing different type of parameter
-    '/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line
-  ]
-  c_args += cc.get_supported_arguments(_trial)
-  cpp_args += cpp.get_supported_arguments(_trial)
-else
-  _trial_c = [
-    '-Werror=implicit-function-declaration',
-    '-Werror=missing-prototypes',
-    '-Werror=return-type',
-    '-Werror=empty-body',
-    '-Werror=incompatible-pointer-types',
-    '-Werror=int-conversion',
-    '-Wimplicit-fallthrough',
-    '-Wno-missing-field-initializers',
-    '-Wno-format-truncation',
-    '-fno-math-errno',
-    '-fno-trapping-math',
-    '-Qunused-arguments',
-    '-fno-common',
-    # Clang
-    '-Wno-microsoft-enum-value',
-    '-Wno-unused-function',
-  ]
-  _trial_cpp = [
-    '-Werror=return-type',
-    '-Werror=empty-body',
-    '-Wno-non-virtual-dtor',
-    '-Wno-missing-field-initializers',
-    '-Wno-format-truncation',
-    '-fno-math-errno',
-    '-fno-trapping-math',
-    '-Qunused-arguments',
-    # Some classes use custom new operator which zeroes memory, however
-    # gcc does aggressive dead-store elimination which threats all writes
-    # to the memory before the constructor as "dead stores".
-    # For now we disable this optimization.
-    '-flifetime-dse=1',
-    # Clang
-    '-Wno-microsoft-enum-value',
-  ]
-
-  # MinGW chokes on format specifiers and I can't get it all working
-  if not (cc.get_argument_syntax() == 'gcc' and host_machine.system() == 'windows')
-    _trial_c += ['-Werror=format', '-Wformat-security']
-    _trial_cpp += ['-Werror=format', '-Wformat-security']
-  endif
-
-  # FreeBSD annotated <pthread.h> but Mesa isn't ready
-  if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
-    _trial_c += ['-Werror=thread-safety']
-  endif
-
-  # If the compiler supports it, put function and data symbols in their
-  # own sections and GC the sections after linking.  This lets drivers
-  # drop shared code unused by that specific driver (particularly
-  # relevant for Vulkan drivers).
-  if cc.has_link_argument('-Wl,--gc-sections')
-    _trial_c += ['-ffunction-sections', '-fdata-sections']
-    _trial_cpp += ['-ffunction-sections', '-fdata-sections']
-  endif
-
-  # Variables that are only used for assertions are considered unused in release
-  # builds. Don't treat this as an error, since we build with -Werror even for
-  # release in CI.
-  if get_option('buildtype') == 'release'
-    _trial_c += ['-Wno-unused-variable', '-Wno-unused-but-set-variable']
-    _trial_cpp += ['-Wno-unused-variable', '-Wno-unused-but-set-variable']
-  endif
-
-  c_args += cc.get_supported_arguments(_trial_c)
-  cpp_args += cpp.get_supported_arguments(_trial_cpp)
-
-  no_override_init_args += cc.get_supported_arguments(
-    ['-Wno-override-init', '-Wno-initializer-overrides']
-  )
-
-  # Check for C and C++ arguments for MSVC compatibility. These are only used
-  # in parts of the mesa code base that need to compile with MSVC, mainly
-  # common code
-  _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer']
-  c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc)
-  cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc)
-endif
-
-# set linker arguments
-if host_machine.system() == 'windows'
-  if cc.get_argument_syntax() == 'msvc'
-    add_project_link_arguments(
-      '/fixed:no',
-      '/dynamicbase',
-      '/nxcompat',
-      language : ['c', 'cpp'],
-    )
-    if get_option('buildtype') != 'debug'
-      add_project_link_arguments(
-        '/incremental:no',
-        language : ['c', 'cpp'],
-      )
-    endif
-  else
-    add_project_link_arguments(
-      cc.get_supported_link_arguments(
-        '-Wl,--nxcompat',
-        '-Wl,--dynamicbase',
-        '-static-libgcc',
-        '-static-libstdc++',
-      ),
-      language : ['c'],
-    )
-    add_project_link_arguments(
-      cpp.get_supported_link_arguments(
-        '-Wl,--nxcompat',
-        '-Wl,--dynamicbase',
-        '-static-libgcc',
-        '-static-libstdc++',
-      ),
-      language : ['cpp'],
-    )
-  endif
-endif
-
-if host_machine.cpu_family().startswith('x86') and cc.get_argument_syntax() != 'msvc'
-  pre_args += '-DUSE_SSE41'
-  with_sse41 = true
-  sse41_args = ['-msse4.1']
-
-  if host_machine.cpu_family() == 'x86'
-    if get_option('sse2')
-      # These settings make generated GCC code match MSVC and follow
-      # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note
-      #
-      # NOTE: We need to ensure stack is realigned given that we
-      # produce shared objects, and have no control over the stack
-      # alignment policy of the application. Therefore we need
-      # -mstackrealign or -mincoming-stack-boundary=2.
-      #
-      # XXX: We could have SSE without -mstackrealign if we always used
-      # __attribute__((force_align_arg_pointer)), but that's not
-      # always the case.
-      c_args += ['-msse2', '-mfpmath=sse', '-mstackrealign']
-    else
-      # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
-      # that's not guaranteed
-      sse41_args += '-mstackrealign'
-    endif
-  endif
-else
-  with_sse41 = false
-  sse41_args = []
-endif
-
-# Check for GCC style atomics
-dep_atomic = null_dep
-
-if cc.compiles('''#include <stdint.h>
-                  int main() {
-                    struct {
-                      uint64_t *v;
-                    } x;
-                    return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
-                           (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
-
-                  }''',
-               name : 'GCC atomic builtins')
-  pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
-
-  # Not all atomic calls can be turned into lock-free instructions, in which
-  # GCC will make calls into the libatomic library. Check whether we need to
-  # link with -latomic.
-  #
-  # This can happen for 64-bit atomic operations on 32-bit architectures such
-  # as ARM.
-  if not cc.links('''#include <stdint.h>
-                     int main() {
-                       struct {
-                         uint64_t *v;
-                       } x;
-                       return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
-                              (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
-                     }''',
-                  name : 'GCC atomic builtins required -latomic')
-    dep_atomic = cc.find_library('atomic')
-  endif
-endif
-if not cc.links('''#include <stdint.h>
-                   uint64_t v;
-                   int main() {
-                     return __sync_add_and_fetch(&v, (uint64_t)1);
-                   }''',
-                dependencies : dep_atomic,
-                name : 'GCC 64bit atomics')
-  pre_args += '-DMISSING_64BIT_ATOMICS'
-endif
-
-dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
-
-# TODO: shared/static? Is this even worth doing?
-
-with_asm_arch = ''
-if host_machine.cpu_family() == 'x86'
-  if system_has_kms_drm or host_machine.system() == 'gnu'
-    with_asm_arch = 'x86'
-    pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
-                 '-DUSE_SSE_ASM']
-
-    if with_glx_read_only_text
-      pre_args += ['-DGLX_X86_READONLY_TEXT']
-    endif
-  endif
-elif host_machine.cpu_family() == 'x86_64'
-  if system_has_kms_drm
-    with_asm_arch = 'x86_64'
-    pre_args += ['-DUSE_X86_64_ASM']
-  endif
-elif host_machine.cpu_family() == 'arm'
-  if system_has_kms_drm
-    with_asm_arch = 'arm'
-    pre_args += ['-DUSE_ARM_ASM']
-  endif
-elif host_machine.cpu_family() == 'aarch64'
-  if system_has_kms_drm
-    with_asm_arch = 'aarch64'
-    pre_args += ['-DUSE_AARCH64_ASM']
-  endif
-elif host_machine.cpu_family() == 'sparc64'
-  if system_has_kms_drm
-    with_asm_arch = 'sparc'
-    pre_args += ['-DUSE_SPARC_ASM']
-  endif
-elif host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
-  if system_has_kms_drm
-    with_asm_arch = 'ppc64le'
-    pre_args += ['-DUSE_PPC64LE_ASM']
-  endif
-elif host_machine.cpu_family() == 'mips64' and host_machine.endian() == 'little'
-  if system_has_kms_drm
-    with_asm_arch = 'mips64el'
-    pre_args += ['-DUSE_MIPS64EL_ASM']
-  endif
-endif
-
-# Check for standard headers and functions
-if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
-  cc.has_header_symbol('sys/sysmacros.h', 'minor') and
-  cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
-  pre_args += '-DMAJOR_IN_SYSMACROS'
-endif
-if (cc.has_header_symbol('sys/mkdev.h', 'major') and
-  cc.has_header_symbol('sys/mkdev.h', 'minor') and
-  cc.has_header_symbol('sys/mkdev.h', 'makedev'))
-  pre_args += '-DMAJOR_IN_MKDEV'
-endif
-
-if cc.check_header('sched.h')
-  pre_args += '-DHAS_SCHED_H'
-  if cc.has_function('sched_getaffinity')
-    pre_args += '-DHAS_SCHED_GETAFFINITY'
-  endif
-endif
-
-if not ['linux'].contains(host_machine.system())
-  # Deprecated on Linux and requires <sys/types.h> on FreeBSD and OpenBSD
-  if cc.check_header('sys/sysctl.h', prefix : '#include <sys/types.h>')
-    pre_args += '-DHAVE_SYS_SYSCTL_H'
-  endif
-endif
-
-foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h', 'cet.h', 'pthread_np.h']
-  if cc.check_header(h)
-    pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
-  endif
-endforeach
-
-functions_to_detect = {
-  'strtof': '',
-  'mkostemp': '',
-  'timespec_get': '#include <time.h>',
-  'memfd_create': '',
-  'random_r': '',
-  'flock': '',
-  'strtok_r': '',
-  'getrandom': '',
-  'qsort_s': '',
-}
-
-foreach f, prefix: functions_to_detect
-  if cc.has_function(f, prefix: prefix)
-    pre_args += '-DHAVE_@0@'.format(f.to_upper())
-  endif
-endforeach
-
-if cpp.links('''
-    #define _GNU_SOURCE
-    #include <stdlib.h>
-
-    static int dcomp(const void *l, const void *r, void *t) { return 0; }
-
-    int main(int ac, char **av) {
-      int arr[] = { 1 };
-      void *t = NULL;
-      qsort_r((void*)&arr[0], 1, 1, dcomp, t);
-      return (0);
-    }''',
-    args : pre_args,
-    name : 'GNU qsort_r')
-  pre_args += '-DHAVE_GNU_QSORT_R'
-elif cpp.links('''
-    #include <stdlib.h>
-
-    static int dcomp(void *t, const void *l, const void *r) { return 0; }
-
-    int main(int ac, char **av) {
-      int arr[] = { 1 };
-      void *t = NULL;
-      qsort_r((void*)&arr[0], 1, 1, t, dcomp);
-      return (0);
-    }''',
-    args : pre_args,
-    name : 'BSD qsort_r')
-  pre_args += '-DHAVE_BSD_QSORT_R'
-endif
-
-if cc.has_header_symbol('time.h', 'struct timespec')
-   pre_args += '-DHAVE_STRUCT_TIMESPEC'
-endif
-
-with_c11_threads = false
-if cc.has_function('thrd_create', prefix: '#include <threads.h>')
-  if with_platform_android
-    # Current only Android's c11 <threads.h> are verified
-    pre_args += '-DHAVE_THRD_CREATE'
-    with_c11_threads = true
-  endif
-endif
-
-if cc.has_header_symbol('errno.h', 'program_invocation_name',
-                        args : '-D_GNU_SOURCE')
-   pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
-elif with_tools.contains('intel')
-  error('Intel tools require the program_invocation_name variable')
-endif
-
-if cc.has_header_symbol('math.h', 'issignaling',
-                        args : '-D_GNU_SOURCE')
-   pre_args += '-DHAVE_ISSIGNALING'
-endif
-
-# MinGW provides a __builtin_posix_memalign function, but not a posix_memalign.
-# This means that this check will succeed, but then compilation will later
-# fail. MSVC doesn't have this function at all, so only check for it on
-# non-windows platforms.
-if host_machine.system() != 'windows'
-  if cc.has_function('posix_memalign')
-    pre_args += '-DHAVE_POSIX_MEMALIGN'
-  endif
-endif
-
-if cc.has_member('struct dirent', 'd_type', prefix: '''#include <sys/types.h>
-   #include <dirent.h>''')
-   pre_args += '-DHAVE_DIRENT_D_TYPE'
-endif
-
-# strtod locale support
-if cc.links('''
-    #define _GNU_SOURCE
-    #include <stdlib.h>
-    #include <locale.h>
-    #ifdef HAVE_XLOCALE_H
-    #include <xlocale.h>
-    #endif
-    int main() {
-      locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-      const char *s = "1.0";
-      char *end;
-      double d = strtod_l(s, end, loc);
-      float f = strtof_l(s, end, loc);
-      freelocale(loc);
-      return 0;
-    }''',
-    args : pre_args,
-    name : 'strtod has locale support')
-  pre_args += '-DHAVE_STRTOD_L'
-endif
-
-# Check for some linker flags
-ld_args_bsymbolic = []
-if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic')
-  ld_args_bsymbolic += '-Wl,-Bsymbolic'
-endif
-ld_args_gc_sections = []
-if cc.links('static char unused() { return 5; } int main() { return 0; }',
-            args : '-Wl,--gc-sections', name : 'gc-sections')
-  ld_args_gc_sections += '-Wl,--gc-sections'
-endif
-with_ld_version_script = false
-if cc.links('int main() { return 0; }',
-            args : '-Wl,--version-script=@0@'.format(
-              join_paths(meson.current_source_dir(), 'build-support/conftest.map')),
-            name : 'version-script')
-  with_ld_version_script = true
-endif
-with_ld_dynamic_list = false
-if cc.links('int main() { return 0; }',
-            args : '-Wl,--dynamic-list=@0@'.format(
-              join_paths(meson.current_source_dir(), 'build-support/conftest.dyn')),
-            name : 'dynamic-list')
-  with_ld_dynamic_list = true
-endif
-
-ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
-
-# check for dl support
-dep_dl = null_dep
-if host_machine.system() != 'windows'
-  if not cc.has_function('dlopen')
-    dep_dl = cc.find_library('dl', required : true)
-  endif
-  if cc.has_function('dladdr', dependencies : dep_dl)
-    # This is really only required for util/disk_cache.h
-    pre_args += '-DHAVE_DLADDR'
-  endif
-endif
-
-if cc.has_function('dl_iterate_phdr')
-  pre_args += '-DHAVE_DL_ITERATE_PHDR'
-elif with_intel_vk or with_intel_hasvk
-  error('Intel "Anvil" Vulkan driver requires the dl_iterate_phdr function')
-endif
-
-# Determine whether or not the rt library is needed for time functions
-if host_machine.system() == 'windows' or cc.has_function('clock_gettime')
-  dep_clock = null_dep
-else
-  dep_clock = cc.find_library('rt')
-endif
-
-dep_zlib = dependency('zlib', version : '>= 1.2.3',
-                      fallback : ['zlib', 'zlib_dep'],
-                      required : get_option('zlib'))
-if dep_zlib.found()
-  pre_args += '-DHAVE_ZLIB'
-endif
-
-_zstd = get_option('zstd')
-if _zstd == 'true'
-  _zstd = 'enabled'
-  warning('zstd option "true" deprecated, please use "enabled" instead.')
-elif _zstd == 'false'
-  _zstd = 'disabled'
-  warning('zstd option "false" deprecated, please use "disabled" instead.')
-endif
-if _zstd != 'disabled'
-  dep_zstd = dependency('libzstd', required : _zstd == 'enabled')
-  if dep_zstd.found()
-    pre_args += '-DHAVE_ZSTD'
-  endif
-else
-  dep_zstd = null_dep
-endif
-
-with_compression = dep_zlib.found() or dep_zstd.found()
-if with_compression
-  pre_args += '-DHAVE_COMPRESSION'
-elif with_shader_cache
-  error('Shader Cache requires compression')
-endif
-
-if host_machine.system() == 'windows'
-  # For MSVC and MinGW we aren't using pthreads, and dependency('threads') will add linkage
-  # to pthread for MinGW, so leave the dependency null_dep for Windows. For Windows linking to
-  # kernel32 is enough for c11/threads.h and it's already linked by meson by default
-  dep_thread = null_dep
-else
-  dep_thread = dependency('threads')
-endif
-if dep_thread.found()
-  pre_args += '-DHAVE_PTHREAD'
-  if host_machine.system() != 'netbsd' and cc.has_function(
-      'pthread_setaffinity_np',
-      dependencies : dep_thread,
-      prefix : '#include <pthread.h>',
-      args : '-D_GNU_SOURCE')
-    pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
-  endif
-endif
-if host_machine.system() == 'darwin'
-  dep_expat = meson.get_compiler('c').find_library('expat')
-elif host_machine.system() != 'windows'
-  dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'],
-                         required: not with_platform_android)
-else
-  dep_expat = null_dep
-endif
-# Predefined macros for windows
-if host_machine.system() == 'windows'
-  pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
-endif
-# this only exists on linux so either this is linux and it will be found, or
-# it's not linux and wont
-dep_m = cc.find_library('m', required : false)
-
-if host_machine.system() == 'windows'
-  dep_regex = meson.get_compiler('c').find_library('regex', required : false)
-  if not dep_regex.found()
-    dep_regex = declare_dependency(compile_args : ['-DNO_REGEX'])
-  endif
-else
-  dep_regex = null_dep
-endif
-
-if with_platform_haiku
-  dep_network = cc.find_library('network')
-endif
-
-dep_futex = null_dep
-if host_machine.system() == 'windows'
-  if (get_option('min-windows-version') < 8)
-    pre_args += '-DWINDOWS_NO_FUTEX'
-  else
-    dep_futex = cc.find_library('synchronization', required : true)
-  endif
-endif
-
-# Check for libdrm. Various drivers have different libdrm version requirements,
-# but we always want to use the same version for all libdrm modules. That means
-# even if driver foo requires 2.4.0 and driver bar requires 2.4.3, if foo and
-# bar are both on use 2.4.3 for both of them
-dep_libdrm_amdgpu = null_dep
-dep_libdrm_radeon = null_dep
-dep_libdrm_nouveau = null_dep
-dep_libdrm_intel = null_dep
-
-_drm_amdgpu_ver = '2.4.110'
-_drm_radeon_ver = '2.4.71'
-_drm_nouveau_ver = '2.4.102'
-_drm_intel_ver = '2.4.75'
-_drm_ver = '2.4.109'
-
-_libdrm_checks = [
-  ['intel', with_gallium_i915],
-  ['amdgpu', (with_amd_vk and not with_platform_windows) or with_gallium_radeonsi],
-  ['radeon', (with_gallium_radeonsi or with_gallium_r300 or with_gallium_r600)],
-  ['nouveau', with_gallium_nouveau],
-]
-
-# Loop over the enables versions and get the highest libdrm requirement for all
-# active drivers.
-_drm_blame = ''
-foreach d : _libdrm_checks
-  ver = get_variable('_drm_@0@_ver'.format(d[0]))
-  if d[1] and ver.version_compare('>' + _drm_ver)
-    _drm_ver = ver
-    _drm_blame = d[0]
-  endif
-endforeach
-if _drm_blame != ''
-  message('libdrm @0@ needed because @1@ has the highest requirement'.format(_drm_ver, _drm_blame))
-endif
-
-# Then get each libdrm module
-foreach d : _libdrm_checks
-  if d[1]
-    set_variable(
-      'dep_libdrm_' + d[0],
-      dependency('libdrm_' + d[0], version : '>=' + _drm_ver)
-    )
-  endif
-endforeach
-
-with_gallium_drisw_kms = false
-dep_libdrm = dependency(
-  'libdrm', version : '>=' + _drm_ver,
-  # GNU/Hurd includes egl_dri2, without drm.
-  required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
-)
-if dep_libdrm.found()
-  pre_args += '-DHAVE_LIBDRM'
-  if with_dri_platform == 'drm' and with_dri
-    with_gallium_drisw_kms = true
-  endif
-endif
-
-dep_libudev = dependency('libudev', required : false)
-if dep_libudev.found()
-  pre_args += '-DHAVE_LIBUDEV'
-endif
-
-llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit', 'core', 'executionengine', 'scalaropts', 'transformutils', 'instcombine']
-llvm_optional_modules = ['coroutines']
-if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
-  llvm_modules += ['amdgpu', 'bitreader', 'ipo']
-  if with_gallium_r600
-    llvm_modules += 'asmparser'
-  endif
-endif
-if with_gallium_opencl
-  llvm_modules += [
-    'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
-    'lto', 'option', 'objcarcopts', 'profiledata'
-  ]
-  # all-targets is needed to support static linking LLVM build with multiple targets
-  # windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['all-targets', 'frontendopenmp', 'windowsdriver']
-endif
-if with_clc
-  llvm_modules += ['coverage', 'target', 'linker', 'irreader', 'option', 'libdriver', 'lto']
-  # all-targets is needed to support static linking LLVM build with multiple targets
-  # windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['all-targets', 'windowsdriver']
-endif
-draw_with_llvm = get_option('draw-use-llvm')
-if draw_with_llvm
-  llvm_modules += 'native'
-  # lto is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['lto']
-endif
-
-if with_intel_clc
-  _llvm_version = '>= 13.0.0'
-elif with_amd_vk or with_gallium_radeonsi or with_gallium_opencl
-  _llvm_version = '>= 11.0.0'
-elif with_clc
-  _llvm_version = '>= 10.0.0'
-else
-  _llvm_version = '>= 5.0.0'
-endif
-
-_shared_llvm = get_option('shared-llvm')
-if _shared_llvm == 'true'
-  _shared_llvm = 'enabled'
-  warning('shared_llvm option "true" deprecated, please use "enabled" instead.')
-elif _shared_llvm == 'false'
-  _shared_llvm = 'disabled'
-  warning('shared_llvm option "false" deprecated, please use "disabled" instead.')
-endif
-if _shared_llvm == 'auto'
-  _shared_llvm = (host_machine.system() != 'windows')
-else
-  _shared_llvm = (_shared_llvm == 'enabled')
-endif
-_llvm = get_option('llvm')
-if _llvm == 'true'
-  _llvm = 'enabled'
-  warning('llvm option "true" deprecated, please use "enabled" instead.')
-elif _llvm == 'false'
-  _llvm = 'disabled'
-  warning('llvm option "false" deprecated, please use "disabled" instead.')
-endif
-
-# the cmake method can only link statically, so don't attempt to use it if we
-# want to link dynamically. Before 0.54.0 meson will try cmake even when shared
-# linking is requested, so we need to force the config-tool method to be used
-# in that case, but in 0.54.0 meson won't try the cmake method if shared
-# linking is requested.
-_llvm_method = 'auto'
-if meson.version().version_compare('< 0.54.0') and _shared_llvm
-  _llvm_method = 'config-tool'
-endif
-
-dep_llvm = null_dep
-with_llvm = false
-if _llvm != 'disabled'
-  dep_llvm = dependency(
-    'llvm',
-    version : _llvm_version,
-    modules : llvm_modules,
-    optional_modules : llvm_optional_modules,
-    required : (
-      with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or with_clc
-      or _llvm == 'enabled'
-    ),
-    static : not _shared_llvm,
-    method : _llvm_method,
-    fallback : ['llvm', 'dep_llvm'],
-    include_type : 'preserve',
-  )
-  with_llvm = dep_llvm.found()
-endif
-if with_llvm
-  pre_args += '-DLLVM_AVAILABLE'
-  pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
-  pre_args += '-DLLVM_IS_SHARED=@0@'.format(_shared_llvm.to_int())
-
-  if draw_with_llvm
-    pre_args += '-DDRAW_LLVM_AVAILABLE'
-  elif with_swrast_vk
-    error('Lavapipe requires LLVM draw support.')
-  endif
-
-  if host_machine.system() != 'windows'
-    # LLVM can be built without rtti, turning off rtti changes the ABI of C++
-    # programs, so we need to build all C++ code in mesa without rtti as well to
-    # ensure that linking works. Note that Win32 compilers does handle mismatching RTTI
-    # without issues, so only apply this for other compilers.
-    if dep_llvm.type_name() == 'internal'
-      _llvm_rtti = subproject('llvm').get_variable('has_rtti', true)
-    else
-      # The CMake finder will return 'ON', the llvm-config will return 'YES'
-      _llvm_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
-    endif
-    if _rtti != _llvm_rtti
-      if _llvm_rtti
-        error('LLVM was built with RTTI, cannot build Mesa with RTTI disabled. Remove cpp_rtti disable switch or use LLVM built without LLVM_ENABLE_RTTI.')
-      else
-        error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
-      endif
-    endif
-  endif
-
-  if cc.get_argument_syntax() == 'msvc'
-    # Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
-    add_project_link_arguments(
-      '/ignore:4199',
-      language : ['c', 'cpp'],
-    )
-  endif
-elif with_amd_vk and with_aco_tests
-  error('ACO tests require LLVM, but LLVM is disabled.')
-elif with_gallium_radeonsi or with_swrast_vk
-  error('The following drivers require LLVM: RadeonSI, SWR, Lavapipe. One of these is enabled, but LLVM is disabled.')
-elif with_gallium_opencl
-  error('The OpenCL "Clover" state tracker requires LLVM, but LLVM is disabled.')
-elif with_clc
-  error('The CLC compiler requires LLVM, but LLVM is disabled.')
-else
-  draw_with_llvm = false
-endif
-
-with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_clc
-if with_opencl_spirv
-  chosen_llvm_version_array = dep_llvm.version().split('.')
-  chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
-  chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()
-
-  # Require an SPIRV-LLVM-Translator version compatible with the chosen LLVM
-  # one.
-
-  # This first version check is still needed as maybe LLVM 8.0 was picked but
-  # we do not want to accept SPIRV-LLVM-Translator 8.0.0.1 as that version
-  # does not have the required API and those are only available starting from
-  # 8.0.1.3.
-  _llvmspirvlib_min_version = '>= 8.0.1.3'
-  if with_intel_clc
-    _llvmspirvlib_min_version = '>= 13.0.0.0'
-  endif
-
-  _llvmspirvlib_version = [
-    _llvmspirvlib_min_version,
-    '>= @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor),
-    '< @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor + 1) ]
-
-  dep_spirv_tools = dependency('SPIRV-Tools', required : true, version : '>= 2018.0')
-  # LLVMSPIRVLib is available at https://github.com/KhronosGroup/SPIRV-LLVM-Translator
-  dep_llvmspirvlib = dependency('LLVMSPIRVLib', required : true, version : _llvmspirvlib_version)
-else
-  dep_spirv_tools = null_dep
-  dep_llvmspirvlib = null_dep
-endif
-
-dep_clang = null_dep
-if with_clc
-  llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
-
-  dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
-
-  if not dep_clang.found() or not _shared_llvm
-    clang_modules = [
-      'clangBasic', 'clangAST', 'clangCodeGen', 'clangLex',
-      'clangDriver', 'clangFrontend', 'clangFrontendTool',
-      'clangHandleCXX', 'clangHandleLLVM', 'clangSerialization',
-      'clangSema', 'clangParse', 'clangEdit', 'clangAnalysis'
-    ]
-    if dep_llvm.version().version_compare('>= 15.0')
-      clang_modules += 'clangSupport'
-    endif
-
-    dep_clang = []
-    foreach m : clang_modules
-      dep_clang += cpp.find_library(m, dirs : llvm_libdir, required : true)
-    endforeach
-  endif
-endif
-
-# Be explicit about only using this lib on Windows, to avoid picking
-# up random libs with the generic name 'libversion'
-dep_version = null_dep
-if host_machine.system() == 'windows'
-  dep_version = cpp.find_library('version')
-endif
-
-dep_elf = dependency('libelf', required : false)
-if not with_platform_windows and not dep_elf.found()
-  dep_elf = cc.find_library('elf', required : false)
-endif
-if dep_elf.found()
-  pre_args += '-DUSE_LIBELF'
-endif
-
-dep_glvnd = null_dep
-if with_glvnd
-  dep_glvnd = dependency('libglvnd', version : '>= 1.3.2')
-  pre_args += '-DUSE_LIBGLVND=1'
-endif
-
-_valgrind = get_option('valgrind')
-if _valgrind == 'true'
-  _valgrind = 'enabled'
-  warning('valgrind option "true" deprecated, please use "enabled" instead.')
-elif _valgrind == 'false'
-  _valgrind = 'disabled'
-  warning('valgrind option "false" deprecated, please use "disabled" instead.')
-endif
-if _valgrind != 'disabled'
-  dep_valgrind = dependency('valgrind', required : _valgrind == 'enabled')
-  if dep_valgrind.found()
-    pre_args += '-DHAVE_VALGRIND'
-  endif
-else
-  dep_valgrind = null_dep
-endif
-
-# AddressSanitizer's leak reports need all the symbols to be present at exit to
-# decode well, which runs afoul of our dlopen()/dlclose()ing of the DRI drivers.
-# Set a flag so we can skip the dlclose for asan builds.
-if ['address', 'address,undefined'].contains(get_option('b_sanitize'))
-  asan_c_args = ['-DBUILT_WITH_ASAN=1']
-else
-  asan_c_args = ['-DBUILT_WITH_ASAN=0']
-endif
-
-yacc_is_bison = true
-
-if build_machine.system() == 'windows'
-  # Prefer the winflexbison versions, they're much easier to install and have
-  # better windows support.
-
-  prog_flex = find_program('win_flex', required : false)
-  if prog_flex.found()
-    # windows compatibility (uses <io.h> instead of <unistd.h> and _isatty,
-    # _fileno functions)
-    prog_flex = [prog_flex, '--wincompat']
-  else
-    prog_flex = [find_program('flex', 'lex', required : with_any_opengl, disabler : true)]
-  endif
-  # Force flex to use const keyword in prototypes, as relies on __cplusplus or
-  # __STDC__ macro to determine whether it's safe to use const keyword
-  prog_flex += '-DYY_USE_CONST='
-
-  prog_flex_cpp = prog_flex
-  # Convince win_flex to use <inttypes.h> for C++ files
-  # Note that we are using a C99 version here rather than C11,
-  # because using a C11 version can cause the MSVC CRT headers to define
-  # static_assert to _Static_assert, which breaks other parts of the CRT
-  prog_flex_cpp += '-D__STDC_VERSION__=199901'
-
-  prog_bison = find_program('win_bison', required : false)
-  if not prog_bison.found()
-    prog_bison = find_program('bison', 'yacc', required : with_any_opengl, disabler : true)
-  endif
-else
-  prog_bison = find_program('bison', required : false)
-
-  if not prog_bison.found()
-    prog_bison = find_program('byacc', required : with_any_opengl, disabler : true)
-    yacc_is_bison = false
-  endif
-
-  # Disable deprecated keyword warnings, since we have to use them for
-  # old-bison compat.  See discussion in
-  # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2161
-  if find_program('bison', required : false, version : '> 2.3').found()
-    prog_bison = [prog_bison, '-Wno-deprecated']
-  endif
-
-  prog_flex = find_program('flex', required : with_any_opengl, disabler : true)
-  prog_flex_cpp = prog_flex
-endif
-
-dep_selinux = null_dep
-if get_option('selinux')
-  if get_option('execmem') != true
-    warning('execmem option is disabled, selinux will not be able to use execmem.')
-  endif
-  dep_selinux = dependency('libselinux')
-  pre_args += '-DMESA_SELINUX'
-endif
-
-if get_option('execmem')
-  pre_args += '-DMESA_EXECMEM'
-endif
-
-_libunwind = get_option('libunwind')
-if _libunwind == 'true'
-  _libunwind = 'enabled'
-  warning('libunwind option "true" deprecated, please use "enabled" instead.')
-elif _libunwind == 'false'
-  _libunwind = 'disabled'
-  warning('libunwind option "false" deprecated, please use "disabled" instead.')
-endif
-if _libunwind != 'disabled' and not with_platform_android
-  if host_machine.system() == 'darwin'
-    dep_unwind = meson.get_compiler('c').find_library('System')
-  else
-    dep_unwind = dependency('libunwind', required : _libunwind == 'enabled')
-  endif
-  if dep_unwind.found()
-    pre_args += '-DHAVE_LIBUNWIND'
-  endif
-else
-  dep_unwind = null_dep
-endif
-
-if with_osmesa
-  if not with_gallium_softpipe
-    error('OSMesa gallium requires gallium softpipe or llvmpipe.')
-  endif
-  if host_machine.system() == 'windows'
-    osmesa_lib_name = 'osmesa'
-  else
-    osmesa_lib_name = 'OSMesa'
-  endif
-  osmesa_bits = get_option('osmesa-bits')
-  if osmesa_bits != 'unspecified'
-    warning('osmesa-bits option is deprecated and have no effect, please remove it.')
-  endif
-endif
-
-# TODO: symbol mangling
-
-if with_platform_wayland
-  dep_wl_scanner = dependency('wayland-scanner', native: true)
-  prog_wl_scanner = find_program(dep_wl_scanner.get_variable(pkgconfig : 'wayland_scanner'))
-  if dep_wl_scanner.version().version_compare('>= 1.15')
-    wl_scanner_arg = 'private-code'
-  else
-    wl_scanner_arg = 'code'
-  endif
-  dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.24')
-  dep_wayland_client = dependency('wayland-client', version : '>=1.18')
-  dep_wayland_server = dependency('wayland-server', version : '>=1.18')
-  if with_egl
-    dep_wayland_egl = dependency('wayland-egl-backend', version : '>= 3')
-    dep_wayland_egl_headers = dep_wayland_egl.partial_dependency(compile_args : true)
-  endif
-  wayland_dmabuf_xml = join_paths(
-    dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir'), 'unstable',
-    'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'
-  )
-  pre_args += '-DWL_HIDE_DEPRECATED'
-endif
-
-dep_x11 = null_dep
-dep_xext = null_dep
-dep_xfixes = null_dep
-dep_x11_xcb = null_dep
-dep_xcb = null_dep
-dep_xcb_glx = null_dep
-dep_xcb_dri2 = null_dep
-dep_xcb_dri3 = null_dep
-dep_dri2proto = null_dep
-dep_glproto = null_dep
-dep_xxf86vm = null_dep
-dep_xcb_dri3 = null_dep
-dep_xcb_present = null_dep
-dep_xcb_sync = null_dep
-dep_xcb_xfixes = null_dep
-dep_xshmfence = null_dep
-dep_xcb_xrandr = null_dep
-dep_xcb_shm = null_dep
-dep_xlib_xrandr = null_dep
-dep_openmp = null_dep
-
-# Even if we find OpenMP, Gitlab CI fails to link with gcc/i386 and clang/anyarch.
-if host_machine.cpu_family() == 'x86_64' and cc.get_id() == 'gcc'
-  dep_openmp = dependency('openmp', required : false)
-  if dep_openmp.found()
-    pre_args += ['-DHAVE_OPENMP']
-  endif
-endif
-
-with_dri3_modifiers = false
-if with_platform_x11
-  if with_glx == 'xlib'
-    dep_x11 = dependency('x11')
-    dep_xext = dependency('xext')
-    dep_xcb = dependency('xcb')
-    dep_xcb_xrandr = dependency('xcb-randr')
-  elif with_glx == 'dri'
-    dep_x11 = dependency('x11')
-    dep_xext = dependency('xext')
-    dep_xfixes = dependency('xfixes', version : '>= 2.0')
-    dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
-    dep_xcb_shm = dependency('xcb-shm')
-  endif
-  if (with_any_vk or with_glx == 'dri' or with_egl or
-       (with_gallium_vdpau or with_gallium_va or
-        with_gallium_omx != 'disabled'))
-    dep_xcb = dependency('xcb')
-    dep_x11_xcb = dependency('x11-xcb')
-    if with_dri_platform == 'drm' and not dep_libdrm.found()
-      error('libdrm required for gallium video statetrackers when using x11')
-    endif
-  endif
-  if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
-    dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
-
-    if with_dri3
-      dep_xcb_dri3 = dependency('xcb-dri3')
-      dep_xcb_present = dependency('xcb-present')
-      # until xcb-dri3 has been around long enough to make a hard-dependency:
-      if (dep_xcb_dri3.version().version_compare('>= 1.13') and
-          dep_xcb_present.version().version_compare('>= 1.13'))
-        with_dri3_modifiers = true
-      endif
-      dep_xcb_shm = dependency('xcb-shm')
-      dep_xcb_sync = dependency('xcb-sync')
-      dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
-    endif
-  endif
-  if with_glx == 'dri' or with_glx == 'xlib'
-    dep_glproto = dependency('glproto', version : '>= 1.4.14')
-  endif
-  if with_glx == 'dri'
-    if with_dri_platform == 'drm'
-      dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
-      if with_glx_direct
-        dep_xxf86vm = dependency('xxf86vm')
-      endif
-    endif
-  endif
-  if (with_egl or
-      with_dri3 or (
-      with_gallium_vdpau or with_gallium_xa or
-      with_gallium_omx != 'disabled'))
-    dep_xcb_xfixes = dependency('xcb-xfixes')
-  endif
-  if with_xlib_lease or with_any_vk
-    dep_xcb_xrandr = dependency('xcb-randr')
-  endif
-  if with_xlib_lease
-    dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3')
-  endif
-endif
-
-if with_dri
-  pre_args += '-DHAVE_DRI'
-endif
-if with_dri2
-  pre_args += '-DHAVE_DRI2'
-endif
-if with_dri3
-  pre_args += '-DHAVE_DRI3'
-endif
-if with_dri3_modifiers
-  pre_args += '-DHAVE_DRI3_MODIFIERS'
-endif
-if with_gallium_drisw_kms
-  pre_args += '-DHAVE_DRISW_KMS'
-endif
-
-if get_option('gallium-extra-hud')
-  pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
-endif
-
-_sensors = get_option('lmsensors')
-if _sensors == 'true'
-  _sensors = 'enabled'
-  warning('lmsensors option "true" deprecated, please use "enabled" instead.')
-elif _sensors == 'false'
-  _sensors = 'disabled'
-  warning('lmsensors option "false" deprecated, please use "disabled" instead.')
-endif
-if _sensors != 'disabled'
-  dep_lmsensors = cc.find_library('sensors', required : _sensors == 'enabled')
-  if dep_lmsensors.found()
-    pre_args += '-DHAVE_LIBSENSORS=1'
-  endif
-else
-  dep_lmsensors = null_dep
-endif
-
-_shader_replacement = get_option('custom-shader-replacement')
-if _shader_replacement == ''
-else
-  pre_args += '-DCUSTOM_SHADER_REPLACEMENT'
-endif
-
-with_perfetto = get_option('perfetto')
-with_datasources = get_option('datasources')
-with_any_datasource = with_datasources.length() != 0
-if with_perfetto
-  dep_perfetto = dependency('perfetto', fallback: ['perfetto', 'dep_perfetto'])
-  pre_args += '-DHAVE_PERFETTO'
-endif
-
-add_project_arguments(pre_args, language : ['c', 'cpp'])
-add_project_arguments(c_args,   language : ['c'])
-add_project_arguments(cpp_args, language : ['cpp'])
-
-gl_priv_reqs = []
-
-if with_glx == 'xlib'
-  gl_priv_reqs += ['x11', 'xext', 'xcb']
-elif with_glx == 'dri'
-  gl_priv_reqs += [
-    'x11', 'xext', 'xfixes', 'x11-xcb', 'xcb',
-    'xcb-glx >= 1.8.1']
-  if with_dri_platform == 'drm'
-    gl_priv_reqs += 'xcb-dri2 >= 1.8'
-    if with_glx_direct
-      gl_priv_reqs += 'xxf86vm'
-    endif
-  endif
-endif
-if dep_libdrm.found()
-  gl_priv_reqs += 'libdrm >= 2.4.75'
-endif
-
-gl_priv_libs = []
-if dep_thread.found()
-  gl_priv_libs += ['-lpthread', '-pthread']
-endif
-if dep_m.found()
-  gl_priv_libs += '-lm'
-endif
-if dep_dl.found()
-  gl_priv_libs += '-ldl'
-endif
-
-# FIXME: autotools lists this as incomplete
-gbm_priv_libs = []
-if dep_dl.found()
-  gbm_priv_libs += '-ldl'
-endif
-
-pkg = import('pkgconfig')
-
-if host_machine.system() == 'windows'
-  prog_dumpbin = find_program('dumpbin', required : false)
-  with_symbols_check = prog_dumpbin.found() and with_tests
-  if with_symbols_check
-    symbols_check_args = ['--dumpbin', prog_dumpbin.path()]
-  endif
-else
-  prog_nm = find_program('nm')
-  with_symbols_check = with_tests
-  symbols_check_args = ['--nm', prog_nm.path()]
-endif
-
-# This quirk needs to be applied to sources with functions defined in assembly
-# as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391
-gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
-
-devenv = environment()
-
-dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/')
-
-subdir('include')
-subdir('bin')
-subdir('src')
-
-if meson.version().version_compare('>= 0.58')
-  meson.add_devenv(devenv)
-endif
-
-lines = ['',
-  'prefix:          ' + get_option('prefix'),
-  'libdir:          ' + get_option('libdir'),
-  'includedir:      ' + get_option('includedir'),
-  '',
-  'OpenGL:          @0@ (ES1: @1@ ES2: @2@)'.format(with_opengl ? 'yes' : 'no',
-                                                    with_gles1 ? 'yes' : 'no',
-                                                    with_gles2 ? 'yes' : 'no'),
-]
-
-if with_osmesa
-  lines += ''
-  lines += 'OSMesa:          lib' + osmesa_lib_name
-else
-  lines += 'OSMesa:          no'
-endif
-
-if with_dri
-  lines += ''
-  lines += 'DRI platform:    ' + with_dri_platform
-  lines += 'DRI driver dir:  ' + dri_drivers_path
-endif
-
-if with_glx != 'disabled'
-  lines += ''
-  if with_glx == 'dri'
-    lines += 'GLX:             DRI-based'
-  elif with_glx == 'xlib'
-    lines += 'GLX:             Xlib-based'
-  else
-    lines += 'GLX:             ' + with_glx
-  endif
-endif
-
-lines += ''
-lines += 'EGL:             ' + (with_egl ? 'yes' : 'no')
-if with_egl
-  egl_drivers = []
-  if with_dri
-    egl_drivers += 'builtin:egl_dri2'
-  endif
-  if with_dri3
-    egl_drivers += 'builtin:egl_dri3'
-  endif
-  if with_platform_windows
-    egl_drivers += 'builtin:wgl'
-  endif
-  lines += 'EGL drivers:     ' + ' '.join(egl_drivers)
-endif
-if with_egl or with_any_vk
-  lines += 'EGL/Vulkan/VL platforms:   ' + ' '.join(_platforms)
-endif
-lines += 'GBM:             ' + (with_gbm ? 'yes' : 'no')
-if with_gbm
-  lines += 'GBM backends path: ' + gbm_backends_path
-endif
-
-lines += ''
-lines += 'Video Codecs: ' + ' '.join(_codecs)
-lines += ''
-
-if with_any_vk
-  lines += 'Vulkan drivers:  ' + ' '.join(_vulkan_drivers)
-  lines += 'Vulkan ICD dir:  ' + with_vulkan_icd_dir
-  if with_any_vulkan_layers
-    lines += 'Vulkan layers:   ' + ' '.join(get_option('vulkan-layers'))
-  endif
-  lines += 'Vulkan Intel Ray Tracing:  ' + (with_intel_vk_rt ? 'yes' : 'no')
-else
-  lines += 'Vulkan drivers:  no'
-endif
-
-lines += ''
-if with_llvm
-  lines += 'llvm:            yes'
-  lines += 'llvm-version:    ' + dep_llvm.version()
-else
-  lines += 'llvm:            no'
-endif
-
-lines += ''
-if with_gallium
-  lines += 'Gallium drivers: ' + ' '.join(gallium_drivers)
-  gallium_st = ['mesa']
-  if with_gallium_xa
-    gallium_st += 'xa'
-  endif
-  if with_gallium_vdpau
-    gallium_st += 'vdpau'
-  endif
-  if with_gallium_omx != 'disabled'
-    gallium_st += 'omx' + with_gallium_omx
-  endif
-  if with_gallium_va
-    gallium_st += 'va'
-  endif
-  if with_gallium_st_nine
-    gallium_st += 'nine'
-  endif
-  if with_gallium_opencl
-    gallium_st += 'clover'
-  endif
-  lines += 'Gallium st:      ' + ' '.join(gallium_st)
-else
-  lines += 'Gallium:         no'
-endif
-
-lines += 'HUD lmsensors:   ' + (dep_lmsensors.found() ? 'yes' : 'no')
-
-lines += ''
-lines += 'Shared-glapi:    ' + (with_shared_glapi ? 'yes' : 'no')
-
-lines += ''
-lines += 'Perfetto:        ' + (with_perfetto ? 'yes' : 'no')
-if with_any_datasource
-  lines += 'Perfetto ds:     ' + ' '.join(with_datasources)
-endif
-
-
-indent = '        '
-summary = indent + ('\n' + indent).join(lines)
-message('Configuration summary:\n@0@\n'.format(summary))
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/mesa-22.3.4-new
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-cross-patch/create.patch.sh
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch/create.patch.sh	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch/create.patch.sh	(nonexistent)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-VERSION=22.3.4
-
-tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
-mv mesa-$VERSION mesa-$VERSION-orig
-
-cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
-
-diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-llvm-cross.patch
-
-mv mesa-$VERSION-llvm-cross.patch ../patches
-
-rm -rf ./mesa-$VERSION
-rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch/create.patch.sh
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: mesa/22.x/create-22.3.4-llvm-cross-patch
===================================================================
--- mesa/22.x/create-22.3.4-llvm-cross-patch	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-cross-patch	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-cross-patch
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/file.list
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/file.list	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/file.list	(nonexistent)
@@ -1 +0,0 @@
-mesa-22.3.4/src/gallium/drivers/vc4/vc4_resource.c
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4/vc4_resource.c
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4/vc4_resource.c	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4/vc4_resource.c	(nonexistent)
@@ -1,1171 +0,0 @@
-/*
- * Copyright © 2014 Broadcom
- * Copyright (C) 2012 Rob Clark <robclark@freedesktop.org>
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice (including the next
- * paragraph) shall be included in all copies or substantial portions of the
- * Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#include <inttypes.h>
-#include "pipe/p_defines.h"
-#include "util/u_memory.h"
-#include "util/format/u_format.h"
-#include "util/u_inlines.h"
-#include "util/u_surface.h"
-#include "util/u_transfer_helper.h"
-#include "util/u_upload_mgr.h"
-#include "util/u_drm.h"
-
-#include "drm-uapi/drm_fourcc.h"
-#include "drm-uapi/vc4_drm.h"
-#include "vc4_screen.h"
-#include "vc4_context.h"
-#include "vc4_resource.h"
-#include "vc4_tiling.h"
-
-static bool
-vc4_resource_bo_alloc(struct vc4_resource *rsc)
-{
-        struct pipe_resource *prsc = &rsc->base;
-        struct pipe_screen *pscreen = prsc->screen;
-        struct vc4_bo *bo;
-
-        if (VC4_DBG(SURFACE)) {
-                fprintf(stderr, "alloc %p: size %d + offset %d -> %d\n",
-                        rsc,
-                        rsc->slices[0].size,
-                        rsc->slices[0].offset,
-                        rsc->slices[0].offset +
-                        rsc->slices[0].size +
-                        rsc->cube_map_stride * (prsc->array_size - 1));
-        }
-
-        bo = vc4_bo_alloc(vc4_screen(pscreen),
-                          rsc->slices[0].offset +
-                          rsc->slices[0].size +
-                          rsc->cube_map_stride * (prsc->array_size - 1),
-                          "resource");
-        if (bo) {
-                vc4_bo_unreference(&rsc->bo);
-                rsc->bo = bo;
-                return true;
-        } else {
-                return false;
-        }
-}
-
-static void
-vc4_resource_transfer_unmap(struct pipe_context *pctx,
-                            struct pipe_transfer *ptrans)
-{
-        struct vc4_context *vc4 = vc4_context(pctx);
-        struct vc4_transfer *trans = vc4_transfer(ptrans);
-
-        if (trans->map) {
-                struct vc4_resource *rsc = vc4_resource(ptrans->resource);
-                struct vc4_resource_slice *slice = &rsc->slices[ptrans->level];
-
-                if (ptrans->usage & PIPE_MAP_WRITE) {
-                        vc4_store_tiled_image(rsc->bo->map + slice->offset +
-                                              ptrans->box.z * rsc->cube_map_stride,
-                                              slice->stride,
-                                              trans->map, ptrans->stride,
-                                              slice->tiling, rsc->cpp,
-                                              &ptrans->box);
-                }
-                free(trans->map);
-        }
-
-        pipe_resource_reference(&ptrans->resource, NULL);
-        slab_free(&vc4->transfer_pool, ptrans);
-}
-
-static void *
-vc4_resource_transfer_map(struct pipe_context *pctx,
-                          struct pipe_resource *prsc,
-                          unsigned level, unsigned usage,
-                          const struct pipe_box *box,
-                          struct pipe_transfer **pptrans)
-{
-        struct vc4_context *vc4 = vc4_context(pctx);
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        struct vc4_transfer *trans;
-        struct pipe_transfer *ptrans;
-        enum pipe_format format = prsc->format;
-        char *buf;
-
-        /* Upgrade DISCARD_RANGE to WHOLE_RESOURCE if the whole resource is
-         * being mapped.
-         */
-        if ((usage & PIPE_MAP_DISCARD_RANGE) &&
-            !(usage & PIPE_MAP_UNSYNCHRONIZED) &&
-            !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&
-            prsc->last_level == 0 &&
-            prsc->width0 == box->width &&
-            prsc->height0 == box->height &&
-            prsc->depth0 == box->depth &&
-            prsc->array_size == 1 &&
-            rsc->bo->private) {
-                usage |= PIPE_MAP_DISCARD_WHOLE_RESOURCE;
-        }
-
-        if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) {
-                if (vc4_resource_bo_alloc(rsc)) {
-                        /* If it might be bound as one of our vertex buffers,
-                         * make sure we re-emit vertex buffer state.
-                         */
-                        if (prsc->bind & PIPE_BIND_VERTEX_BUFFER)
-                                vc4->dirty |= VC4_DIRTY_VTXBUF;
-                } else {
-                        /* If we failed to reallocate, flush users so that we
-                         * don't violate any syncing requirements.
-                         */
-                        vc4_flush_jobs_reading_resource(vc4, prsc);
-                }
-        } else if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) {
-                /* If we're writing and the buffer is being used by the CL, we
-                 * have to flush the CL first.  If we're only reading, we need
-                 * to flush if the CL has written our buffer.
-                 */
-                if (usage & PIPE_MAP_WRITE)
-                        vc4_flush_jobs_reading_resource(vc4, prsc);
-                else
-                        vc4_flush_jobs_writing_resource(vc4, prsc);
-        }
-
-        if (usage & PIPE_MAP_WRITE) {
-                rsc->writes++;
-                rsc->initialized_buffers = ~0;
-        }
-
-        trans = slab_zalloc(&vc4->transfer_pool);
-        if (!trans)
-                return NULL;
-
-        /* XXX: Handle DONTBLOCK, DISCARD_RANGE, PERSISTENT, COHERENT. */
-
-        ptrans = &trans->base;
-
-        pipe_resource_reference(&ptrans->resource, prsc);
-        ptrans->level = level;
-        ptrans->usage = usage;
-        ptrans->box = *box;
-
-        if (usage & PIPE_MAP_UNSYNCHRONIZED)
-                buf = vc4_bo_map_unsynchronized(rsc->bo);
-        else
-                buf = vc4_bo_map(rsc->bo);
-        if (!buf) {
-                fprintf(stderr, "Failed to map bo\n");
-                goto fail;
-        }
-
-        *pptrans = ptrans;
-
-        struct vc4_resource_slice *slice = &rsc->slices[level];
-        if (rsc->tiled) {
-                /* No direct mappings of tiled, since we need to manually
-                 * tile/untile.
-                 */
-                if (usage & PIPE_MAP_DIRECTLY)
-                        return NULL;
-
-                /* Our load/store routines work on entire compressed blocks. */
-                u_box_pixels_to_blocks(&ptrans->box, &ptrans->box, format);
-
-                ptrans->stride = ptrans->box.width * rsc->cpp;
-                ptrans->layer_stride = ptrans->stride * ptrans->box.height;
-
-                trans->map = malloc(ptrans->layer_stride * ptrans->box.depth);
-
-                if (usage & PIPE_MAP_READ) {
-                        vc4_load_tiled_image(trans->map, ptrans->stride,
-                                             buf + slice->offset +
-                                             ptrans->box.z * rsc->cube_map_stride,
-                                             slice->stride,
-                                             slice->tiling, rsc->cpp,
-                                             &ptrans->box);
-                }
-                return trans->map;
-        } else {
-                ptrans->stride = slice->stride;
-                ptrans->layer_stride = ptrans->stride;
-
-                return buf + slice->offset +
-                        ptrans->box.y / util_format_get_blockheight(format) * ptrans->stride +
-                        ptrans->box.x / util_format_get_blockwidth(format) * rsc->cpp +
-                        ptrans->box.z * rsc->cube_map_stride;
-        }
-
-
-fail:
-        vc4_resource_transfer_unmap(pctx, ptrans);
-        return NULL;
-}
-
-static void
-vc4_texture_subdata(struct pipe_context *pctx,
-                    struct pipe_resource *prsc,
-                    unsigned level,
-                    unsigned usage,
-                    const struct pipe_box *box,
-                    const void *data,
-                    unsigned stride,
-                    unsigned layer_stride)
-{
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        struct vc4_resource_slice *slice = &rsc->slices[level];
-
-        /* For a direct mapping, we can just take the u_transfer path. */
-        if (!rsc->tiled ||
-            box->depth != 1 ||
-            (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE)) {
-                return u_default_texture_subdata(pctx, prsc, level, usage, box,
-                                                 data, stride, layer_stride);
-        }
-
-        /* Otherwise, map and store the texture data directly into the tiled
-         * texture.
-         */
-        void *buf;
-        if (usage & PIPE_MAP_UNSYNCHRONIZED)
-                buf = vc4_bo_map_unsynchronized(rsc->bo);
-        else
-                buf = vc4_bo_map(rsc->bo);
-
-        vc4_store_tiled_image(buf + slice->offset +
-                              box->z * rsc->cube_map_stride,
-                              slice->stride,
-                              (void *)data, stride,
-                              slice->tiling, rsc->cpp,
-                              box);
-}
-
-static void
-vc4_resource_destroy(struct pipe_screen *pscreen,
-                     struct pipe_resource *prsc)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        vc4_bo_unreference(&rsc->bo);
-
-        if (rsc->scanout)
-                renderonly_scanout_destroy(rsc->scanout, screen->ro);
-
-        free(rsc);
-}
-
-static uint64_t
-vc4_resource_modifier(struct vc4_resource *rsc)
-{
-        if (rsc->tiled)
-                return DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED;
-        else
-                return DRM_FORMAT_MOD_LINEAR;
-}
-
-static bool
-vc4_resource_get_handle(struct pipe_screen *pscreen,
-                        struct pipe_context *pctx,
-                        struct pipe_resource *prsc,
-                        struct winsys_handle *whandle,
-                        unsigned usage)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-        struct vc4_resource *rsc = vc4_resource(prsc);
-
-        whandle->stride = rsc->slices[0].stride;
-        whandle->offset = 0;
-        whandle->modifier = vc4_resource_modifier(rsc);
-
-        /* If we're passing some reference to our BO out to some other part of
-         * the system, then we can't do any optimizations about only us being
-         * the ones seeing it (like BO caching or shadow update avoidance).
-         */
-        rsc->bo->private = false;
-
-        switch (whandle->type) {
-        case WINSYS_HANDLE_TYPE_SHARED:
-                if (screen->ro) {
-                        /* This could probably be supported, assuming that a
-                         * control node was used for pl111.
-                         */
-                        fprintf(stderr, "flink unsupported with pl111\n");
-                        return false;
-                }
-
-                return vc4_bo_flink(rsc->bo, &whandle->handle);
-        case WINSYS_HANDLE_TYPE_KMS:
-                if (screen->ro) {
-                        return renderonly_get_handle(rsc->scanout, whandle);
-                }
-                whandle->handle = rsc->bo->handle;
-                return true;
-        case WINSYS_HANDLE_TYPE_FD:
-                /* FDs are cross-device, so we can export directly from vc4.
-                 */
-                whandle->handle = vc4_bo_get_dmabuf(rsc->bo);
-                return whandle->handle != -1;
-        }
-
-        return false;
-}
-
-static bool
-vc4_resource_get_param(struct pipe_screen *pscreen,
-                       struct pipe_context *pctx, struct pipe_resource *prsc,
-                       unsigned plane, unsigned layer, unsigned level,
-                       enum pipe_resource_param param,
-                       unsigned usage, uint64_t *value)
-{
-        struct vc4_resource *rsc = vc4_resource(prsc);
-
-        switch (param) {
-        case PIPE_RESOURCE_PARAM_STRIDE:
-                *value = rsc->slices[level].stride;
-                return true;
-        case PIPE_RESOURCE_PARAM_OFFSET:
-                *value = 0;
-                return true;
-        case PIPE_RESOURCE_PARAM_MODIFIER:
-                *value = vc4_resource_modifier(rsc);
-                return true;
-        default:
-                return false;
-        }
-}
-
-static void
-vc4_setup_slices(struct vc4_resource *rsc, const char *caller)
-{
-        struct pipe_resource *prsc = &rsc->base;
-        uint32_t width = prsc->width0;
-        uint32_t height = prsc->height0;
-        if (prsc->format == PIPE_FORMAT_ETC1_RGB8) {
-                width = (width + 3) >> 2;
-                height = (height + 3) >> 2;
-        }
-
-        uint32_t pot_width = util_next_power_of_two(width);
-        uint32_t pot_height = util_next_power_of_two(height);
-        uint32_t offset = 0;
-        uint32_t utile_w = vc4_utile_width(rsc->cpp);
-        uint32_t utile_h = vc4_utile_height(rsc->cpp);
-
-        for (int i = prsc->last_level; i >= 0; i--) {
-                struct vc4_resource_slice *slice = &rsc->slices[i];
-
-                uint32_t level_width, level_height;
-                if (i == 0) {
-                        level_width = width;
-                        level_height = height;
-                } else {
-                        level_width = u_minify(pot_width, i);
-                        level_height = u_minify(pot_height, i);
-                }
-
-                if (!rsc->tiled) {
-                        slice->tiling = VC4_TILING_FORMAT_LINEAR;
-                        if (prsc->nr_samples > 1) {
-                                /* MSAA (4x) surfaces are stored as raw tile buffer contents. */
-                                level_width = align(level_width, 32);
-                                level_height = align(level_height, 32);
-                        } else {
-                                level_width = align(level_width, utile_w);
-                        }
-                } else {
-                        if (vc4_size_is_lt(level_width, level_height,
-                                           rsc->cpp)) {
-                                slice->tiling = VC4_TILING_FORMAT_LT;
-                                level_width = align(level_width, utile_w);
-                                level_height = align(level_height, utile_h);
-                        } else {
-                                slice->tiling = VC4_TILING_FORMAT_T;
-                                level_width = align(level_width,
-                                                    4 * 2 * utile_w);
-                                level_height = align(level_height,
-                                                     4 * 2 * utile_h);
-                        }
-                }
-
-                slice->offset = offset;
-                slice->stride = (level_width * rsc->cpp *
-                                 MAX2(prsc->nr_samples, 1));
-                slice->size = level_height * slice->stride;
-
-                offset += slice->size;
-
-                if (VC4_DBG(SURFACE)) {
-                        static const char tiling_chars[] = {
-                                [VC4_TILING_FORMAT_LINEAR] = 'R',
-                                [VC4_TILING_FORMAT_LT] = 'L',
-                                [VC4_TILING_FORMAT_T] = 'T'
-                        };
-                        fprintf(stderr,
-                                "rsc %s %p (format %s: vc4 %d), %dx%d: "
-                                "level %d (%c) -> %dx%d, stride %d@0x%08x\n",
-                                caller, rsc,
-                                util_format_short_name(prsc->format),
-                                rsc->vc4_format,
-                                prsc->width0, prsc->height0,
-                                i, tiling_chars[slice->tiling],
-                                level_width, level_height,
-                                slice->stride, slice->offset);
-                }
-        }
-
-        /* The texture base pointer that has to point to level 0 doesn't have
-         * intra-page bits, so we have to align it, and thus shift up all the
-         * smaller slices.
-         */
-        uint32_t page_align_offset = (align(rsc->slices[0].offset, 4096) -
-                                      rsc->slices[0].offset);
-        if (page_align_offset) {
-                for (int i = 0; i <= prsc->last_level; i++)
-                        rsc->slices[i].offset += page_align_offset;
-        }
-
-        /* Cube map faces appear as whole miptrees at a page-aligned offset
-         * from the first face's miptree.
-         */
-        if (prsc->target == PIPE_TEXTURE_CUBE) {
-                rsc->cube_map_stride = align(rsc->slices[0].offset +
-                                             rsc->slices[0].size, 4096);
-        }
-}
-
-static struct vc4_resource *
-vc4_resource_setup(struct pipe_screen *pscreen,
-                   const struct pipe_resource *tmpl)
-{
-        struct vc4_resource *rsc = CALLOC_STRUCT(vc4_resource);
-        if (!rsc)
-                return NULL;
-        struct pipe_resource *prsc = &rsc->base;
-
-        *prsc = *tmpl;
-
-        pipe_reference_init(&prsc->reference, 1);
-        prsc->screen = pscreen;
-
-        if (prsc->nr_samples <= 1)
-                rsc->cpp = util_format_get_blocksize(tmpl->format);
-        else
-                rsc->cpp = sizeof(uint32_t);
-
-        assert(rsc->cpp);
-
-        return rsc;
-}
-
-static enum vc4_texture_data_type
-get_resource_texture_format(struct pipe_resource *prsc)
-{
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        uint8_t format = vc4_get_tex_format(prsc->format);
-
-        if (!rsc->tiled) {
-                if (prsc->nr_samples > 1) {
-                        return ~0;
-                } else {
-                        if (format == VC4_TEXTURE_TYPE_RGBA8888)
-                                return VC4_TEXTURE_TYPE_RGBA32R;
-                        else
-                                return ~0;
-                }
-        }
-
-        return format;
-}
-
-static struct pipe_resource *
-vc4_resource_create_with_modifiers(struct pipe_screen *pscreen,
-                                   const struct pipe_resource *tmpl,
-                                   const uint64_t *modifiers,
-                                   int count)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-        struct vc4_resource *rsc = vc4_resource_setup(pscreen, tmpl);
-        struct pipe_resource *prsc = &rsc->base;
-        bool linear_ok = drm_find_modifier(DRM_FORMAT_MOD_LINEAR, modifiers, count);
-        /* Use a tiled layout if we can, for better 3D performance. */
-        bool should_tile = true;
-
-        /* VBOs/PBOs are untiled (and 1 height). */
-        if (tmpl->target == PIPE_BUFFER)
-                should_tile = false;
-
-        /* MSAA buffers are linear. */
-        if (tmpl->nr_samples > 1)
-                should_tile = false;
-
-        /* No tiling when we're sharing with another device (pl111). */
-        if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT))
-                should_tile = false;
-
-        /* Cursors are always linear, and the user can request linear as well.
-         */
-        if (tmpl->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR))
-                should_tile = false;
-
-        /* No shared objects with LT format -- the kernel only has T-format
-         * metadata.  LT objects are small enough it's not worth the trouble to
-         * give them metadata to tile.
-         */
-        if ((tmpl->bind & (PIPE_BIND_SHARED | PIPE_BIND_SCANOUT)) &&
-            vc4_size_is_lt(prsc->width0, prsc->height0, rsc->cpp))
-                should_tile = false;
-
-        /* If we're sharing or scanning out, we need the ioctl present to
-         * inform the kernel or the other side.
-         */
-        if ((tmpl->bind & (PIPE_BIND_SHARED |
-                           PIPE_BIND_SCANOUT)) && !screen->has_tiling_ioctl)
-                should_tile = false;
-
-        /* No user-specified modifier; determine our own. */
-        if (count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) {
-                linear_ok = true;
-                rsc->tiled = should_tile;
-        } else if (should_tile &&
-                   drm_find_modifier(DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED,
-                                 modifiers, count)) {
-                rsc->tiled = true;
-        } else if (linear_ok) {
-                rsc->tiled = false;
-        } else {
-                fprintf(stderr, "Unsupported modifier requested\n");
-                return NULL;
-        }
-
-        if (tmpl->target != PIPE_BUFFER)
-                rsc->vc4_format = get_resource_texture_format(prsc);
-
-        vc4_setup_slices(rsc, "create");
-        if (!vc4_resource_bo_alloc(rsc))
-                goto fail;
-
-        if (screen->has_tiling_ioctl) {
-                uint64_t modifier;
-                if (rsc->tiled)
-                        modifier = DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED;
-                else
-                        modifier = DRM_FORMAT_MOD_LINEAR;
-                struct drm_vc4_set_tiling set_tiling = {
-                        .handle = rsc->bo->handle,
-                        .modifier = modifier,
-                };
-                int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_SET_TILING,
-                                    &set_tiling);
-                if (ret != 0)
-                        goto fail;
-        }
-
-        /* Set up the "scanout resource" (the dmabuf export of our buffer to
-         * the KMS handle) if the buffer might ever have
-         * resource_get_handle(WINSYS_HANDLE_TYPE_KMS) called on it.
-         * create_with_modifiers() doesn't give us usage flags, so we have to
-         * assume that all calls with modifiers are scanout-possible.
-         */
-        if (screen->ro &&
-            ((tmpl->bind & PIPE_BIND_SCANOUT) ||
-             !(count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID))) {
-                rsc->scanout =
-                        renderonly_scanout_for_resource(prsc, screen->ro, NULL);
-                if (!rsc->scanout)
-                        goto fail;
-        }
-
-        vc4_bo_label(screen, rsc->bo, "%sresource %dx%d@%d/%d",
-                     (tmpl->bind & PIPE_BIND_SCANOUT) ? "scanout " : "",
-                     tmpl->width0, tmpl->height0,
-                     rsc->cpp * 8, prsc->last_level);
-
-        return prsc;
-fail:
-        vc4_resource_destroy(pscreen, prsc);
-        return NULL;
-}
-
-struct pipe_resource *
-vc4_resource_create(struct pipe_screen *pscreen,
-                    const struct pipe_resource *tmpl)
-{
-        const uint64_t mod = DRM_FORMAT_MOD_INVALID;
-        return vc4_resource_create_with_modifiers(pscreen, tmpl, &mod, 1);
-}
-
-static struct pipe_resource *
-vc4_resource_from_handle(struct pipe_screen *pscreen,
-                         const struct pipe_resource *tmpl,
-                         struct winsys_handle *whandle,
-                         unsigned usage)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-        struct vc4_resource *rsc = vc4_resource_setup(pscreen, tmpl);
-        struct pipe_resource *prsc = &rsc->base;
-        struct vc4_resource_slice *slice = &rsc->slices[0];
-
-        if (!rsc)
-                return NULL;
-
-        switch (whandle->type) {
-        case WINSYS_HANDLE_TYPE_SHARED:
-                rsc->bo = vc4_bo_open_name(screen, whandle->handle);
-                break;
-        case WINSYS_HANDLE_TYPE_FD:
-                rsc->bo = vc4_bo_open_dmabuf(screen, whandle->handle);
-                break;
-        default:
-                fprintf(stderr,
-                        "Attempt to import unsupported handle type %d\n",
-                        whandle->type);
-        }
-
-        if (!rsc->bo)
-                goto fail;
-
-        struct drm_vc4_get_tiling get_tiling = {
-                .handle = rsc->bo->handle,
-        };
-        int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_TILING, &get_tiling);
-
-        if (ret != 0) {
-                whandle->modifier = DRM_FORMAT_MOD_LINEAR;
-        } else if (whandle->modifier == DRM_FORMAT_MOD_INVALID) {
-                whandle->modifier = get_tiling.modifier;
-        } else if (whandle->modifier != get_tiling.modifier) {
-                fprintf(stderr,
-                        "Modifier 0x%" PRIx64 " vs. tiling (0x%" PRIx64 ") mismatch\n",
-                        (uint64_t)whandle->modifier, (uint64_t)get_tiling.modifier);
-                goto fail;
-        }
-
-        switch (whandle->modifier) {
-        case DRM_FORMAT_MOD_LINEAR:
-                rsc->tiled = false;
-                break;
-        case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
-                rsc->tiled = true;
-                break;
-        default:
-                fprintf(stderr,
-                        "Attempt to import unsupported modifier 0x%" PRIx64 "\n",
-                        (uint64_t)whandle->modifier);
-                goto fail;
-        }
-
-        rsc->vc4_format = get_resource_texture_format(prsc);
-        vc4_setup_slices(rsc, "import");
-
-        if (whandle->offset != 0) {
-                if (rsc->tiled) {
-                        fprintf(stderr,
-                                "Attempt to import unsupported "
-                                "winsys offset %u\n",
-                                whandle->offset);
-                        goto fail;
-                }
-
-                rsc->slices[0].offset += whandle->offset;
-
-                if (rsc->slices[0].offset + rsc->slices[0].size >
-                    rsc->bo->size) {
-                        fprintf(stderr, "Attempt to import "
-                                "with overflowing offset (%d + %d > %d)\n",
-                                whandle->offset,
-                                rsc->slices[0].size,
-                                rsc->bo->size);
-                        goto fail;
-                }
-        }
-
-        if (screen->ro) {
-                /* Make sure that renderonly has a handle to our buffer in the
-                 * display's fd, so that a later renderonly_get_handle()
-                 * returns correct handles or GEM names.
-                 */
-                rsc->scanout =
-                        renderonly_create_gpu_import_for_resource(prsc,
-                                                                  screen->ro,
-                                                                  NULL);
-        }
-
-        if (rsc->tiled && whandle->stride != slice->stride) {
-                static bool warned = false;
-                if (!warned) {
-                        warned = true;
-                        fprintf(stderr,
-                                "Attempting to import %dx%d %s with "
-                                "unsupported stride %d instead of %d\n",
-                                prsc->width0, prsc->height0,
-                                util_format_short_name(prsc->format),
-                                whandle->stride,
-                                slice->stride);
-                }
-                goto fail;
-        } else if (!rsc->tiled) {
-                slice->stride = whandle->stride;
-        }
-
-        return prsc;
-
-fail:
-        vc4_resource_destroy(pscreen, prsc);
-        return NULL;
-}
-
-static struct pipe_surface *
-vc4_create_surface(struct pipe_context *pctx,
-                   struct pipe_resource *ptex,
-                   const struct pipe_surface *surf_tmpl)
-{
-        struct vc4_surface *surface = CALLOC_STRUCT(vc4_surface);
-        struct vc4_resource *rsc = vc4_resource(ptex);
-
-        if (!surface)
-                return NULL;
-
-        assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
-
-        struct pipe_surface *psurf = &surface->base;
-        unsigned level = surf_tmpl->u.tex.level;
-
-        pipe_reference_init(&psurf->reference, 1);
-        pipe_resource_reference(&psurf->texture, ptex);
-
-        psurf->context = pctx;
-        psurf->format = surf_tmpl->format;
-        psurf->width = u_minify(ptex->width0, level);
-        psurf->height = u_minify(ptex->height0, level);
-        psurf->u.tex.level = level;
-        psurf->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
-        psurf->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
-        surface->offset = (rsc->slices[level].offset +
-                           psurf->u.tex.first_layer * rsc->cube_map_stride);
-        surface->tiling = rsc->slices[level].tiling;
-
-        return &surface->base;
-}
-
-static void
-vc4_surface_destroy(struct pipe_context *pctx, struct pipe_surface *psurf)
-{
-        pipe_resource_reference(&psurf->texture, NULL);
-        FREE(psurf);
-}
-
-static void
-vc4_dump_surface_non_msaa(struct pipe_surface *psurf)
-{
-        struct pipe_resource *prsc = psurf->texture;
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        uint32_t *map = vc4_bo_map(rsc->bo);
-        uint32_t stride = rsc->slices[0].stride / 4;
-        uint32_t width = psurf->width;
-        uint32_t height = psurf->height;
-        uint32_t chunk_w = width / 79;
-        uint32_t chunk_h = height / 40;
-        uint32_t found_colors[10] = { 0 };
-        uint32_t num_found_colors = 0;
-
-        if (rsc->vc4_format != VC4_TEXTURE_TYPE_RGBA32R) {
-                fprintf(stderr, "%s: Unsupported format %s\n",
-                        __func__, util_format_short_name(psurf->format));
-                return;
-        }
-
-        for (int by = 0; by < height; by += chunk_h) {
-                for (int bx = 0; bx < width; bx += chunk_w) {
-                        int all_found_color = -1; /* nothing found */
-
-                        for (int y = by; y < MIN2(height, by + chunk_h); y++) {
-                                for (int x = bx; x < MIN2(width, bx + chunk_w); x++) {
-                                        uint32_t pix = map[y * stride + x];
-
-                                        int i;
-                                        for (i = 0; i < num_found_colors; i++) {
-                                                if (pix == found_colors[i])
-                                                        break;
-                                        }
-                                        if (i == num_found_colors &&
-                                            num_found_colors <
-                                            ARRAY_SIZE(found_colors)) {
-                                                found_colors[num_found_colors++] = pix;
-                                        }
-
-                                        if (i < num_found_colors) {
-                                                if (all_found_color == -1)
-                                                        all_found_color = i;
-                                                else if (i != all_found_color)
-                                                        all_found_color = ARRAY_SIZE(found_colors);
-                                        }
-                                }
-                        }
-                        /* If all pixels for this chunk have a consistent
-                         * value, then print a character for it.  Either a
-                         * fixed name (particularly common for piglit tests),
-                         * or a runtime-generated number.
-                         */
-                        if (all_found_color >= 0 &&
-                            all_found_color < ARRAY_SIZE(found_colors)) {
-                                static const struct {
-                                        uint32_t val;
-                                        const char *c;
-                                } named_colors[] = {
-                                        { 0xff000000, "█" },
-                                        { 0x00000000, "█" },
-                                        { 0xffff0000, "r" },
-                                        { 0xff00ff00, "g" },
-                                        { 0xff0000ff, "b" },
-                                        { 0xffffffff, "w" },
-                                };
-                                int i;
-                                for (i = 0; i < ARRAY_SIZE(named_colors); i++) {
-                                        if (named_colors[i].val ==
-                                            found_colors[all_found_color]) {
-                                                fprintf(stderr, "%s",
-                                                        named_colors[i].c);
-                                                break;
-                                        }
-                                }
-                                /* For unnamed colors, print a number and the
-                                 * numbers will have values printed at the
-                                 * end.
-                                 */
-                                if (i == ARRAY_SIZE(named_colors)) {
-                                        fprintf(stderr, "%c",
-                                                '0' + all_found_color);
-                                }
-                        } else {
-                                /* If there's no consistent color, print this.
-                                 */
-                                fprintf(stderr, ".");
-                        }
-                }
-                fprintf(stderr, "\n");
-        }
-
-        for (int i = 0; i < num_found_colors; i++) {
-                fprintf(stderr, "color %d: 0x%08x\n", i, found_colors[i]);
-        }
-}
-
-static uint32_t
-vc4_surface_msaa_get_sample(struct pipe_surface *psurf,
-                            uint32_t x, uint32_t y, uint32_t sample)
-{
-        struct pipe_resource *prsc = psurf->texture;
-        struct vc4_resource *rsc = vc4_resource(prsc);
-        uint32_t tile_w = 32, tile_h = 32;
-        uint32_t tiles_w = DIV_ROUND_UP(psurf->width, 32);
-
-        uint32_t tile_x = x / tile_w;
-        uint32_t tile_y = y / tile_h;
-        uint32_t *tile = (vc4_bo_map(rsc->bo) +
-                          VC4_TILE_BUFFER_SIZE * (tile_y * tiles_w + tile_x));
-        uint32_t subtile_x = x % tile_w;
-        uint32_t subtile_y = y % tile_h;
-
-        uint32_t quad_samples = VC4_MAX_SAMPLES * 4;
-        uint32_t tile_stride = quad_samples * tile_w / 2;
-
-        return *((uint32_t *)tile +
-                 (subtile_y >> 1) * tile_stride +
-                 (subtile_x >> 1) * quad_samples +
-                 ((subtile_y & 1) << 1) +
-                 (subtile_x & 1) +
-                 sample);
-}
-
-static void
-vc4_dump_surface_msaa_char(struct pipe_surface *psurf,
-                           uint32_t start_x, uint32_t start_y,
-                           uint32_t w, uint32_t h)
-{
-        bool all_same_color = true;
-        uint32_t all_pix = 0;
-
-        for (int y = start_y; y < start_y + h; y++) {
-                for (int x = start_x; x < start_x + w; x++) {
-                        for (int s = 0; s < VC4_MAX_SAMPLES; s++) {
-                                uint32_t pix = vc4_surface_msaa_get_sample(psurf,
-                                                                           x, y,
-                                                                           s);
-                                if (x == start_x && y == start_y)
-                                        all_pix = pix;
-                                else if (all_pix != pix)
-                                        all_same_color = false;
-                        }
-                }
-        }
-        if (all_same_color) {
-                static const struct {
-                        uint32_t val;
-                        const char *c;
-                } named_colors[] = {
-                        { 0xff000000, "█" },
-                        { 0x00000000, "█" },
-                        { 0xffff0000, "r" },
-                        { 0xff00ff00, "g" },
-                        { 0xff0000ff, "b" },
-                        { 0xffffffff, "w" },
-                };
-                int i;
-                for (i = 0; i < ARRAY_SIZE(named_colors); i++) {
-                        if (named_colors[i].val == all_pix) {
-                                fprintf(stderr, "%s",
-                                        named_colors[i].c);
-                                return;
-                        }
-                }
-                fprintf(stderr, "x");
-        } else {
-                fprintf(stderr, ".");
-        }
-}
-
-static void
-vc4_dump_surface_msaa(struct pipe_surface *psurf)
-{
-        uint32_t tile_w = 32, tile_h = 32;
-        uint32_t tiles_w = DIV_ROUND_UP(psurf->width, tile_w);
-        uint32_t tiles_h = DIV_ROUND_UP(psurf->height, tile_h);
-        uint32_t char_w = 140, char_h = 60;
-        uint32_t char_w_per_tile = char_w / tiles_w - 1;
-        uint32_t char_h_per_tile = char_h / tiles_h - 1;
-
-        fprintf(stderr, "Surface: %dx%d (%dx MSAA)\n",
-                psurf->width, psurf->height, psurf->texture->nr_samples);
-
-        for (int x = 0; x < (char_w_per_tile + 1) * tiles_w; x++)
-                fprintf(stderr, "-");
-        fprintf(stderr, "\n");
-
-        for (int ty = 0; ty < psurf->height; ty += tile_h) {
-                for (int y = 0; y < char_h_per_tile; y++) {
-
-                        for (int tx = 0; tx < psurf->width; tx += tile_w) {
-                                for (int x = 0; x < char_w_per_tile; x++) {
-                                        uint32_t bx1 = (x * tile_w /
-                                                        char_w_per_tile);
-                                        uint32_t bx2 = ((x + 1) * tile_w /
-                                                        char_w_per_tile);
-                                        uint32_t by1 = (y * tile_h /
-                                                        char_h_per_tile);
-                                        uint32_t by2 = ((y + 1) * tile_h /
-                                                        char_h_per_tile);
-
-                                        vc4_dump_surface_msaa_char(psurf,
-                                                                   tx + bx1,
-                                                                   ty + by1,
-                                                                   bx2 - bx1,
-                                                                   by2 - by1);
-                                }
-                                fprintf(stderr, "|");
-                        }
-                        fprintf(stderr, "\n");
-                }
-
-                for (int x = 0; x < (char_w_per_tile + 1) * tiles_w; x++)
-                        fprintf(stderr, "-");
-                fprintf(stderr, "\n");
-        }
-}
-
-/** Debug routine to dump the contents of an 8888 surface to the console */
-void
-vc4_dump_surface(struct pipe_surface *psurf)
-{
-        if (!psurf)
-                return;
-
-        if (psurf->texture->nr_samples > 1)
-                vc4_dump_surface_msaa(psurf);
-        else
-                vc4_dump_surface_non_msaa(psurf);
-}
-
-static void
-vc4_flush_resource(struct pipe_context *pctx, struct pipe_resource *resource)
-{
-        /* All calls to flush_resource are followed by a flush of the context,
-         * so there's nothing to do.
-         */
-}
-
-void
-vc4_update_shadow_baselevel_texture(struct pipe_context *pctx,
-                                    struct pipe_sampler_view *pview)
-{
-        struct vc4_context *vc4 = vc4_context(pctx);
-        struct vc4_sampler_view *view = vc4_sampler_view(pview);
-        struct vc4_resource *shadow = vc4_resource(view->texture);
-        struct vc4_resource *orig = vc4_resource(pview->texture);
-
-        assert(view->texture != pview->texture);
-
-        if (shadow->writes == orig->writes && orig->bo->private)
-                return;
-
-        perf_debug("Updating %dx%d@%d shadow texture due to %s\n",
-                   orig->base.width0, orig->base.height0,
-                   pview->u.tex.first_level,
-                   pview->u.tex.first_level ? "base level" : "raster layout");
-
-        for (int i = 0; i <= shadow->base.last_level; i++) {
-                unsigned width = u_minify(shadow->base.width0, i);
-                unsigned height = u_minify(shadow->base.height0, i);
-                struct pipe_blit_info info = {
-                        .dst = {
-                                .resource = &shadow->base,
-                                .level = i,
-                                .box = {
-                                        .x = 0,
-                                        .y = 0,
-                                        .z = 0,
-                                        .width = width,
-                                        .height = height,
-                                        .depth = 1,
-                                },
-                                .format = shadow->base.format,
-                        },
-                        .src = {
-                                .resource = &orig->base,
-                                .level = pview->u.tex.first_level + i,
-                                .box = {
-                                        .x = 0,
-                                        .y = 0,
-                                        .z = 0,
-                                        .width = width,
-                                        .height = height,
-                                        .depth = 1,
-                                },
-                                .format = orig->base.format,
-                        },
-                        .mask = ~0,
-                };
-                pctx->blit(pctx, &info);
-        }
-
-        shadow->writes = orig->writes;
-}
-
-/**
- * Converts a 4-byte index buffer to 2 bytes.
- *
- * Since GLES2 only has support for 1 and 2-byte indices, the hardware doesn't
- * include 4-byte index support, and we have to shrink it down.
- *
- * There's no fallback support for when indices end up being larger than 2^16,
- * though it will at least assertion fail.  Also, if the original index data
- * was in user memory, it would be nice to not have uploaded it to a VBO
- * before translating.
- */
-struct pipe_resource *
-vc4_get_shadow_index_buffer(struct pipe_context *pctx,
-                            const struct pipe_draw_info *info,
-                            uint32_t offset,
-                            uint32_t count,
-                            uint32_t *shadow_offset)
-{
-        struct vc4_context *vc4 = vc4_context(pctx);
-        struct vc4_resource *orig = vc4_resource(info->index.resource);
-        perf_debug("Fallback conversion for %d uint indices\n", count);
-
-        void *data;
-        struct pipe_resource *shadow_rsc = NULL;
-        u_upload_alloc(vc4->uploader, 0, count * 2, 4,
-                       shadow_offset, &shadow_rsc, &data);
-        uint16_t *dst = data;
-
-        struct pipe_transfer *src_transfer = NULL;
-        const uint32_t *src;
-        if (info->has_user_indices) {
-                src = (uint32_t*)((char*)info->index.user + offset);
-        } else {
-                src = pipe_buffer_map_range(pctx, &orig->base,
-                                            offset,
-                                            count * 4,
-                                            PIPE_MAP_READ, &src_transfer);
-        }
-
-        for (int i = 0; i < count; i++) {
-                uint32_t src_index = src[i];
-                assert(src_index <= 0xffff);
-                dst[i] = src_index;
-        }
-
-        if (src_transfer)
-                pctx->buffer_unmap(pctx, src_transfer);
-
-        return shadow_rsc;
-}
-
-static const struct u_transfer_vtbl transfer_vtbl = {
-        .resource_create          = vc4_resource_create,
-        .resource_destroy         = vc4_resource_destroy,
-        .transfer_map             = vc4_resource_transfer_map,
-        .transfer_unmap           = vc4_resource_transfer_unmap,
-        .transfer_flush_region    = u_default_transfer_flush_region,
-};
-
-void
-vc4_resource_screen_init(struct pipe_screen *pscreen)
-{
-        struct vc4_screen *screen = vc4_screen(pscreen);
-
-        pscreen->resource_create = vc4_resource_create;
-        pscreen->resource_create_with_modifiers =
-                vc4_resource_create_with_modifiers;
-        pscreen->resource_from_handle = vc4_resource_from_handle;
-        pscreen->resource_get_handle = vc4_resource_get_handle;
-        pscreen->resource_get_param = vc4_resource_get_param;
-        pscreen->resource_destroy = vc4_resource_destroy;
-        pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
-                                                            U_TRANSFER_HELPER_MSAA_MAP);
-
-        /* Test if the kernel has GET_TILING; it will return -EINVAL if the
-         * ioctl does not exist, but -ENOENT if we pass an impossible handle.
-         * 0 cannot be a valid GEM object, so use that.
-         */
-        struct drm_vc4_get_tiling get_tiling = {
-                .handle = 0x0,
-        };
-        int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_TILING, &get_tiling);
-        if (ret == -1 && errno == ENOENT)
-                screen->has_tiling_ioctl = true;
-}
-
-void
-vc4_resource_context_init(struct pipe_context *pctx)
-{
-        pctx->buffer_map = u_transfer_helper_transfer_map;
-        pctx->texture_map = u_transfer_helper_transfer_map;
-        pctx->transfer_flush_region = u_transfer_helper_transfer_flush_region;
-        pctx->buffer_unmap = u_transfer_helper_transfer_unmap;
-        pctx->texture_unmap = u_transfer_helper_transfer_unmap;
-        pctx->buffer_subdata = u_default_buffer_subdata;
-        pctx->texture_subdata = vc4_texture_subdata;
-        pctx->create_surface = vc4_create_surface;
-        pctx->surface_destroy = vc4_surface_destroy;
-        pctx->resource_copy_region = util_resource_copy_region;
-        pctx->blit = vc4_blit;
-        pctx->flush_resource = vc4_flush_resource;
-}
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers/vc4
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium/drivers
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src/gallium
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new/src
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/mesa-22.3.4-new
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/create.patch.sh
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch/create.patch.sh	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch/create.patch.sh	(nonexistent)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-VERSION=22.3.4
-
-tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
-mv mesa-$VERSION mesa-$VERSION-orig
-
-cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
-
-diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-gallium-vc4-format.patch
-
-mv mesa-$VERSION-gallium-vc4-format.patch ../patches
-
-rm -rf ./mesa-$VERSION
-rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch/create.patch.sh
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: mesa/22.x/create-22.3.4-gallium-vc4-format-patch
===================================================================
--- mesa/22.x/create-22.3.4-gallium-vc4-format-patch	(revision 384)
+++ mesa/22.x/create-22.3.4-gallium-vc4-format-patch	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-gallium-vc4-format-patch
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-config-tool-patch/file.list
===================================================================
--- mesa/22.x/create-22.3.4-llvm-config-tool-patch/file.list	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-config-tool-patch/file.list	(nonexistent)
@@ -1 +0,0 @@
-mesa-22.3.4/meson.build
Index: mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new/meson.build
===================================================================
--- mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new/meson.build	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new/meson.build	(nonexistent)
@@ -1,2428 +0,0 @@
-# Copyright © 2017-2020 Intel Corporation
-
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-# SOFTWARE.
-
-project(
-  'mesa',
-  ['c', 'cpp'],
-  version : run_command(
-    [find_program('python3', 'python'), 'bin/meson_get_version.py'],
-    check : true
-  ).stdout(),
-  license : 'MIT',
-  meson_version : '>= 0.53',
-  default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++17', 'rust_std=2021']
-)
-
-# In recent versions, meson can inject some extra arguments to get richer
-# results from gtest based tests.  Feature was added in 0.55, but requiring
-# 0.59.2 to include an important fix.  See https://github.com/mesonbuild/meson/pull/9283.
-gtest_test_protocol = 'exitcode'
-if meson.version().version_compare('>= 0.59.2')
-  gtest_test_protocol = 'gtest'
-endif
-
-cc = meson.get_compiler('c')
-cpp = meson.get_compiler('cpp')
-
-null_dep = dependency('', required : false)
-
-if get_option('layout') != 'mirror'
-  error('`mirror` is the only build directory layout supported')
-endif
-
-# Arguments for the preprocessor, put these in a separate array from the C and
-# C++ (cpp in meson terminology) arguments since they need to be added to the
-# default arguments for both C and C++.
-pre_args = [
-  '-D__STDC_CONSTANT_MACROS',
-  '-D__STDC_FORMAT_MACROS',
-  '-D__STDC_LIMIT_MACROS',
-  '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
-  '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"',
-]
-c_args = []
-cpp_args = []
-
-with_moltenvk_dir = get_option('moltenvk-dir')
-with_vulkan_icd_dir = get_option('vulkan-icd-dir')
-with_tests = get_option('build-tests')
-with_glcpp_tests = get_option('enable-glcpp-tests')
-with_aco_tests = get_option('build-aco-tests')
-with_glx_read_only_text = get_option('glx-read-only-text')
-with_glx_direct = get_option('glx-direct')
-with_osmesa = get_option('osmesa')
-with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay')
-with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select')
-with_tools = get_option('tools')
-if with_tools.contains('all')
-  with_tools = [
-    'drm-shim',
-    'dlclose-skip',
-    'etnaviv',
-    'freedreno',
-    'glsl',
-    'intel',
-    'intel-ui',
-    'lima',
-    'nir',
-    'nouveau',
-    'asahi',
-    'imagination',
-  ]
-endif
-
-with_any_vulkan_layers = get_option('vulkan-layers').length() != 0
-with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
-with_imgui = with_intel_tools or with_vulkan_overlay_layer
-
-dri_drivers_path = get_option('dri-drivers-path')
-if dri_drivers_path == ''
-  dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
-endif
-dri_search_path = get_option('dri-search-path')
-if dri_search_path == ''
-  dri_search_path = dri_drivers_path
-endif
-
-gbm_backends_path = get_option('gbm-backends-path')
-if gbm_backends_path == ''
-  gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
-endif
-
-with_gles1 = get_option('gles1')
-if with_gles1 == 'true'
-  with_gles1 = 'enabled'
-  warning('gles1 option "true" deprecated, please use "enabled" instead.')
-elif with_gles1 == 'false'
-  with_gles1 = 'disabled'
-  warning('gles1 option "false" deprecated, please use "disabled" instead.')
-endif
-with_gles2 = get_option('gles2')
-if with_gles2 == 'true'
-  with_gles2 = 'enabled'
-  warning('gles2 option "true" deprecated, please use "enabled" instead.')
-elif with_gles2 == 'false'
-  with_gles2 = 'disabled'
-  warning('gles2 option "false" deprecated, please use "disabled" instead.')
-endif
-if host_machine.system() == 'windows'
-  if with_gles1 == 'auto'
-    with_gles1 = 'disabled'
-  endif
-  if with_gles2 == 'auto'
-    with_gles2 = 'disabled'
-  endif
-endif
-with_opengl = get_option('opengl')
-
-# Default shared glapi off for windows, on elsewhere.
-_sg = get_option('shared-glapi')
-if _sg == 'true'
-  _sg = 'enabled'
-  warning('shared-glapi option "true" deprecated, please use "enabled" instead.')
-elif _sg == 'false'
-  _sg = 'disabled'
-  warning('shared-glapi option "false" deprecated, please use "disabled" instead.')
-endif
-if _sg == 'auto'
-  with_shared_glapi = host_machine.system() != 'windows'
-else
-  with_shared_glapi = _sg == 'enabled'
-endif
-
-# shared-glapi is required if at least two OpenGL APIs are being built
-if not with_shared_glapi
-  if ((with_gles1 == 'enabled' and with_gles2 == 'enabled') or
-      (with_gles1 == 'enabled' and with_opengl) or
-      (with_gles2 == 'enabled' and with_opengl))
-    error('shared-glapi required for building two or more of OpenGL, OpenGL ES 1.x, OpenGL ES 2.x')
-  endif
-  with_gles1 = 'disabled'
-  with_gles2 = 'disabled'
-endif
-
-# We require OpenGL for OpenGL ES
-if not with_opengl
-  if (with_gles1 == 'enabled' or with_gles2 == 'enabled') and not with_opengl
-    error('building OpenGL ES without OpenGL is not supported.')
-  endif
-  with_gles1 = 'disabled'
-  with_gles2 = 'disabled'
-endif
-
-with_gles1 = with_gles1 != 'disabled'
-with_gles2 = with_gles2 != 'disabled'
-with_any_opengl = with_opengl or with_gles1 or with_gles2
-# Only build shared_glapi if at least one OpenGL API is enabled
-with_shared_glapi = with_shared_glapi and with_any_opengl
-
-system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system())
-
-with_freedreno_kgsl = get_option('freedreno-kgsl')
-if with_freedreno_kgsl
-  system_has_kms_drm = false
-endif
-
-dri_drivers = get_option('dri-drivers')
-if dri_drivers.length() != 0
-  error('Mesa\'s main branch no longer has any "classic" drivers, use the "amber" branch instead.')
-endif
-
-gallium_drivers = get_option('gallium-drivers')
-if gallium_drivers.contains('auto')
-  if system_has_kms_drm
-    # TODO: PPC, Sparc
-    if ['x86', 'x86_64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast',
-        'iris', 'crocus', 'i915'
-      ]
-    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga',
-        'tegra', 'virgl', 'lima', 'panfrost', 'swrast'
-      ]
-    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
-      gallium_drivers = [
-        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast'
-      ]
-    else
-      error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-            host_machine.cpu_family()))
-    endif
-  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
-    gallium_drivers = ['swrast']
-  else
-    error('Unknown OS @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-with_gallium_radeonsi = gallium_drivers.contains('radeonsi')
-with_gallium_r300 = gallium_drivers.contains('r300')
-with_gallium_r600 = gallium_drivers.contains('r600')
-with_gallium_nouveau = gallium_drivers.contains('nouveau')
-with_gallium_freedreno = gallium_drivers.contains('freedreno')
-with_gallium_softpipe = gallium_drivers.contains('swrast')
-with_gallium_vc4 = gallium_drivers.contains('vc4')
-with_gallium_v3d = gallium_drivers.contains('v3d')
-with_gallium_panfrost = gallium_drivers.contains('panfrost')
-with_gallium_etnaviv = gallium_drivers.contains('etnaviv')
-with_gallium_tegra = gallium_drivers.contains('tegra')
-with_gallium_crocus = gallium_drivers.contains('crocus')
-with_gallium_iris = gallium_drivers.contains('iris')
-with_gallium_i915 = gallium_drivers.contains('i915')
-with_gallium_svga = gallium_drivers.contains('svga')
-with_gallium_virgl = gallium_drivers.contains('virgl')
-with_gallium_lima = gallium_drivers.contains('lima')
-with_gallium_zink = gallium_drivers.contains('zink')
-with_gallium_d3d12 = gallium_drivers.contains('d3d12')
-with_gallium_asahi = gallium_drivers.contains('asahi')
-foreach gallium_driver : gallium_drivers
-  pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
-endforeach
-
-with_gallium = gallium_drivers.length() != 0
-with_gallium_kmsro = with_gallium_v3d or with_gallium_vc4 or with_gallium_etnaviv or with_gallium_panfrost or with_gallium_lima or with_gallium_freedreno or with_gallium_asahi
-
-if not system_has_kms_drm
-   with_gallium_kmsro = false
-endif
-
-with_dri = false
-if with_gallium and system_has_kms_drm
-  _glx = get_option('glx')
-  _egl = get_option('egl')
-  if _glx == 'dri' or _egl == 'enabled' or (_glx == 'disabled' and _egl != 'disabled')
-    with_dri = true
-  endif
-endif
-
-_vulkan_drivers = get_option('vulkan-drivers')
-if _vulkan_drivers.contains('auto')
-  if system_has_kms_drm
-    if host_machine.cpu_family().startswith('x86')
-      _vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast']
-    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
-      _vulkan_drivers = ['swrast']
-    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
-      _vulkan_drivers = ['amd', 'swrast']
-    else
-      error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-            host_machine.cpu_family()))
-    endif
-  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
-    # No vulkan driver supports windows or macOS currently
-    _vulkan_drivers = []
-  else
-    error('Unknown OS @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-
-with_intel_vk = _vulkan_drivers.contains('intel')
-with_intel_hasvk = _vulkan_drivers.contains('intel_hasvk')
-with_amd_vk = _vulkan_drivers.contains('amd')
-with_freedreno_vk = _vulkan_drivers.contains('freedreno')
-with_panfrost_vk = _vulkan_drivers.contains('panfrost')
-with_swrast_vk = _vulkan_drivers.contains('swrast')
-with_virtio_vk = _vulkan_drivers.contains('virtio-experimental')
-with_freedreno_virtio = get_option('freedreno-virtio')
-with_broadcom_vk = _vulkan_drivers.contains('broadcom')
-with_imagination_vk = _vulkan_drivers.contains('imagination-experimental')
-with_imagination_srv = get_option('imagination-srv')
-with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
-with_any_vk = _vulkan_drivers.length() != 0
-
-with_any_broadcom = with_gallium_vc4 or with_gallium_v3d or with_broadcom_vk
-with_any_intel = with_intel_vk or with_intel_hasvk or with_gallium_iris or with_gallium_crocus or with_intel_tools
-
-if with_swrast_vk and not with_gallium_softpipe
-  error('swrast vulkan requires gallium swrast')
-endif
-if with_gallium_tegra and not with_gallium_nouveau
-  error('tegra driver requires nouveau driver')
-endif
-if with_aco_tests and not with_amd_vk
-  error('ACO tests require Radv')
-endif
-
-with_microsoft_clc = get_option('microsoft-clc').enabled()
-if ['x86_64'].contains(host_machine.cpu_family())
-  with_intel_clc = get_option('intel-clc').enabled()
-  with_intel_vk_rt = with_intel_vk and with_intel_clc
-else
-  with_intel_clc = false
-  with_intel_vk_rt = false
-endif
-with_clc = with_microsoft_clc or with_intel_clc
-with_libclc = with_clc
-with_spirv_to_dxil = get_option('spirv-to-dxil')
-
-if host_machine.system() == 'darwin'
-  with_dri_platform = 'apple'
-  pre_args += '-DBUILDING_MESA'
-elif ['windows', 'cygwin'].contains(host_machine.system())
-  with_dri_platform = 'windows'
-elif system_has_kms_drm
-  with_dri_platform = 'drm'
-else
-  # FIXME: haiku doesn't use dri, and xlib doesn't use dri, probably should
-  # assert here that one of those cases has been met.
-  # FIXME: illumos ends up here as well
-  with_dri_platform = 'none'
-endif
-
-with_vulkan_beta = get_option('vulkan-beta')
-if with_vulkan_beta
-  pre_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-endif
-
-_codecs = get_option('video-codecs')
-foreach c : ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc']
-   pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
-endforeach
-
-_platforms = get_option('platforms')
-if _platforms.contains('auto')
-  if system_has_kms_drm
-    _platforms = ['x11', 'wayland']
-  elif ['darwin', 'cygwin'].contains(host_machine.system())
-    _platforms = ['x11']
-  elif ['haiku'].contains(host_machine.system())
-    _platforms = ['haiku']
-  elif host_machine.system() == 'windows'
-    _platforms = ['windows']
-  else
-    error('Unknown OS @0@. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.'.format(
-          host_machine.system()))
-  endif
-endif
-
-with_platform_android = _platforms.contains('android')
-with_platform_x11 = _platforms.contains('x11')
-with_platform_wayland = _platforms.contains('wayland')
-with_platform_haiku = _platforms.contains('haiku')
-with_platform_windows = _platforms.contains('windows')
-
-with_glx = get_option('glx')
-if with_glx == 'auto'
-  if with_platform_android
-    with_glx = 'disabled'
-  elif with_dri
-    with_glx = 'dri'
-  elif with_platform_haiku
-    with_glx = 'disabled'
-  elif host_machine.system() == 'windows'
-    with_glx = 'disabled'
-  elif with_gallium
-    # Even when building just gallium drivers the user probably wants dri
-    with_glx = 'dri'
-  elif with_platform_x11 and with_any_opengl and not with_any_vk
-    # The automatic behavior should not be to turn on xlib based glx when
-    # building only vulkan drivers
-    with_glx = 'xlib'
-  else
-    with_glx = 'disabled'
-  endif
-endif
-if with_glx == 'dri'
-   if with_gallium
-      with_dri = true
-   endif
-endif
-
-if not (with_dri or with_gallium or with_glx != 'disabled')
-  with_gles1 = false
-  with_gles2 = false
-  with_opengl = false
-  with_any_opengl = false
-  with_shared_glapi = false
-endif
-
-_gbm = get_option('gbm')
-if _gbm == 'true'
-  _gbm = 'enabled'
-  warning('gbm option "true" deprecated, please use "enabled" instead.')
-elif _gbm == 'false'
-  _gbm = 'disabled'
-  warning('gbm option "false" deprecated, please use "disabled" instead.')
-endif
-if _gbm == 'auto'
-  with_gbm = system_has_kms_drm and with_dri
-else
-  with_gbm = _gbm == 'enabled'
-endif
-if with_gbm and not system_has_kms_drm
-  error('GBM only supports DRM/KMS platforms')
-endif
-
-_xlib_lease = get_option('xlib-lease')
-if _xlib_lease == 'true'
-  _xlib_lease = 'enabled'
-  warning('xlib_lease option "true" deprecated, please use "enabled" instead.')
-elif _xlib_lease == 'false'
-  _xlib_lease = 'disabled'
-  warning('xlib_lease option "false" deprecated, please use "disabled" instead.')
-endif
-if _xlib_lease == 'auto'
-  with_xlib_lease = with_platform_x11 and system_has_kms_drm
-else
-  with_xlib_lease = _xlib_lease == 'enabled'
-endif
-
-if with_platform_wayland
-  c_args += '-DVK_USE_PLATFORM_WAYLAND_KHR'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_WAYLAND_KHR'
-endif
-if with_platform_x11
-  c_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR']
-  #add this once aco and other places can build with it
-  #cpp_args += ['-DVK_USE_PLATFORM_XCB_KHR', '-DVK_USE_PLATFORM_XLIB_KHR']
-endif
-if with_platform_windows
-  c_args += '-DVK_USE_PLATFORM_WIN32_KHR'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_WIN32_KHR'
-endif
-if with_platform_android
-  c_args += '-DVK_USE_PLATFORM_ANDROID_KHR'
-  cpp_args += '-DVK_USE_PLATFORM_ANDROID_KHR'
-endif
-if with_xlib_lease
-  c_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
-  #add this once aco and other places can build with it
-  #cpp_args += '-DVK_USE_PLATFORM_XLIB_XRANDR_EXT'
-endif
-if system_has_kms_drm and not with_platform_android
-  c_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
-  cpp_args += '-DVK_USE_PLATFORM_DISPLAY_KHR'
-endif
-if host_machine.system() == 'darwin'
-  c_args += '-DVK_USE_PLATFORM_MACOS_MVK'
-  cpp_args += '-DVK_USE_PLATFORM_MACOS_MVK'
-  c_args += '-DVK_USE_PLATFORM_METAL_EXT'
-  cpp_args += '-DVK_USE_PLATFORM_METAL_EXT'
-  #macOS seems to need beta extensions to build for now:
-  c_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-  cpp_args += '-DVK_ENABLE_BETA_EXTENSIONS'
-endif
-
-_egl = get_option('egl')
-if _egl == 'true'
-  _egl = 'enabled'
-  warning('egl option "true" deprecated, please use "enabled" instead.')
-elif _egl == 'false'
-  _egl = 'disabled'
-  warning('egl option "false" deprecated, please use "disabled" instead.')
-endif
-if _egl == 'auto'
-  with_egl = (
-    host_machine.system() != 'darwin' and
-    (with_platform_windows or with_dri) and
-    with_shared_glapi
-  )
-elif _egl == 'enabled'
-  if not with_dri and not with_platform_haiku and not with_platform_windows
-    error('EGL requires dri, haiku, or windows')
-  elif not with_shared_glapi
-    error('EGL requires shared-glapi')
-  elif not ['disabled', 'dri'].contains(with_glx)
-    error('EGL requires dri, but a GLX is being built without dri')
-  elif host_machine.system() == 'darwin'
-    error('EGL is not available on MacOS')
-  endif
-  with_egl = true
-else
-  with_egl = false
-endif
-
-if with_egl
-  _platforms += 'surfaceless'
-  if with_gbm and not with_platform_android
-    _platforms += 'drm'
-  endif
-
-  egl_native_platform = get_option('egl-native-platform')
-  if egl_native_platform.contains('auto')
-    egl_native_platform = _platforms[0]
-  endif
-endif
-
-if with_egl and not _platforms.contains(egl_native_platform)
-  error('-Degl-native-platform does not specify an enabled platform')
-endif
-
-if 'x11' in _platforms
-  _platforms += 'xcb'
-endif
-
-foreach platform : _platforms
-  pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
-endforeach
-
-if with_platform_android and get_option('platform-sdk-version') >= 29
-  # By default the NDK compiler, at least, emits emutls references instead of
-  # ELF TLS, even when building targeting newer API levels.  Make it actually do
-  # ELF TLS instead.
-  c_args += '-fno-emulated-tls'
-  cpp_args += '-fno-emulated-tls'
-endif
-
-# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
-# full toolchain (including libc) support.
-have_mtls_dialect = false
-foreach c_arg : get_option('c_args')
-  if c_arg.startswith('-mtls-dialect=')
-    have_mtls_dialect = true
-    break
-  endif
-endforeach
-if not have_mtls_dialect
-  # need .run to check libc support. meson aborts when calling .run when
-  # cross-compiling, but because this is just an optimization we can skip it
-  if meson.is_cross_build() and not meson.has_exe_wrapper()
-    warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
-  else
-    # -fpic to force dynamic tls, otherwise TLS relaxation defeats check
-    gnu2_test = cc.run('int __thread x; int main() { return x; }',
-                       args: ['-mtls-dialect=gnu2', '-fpic'],
-                       name: '-mtls-dialect=gnu2')
-    if gnu2_test.returncode() == 0 and (
-          # check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
-          host_machine.cpu_family() != 'x86_64' or
-          # get_linker_id misses LDFLAGS=-fuse-ld=lld: https://github.com/mesonbuild/meson/issues/6377
-          #cc.get_linker_id() != 'ld.lld' or
-          cc.links('''int __thread x; int y; int main() { __asm__(
-                "leaq x@TLSDESC(%rip), %rax\n"
-                "movq y@GOTPCREL(%rip), %rdx\n"
-                "call *x@TLSCALL(%rax)\n"); }''', name: 'split TLSDESC')
-          )
-      c_args += '-mtls-dialect=gnu2'
-      cpp_args += '-mtls-dialect=gnu2'
-    endif
-  endif
-endif
-
-if with_glx != 'disabled'
-  if not (with_platform_x11 and with_any_opengl)
-    error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
-  elif with_glx == 'xlib'
-    if not with_gallium
-      error('xlib based GLX requires at least one gallium driver')
-    elif not with_gallium_softpipe
-      error('xlib based GLX requires softpipe or llvmpipe.')
-    elif with_dri
-      error('xlib conflicts with any dri driver')
-    endif
-  elif with_glx == 'dri'
-    if not with_shared_glapi
-      error('dri based GLX requires shared-glapi')
-    endif
-  endif
-endif
-
-with_glvnd = get_option('glvnd')
-glvnd_vendor_name = get_option('glvnd-vendor-name')
-if with_glvnd
-  if with_platform_windows
-    error('glvnd cannot be used on Windows')
-  elif with_glx == 'xlib'
-    error('Cannot build glvnd support for GLX that is not DRI based.')
-  elif with_glx == 'disabled' and not with_egl
-    error('glvnd requires DRI based GLX and/or EGL')
-  endif
-  if get_option('egl-lib-suffix') != ''
-    error('''EGL lib suffix can't be used with libglvnd''')
-  endif
-endif
-
-if with_vulkan_icd_dir == ''
-  with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
-endif
-
-# GNU/Hurd includes egl_dri2, without drm.
-with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
-  host_machine.system() == 'gnu')
-_dri3 = get_option('dri3')
-if _dri3 == 'true'
-  _dri3 = 'enabled'
-  warning('dri3 option "true" deprecated, please use "enabled" instead.')
-elif _dri3 == 'false'
-  _dri3 = 'disabled'
-  warning('dri3 option "false" deprecated, please use "disabled" instead.')
-endif
-if _dri3 == 'auto'
-  with_dri3 = system_has_kms_drm and with_dri2
-else
-  with_dri3 = _dri3 == 'enabled'
-endif
-
-if with_any_vk and (with_platform_x11 and not with_dri3)
-  error('Vulkan drivers require dri3 for X11 support')
-endif
-if with_dri
-  if with_glx == 'disabled' and not with_egl and not with_gbm
-    error('building dri drivers require at least one windowing system')
-  endif
-endif
-
-if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
-  error('kmsro requires dri3 for X11 support')
-endif
-
-dep_dxheaders = null_dep
-if with_gallium_d3d12 or with_microsoft_clc or with_microsoft_vk
-  dep_dxheaders = dependency('directx-headers', required : false)
-  if not dep_dxheaders.found()
-    dep_dxheaders = dependency('DirectX-Headers',
-      version : '>= 1.606.4',
-      fallback : ['DirectX-Headers', 'dep_dxheaders'],
-      required : with_gallium_d3d12 or with_microsoft_vk
-    )
-  endif
-endif
-
-_with_gallium_d3d12_video = get_option('gallium-d3d12-video')
-with_gallium_d3d12_video = false
-if with_gallium_d3d12 and not _with_gallium_d3d12_video.disabled()
-  with_gallium_d3d12_video = true
-  pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO'
-endif
-
-_vdpau = get_option('gallium-vdpau')
-if _vdpau == 'true'
-  _vdpau = 'enabled'
-  warning('gallium-vdpau option "true" deprecated, please use "enabled" instead.')
-elif _vdpau == 'false'
-  _vdpau = 'disabled'
-  warning('gallium-vdpau option "false" deprecated, please use "disabled" instead.')
-endif
-if not system_has_kms_drm
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker can only be build on unix-like OSes.')
-  else
-    _vdpau = 'disabled'
-  endif
-elif not with_platform_x11
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker requires X11 support.')
-  else
-    _vdpau = 'disabled'
-  endif
-elif not (with_gallium_r300 or with_gallium_r600 or with_gallium_radeonsi or
-          with_gallium_nouveau or with_gallium_d3d12_video or with_gallium_virgl)
-  if _vdpau == 'enabled'
-    error('VDPAU state tracker requires at least one of the following gallium drivers: r300, r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).')
-  else
-    _vdpau = 'disabled'
-  endif
-endif
-dep_vdpau = null_dep
-with_gallium_vdpau = false
-if _vdpau != 'disabled'
-  dep_vdpau = dependency('vdpau', version : '>= 1.1', required : _vdpau == 'enabled')
-  if dep_vdpau.found()
-    dep_vdpau = dep_vdpau.partial_dependency(compile_args : true)
-    with_gallium_vdpau = true
-  endif
-endif
-
-if with_gallium_vdpau
-  pre_args += '-DHAVE_ST_VDPAU'
-endif
-vdpau_drivers_path = get_option('vdpau-libs-path')
-if vdpau_drivers_path == ''
-  vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau')
-endif
-
-if with_vulkan_overlay_layer or with_aco_tests or with_amd_vk
-  prog_glslang = find_program('glslangValidator')
-  if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
-    glslang_quiet = ['--quiet']
-  else
-    glslang_quiet = []
-  endif
-endif
-
-dep_xv = null_dep
-_omx = get_option('gallium-omx')
-if not system_has_kms_drm
-  if ['auto', 'disabled'].contains(_omx)
-    _omx = 'disabled'
-  else
-    error('OMX state tracker can only be built on unix-like OSes.')
-  endif
-elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
-  if ['auto', 'disabled'].contains(_omx)
-    _omx = 'disabled'
-  else
-    error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
-  endif
-endif
-with_gallium_omx = _omx
-dep_omx = null_dep
-dep_omx_other = []
-if ['auto', 'bellagio'].contains(_omx)
-  dep_omx = dependency(
-    'libomxil-bellagio', required : _omx == 'bellagio'
-  )
-  if dep_omx.found()
-    with_gallium_omx = 'bellagio'
-  endif
-endif
-if ['auto', 'tizonia'].contains(_omx)
-  if with_dri and with_egl
-    dep_omx = dependency(
-      'libtizonia', version : '>= 0.10.0',
-      required : _omx == 'tizonia',
-    )
-    dep_omx_other = [
-      dependency('libtizplatform', required : _omx == 'tizonia'),
-      dependency('tizilheaders', required : _omx == 'tizonia'),
-    ]
-    if dep_omx.found() and dep_omx_other[0].found() and dep_omx_other[1].found()
-      with_gallium_omx = 'tizonia'
-    endif
-  elif _omx == 'tizonia'
-    error('OMX-Tizonia state tracker requires dri and egl')
-  endif
-endif
-if _omx == 'auto'
-  with_gallium_omx = 'disabled'
-else
-  with_gallium_omx = _omx
-endif
-
-pre_args += [
-  '-DENABLE_ST_OMX_BELLAGIO=' + (with_gallium_omx == 'bellagio' ? '1' : '0'),
-  '-DENABLE_ST_OMX_TIZONIA=' + (with_gallium_omx == 'tizonia' ? '1' : '0'),
-]
-
-
-omx_drivers_path = get_option('omx-libs-path')
-
-if with_gallium_omx != 'disabled'
-  # Figure out where to put the omx driver.
-  # FIXME: this could all be vastly simplified by adding a 'defined_variable'
-  # argument to meson's get_variable method.
-  if omx_drivers_path == ''
-    _omx_libdir = dep_omx.get_variable(pkgconfig : 'libdir')
-    _omx_drivers_dir = dep_omx.get_variable(pkgconfig : 'pluginsdir')
-    if _omx_libdir == get_option('libdir')
-      omx_drivers_path = _omx_drivers_dir
-    else
-      _omx_base_dir = []
-      # This will fail on windows. Does OMX run on windows?
-      _omx_libdir = _omx_libdir.split('/')
-      _omx_drivers_dir = _omx_drivers_dir.split('/')
-      foreach o : _omx_drivers_dir
-        if not _omx_libdir.contains(o)
-          _omx_base_dir += o
-        endif
-      endforeach
-      omx_drivers_path = join_paths(get_option('libdir'), _omx_base_dir)
-    endif
-  endif
-endif
-
-_va = get_option('gallium-va')
-if _va == 'true'
-  _va = 'enabled'
-  warning('gallium-va option "true" deprecated, please use "enabled" instead.')
-elif _va == 'false'
-  _va = 'disabled'
-  warning('gallium-va option "false" deprecated, please use "disabled" instead.')
-endif
-if not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau or with_gallium_d3d12_video or with_gallium_virgl)
-  if _va == 'enabled'
-    error('VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
-  else
-    _va = 'disabled'
-  endif
-endif
-with_gallium_va = false
-dep_va = null_dep
-if _va != 'disabled'
-  _dep_va_name = 'libva'
-  if host_machine.system() == 'windows'
-    _dep_va_name = 'libva-win32'
-  endif
-  dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va == 'enabled')
-  if dep_va.found()
-    dep_va_headers = dep_va.partial_dependency(compile_args : true)
-    with_gallium_va = true
-    if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
-                            dependencies: dep_va_headers)
-      pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
-    endif
-  endif
-endif
-
-va_drivers_path = get_option('va-libs-path')
-if va_drivers_path == ''
-  va_drivers_path = join_paths(get_option('libdir'), 'dri')
-endif
-
-_xa = get_option('gallium-xa')
-if _xa == 'true'
-  _xa = 'enabled'
-  warning('gallium-xa option "true" deprecated, please use "enabled" instead.')
-elif _xa == 'false'
-  _xa = 'disabled'
-  warning('gallium-xa option "false" deprecated, please use "disabled" instead.')
-endif
-if not system_has_kms_drm
-  if _xa == 'enabled'
-    error('XA state tracker can only be built on unix-like OSes.')
-  else
-    _xa = 'disabled'
-  endif
-elif not (with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915
-          or with_gallium_svga)
-  if _xa == 'enabled'
-    error('XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.')
-  else
-    _xa = 'disabled'
-  endif
-endif
-with_gallium_xa = _xa != 'disabled'
-
-d3d_drivers_path = get_option('d3d-drivers-path')
-if d3d_drivers_path == ''
-  d3d_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'd3d')
-endif
-
-with_gallium_st_nine =  get_option('gallium-nine')
-if with_gallium_st_nine
-  if not with_gallium_softpipe
-    error('The nine state tracker requires gallium softpipe/llvmpipe.')
-  elif not (with_gallium_radeonsi or with_gallium_nouveau or with_gallium_r600
-            or with_gallium_r300 or with_gallium_svga or with_gallium_i915
-            or with_gallium_iris or with_gallium_crocus or with_gallium_zink)
-    error('The nine state tracker requires at least one non-swrast gallium driver.')
-  endif
-  if not with_dri3
-    error('Using nine with wine requires dri3')
-  endif
-endif
-with_gallium_st_d3d10umd =  get_option('gallium-d3d10umd')
-if with_gallium_st_d3d10umd
-  if not with_gallium_softpipe
-    error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.')
-  endif
-endif
-_power8 = get_option('power8')
-if _power8 == 'true'
-  _power8 = 'enabled'
-  warning('power8 option "true" deprecated, please use "enabled" instead.')
-elif _power8 == 'false'
-  _power8 = 'disabled'
-  warning('power8 option "false" deprecated, please use "disabled" instead.')
-endif
-if _power8 != 'disabled'
-  if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
-    if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
-      error('Altivec is not supported with gcc version < 4.8.')
-    endif
-    if cc.compiles('''
-        #include <altivec.h>
-        int main() {
-          vector unsigned char r;
-          vector unsigned int v = vec_splat_u32 (1);
-          r = __builtin_vec_vgbbd ((vector unsigned char) v);
-          return 0;
-        }''',
-        args : '-mpower8-vector',
-        name : 'POWER8 intrinsics')
-      pre_args += ['-D_ARCH_PWR8', '-mpower8-vector']
-    elif get_option('power8') == 'enabled'
-      error('POWER8 intrinsic support required but not found.')
-    endif
-  endif
-endif
-
-if get_option('vmware-mks-stats')
-  if not with_gallium_svga
-    error('vmware-mks-stats requires gallium VMware/svga driver.')
-  endif
-  pre_args += '-DVMX86_STATS=1'
-endif
-
-_opencl = get_option('gallium-opencl')
-_rtti = get_option('cpp_rtti')
-if _opencl != 'disabled'
-  if not with_gallium
-    error('OpenCL Clover implementation requires at least one gallium driver.')
-  endif
-  if not _rtti
-    error('The Clover OpenCL state tracker requires rtti')
-  endif
-
-  with_libclc = true
-  with_gallium_opencl = true
-  with_opencl_icd = _opencl == 'icd'
-else
-  with_gallium_opencl = false
-  with_opencl_icd = false
-endif
-
-with_gallium_rusticl = get_option('gallium-rusticl')
-if with_gallium_rusticl
-  if not with_gallium
-    error('rusticl requires at least one gallium driver.')
-  endif
-
-  if meson.version().version_compare('< 0.61.4')
-    error('rusticl requires meson 0.61.4 or newer')
-  endif
-
-  add_languages('rust', required: true)
-
-  with_clc = true
-  with_libclc = true
-endif
-
-dep_clc = null_dep
-if with_libclc
-  dep_clc = dependency('libclc')
-endif
-
-gl_pkgconfig_c_flags = []
-if with_platform_x11
-  if with_glx == 'xlib'
-    pre_args += '-DUSE_XSHM'
-  else
-    pre_args += '-DGLX_INDIRECT_RENDERING'
-    if with_glx_direct
-      pre_args += '-DGLX_DIRECT_RENDERING'
-    endif
-    if with_dri_platform == 'drm'
-      pre_args += '-DGLX_USE_DRM'
-    elif with_dri_platform == 'apple'
-      pre_args += '-DGLX_USE_APPLEGL'
-    elif with_dri_platform == 'windows'
-      pre_args += '-DGLX_USE_WINDOWSGL'
-    endif
-  endif
-endif
-
-with_android_stub = get_option('android-stub')
-if with_android_stub and not with_platform_android
-  error('`-D android-stub=true` makes no sense without `-D platforms=android`')
-endif
-
-if with_platform_android
-  dep_android_mapper4 = null_dep
-  if not with_android_stub
-    dep_android = [
-      dependency('cutils'),
-      dependency('hardware'),
-      dependency('sync'),
-      dependency('backtrace')
-    ]
-    if get_option('platform-sdk-version') >= 26
-      dep_android += dependency('nativewindow')
-    endif
-    if get_option('platform-sdk-version') >= 30
-      dep_android_mapper4 = dependency('android.hardware.graphics.mapper', version : '>= 4.0', required : false)
-    endif
-  endif
-  pre_args += [
-    '-DANDROID',
-    '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string()
-  ]
-endif
-
-prog_python = import('python').find_installation('python3')
-has_mako = run_command(
-  prog_python, '-c',
-  '''
-from distutils.version import StrictVersion
-import mako
-assert StrictVersion(mako.__version__) > StrictVersion("0.8.0")
-  ''', check: false)
-if has_mako.returncode() != 0
-  error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
-endif
-
-if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
-  error('When using GCC, version 4.4.6 or later is required.')
-endif
-
-# Support systems without ETIME (e.g. FreeBSD)
-if cc.get_define('ETIME', prefix : '#include <errno.h>') == ''
-  pre_args += '-DETIME=ETIMEDOUT'
-endif
-
-# Define DEBUG for debug builds only (debugoptimized is not included on this one)
-if get_option('buildtype') == 'debug'
-  pre_args += '-DDEBUG'
-endif
-
-with_shader_cache = false
-_shader_cache = get_option('shader-cache')
-if _shader_cache == 'true'
-  _shader_cache = 'enabled'
-  warning('shader_cache option "true" deprecated, please use "enabled" instead.')
-elif _shader_cache == 'false'
-  _shader_cache = 'disabled'
-  warning('shader_cache option "false" deprecated, please use "disabled" instead.')
-endif
-if _shader_cache != 'disabled'
-  if host_machine.system() == 'windows'
-    if _shader_cache == 'enabled'
-      error('Shader Cache does not currently work on Windows')
-    endif
-  else
-    pre_args += '-DENABLE_SHADER_CACHE'
-    if not get_option('shader-cache-default')
-      pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
-    endif
-    with_shader_cache = true
-  endif
-endif
-
-if with_shader_cache
-  shader_cache_max_size = get_option('shader-cache-max-size')
-  if shader_cache_max_size != ''
-    pre_args += '-DMESA_SHADER_CACHE_MAX_SIZE="@0@"'.format(shader_cache_max_size)
-  endif
-endif
-
-# Check for GCC style builtins
-foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs',
-             'ffsll', 'popcount', 'popcountll', 'unreachable', 'types_compatible_p']
-  if cc.has_function(b)
-    pre_args += '-DHAVE___BUILTIN_@0@'.format(b.to_upper())
-  endif
-endforeach
-
-# check for GCC __attribute__
-_attributes = [
-  'const', 'flatten', 'malloc', 'pure', 'unused', 'warn_unused_result',
-  'weak', 'format', 'packed', 'returns_nonnull', 'alias', 'noreturn',
-]
-foreach a : cc.get_supported_function_attributes(_attributes)
-  pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
-endforeach
-if cc.has_function_attribute('visibility:hidden')
-  pre_args += '-DHAVE_FUNC_ATTRIBUTE_VISIBILITY'
-endif
-if cc.compiles('__uint128_t foo(void) { return 0; }',
-               name : '__uint128_t')
-  pre_args += '-DHAVE_UINT128'
-endif
-
-if cc.has_function('reallocarray')
-   pre_args += '-DHAVE_REALLOCARRAY'
-endif
-
-# TODO: this is very incomplete
-if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
-  pre_args += '-D_GNU_SOURCE'
-elif host_machine.system() == 'sunos'
-  pre_args += '-D__EXTENSIONS__'
-elif host_machine.system() == 'windows'
-  pre_args += [
-    '-D_WINDOWS', '-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00',
-    '-DPIPE_SUBSYSTEM_WINDOWS_USER',
-    '-D_USE_MATH_DEFINES',  # XXX: scons didn't use this for mingw
-  ]
-  if cc.get_argument_syntax() == 'msvc'
-    pre_args += [
-      '-DVC_EXTRALEAN',
-      '-D_CRT_SECURE_NO_WARNINGS',
-      '-D_CRT_SECURE_NO_DEPRECATE',
-      '-D_SCL_SECURE_NO_WARNINGS',
-      '-D_SCL_SECURE_NO_DEPRECATE',
-      '-D_ALLOW_KEYWORD_MACROS',
-      '-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
-      '-DNOMINMAX',
-    ]
-  else
-    # When the target is not mingw/ucrt
-    # NOTE: clang's stddef.h are conflict with mingw/ucrt's stddef.h
-    # So do not include headers that defined in clang for detecting
-    # _UCRT
-    if cc.compiles('''
-      #include <string.h>
-      #if defined(__MINGW32__) && defined(_UCRT)
-      #error
-      #endif
-      int main(void) { return 0; }''')
-      pre_args += ['-D__MSVCRT_VERSION__=0x0700']
-    endif
-  endif
-elif host_machine.system() == 'openbsd'
-  pre_args += '-D_ISOC11_SOURCE'
-endif
-
-# Check for generic C arguments
-c_msvc_compat_args = []
-no_override_init_args = []
-cpp_msvc_compat_args = []
-if cc.get_argument_syntax() == 'msvc'
-  _trial = [
-    '/wd4018',  # signed/unsigned mismatch
-    '/wd4056',  # overflow in floating-point constant arithmetic
-    '/wd4244',  # conversion from 'type1' to 'type2', possible loss of data
-    '/wd4267',  # 'var' : conversion from 'size_t' to 'type', possible loss of data
-    '/wd4305',  # trancation from 'type1' to 'type2'
-    '/wd4351',  # new behavior: elements of array 'array' will be default initialized
-    '/wd4756',  # overflow in constant arithmetic
-    '/wd4800',  # forcing value to bool 'true' or 'false' (performance warning)
-    '/wd4996',  # disabled deprecated POSIX name warnings
-    '/wd4291',  # no matching operator delete found
-    '/wd4146',  # unary minus operator applied to unsigned type, result still unsigned
-    '/wd4200',  # nonstandard extension used: zero-sized array in struct/union
-    '/wd4624',  # destructor was implicitly defined as deleted [from LLVM]
-    '/wd4309',  # 'initializing': truncation of constant value
-    '/wd4838',  # conversion from 'int' to 'const char' requires a narrowing conversion
-    '/wd5105',  # macro expansion producing 'defined' has undefined behavior (winbase.h, need Windows SDK upgrade)
-    '/we4020',  # Error when passing the wrong number of parameters
-    '/we4024',  # Error when passing different type of parameter
-    '/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line
-  ]
-  c_args += cc.get_supported_arguments(_trial)
-  cpp_args += cpp.get_supported_arguments(_trial)
-else
-  _trial_c = [
-    '-Werror=implicit-function-declaration',
-    '-Werror=missing-prototypes',
-    '-Werror=return-type',
-    '-Werror=empty-body',
-    '-Werror=incompatible-pointer-types',
-    '-Werror=int-conversion',
-    '-Wimplicit-fallthrough',
-    '-Wno-missing-field-initializers',
-    '-Wno-format-truncation',
-    '-fno-math-errno',
-    '-fno-trapping-math',
-    '-Qunused-arguments',
-    '-fno-common',
-    # Clang
-    '-Wno-microsoft-enum-value',
-    '-Wno-unused-function',
-  ]
-  _trial_cpp = [
-    '-Werror=return-type',
-    '-Werror=empty-body',
-    '-Wno-non-virtual-dtor',
-    '-Wno-missing-field-initializers',
-    '-Wno-format-truncation',
-    '-fno-math-errno',
-    '-fno-trapping-math',
-    '-Qunused-arguments',
-    # Some classes use custom new operator which zeroes memory, however
-    # gcc does aggressive dead-store elimination which threats all writes
-    # to the memory before the constructor as "dead stores".
-    # For now we disable this optimization.
-    '-flifetime-dse=1',
-    # Clang
-    '-Wno-microsoft-enum-value',
-  ]
-
-  # MinGW chokes on format specifiers and I can't get it all working
-  if not (cc.get_argument_syntax() == 'gcc' and host_machine.system() == 'windows')
-    _trial_c += ['-Werror=format', '-Wformat-security']
-    _trial_cpp += ['-Werror=format', '-Wformat-security']
-  endif
-
-  # FreeBSD annotated <pthread.h> but Mesa isn't ready
-  if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
-    _trial_c += ['-Werror=thread-safety']
-  endif
-
-  # If the compiler supports it, put function and data symbols in their
-  # own sections and GC the sections after linking.  This lets drivers
-  # drop shared code unused by that specific driver (particularly
-  # relevant for Vulkan drivers).
-  if cc.has_link_argument('-Wl,--gc-sections')
-    _trial_c += ['-ffunction-sections', '-fdata-sections']
-    _trial_cpp += ['-ffunction-sections', '-fdata-sections']
-  endif
-
-  # Variables that are only used for assertions are considered unused in release
-  # builds. Don't treat this as an error, since we build with -Werror even for
-  # release in CI.
-  if get_option('buildtype') == 'release'
-    _trial_c += ['-Wno-unused-variable', '-Wno-unused-but-set-variable']
-    _trial_cpp += ['-Wno-unused-variable', '-Wno-unused-but-set-variable']
-  endif
-
-  c_args += cc.get_supported_arguments(_trial_c)
-  cpp_args += cpp.get_supported_arguments(_trial_cpp)
-
-  no_override_init_args += cc.get_supported_arguments(
-    ['-Wno-override-init', '-Wno-initializer-overrides']
-  )
-
-  # Check for C and C++ arguments for MSVC compatibility. These are only used
-  # in parts of the mesa code base that need to compile with MSVC, mainly
-  # common code
-  _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer']
-  c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc)
-  cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc)
-endif
-
-# set linker arguments
-if host_machine.system() == 'windows'
-  if cc.get_argument_syntax() == 'msvc'
-    add_project_link_arguments(
-      '/fixed:no',
-      '/dynamicbase',
-      '/nxcompat',
-      language : ['c', 'cpp'],
-    )
-    if get_option('buildtype') != 'debug'
-      add_project_link_arguments(
-        '/incremental:no',
-        language : ['c', 'cpp'],
-      )
-    endif
-  else
-    add_project_link_arguments(
-      cc.get_supported_link_arguments(
-        '-Wl,--nxcompat',
-        '-Wl,--dynamicbase',
-        '-static-libgcc',
-        '-static-libstdc++',
-      ),
-      language : ['c'],
-    )
-    add_project_link_arguments(
-      cpp.get_supported_link_arguments(
-        '-Wl,--nxcompat',
-        '-Wl,--dynamicbase',
-        '-static-libgcc',
-        '-static-libstdc++',
-      ),
-      language : ['cpp'],
-    )
-  endif
-endif
-
-if host_machine.cpu_family().startswith('x86') and cc.get_argument_syntax() != 'msvc'
-  pre_args += '-DUSE_SSE41'
-  with_sse41 = true
-  sse41_args = ['-msse4.1']
-
-  if host_machine.cpu_family() == 'x86'
-    if get_option('sse2')
-      # These settings make generated GCC code match MSVC and follow
-      # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note
-      #
-      # NOTE: We need to ensure stack is realigned given that we
-      # produce shared objects, and have no control over the stack
-      # alignment policy of the application. Therefore we need
-      # -mstackrealign or -mincoming-stack-boundary=2.
-      #
-      # XXX: We could have SSE without -mstackrealign if we always used
-      # __attribute__((force_align_arg_pointer)), but that's not
-      # always the case.
-      c_args += ['-msse2', '-mfpmath=sse', '-mstackrealign']
-    else
-      # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
-      # that's not guaranteed
-      sse41_args += '-mstackrealign'
-    endif
-  endif
-else
-  with_sse41 = false
-  sse41_args = []
-endif
-
-# Check for GCC style atomics
-dep_atomic = null_dep
-
-if cc.compiles('''#include <stdint.h>
-                  int main() {
-                    struct {
-                      uint64_t *v;
-                    } x;
-                    return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
-                           (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
-
-                  }''',
-               name : 'GCC atomic builtins')
-  pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
-
-  # Not all atomic calls can be turned into lock-free instructions, in which
-  # GCC will make calls into the libatomic library. Check whether we need to
-  # link with -latomic.
-  #
-  # This can happen for 64-bit atomic operations on 32-bit architectures such
-  # as ARM.
-  if not cc.links('''#include <stdint.h>
-                     int main() {
-                       struct {
-                         uint64_t *v;
-                       } x;
-                       return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
-                              (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
-                     }''',
-                  name : 'GCC atomic builtins required -latomic')
-    dep_atomic = cc.find_library('atomic')
-  endif
-endif
-if not cc.links('''#include <stdint.h>
-                   uint64_t v;
-                   int main() {
-                     return __sync_add_and_fetch(&v, (uint64_t)1);
-                   }''',
-                dependencies : dep_atomic,
-                name : 'GCC 64bit atomics')
-  pre_args += '-DMISSING_64BIT_ATOMICS'
-endif
-
-dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
-
-# TODO: shared/static? Is this even worth doing?
-
-with_asm_arch = ''
-if host_machine.cpu_family() == 'x86'
-  if system_has_kms_drm or host_machine.system() == 'gnu'
-    with_asm_arch = 'x86'
-    pre_args += ['-DUSE_X86_ASM', '-DUSE_MMX_ASM', '-DUSE_3DNOW_ASM',
-                 '-DUSE_SSE_ASM']
-
-    if with_glx_read_only_text
-      pre_args += ['-DGLX_X86_READONLY_TEXT']
-    endif
-  endif
-elif host_machine.cpu_family() == 'x86_64'
-  if system_has_kms_drm
-    with_asm_arch = 'x86_64'
-    pre_args += ['-DUSE_X86_64_ASM']
-  endif
-elif host_machine.cpu_family() == 'arm'
-  if system_has_kms_drm
-    with_asm_arch = 'arm'
-    pre_args += ['-DUSE_ARM_ASM']
-  endif
-elif host_machine.cpu_family() == 'aarch64'
-  if system_has_kms_drm
-    with_asm_arch = 'aarch64'
-    pre_args += ['-DUSE_AARCH64_ASM']
-  endif
-elif host_machine.cpu_family() == 'sparc64'
-  if system_has_kms_drm
-    with_asm_arch = 'sparc'
-    pre_args += ['-DUSE_SPARC_ASM']
-  endif
-elif host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
-  if system_has_kms_drm
-    with_asm_arch = 'ppc64le'
-    pre_args += ['-DUSE_PPC64LE_ASM']
-  endif
-elif host_machine.cpu_family() == 'mips64' and host_machine.endian() == 'little'
-  if system_has_kms_drm
-    with_asm_arch = 'mips64el'
-    pre_args += ['-DUSE_MIPS64EL_ASM']
-  endif
-endif
-
-# Check for standard headers and functions
-if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
-  cc.has_header_symbol('sys/sysmacros.h', 'minor') and
-  cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
-  pre_args += '-DMAJOR_IN_SYSMACROS'
-endif
-if (cc.has_header_symbol('sys/mkdev.h', 'major') and
-  cc.has_header_symbol('sys/mkdev.h', 'minor') and
-  cc.has_header_symbol('sys/mkdev.h', 'makedev'))
-  pre_args += '-DMAJOR_IN_MKDEV'
-endif
-
-if cc.check_header('sched.h')
-  pre_args += '-DHAS_SCHED_H'
-  if cc.has_function('sched_getaffinity')
-    pre_args += '-DHAS_SCHED_GETAFFINITY'
-  endif
-endif
-
-if not ['linux'].contains(host_machine.system())
-  # Deprecated on Linux and requires <sys/types.h> on FreeBSD and OpenBSD
-  if cc.check_header('sys/sysctl.h', prefix : '#include <sys/types.h>')
-    pre_args += '-DHAVE_SYS_SYSCTL_H'
-  endif
-endif
-
-foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h', 'cet.h', 'pthread_np.h']
-  if cc.check_header(h)
-    pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
-  endif
-endforeach
-
-functions_to_detect = {
-  'strtof': '',
-  'mkostemp': '',
-  'timespec_get': '#include <time.h>',
-  'memfd_create': '',
-  'random_r': '',
-  'flock': '',
-  'strtok_r': '',
-  'getrandom': '',
-  'qsort_s': '',
-}
-
-foreach f, prefix: functions_to_detect
-  if cc.has_function(f, prefix: prefix)
-    pre_args += '-DHAVE_@0@'.format(f.to_upper())
-  endif
-endforeach
-
-if cpp.links('''
-    #define _GNU_SOURCE
-    #include <stdlib.h>
-
-    static int dcomp(const void *l, const void *r, void *t) { return 0; }
-
-    int main(int ac, char **av) {
-      int arr[] = { 1 };
-      void *t = NULL;
-      qsort_r((void*)&arr[0], 1, 1, dcomp, t);
-      return (0);
-    }''',
-    args : pre_args,
-    name : 'GNU qsort_r')
-  pre_args += '-DHAVE_GNU_QSORT_R'
-elif cpp.links('''
-    #include <stdlib.h>
-
-    static int dcomp(void *t, const void *l, const void *r) { return 0; }
-
-    int main(int ac, char **av) {
-      int arr[] = { 1 };
-      void *t = NULL;
-      qsort_r((void*)&arr[0], 1, 1, t, dcomp);
-      return (0);
-    }''',
-    args : pre_args,
-    name : 'BSD qsort_r')
-  pre_args += '-DHAVE_BSD_QSORT_R'
-endif
-
-if cc.has_header_symbol('time.h', 'struct timespec')
-   pre_args += '-DHAVE_STRUCT_TIMESPEC'
-endif
-
-with_c11_threads = false
-if cc.has_function('thrd_create', prefix: '#include <threads.h>')
-  if with_platform_android
-    # Current only Android's c11 <threads.h> are verified
-    pre_args += '-DHAVE_THRD_CREATE'
-    with_c11_threads = true
-  endif
-endif
-
-if cc.has_header_symbol('errno.h', 'program_invocation_name',
-                        args : '-D_GNU_SOURCE')
-   pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
-elif with_tools.contains('intel')
-  error('Intel tools require the program_invocation_name variable')
-endif
-
-if cc.has_header_symbol('math.h', 'issignaling',
-                        args : '-D_GNU_SOURCE')
-   pre_args += '-DHAVE_ISSIGNALING'
-endif
-
-# MinGW provides a __builtin_posix_memalign function, but not a posix_memalign.
-# This means that this check will succeed, but then compilation will later
-# fail. MSVC doesn't have this function at all, so only check for it on
-# non-windows platforms.
-if host_machine.system() != 'windows'
-  if cc.has_function('posix_memalign')
-    pre_args += '-DHAVE_POSIX_MEMALIGN'
-  endif
-endif
-
-if cc.has_member('struct dirent', 'd_type', prefix: '''#include <sys/types.h>
-   #include <dirent.h>''')
-   pre_args += '-DHAVE_DIRENT_D_TYPE'
-endif
-
-# strtod locale support
-if cc.links('''
-    #define _GNU_SOURCE
-    #include <stdlib.h>
-    #include <locale.h>
-    #ifdef HAVE_XLOCALE_H
-    #include <xlocale.h>
-    #endif
-    int main() {
-      locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
-      const char *s = "1.0";
-      char *end;
-      double d = strtod_l(s, end, loc);
-      float f = strtof_l(s, end, loc);
-      freelocale(loc);
-      return 0;
-    }''',
-    args : pre_args,
-    name : 'strtod has locale support')
-  pre_args += '-DHAVE_STRTOD_L'
-endif
-
-# Check for some linker flags
-ld_args_bsymbolic = []
-if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic')
-  ld_args_bsymbolic += '-Wl,-Bsymbolic'
-endif
-ld_args_gc_sections = []
-if cc.links('static char unused() { return 5; } int main() { return 0; }',
-            args : '-Wl,--gc-sections', name : 'gc-sections')
-  ld_args_gc_sections += '-Wl,--gc-sections'
-endif
-with_ld_version_script = false
-if cc.links('int main() { return 0; }',
-            args : '-Wl,--version-script=@0@'.format(
-              join_paths(meson.current_source_dir(), 'build-support/conftest.map')),
-            name : 'version-script')
-  with_ld_version_script = true
-endif
-with_ld_dynamic_list = false
-if cc.links('int main() { return 0; }',
-            args : '-Wl,--dynamic-list=@0@'.format(
-              join_paths(meson.current_source_dir(), 'build-support/conftest.dyn')),
-            name : 'dynamic-list')
-  with_ld_dynamic_list = true
-endif
-
-ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
-
-# check for dl support
-dep_dl = null_dep
-if host_machine.system() != 'windows'
-  if not cc.has_function('dlopen')
-    dep_dl = cc.find_library('dl', required : true)
-  endif
-  if cc.has_function('dladdr', dependencies : dep_dl)
-    # This is really only required for util/disk_cache.h
-    pre_args += '-DHAVE_DLADDR'
-  endif
-endif
-
-if cc.has_function('dl_iterate_phdr')
-  pre_args += '-DHAVE_DL_ITERATE_PHDR'
-elif with_intel_vk or with_intel_hasvk
-  error('Intel "Anvil" Vulkan driver requires the dl_iterate_phdr function')
-endif
-
-# Determine whether or not the rt library is needed for time functions
-if host_machine.system() == 'windows' or cc.has_function('clock_gettime')
-  dep_clock = null_dep
-else
-  dep_clock = cc.find_library('rt')
-endif
-
-dep_zlib = dependency('zlib', version : '>= 1.2.3',
-                      fallback : ['zlib', 'zlib_dep'],
-                      required : get_option('zlib'))
-if dep_zlib.found()
-  pre_args += '-DHAVE_ZLIB'
-endif
-
-_zstd = get_option('zstd')
-if _zstd == 'true'
-  _zstd = 'enabled'
-  warning('zstd option "true" deprecated, please use "enabled" instead.')
-elif _zstd == 'false'
-  _zstd = 'disabled'
-  warning('zstd option "false" deprecated, please use "disabled" instead.')
-endif
-if _zstd != 'disabled'
-  dep_zstd = dependency('libzstd', required : _zstd == 'enabled')
-  if dep_zstd.found()
-    pre_args += '-DHAVE_ZSTD'
-  endif
-else
-  dep_zstd = null_dep
-endif
-
-with_compression = dep_zlib.found() or dep_zstd.found()
-if with_compression
-  pre_args += '-DHAVE_COMPRESSION'
-elif with_shader_cache
-  error('Shader Cache requires compression')
-endif
-
-if host_machine.system() == 'windows'
-  # For MSVC and MinGW we aren't using pthreads, and dependency('threads') will add linkage
-  # to pthread for MinGW, so leave the dependency null_dep for Windows. For Windows linking to
-  # kernel32 is enough for c11/threads.h and it's already linked by meson by default
-  dep_thread = null_dep
-else
-  dep_thread = dependency('threads')
-endif
-if dep_thread.found()
-  pre_args += '-DHAVE_PTHREAD'
-  if host_machine.system() != 'netbsd' and cc.has_function(
-      'pthread_setaffinity_np',
-      dependencies : dep_thread,
-      prefix : '#include <pthread.h>',
-      args : '-D_GNU_SOURCE')
-    pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
-  endif
-endif
-if host_machine.system() == 'darwin'
-  dep_expat = meson.get_compiler('c').find_library('expat')
-elif host_machine.system() != 'windows'
-  dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'],
-                         required: not with_platform_android)
-else
-  dep_expat = null_dep
-endif
-# Predefined macros for windows
-if host_machine.system() == 'windows'
-  pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
-endif
-# this only exists on linux so either this is linux and it will be found, or
-# it's not linux and wont
-dep_m = cc.find_library('m', required : false)
-
-if host_machine.system() == 'windows'
-  dep_regex = meson.get_compiler('c').find_library('regex', required : false)
-  if not dep_regex.found()
-    dep_regex = declare_dependency(compile_args : ['-DNO_REGEX'])
-  endif
-else
-  dep_regex = null_dep
-endif
-
-if with_platform_haiku
-  dep_network = cc.find_library('network')
-endif
-
-dep_futex = null_dep
-if host_machine.system() == 'windows'
-  if (get_option('min-windows-version') < 8)
-    pre_args += '-DWINDOWS_NO_FUTEX'
-  else
-    dep_futex = cc.find_library('synchronization', required : true)
-  endif
-endif
-
-# Check for libdrm. Various drivers have different libdrm version requirements,
-# but we always want to use the same version for all libdrm modules. That means
-# even if driver foo requires 2.4.0 and driver bar requires 2.4.3, if foo and
-# bar are both on use 2.4.3 for both of them
-dep_libdrm_amdgpu = null_dep
-dep_libdrm_radeon = null_dep
-dep_libdrm_nouveau = null_dep
-dep_libdrm_intel = null_dep
-
-_drm_amdgpu_ver = '2.4.110'
-_drm_radeon_ver = '2.4.71'
-_drm_nouveau_ver = '2.4.102'
-_drm_intel_ver = '2.4.75'
-_drm_ver = '2.4.109'
-
-_libdrm_checks = [
-  ['intel', with_gallium_i915],
-  ['amdgpu', (with_amd_vk and not with_platform_windows) or with_gallium_radeonsi],
-  ['radeon', (with_gallium_radeonsi or with_gallium_r300 or with_gallium_r600)],
-  ['nouveau', with_gallium_nouveau],
-]
-
-# Loop over the enables versions and get the highest libdrm requirement for all
-# active drivers.
-_drm_blame = ''
-foreach d : _libdrm_checks
-  ver = get_variable('_drm_@0@_ver'.format(d[0]))
-  if d[1] and ver.version_compare('>' + _drm_ver)
-    _drm_ver = ver
-    _drm_blame = d[0]
-  endif
-endforeach
-if _drm_blame != ''
-  message('libdrm @0@ needed because @1@ has the highest requirement'.format(_drm_ver, _drm_blame))
-endif
-
-# Then get each libdrm module
-foreach d : _libdrm_checks
-  if d[1]
-    set_variable(
-      'dep_libdrm_' + d[0],
-      dependency('libdrm_' + d[0], version : '>=' + _drm_ver)
-    )
-  endif
-endforeach
-
-with_gallium_drisw_kms = false
-dep_libdrm = dependency(
-  'libdrm', version : '>=' + _drm_ver,
-  # GNU/Hurd includes egl_dri2, without drm.
-  required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
-)
-if dep_libdrm.found()
-  pre_args += '-DHAVE_LIBDRM'
-  if with_dri_platform == 'drm' and with_dri
-    with_gallium_drisw_kms = true
-  endif
-endif
-
-dep_libudev = dependency('libudev', required : false)
-if dep_libudev.found()
-  pre_args += '-DHAVE_LIBUDEV'
-endif
-
-llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit', 'core', 'executionengine', 'scalaropts', 'transformutils', 'instcombine']
-llvm_optional_modules = ['coroutines']
-if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
-  llvm_modules += ['amdgpu', 'bitreader', 'ipo']
-  if with_gallium_r600
-    llvm_modules += 'asmparser'
-  endif
-endif
-if with_gallium_opencl
-  llvm_modules += [
-    'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
-    'lto', 'option', 'objcarcopts', 'profiledata'
-  ]
-  # all-targets is needed to support static linking LLVM build with multiple targets
-  # windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['all-targets', 'frontendopenmp', 'windowsdriver']
-endif
-if with_clc
-  llvm_modules += ['coverage', 'target', 'linker', 'irreader', 'option', 'libdriver', 'lto']
-  # all-targets is needed to support static linking LLVM build with multiple targets
-  # windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['all-targets', 'windowsdriver']
-endif
-draw_with_llvm = get_option('draw-use-llvm')
-if draw_with_llvm
-  llvm_modules += 'native'
-  # lto is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
-  llvm_optional_modules += ['lto']
-endif
-
-if with_intel_clc
-  _llvm_version = '>= 13.0.0'
-elif with_amd_vk or with_gallium_radeonsi or with_gallium_opencl
-  _llvm_version = '>= 11.0.0'
-elif with_clc
-  _llvm_version = '>= 10.0.0'
-else
-  _llvm_version = '>= 5.0.0'
-endif
-
-_shared_llvm = get_option('shared-llvm')
-if _shared_llvm == 'true'
-  _shared_llvm = 'enabled'
-  warning('shared_llvm option "true" deprecated, please use "enabled" instead.')
-elif _shared_llvm == 'false'
-  _shared_llvm = 'disabled'
-  warning('shared_llvm option "false" deprecated, please use "disabled" instead.')
-endif
-if _shared_llvm == 'auto'
-  _shared_llvm = (host_machine.system() != 'windows')
-else
-  _shared_llvm = (_shared_llvm == 'enabled')
-endif
-_llvm = get_option('llvm')
-if _llvm == 'true'
-  _llvm = 'enabled'
-  warning('llvm option "true" deprecated, please use "enabled" instead.')
-elif _llvm == 'false'
-  _llvm = 'disabled'
-  warning('llvm option "false" deprecated, please use "disabled" instead.')
-endif
-
-# the cmake method can only link statically, so don't attempt to use it if we
-# want to link dynamically. Before 0.54.0 meson will try cmake even when shared
-# linking is requested, so we need to force the config-tool method to be used
-# in that case, but in 0.54.0 meson won't try the cmake method if shared
-# linking is requested.
-_llvm_method = 'config-tool'
-if meson.version().version_compare('< 0.54.0') and _shared_llvm
-  _llvm_method = 'config-tool'
-endif
-
-dep_llvm = null_dep
-with_llvm = false
-if _llvm != 'disabled'
-  dep_llvm = dependency(
-    'llvm',
-    version : _llvm_version,
-    modules : llvm_modules,
-    optional_modules : llvm_optional_modules,
-    required : (
-      with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or with_clc
-      or _llvm == 'enabled'
-    ),
-    static : not _shared_llvm,
-    method : _llvm_method,
-    fallback : ['llvm', 'dep_llvm'],
-    include_type : 'system',
-  )
-  with_llvm = dep_llvm.found()
-endif
-if with_llvm
-  pre_args += '-DLLVM_AVAILABLE'
-  pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
-  pre_args += '-DLLVM_IS_SHARED=@0@'.format(_shared_llvm.to_int())
-
-  if draw_with_llvm
-    pre_args += '-DDRAW_LLVM_AVAILABLE'
-  elif with_swrast_vk
-    error('Lavapipe requires LLVM draw support.')
-  endif
-
-  if host_machine.system() != 'windows'
-    # LLVM can be built without rtti, turning off rtti changes the ABI of C++
-    # programs, so we need to build all C++ code in mesa without rtti as well to
-    # ensure that linking works. Note that Win32 compilers does handle mismatching RTTI
-    # without issues, so only apply this for other compilers.
-    if dep_llvm.type_name() == 'internal'
-      _llvm_rtti = subproject('llvm').get_variable('has_rtti', true)
-    else
-      # The CMake finder will return 'ON', the llvm-config will return 'YES'
-      _llvm_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
-    endif
-    if _rtti != _llvm_rtti
-      if _llvm_rtti
-        error('LLVM was built with RTTI, cannot build Mesa with RTTI disabled. Remove cpp_rtti disable switch or use LLVM built without LLVM_ENABLE_RTTI.')
-      else
-        error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
-      endif
-    endif
-  endif
-
-  if cc.get_argument_syntax() == 'msvc'
-    # Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
-    add_project_link_arguments(
-      '/ignore:4199',
-      language : ['c', 'cpp'],
-    )
-  endif
-elif with_amd_vk and with_aco_tests
-  error('ACO tests require LLVM, but LLVM is disabled.')
-elif with_gallium_radeonsi or with_swrast_vk
-  error('The following drivers require LLVM: RadeonSI, SWR, Lavapipe. One of these is enabled, but LLVM is disabled.')
-elif with_gallium_opencl
-  error('The OpenCL "Clover" state tracker requires LLVM, but LLVM is disabled.')
-elif with_clc
-  error('The CLC compiler requires LLVM, but LLVM is disabled.')
-else
-  draw_with_llvm = false
-endif
-
-with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_clc
-if with_opencl_spirv
-  chosen_llvm_version_array = dep_llvm.version().split('.')
-  chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
-  chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()
-
-  # Require an SPIRV-LLVM-Translator version compatible with the chosen LLVM
-  # one.
-
-  # This first version check is still needed as maybe LLVM 8.0 was picked but
-  # we do not want to accept SPIRV-LLVM-Translator 8.0.0.1 as that version
-  # does not have the required API and those are only available starting from
-  # 8.0.1.3.
-  _llvmspirvlib_min_version = '>= 8.0.1.3'
-  if with_intel_clc
-    _llvmspirvlib_min_version = '>= 13.0.0.0'
-  endif
-
-  _llvmspirvlib_version = [
-    _llvmspirvlib_min_version,
-    '>= @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor),
-    '< @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor + 1) ]
-
-  dep_spirv_tools = dependency('SPIRV-Tools', required : true, version : '>= 2018.0')
-  # LLVMSPIRVLib is available at https://github.com/KhronosGroup/SPIRV-LLVM-Translator
-  dep_llvmspirvlib = dependency('LLVMSPIRVLib', required : true, version : _llvmspirvlib_version)
-else
-  dep_spirv_tools = null_dep
-  dep_llvmspirvlib = null_dep
-endif
-
-dep_clang = null_dep
-if with_clc
-  llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
-
-  dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
-
-  if not dep_clang.found() or not _shared_llvm
-    clang_modules = [
-      'clangBasic', 'clangAST', 'clangCodeGen', 'clangLex',
-      'clangDriver', 'clangFrontend', 'clangFrontendTool',
-      'clangHandleCXX', 'clangHandleLLVM', 'clangSerialization',
-      'clangSema', 'clangParse', 'clangEdit', 'clangAnalysis'
-    ]
-    if dep_llvm.version().version_compare('>= 15.0')
-      clang_modules += 'clangSupport'
-    endif
-
-    dep_clang = []
-    foreach m : clang_modules
-      dep_clang += cpp.find_library(m, dirs : llvm_libdir, required : true)
-    endforeach
-  endif
-endif
-
-# Be explicit about only using this lib on Windows, to avoid picking
-# up random libs with the generic name 'libversion'
-dep_version = null_dep
-if host_machine.system() == 'windows'
-  dep_version = cpp.find_library('version')
-endif
-
-dep_elf = dependency('libelf', required : false)
-if not with_platform_windows and not dep_elf.found()
-  dep_elf = cc.find_library('elf', required : false)
-endif
-if dep_elf.found()
-  pre_args += '-DUSE_LIBELF'
-endif
-
-dep_glvnd = null_dep
-if with_glvnd
-  dep_glvnd = dependency('libglvnd', version : '>= 1.3.2')
-  pre_args += '-DUSE_LIBGLVND=1'
-endif
-
-_valgrind = get_option('valgrind')
-if _valgrind == 'true'
-  _valgrind = 'enabled'
-  warning('valgrind option "true" deprecated, please use "enabled" instead.')
-elif _valgrind == 'false'
-  _valgrind = 'disabled'
-  warning('valgrind option "false" deprecated, please use "disabled" instead.')
-endif
-if _valgrind != 'disabled'
-  dep_valgrind = dependency('valgrind', required : _valgrind == 'enabled')
-  if dep_valgrind.found()
-    pre_args += '-DHAVE_VALGRIND'
-  endif
-else
-  dep_valgrind = null_dep
-endif
-
-# AddressSanitizer's leak reports need all the symbols to be present at exit to
-# decode well, which runs afoul of our dlopen()/dlclose()ing of the DRI drivers.
-# Set a flag so we can skip the dlclose for asan builds.
-if ['address', 'address,undefined'].contains(get_option('b_sanitize'))
-  asan_c_args = ['-DBUILT_WITH_ASAN=1']
-else
-  asan_c_args = ['-DBUILT_WITH_ASAN=0']
-endif
-
-yacc_is_bison = true
-
-if build_machine.system() == 'windows'
-  # Prefer the winflexbison versions, they're much easier to install and have
-  # better windows support.
-
-  prog_flex = find_program('win_flex', required : false)
-  if prog_flex.found()
-    # windows compatibility (uses <io.h> instead of <unistd.h> and _isatty,
-    # _fileno functions)
-    prog_flex = [prog_flex, '--wincompat']
-  else
-    prog_flex = [find_program('flex', 'lex', required : with_any_opengl, disabler : true)]
-  endif
-  # Force flex to use const keyword in prototypes, as relies on __cplusplus or
-  # __STDC__ macro to determine whether it's safe to use const keyword
-  prog_flex += '-DYY_USE_CONST='
-
-  prog_flex_cpp = prog_flex
-  # Convince win_flex to use <inttypes.h> for C++ files
-  # Note that we are using a C99 version here rather than C11,
-  # because using a C11 version can cause the MSVC CRT headers to define
-  # static_assert to _Static_assert, which breaks other parts of the CRT
-  prog_flex_cpp += '-D__STDC_VERSION__=199901'
-
-  prog_bison = find_program('win_bison', required : false)
-  if not prog_bison.found()
-    prog_bison = find_program('bison', 'yacc', required : with_any_opengl, disabler : true)
-  endif
-else
-  prog_bison = find_program('bison', required : false)
-
-  if not prog_bison.found()
-    prog_bison = find_program('byacc', required : with_any_opengl, disabler : true)
-    yacc_is_bison = false
-  endif
-
-  # Disable deprecated keyword warnings, since we have to use them for
-  # old-bison compat.  See discussion in
-  # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2161
-  if find_program('bison', required : false, version : '> 2.3').found()
-    prog_bison = [prog_bison, '-Wno-deprecated']
-  endif
-
-  prog_flex = find_program('flex', required : with_any_opengl, disabler : true)
-  prog_flex_cpp = prog_flex
-endif
-
-dep_selinux = null_dep
-if get_option('selinux')
-  if get_option('execmem') != true
-    warning('execmem option is disabled, selinux will not be able to use execmem.')
-  endif
-  dep_selinux = dependency('libselinux')
-  pre_args += '-DMESA_SELINUX'
-endif
-
-if get_option('execmem')
-  pre_args += '-DMESA_EXECMEM'
-endif
-
-_libunwind = get_option('libunwind')
-if _libunwind == 'true'
-  _libunwind = 'enabled'
-  warning('libunwind option "true" deprecated, please use "enabled" instead.')
-elif _libunwind == 'false'
-  _libunwind = 'disabled'
-  warning('libunwind option "false" deprecated, please use "disabled" instead.')
-endif
-if _libunwind != 'disabled' and not with_platform_android
-  if host_machine.system() == 'darwin'
-    dep_unwind = meson.get_compiler('c').find_library('System')
-  else
-    dep_unwind = dependency('libunwind', required : _libunwind == 'enabled')
-  endif
-  if dep_unwind.found()
-    pre_args += '-DHAVE_LIBUNWIND'
-  endif
-else
-  dep_unwind = null_dep
-endif
-
-if with_osmesa
-  if not with_gallium_softpipe
-    error('OSMesa gallium requires gallium softpipe or llvmpipe.')
-  endif
-  if host_machine.system() == 'windows'
-    osmesa_lib_name = 'osmesa'
-  else
-    osmesa_lib_name = 'OSMesa'
-  endif
-  osmesa_bits = get_option('osmesa-bits')
-  if osmesa_bits != 'unspecified'
-    warning('osmesa-bits option is deprecated and have no effect, please remove it.')
-  endif
-endif
-
-# TODO: symbol mangling
-
-if with_platform_wayland
-  dep_wl_scanner = dependency('wayland-scanner', native: true)
-  prog_wl_scanner = find_program(dep_wl_scanner.get_variable(pkgconfig : 'wayland_scanner'))
-  if dep_wl_scanner.version().version_compare('>= 1.15')
-    wl_scanner_arg = 'private-code'
-  else
-    wl_scanner_arg = 'code'
-  endif
-  dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.24')
-  dep_wayland_client = dependency('wayland-client', version : '>=1.18')
-  dep_wayland_server = dependency('wayland-server', version : '>=1.18')
-  if with_egl
-    dep_wayland_egl = dependency('wayland-egl-backend', version : '>= 3')
-    dep_wayland_egl_headers = dep_wayland_egl.partial_dependency(compile_args : true)
-  endif
-  wayland_dmabuf_xml = join_paths(
-    dep_wl_protocols.get_variable(pkgconfig : 'pkgdatadir'), 'unstable',
-    'linux-dmabuf', 'linux-dmabuf-unstable-v1.xml'
-  )
-  pre_args += '-DWL_HIDE_DEPRECATED'
-endif
-
-dep_x11 = null_dep
-dep_xext = null_dep
-dep_xfixes = null_dep
-dep_x11_xcb = null_dep
-dep_xcb = null_dep
-dep_xcb_glx = null_dep
-dep_xcb_dri2 = null_dep
-dep_xcb_dri3 = null_dep
-dep_dri2proto = null_dep
-dep_glproto = null_dep
-dep_xxf86vm = null_dep
-dep_xcb_dri3 = null_dep
-dep_xcb_present = null_dep
-dep_xcb_sync = null_dep
-dep_xcb_xfixes = null_dep
-dep_xshmfence = null_dep
-dep_xcb_xrandr = null_dep
-dep_xcb_shm = null_dep
-dep_xlib_xrandr = null_dep
-dep_openmp = null_dep
-
-# Even if we find OpenMP, Gitlab CI fails to link with gcc/i386 and clang/anyarch.
-if host_machine.cpu_family() == 'x86_64' and cc.get_id() == 'gcc'
-  dep_openmp = dependency('openmp', required : false)
-  if dep_openmp.found()
-    pre_args += ['-DHAVE_OPENMP']
-  endif
-endif
-
-with_dri3_modifiers = false
-if with_platform_x11
-  if with_glx == 'xlib'
-    dep_x11 = dependency('x11')
-    dep_xext = dependency('xext')
-    dep_xcb = dependency('xcb')
-    dep_xcb_xrandr = dependency('xcb-randr')
-  elif with_glx == 'dri'
-    dep_x11 = dependency('x11')
-    dep_xext = dependency('xext')
-    dep_xfixes = dependency('xfixes', version : '>= 2.0')
-    dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
-    dep_xcb_shm = dependency('xcb-shm')
-  endif
-  if (with_any_vk or with_glx == 'dri' or with_egl or
-       (with_gallium_vdpau or with_gallium_va or
-        with_gallium_omx != 'disabled'))
-    dep_xcb = dependency('xcb')
-    dep_x11_xcb = dependency('x11-xcb')
-    if with_dri_platform == 'drm' and not dep_libdrm.found()
-      error('libdrm required for gallium video statetrackers when using x11')
-    endif
-  endif
-  if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
-    dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
-
-    if with_dri3
-      dep_xcb_dri3 = dependency('xcb-dri3')
-      dep_xcb_present = dependency('xcb-present')
-      # until xcb-dri3 has been around long enough to make a hard-dependency:
-      if (dep_xcb_dri3.version().version_compare('>= 1.13') and
-          dep_xcb_present.version().version_compare('>= 1.13'))
-        with_dri3_modifiers = true
-      endif
-      dep_xcb_shm = dependency('xcb-shm')
-      dep_xcb_sync = dependency('xcb-sync')
-      dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
-    endif
-  endif
-  if with_glx == 'dri' or with_glx == 'xlib'
-    dep_glproto = dependency('glproto', version : '>= 1.4.14')
-  endif
-  if with_glx == 'dri'
-    if with_dri_platform == 'drm'
-      dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
-      if with_glx_direct
-        dep_xxf86vm = dependency('xxf86vm')
-      endif
-    endif
-  endif
-  if (with_egl or
-      with_dri3 or (
-      with_gallium_vdpau or with_gallium_xa or
-      with_gallium_omx != 'disabled'))
-    dep_xcb_xfixes = dependency('xcb-xfixes')
-  endif
-  if with_xlib_lease or with_any_vk
-    dep_xcb_xrandr = dependency('xcb-randr')
-  endif
-  if with_xlib_lease
-    dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3')
-  endif
-endif
-
-if with_dri
-  pre_args += '-DHAVE_DRI'
-endif
-if with_dri2
-  pre_args += '-DHAVE_DRI2'
-endif
-if with_dri3
-  pre_args += '-DHAVE_DRI3'
-endif
-if with_dri3_modifiers
-  pre_args += '-DHAVE_DRI3_MODIFIERS'
-endif
-if with_gallium_drisw_kms
-  pre_args += '-DHAVE_DRISW_KMS'
-endif
-
-if get_option('gallium-extra-hud')
-  pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
-endif
-
-_sensors = get_option('lmsensors')
-if _sensors == 'true'
-  _sensors = 'enabled'
-  warning('lmsensors option "true" deprecated, please use "enabled" instead.')
-elif _sensors == 'false'
-  _sensors = 'disabled'
-  warning('lmsensors option "false" deprecated, please use "disabled" instead.')
-endif
-if _sensors != 'disabled'
-  dep_lmsensors = cc.find_library('sensors', required : _sensors == 'enabled')
-  if dep_lmsensors.found()
-    pre_args += '-DHAVE_LIBSENSORS=1'
-  endif
-else
-  dep_lmsensors = null_dep
-endif
-
-_shader_replacement = get_option('custom-shader-replacement')
-if _shader_replacement == ''
-else
-  pre_args += '-DCUSTOM_SHADER_REPLACEMENT'
-endif
-
-with_perfetto = get_option('perfetto')
-with_datasources = get_option('datasources')
-with_any_datasource = with_datasources.length() != 0
-if with_perfetto
-  dep_perfetto = dependency('perfetto', fallback: ['perfetto', 'dep_perfetto'])
-  pre_args += '-DHAVE_PERFETTO'
-endif
-
-add_project_arguments(pre_args, language : ['c', 'cpp'])
-add_project_arguments(c_args,   language : ['c'])
-add_project_arguments(cpp_args, language : ['cpp'])
-
-gl_priv_reqs = []
-
-if with_glx == 'xlib'
-  gl_priv_reqs += ['x11', 'xext', 'xcb']
-elif with_glx == 'dri'
-  gl_priv_reqs += [
-    'x11', 'xext', 'xfixes', 'x11-xcb', 'xcb',
-    'xcb-glx >= 1.8.1']
-  if with_dri_platform == 'drm'
-    gl_priv_reqs += 'xcb-dri2 >= 1.8'
-    if with_glx_direct
-      gl_priv_reqs += 'xxf86vm'
-    endif
-  endif
-endif
-if dep_libdrm.found()
-  gl_priv_reqs += 'libdrm >= 2.4.75'
-endif
-
-gl_priv_libs = []
-if dep_thread.found()
-  gl_priv_libs += ['-lpthread', '-pthread']
-endif
-if dep_m.found()
-  gl_priv_libs += '-lm'
-endif
-if dep_dl.found()
-  gl_priv_libs += '-ldl'
-endif
-
-# FIXME: autotools lists this as incomplete
-gbm_priv_libs = []
-if dep_dl.found()
-  gbm_priv_libs += '-ldl'
-endif
-
-pkg = import('pkgconfig')
-
-if host_machine.system() == 'windows'
-  prog_dumpbin = find_program('dumpbin', required : false)
-  with_symbols_check = prog_dumpbin.found() and with_tests
-  if with_symbols_check
-    symbols_check_args = ['--dumpbin', prog_dumpbin.path()]
-  endif
-else
-  prog_nm = find_program('nm')
-  with_symbols_check = with_tests
-  symbols_check_args = ['--nm', prog_nm.path()]
-endif
-
-# This quirk needs to be applied to sources with functions defined in assembly
-# as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391
-gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
-
-devenv = environment()
-
-dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/')
-
-subdir('include')
-subdir('bin')
-subdir('src')
-
-if meson.version().version_compare('>= 0.58')
-  meson.add_devenv(devenv)
-endif
-
-lines = ['',
-  'prefix:          ' + get_option('prefix'),
-  'libdir:          ' + get_option('libdir'),
-  'includedir:      ' + get_option('includedir'),
-  '',
-  'OpenGL:          @0@ (ES1: @1@ ES2: @2@)'.format(with_opengl ? 'yes' : 'no',
-                                                    with_gles1 ? 'yes' : 'no',
-                                                    with_gles2 ? 'yes' : 'no'),
-]
-
-if with_osmesa
-  lines += ''
-  lines += 'OSMesa:          lib' + osmesa_lib_name
-else
-  lines += 'OSMesa:          no'
-endif
-
-if with_dri
-  lines += ''
-  lines += 'DRI platform:    ' + with_dri_platform
-  lines += 'DRI driver dir:  ' + dri_drivers_path
-endif
-
-if with_glx != 'disabled'
-  lines += ''
-  if with_glx == 'dri'
-    lines += 'GLX:             DRI-based'
-  elif with_glx == 'xlib'
-    lines += 'GLX:             Xlib-based'
-  else
-    lines += 'GLX:             ' + with_glx
-  endif
-endif
-
-lines += ''
-lines += 'EGL:             ' + (with_egl ? 'yes' : 'no')
-if with_egl
-  egl_drivers = []
-  if with_dri
-    egl_drivers += 'builtin:egl_dri2'
-  endif
-  if with_dri3
-    egl_drivers += 'builtin:egl_dri3'
-  endif
-  if with_platform_windows
-    egl_drivers += 'builtin:wgl'
-  endif
-  lines += 'EGL drivers:     ' + ' '.join(egl_drivers)
-endif
-if with_egl or with_any_vk
-  lines += 'EGL/Vulkan/VL platforms:   ' + ' '.join(_platforms)
-endif
-lines += 'GBM:             ' + (with_gbm ? 'yes' : 'no')
-if with_gbm
-  lines += 'GBM backends path: ' + gbm_backends_path
-endif
-
-lines += ''
-lines += 'Video Codecs: ' + ' '.join(_codecs)
-lines += ''
-
-if with_any_vk
-  lines += 'Vulkan drivers:  ' + ' '.join(_vulkan_drivers)
-  lines += 'Vulkan ICD dir:  ' + with_vulkan_icd_dir
-  if with_any_vulkan_layers
-    lines += 'Vulkan layers:   ' + ' '.join(get_option('vulkan-layers'))
-  endif
-  lines += 'Vulkan Intel Ray Tracing:  ' + (with_intel_vk_rt ? 'yes' : 'no')
-else
-  lines += 'Vulkan drivers:  no'
-endif
-
-lines += ''
-if with_llvm
-  lines += 'llvm:            yes'
-  lines += 'llvm-version:    ' + dep_llvm.version()
-else
-  lines += 'llvm:            no'
-endif
-
-lines += ''
-if with_gallium
-  lines += 'Gallium drivers: ' + ' '.join(gallium_drivers)
-  gallium_st = ['mesa']
-  if with_gallium_xa
-    gallium_st += 'xa'
-  endif
-  if with_gallium_vdpau
-    gallium_st += 'vdpau'
-  endif
-  if with_gallium_omx != 'disabled'
-    gallium_st += 'omx' + with_gallium_omx
-  endif
-  if with_gallium_va
-    gallium_st += 'va'
-  endif
-  if with_gallium_st_nine
-    gallium_st += 'nine'
-  endif
-  if with_gallium_opencl
-    gallium_st += 'clover'
-  endif
-  lines += 'Gallium st:      ' + ' '.join(gallium_st)
-else
-  lines += 'Gallium:         no'
-endif
-
-lines += 'HUD lmsensors:   ' + (dep_lmsensors.found() ? 'yes' : 'no')
-
-lines += ''
-lines += 'Shared-glapi:    ' + (with_shared_glapi ? 'yes' : 'no')
-
-lines += ''
-lines += 'Perfetto:        ' + (with_perfetto ? 'yes' : 'no')
-if with_any_datasource
-  lines += 'Perfetto ds:     ' + ' '.join(with_datasources)
-endif
-
-
-indent = '        '
-summary = indent + ('\n' + indent).join(lines)
-message('Configuration summary:\n@0@\n'.format(summary))
Index: mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new
===================================================================
--- mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-config-tool-patch/mesa-22.3.4-new
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/create-22.3.4-llvm-config-tool-patch/create.patch.sh
===================================================================
--- mesa/22.x/create-22.3.4-llvm-config-tool-patch/create.patch.sh	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-config-tool-patch/create.patch.sh	(nonexistent)
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-VERSION=22.3.4
-
-tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
-mv mesa-$VERSION mesa-$VERSION-orig
-
-cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
-
-diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-llvm-config-tool.patch
-
-mv mesa-$VERSION-llvm-config-tool.patch ../patches
-
-rm -rf ./mesa-$VERSION
-rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/22.x/create-22.3.4-llvm-config-tool-patch/create.patch.sh
___________________________________________________________________
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: mesa/22.x/create-22.3.4-llvm-config-tool-patch
===================================================================
--- mesa/22.x/create-22.3.4-llvm-config-tool-patch	(revision 384)
+++ mesa/22.x/create-22.3.4-llvm-config-tool-patch	(nonexistent)

Property changes on: mesa/22.x/create-22.3.4-llvm-config-tool-patch
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/patches/README
===================================================================
--- mesa/22.x/patches/README	(revision 384)
+++ mesa/22.x/patches/README	(nonexistent)
@@ -1,10 +0,0 @@
-
-/* begin *
-
-   mesa-22.3.4-llvm-cross.patch         - Do not try run on cross; do not use -isystem
-                                          includes;
-   mesa-22.3.4-llvm-config-tool.patch   - Use 'config-tool' method by default to
-                                          find LLVM (amdgpu module);
-   mesa-22.3.4-gallium-vc4-format.patch - Suppress printf() errors.
-
- * end */
Index: mesa/22.x/patches
===================================================================
--- mesa/22.x/patches	(revision 384)
+++ mesa/22.x/patches	(nonexistent)

Property changes on: mesa/22.x/patches
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/22.x/Makefile
===================================================================
--- mesa/22.x/Makefile	(revision 384)
+++ mesa/22.x/Makefile	(nonexistent)
@@ -1,60 +0,0 @@
-
-COMPONENT_TARGETS = $(HARDWARE_NOARCH)
-
-
-include ../../../../../build-system/constants.mk
-
-
-url         = $(DOWNLOAD_SERVER)/sources/packages/x/mesa/22.x
-
-versions    = 22.3.4
-pkgname     = mesa
-suffix      = tar.xz
-
-tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
-sha1s       = $(addsuffix .sha1sum, $(tarballs))
-
-patches     = $(CURDIR)/patches/mesa-22.3.4-gallium-vc4-format.patch
-patches    += $(CURDIR)/patches/mesa-22.3.4-llvm-config-tool.patch
-patches    += $(CURDIR)/patches/mesa-22.3.4-llvm-cross.patch
-
-.NOTPARALLEL: $(patches)
-
-
-BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
-
-
-include ../../../../../build-system/core.mk
-
-
-.PHONY: download_clean
-
-
-$(tarballs):
-	@echo -e "\n======= Downloading source tarballs =======" ; \
-	 for tarball in $(tarballs) ; do \
-	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
-	 done ; wait
-
-$(sha1s): $(tarballs)
-	@for sha in $@ ; do \
-	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
-	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
-	   touch $$sha ; \
-	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
-	   sha1sum --check $$sha ; ret="$$?" ; \
-	   if [ "$$ret" == "1" ]; then \
-	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
-	     exit 1 ; \
-	   fi ; \
-	 done
-
-$(patches): $(sha1s)
-	@echo -e "\n======= Create Patches =======\n" ; \
-	 ( cd create-22.3.4-gallium-vc4-format-patch ; ./create.patch.sh ) ; \
-	 ( cd create-22.3.4-llvm-config-tool-patch   ; ./create.patch.sh ) ; \
-	 ( cd create-22.3.4-llvm-cross-patch         ; ./create.patch.sh ) ; \
-	 echo -e "\n"
-
-download_clean:
-	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mesa/22.x
===================================================================
--- mesa/22.x	(revision 384)
+++ mesa/22.x	(nonexistent)

Property changes on: mesa/22.x
___________________________________________________________________
Deleted: svn:ignore
## -1,73 +0,0 ##
-
-# install dir
-dist
-
-# Target build dirs
-.a1x-newlib
-.a2x-newlib
-.at91sam7s-newlib
-
-.build-machine
-
-.a1x-glibc
-.a2x-glibc
-.h3-glibc
-.h5-glibc
-.i586-glibc
-.i686-glibc
-.imx6-glibc
-.jz47xx-glibc
-.makefile
-.am335x-glibc
-.omap543x-glibc
-.p5600-glibc
-.power8-glibc
-.power8le-glibc
-.power9-glibc
-.power9le-glibc
-.m1000-glibc
-.riscv64-glibc
-.rk328x-glibc
-.rk33xx-glibc
-.rk339x-glibc
-.s8xx-glibc
-.s9xx-glibc
-.x86_64-glibc
-
-# Hidden files (each file)
-.makefile
-.dist
-.rootfs
-
-# src & hw requires
-.src_requires
-.src_requires_depend
-.requires
-.requires_depend
-
-# Tarballs
-*.gz
-*.bz2
-*.lz
-*.xz
-*.tgz
-*.txz
-
-# Signatures
-*.asc
-*.sig
-*.sign
-*.sha1sum
-
-# Patches
-*.patch
-
-# Descriptions
-*.dsc
-*.txt
-
-# Default linux config files
-*.defconfig
-
-# backup copies
-*~
Index: mesa/23.x/Makefile
===================================================================
--- mesa/23.x/Makefile	(nonexistent)
+++ mesa/23.x/Makefile	(revision 385)
@@ -0,0 +1,60 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mesa/23.x
+
+versions    = 23.2.1
+pkgname     = mesa
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/mesa-23.2.1-gallium-vc4-format.patch
+patches    += $(CURDIR)/patches/mesa-23.2.1-llvm-cross.patch
+patches    += $(CURDIR)/patches/mesa-23.2.1-baikal-m1.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-23.2.1-gallium-vc4-format-patch ; ./create.patch.sh ) ; \
+	 ( cd create-23.2.1-llvm-cross-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-23.2.1-baikal-m1-patch          ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mesa/23.x/create-23.2.1-baikal-m1-patch/create.patch.sh
===================================================================
--- mesa/23.x/create-23.2.1-baikal-m1-patch/create.patch.sh	(nonexistent)
+++ mesa/23.x/create-23.2.1-baikal-m1-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=23.2.1
+
+tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
+mv mesa-$VERSION mesa-$VERSION-orig
+
+cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
+
+diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-baikal-m1.patch
+
+mv mesa-$VERSION-baikal-m1.patch ../patches
+
+rm -rf ./mesa-$VERSION
+rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/23.x/create-23.2.1-baikal-m1-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mesa/23.x/create-23.2.1-baikal-m1-patch/file.list
===================================================================
--- mesa/23.x/create-23.2.1-baikal-m1-patch/file.list	(nonexistent)
+++ mesa/23.x/create-23.2.1-baikal-m1-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+mesa-23.2.1/src/gallium/targets/dri/meson.build
+mesa-23.2.1/src/gallium/targets/dri/target.c
Index: mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build
===================================================================
--- mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build	(nonexistent)
+++ mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/meson.build	(revision 385)
@@ -0,0 +1,146 @@
+# Copyright © 2017 Dylan Baker
+# Copyright © 2018 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+# TODO: support non-static targets
+# Static targets are always enabled in autotools (unless you modify
+# configure.ac)
+
+gallium_dri_c_args = []
+gallium_dri_ld_args = []
+gallium_dri_link_depends = []
+gallium_dri_drivers = []
+
+if with_ld_version_script
+  gallium_dri_ld_args += ['-Wl,--version-script', join_paths(meson.current_source_dir(), 'dri.sym')]
+  gallium_dri_link_depends += files('dri.sym')
+endif
+if with_ld_dynamic_list
+  gallium_dri_ld_args += ['-Wl,--dynamic-list', join_paths(meson.current_source_dir(), '../dri-vdpau.dyn')]
+  gallium_dri_link_depends += files('../dri-vdpau.dyn')
+endif
+
+libgallium_dri = shared_library(
+  'gallium_dri',
+  files('target.c'),
+  include_directories : [
+    inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_util, inc_gallium_drivers,
+    inc_gallium_winsys, include_directories('../../frontends/dri'),
+  ],
+  gnu_symbol_visibility : 'hidden',
+  link_args : [ld_args_build_id, ld_args_gc_sections, gallium_dri_ld_args],
+  link_depends : gallium_dri_link_depends,
+  link_with : [
+    libdri, libmesa, libgalliumvl,
+    libgallium, libglapi, libpipe_loader_static, libws_null, libwsw, libswdri,
+    libswkmsdri,
+  ],
+  dependencies : [
+    dep_selinux, dep_libdrm, dep_llvm, dep_thread, idep_xmlconfig, idep_mesautil,
+    driver_swrast, driver_r300, driver_r600, driver_radeonsi, driver_nouveau,
+    driver_kmsro, driver_v3d, driver_vc4, driver_freedreno, driver_etnaviv,
+    driver_tegra, driver_i915, driver_svga, driver_virgl,
+    driver_panfrost, driver_iris, driver_lima, driver_zink, driver_d3d12,
+    driver_asahi, driver_crocus
+  ],
+  # Will be deleted during installation, see install_megadrivers.py
+  install : true,
+  install_dir : dri_drivers_path,
+  name_suffix : 'so',
+)
+
+foreach d : [[with_gallium_kmsro, [
+               'armada-drm_dri.so',
+               'baikal-vdu_dri.so',
+               'exynos_dri.so',
+               'hx8357d_dri.so',
+               'ili9225_dri.so',
+               'ili9341_dri.so',
+               'imx-drm_dri.so',
+               'imx-dcss_dri.so',
+               'imx-lcdif_dri.so',
+               'ingenic-drm_dri.so',
+               'kirin_dri.so',
+               'komeda_dri.so',
+               'mali-dp_dri.so',
+               'mcde_dri.so',
+               'mediatek_dri.so',
+               'meson_dri.so',
+               'mi0283qt_dri.so',
+               'mxsfb-drm_dri.so',
+               'pl111_dri.so',
+               'rcar-du_dri.so',
+               'repaper_dri.so',
+               'rockchip_dri.so',
+               'st7586_dri.so',
+               'st7735r_dri.so',
+               'stm_dri.so',
+	       'sun4i-drm_dri.so',
+             ]],
+             [with_gallium_radeonsi, 'radeonsi_dri.so'],
+             [with_gallium_nouveau, 'nouveau_dri.so'],
+             [with_gallium_freedreno, ['msm_dri.so', 'kgsl_dri.so']],
+             [with_gallium_softpipe, 'swrast_dri.so'],
+             [with_gallium_softpipe and with_gallium_drisw_kms, 'kms_swrast_dri.so'],
+             [with_gallium_v3d, 'v3d_dri.so'],
+             [with_gallium_vc4, 'vc4_dri.so'],
+             [with_gallium_panfrost, 'panfrost_dri.so'],
+             [with_gallium_etnaviv, 'etnaviv_dri.so'],
+             [with_gallium_tegra, 'tegra_dri.so'],
+             [with_gallium_crocus, 'crocus_dri.so'],
+             [with_gallium_iris, 'iris_dri.so'],
+             [with_gallium_i915, 'i915_dri.so'],
+             [with_gallium_r300, 'r300_dri.so'],
+             [with_gallium_r600, 'r600_dri.so'],
+             [with_gallium_svga, 'vmwgfx_dri.so'],
+             [with_gallium_virgl or
+               (with_gallium_freedreno and freedreno_kmds.contains('virtio')),
+               'virtio_gpu_dri.so'],
+             [with_gallium_lima, 'lima_dri.so'],
+             [with_gallium_zink, 'zink_dri.so'],
+             [with_gallium_d3d12, 'd3d12_dri.so'],
+             [with_gallium_asahi, 'asahi_dri.so']]
+  if d[0]
+    gallium_dri_drivers += d[1]
+  endif
+endforeach
+
+# This only works on Unix-like oses, which is probably fine for dri
+prog_ln = find_program('ln', required : false)
+if prog_ln.found()
+  devenv.set('LIBGL_DRIVERS_PATH', meson.current_build_dir())
+
+  foreach d : gallium_dri_drivers
+    custom_target(
+      'devenv_@0@'.format(d),
+      input : libgallium_dri,
+      output : d,
+      command : [prog_ln, '-f', '@INPUT@', '@OUTPUT@'],
+      build_by_default : true,
+    )
+  endforeach
+endif
+
+meson.add_install_script(
+  install_megadrivers_py.full_path(),
+  libgallium_dri.full_path(),
+  dri_drivers_path,
+  gallium_dri_drivers,
+)
Index: mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c
===================================================================
--- mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c	(nonexistent)
+++ mesa/23.x/create-23.2.1-baikal-m1-patch/mesa-23.2.1-new/src/gallium/targets/dri/target.c	(revision 385)
@@ -0,0 +1,147 @@
+#include "target-helpers/drm_helper.h"
+#include "target-helpers/sw_helper.h"
+
+#include "dri_screen.h"
+
+#define DEFINE_LOADER_DRM_ENTRYPOINT(drivername)                          \
+const __DRIextension **__driDriverGetExtensions_##drivername(void);       \
+PUBLIC const __DRIextension **__driDriverGetExtensions_##drivername(void) \
+{                                                                         \
+   return galliumdrm_driver_extensions;                                   \
+}
+
+#if defined(GALLIUM_SOFTPIPE)
+
+const __DRIextension **__driDriverGetExtensions_swrast(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_swrast(void)
+{
+   return galliumsw_driver_extensions;
+}
+
+#if defined(HAVE_LIBDRM)
+
+const __DRIextension **__driDriverGetExtensions_kms_swrast(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_kms_swrast(void)
+{
+   return dri_swrast_kms_driver_extensions;
+}
+
+#endif
+#endif
+
+#if defined(GALLIUM_I915)
+DEFINE_LOADER_DRM_ENTRYPOINT(i915)
+#endif
+
+#if defined(GALLIUM_IRIS)
+DEFINE_LOADER_DRM_ENTRYPOINT(iris)
+#endif
+
+#if defined(GALLIUM_CROCUS)
+DEFINE_LOADER_DRM_ENTRYPOINT(crocus)
+#endif
+
+#if defined(GALLIUM_NOUVEAU)
+DEFINE_LOADER_DRM_ENTRYPOINT(nouveau)
+#endif
+
+#if defined(GALLIUM_R300)
+DEFINE_LOADER_DRM_ENTRYPOINT(r300)
+#endif
+
+#if defined(GALLIUM_R600)
+DEFINE_LOADER_DRM_ENTRYPOINT(r600)
+#endif
+
+#if defined(GALLIUM_RADEONSI)
+DEFINE_LOADER_DRM_ENTRYPOINT(radeonsi)
+#endif
+
+#if defined(GALLIUM_VMWGFX)
+DEFINE_LOADER_DRM_ENTRYPOINT(vmwgfx)
+#endif
+
+#if defined(GALLIUM_FREEDRENO)
+DEFINE_LOADER_DRM_ENTRYPOINT(msm)
+DEFINE_LOADER_DRM_ENTRYPOINT(kgsl)
+#endif
+
+#if defined(GALLIUM_VIRGL) || (defined(GALLIUM_FREEDRENO) && !defined(PIPE_LOADER_DYNAMIC))
+DEFINE_LOADER_DRM_ENTRYPOINT(virtio_gpu)
+#endif
+
+#if defined(GALLIUM_V3D)
+DEFINE_LOADER_DRM_ENTRYPOINT(v3d)
+#endif
+
+#if defined(GALLIUM_VC4)
+DEFINE_LOADER_DRM_ENTRYPOINT(vc4)
+#endif
+
+#if defined(GALLIUM_PANFROST)
+DEFINE_LOADER_DRM_ENTRYPOINT(panfrost)
+#endif
+
+#if defined(GALLIUM_ASAHI)
+DEFINE_LOADER_DRM_ENTRYPOINT(asahi)
+#endif
+
+#if defined(GALLIUM_ETNAVIV)
+DEFINE_LOADER_DRM_ENTRYPOINT(etnaviv)
+#endif
+
+#if defined(GALLIUM_TEGRA)
+DEFINE_LOADER_DRM_ENTRYPOINT(tegra);
+#endif
+
+#if defined(GALLIUM_KMSRO)
+DEFINE_LOADER_DRM_ENTRYPOINT(armada_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(baikal_vdu)
+DEFINE_LOADER_DRM_ENTRYPOINT(exynos)
+DEFINE_LOADER_DRM_ENTRYPOINT(hx8357d)
+DEFINE_LOADER_DRM_ENTRYPOINT(ili9225)
+DEFINE_LOADER_DRM_ENTRYPOINT(ili9341)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_dcss)
+DEFINE_LOADER_DRM_ENTRYPOINT(imx_lcdif)
+DEFINE_LOADER_DRM_ENTRYPOINT(ingenic_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(kirin)
+DEFINE_LOADER_DRM_ENTRYPOINT(komeda)
+DEFINE_LOADER_DRM_ENTRYPOINT(mali_dp)
+DEFINE_LOADER_DRM_ENTRYPOINT(mcde)
+DEFINE_LOADER_DRM_ENTRYPOINT(mediatek)
+DEFINE_LOADER_DRM_ENTRYPOINT(meson)
+DEFINE_LOADER_DRM_ENTRYPOINT(mi0283qt)
+DEFINE_LOADER_DRM_ENTRYPOINT(mxsfb_drm)
+DEFINE_LOADER_DRM_ENTRYPOINT(pl111)
+DEFINE_LOADER_DRM_ENTRYPOINT(rcar_du)
+DEFINE_LOADER_DRM_ENTRYPOINT(repaper)
+DEFINE_LOADER_DRM_ENTRYPOINT(rockchip)
+DEFINE_LOADER_DRM_ENTRYPOINT(st7586)
+DEFINE_LOADER_DRM_ENTRYPOINT(st7735r)
+DEFINE_LOADER_DRM_ENTRYPOINT(stm)
+DEFINE_LOADER_DRM_ENTRYPOINT(sun4i_drm)
+#endif
+
+#if defined(GALLIUM_LIMA)
+DEFINE_LOADER_DRM_ENTRYPOINT(lima)
+#endif
+
+#if defined(GALLIUM_ZINK) && !defined(__APPLE__)
+#if defined(ANDROID)
+DEFINE_LOADER_DRM_ENTRYPOINT(zink);
+#else
+const __DRIextension **__driDriverGetExtensions_zink(void);
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_zink(void)
+{
+   return galliumvk_driver_extensions;
+}
+#endif
+#endif
+
+#if defined(GALLIUM_D3D12)
+DEFINE_LOADER_DRM_ENTRYPOINT(d3d12);
+#endif
Index: mesa/23.x/create-23.2.1-gallium-vc4-format-patch/create.patch.sh
===================================================================
--- mesa/23.x/create-23.2.1-gallium-vc4-format-patch/create.patch.sh	(nonexistent)
+++ mesa/23.x/create-23.2.1-gallium-vc4-format-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=23.2.1
+
+tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
+mv mesa-$VERSION mesa-$VERSION-orig
+
+cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
+
+diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-gallium-vc4-format.patch
+
+mv mesa-$VERSION-gallium-vc4-format.patch ../patches
+
+rm -rf ./mesa-$VERSION
+rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/23.x/create-23.2.1-gallium-vc4-format-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mesa/23.x/create-23.2.1-gallium-vc4-format-patch/file.list
===================================================================
--- mesa/23.x/create-23.2.1-gallium-vc4-format-patch/file.list	(nonexistent)
+++ mesa/23.x/create-23.2.1-gallium-vc4-format-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+mesa-23.2.1/src/gallium/drivers/vc4/vc4_resource.c
Index: mesa/23.x/create-23.2.1-gallium-vc4-format-patch/mesa-23.2.1-new/src/gallium/drivers/vc4/vc4_resource.c
===================================================================
--- mesa/23.x/create-23.2.1-gallium-vc4-format-patch/mesa-23.2.1-new/src/gallium/drivers/vc4/vc4_resource.c	(nonexistent)
+++ mesa/23.x/create-23.2.1-gallium-vc4-format-patch/mesa-23.2.1-new/src/gallium/drivers/vc4/vc4_resource.c	(revision 385)
@@ -0,0 +1,1171 @@
+/*
+ * Copyright © 2014 Broadcom
+ * Copyright (C) 2012 Rob Clark <robclark@freedesktop.org>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+
+#include <inttypes.h>
+#include "pipe/p_defines.h"
+#include "util/u_memory.h"
+#include "util/format/u_format.h"
+#include "util/u_inlines.h"
+#include "util/u_surface.h"
+#include "util/u_transfer_helper.h"
+#include "util/u_upload_mgr.h"
+#include "util/u_drm.h"
+
+#include "drm-uapi/drm_fourcc.h"
+#include "drm-uapi/vc4_drm.h"
+#include "vc4_screen.h"
+#include "vc4_context.h"
+#include "vc4_resource.h"
+#include "vc4_tiling.h"
+
+static bool
+vc4_resource_bo_alloc(struct vc4_resource *rsc)
+{
+        struct pipe_resource *prsc = &rsc->base;
+        struct pipe_screen *pscreen = prsc->screen;
+        struct vc4_bo *bo;
+
+        if (VC4_DBG(SURFACE)) {
+                fprintf(stderr, "alloc %p: size %d + offset %d -> %d\n",
+                        rsc,
+                        rsc->slices[0].size,
+                        rsc->slices[0].offset,
+                        rsc->slices[0].offset +
+                        rsc->slices[0].size +
+                        rsc->cube_map_stride * (prsc->array_size - 1));
+        }
+
+        bo = vc4_bo_alloc(vc4_screen(pscreen),
+                          rsc->slices[0].offset +
+                          rsc->slices[0].size +
+                          rsc->cube_map_stride * (prsc->array_size - 1),
+                          "resource");
+        if (bo) {
+                vc4_bo_unreference(&rsc->bo);
+                rsc->bo = bo;
+                return true;
+        } else {
+                return false;
+        }
+}
+
+static void
+vc4_resource_transfer_unmap(struct pipe_context *pctx,
+                            struct pipe_transfer *ptrans)
+{
+        struct vc4_context *vc4 = vc4_context(pctx);
+        struct vc4_transfer *trans = vc4_transfer(ptrans);
+
+        if (trans->map) {
+                struct vc4_resource *rsc = vc4_resource(ptrans->resource);
+                struct vc4_resource_slice *slice = &rsc->slices[ptrans->level];
+
+                if (ptrans->usage & PIPE_MAP_WRITE) {
+                        vc4_store_tiled_image(rsc->bo->map + slice->offset +
+                                              ptrans->box.z * rsc->cube_map_stride,
+                                              slice->stride,
+                                              trans->map, ptrans->stride,
+                                              slice->tiling, rsc->cpp,
+                                              &ptrans->box);
+                }
+                free(trans->map);
+        }
+
+        pipe_resource_reference(&ptrans->resource, NULL);
+        slab_free(&vc4->transfer_pool, ptrans);
+}
+
+static void *
+vc4_resource_transfer_map(struct pipe_context *pctx,
+                          struct pipe_resource *prsc,
+                          unsigned level, unsigned usage,
+                          const struct pipe_box *box,
+                          struct pipe_transfer **pptrans)
+{
+        struct vc4_context *vc4 = vc4_context(pctx);
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        struct vc4_transfer *trans;
+        struct pipe_transfer *ptrans;
+        enum pipe_format format = prsc->format;
+        char *buf;
+
+        /* Upgrade DISCARD_RANGE to WHOLE_RESOURCE if the whole resource is
+         * being mapped.
+         */
+        if ((usage & PIPE_MAP_DISCARD_RANGE) &&
+            !(usage & PIPE_MAP_UNSYNCHRONIZED) &&
+            !(prsc->flags & PIPE_RESOURCE_FLAG_MAP_PERSISTENT) &&
+            prsc->last_level == 0 &&
+            prsc->width0 == box->width &&
+            prsc->height0 == box->height &&
+            prsc->depth0 == box->depth &&
+            prsc->array_size == 1 &&
+            rsc->bo->private) {
+                usage |= PIPE_MAP_DISCARD_WHOLE_RESOURCE;
+        }
+
+        if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) {
+                if (vc4_resource_bo_alloc(rsc)) {
+                        /* If it might be bound as one of our vertex buffers,
+                         * make sure we re-emit vertex buffer state.
+                         */
+                        if (prsc->bind & PIPE_BIND_VERTEX_BUFFER)
+                                vc4->dirty |= VC4_DIRTY_VTXBUF;
+                } else {
+                        /* If we failed to reallocate, flush users so that we
+                         * don't violate any syncing requirements.
+                         */
+                        vc4_flush_jobs_reading_resource(vc4, prsc);
+                }
+        } else if (!(usage & PIPE_MAP_UNSYNCHRONIZED)) {
+                /* If we're writing and the buffer is being used by the CL, we
+                 * have to flush the CL first.  If we're only reading, we need
+                 * to flush if the CL has written our buffer.
+                 */
+                if (usage & PIPE_MAP_WRITE)
+                        vc4_flush_jobs_reading_resource(vc4, prsc);
+                else
+                        vc4_flush_jobs_writing_resource(vc4, prsc);
+        }
+
+        if (usage & PIPE_MAP_WRITE) {
+                rsc->writes++;
+                rsc->initialized_buffers = ~0;
+        }
+
+        trans = slab_zalloc(&vc4->transfer_pool);
+        if (!trans)
+                return NULL;
+
+        /* XXX: Handle DONTBLOCK, DISCARD_RANGE, PERSISTENT, COHERENT. */
+
+        ptrans = &trans->base;
+
+        pipe_resource_reference(&ptrans->resource, prsc);
+        ptrans->level = level;
+        ptrans->usage = usage;
+        ptrans->box = *box;
+
+        if (usage & PIPE_MAP_UNSYNCHRONIZED)
+                buf = vc4_bo_map_unsynchronized(rsc->bo);
+        else
+                buf = vc4_bo_map(rsc->bo);
+        if (!buf) {
+                fprintf(stderr, "Failed to map bo\n");
+                goto fail;
+        }
+
+        *pptrans = ptrans;
+
+        struct vc4_resource_slice *slice = &rsc->slices[level];
+        if (rsc->tiled) {
+                /* No direct mappings of tiled, since we need to manually
+                 * tile/untile.
+                 */
+                if (usage & PIPE_MAP_DIRECTLY)
+                        return NULL;
+
+                /* Our load/store routines work on entire compressed blocks. */
+                u_box_pixels_to_blocks(&ptrans->box, &ptrans->box, format);
+
+                ptrans->stride = ptrans->box.width * rsc->cpp;
+                ptrans->layer_stride = ptrans->stride * ptrans->box.height;
+
+                trans->map = malloc(ptrans->layer_stride * ptrans->box.depth);
+
+                if (usage & PIPE_MAP_READ) {
+                        vc4_load_tiled_image(trans->map, ptrans->stride,
+                                             buf + slice->offset +
+                                             ptrans->box.z * rsc->cube_map_stride,
+                                             slice->stride,
+                                             slice->tiling, rsc->cpp,
+                                             &ptrans->box);
+                }
+                return trans->map;
+        } else {
+                ptrans->stride = slice->stride;
+                ptrans->layer_stride = ptrans->stride;
+
+                return buf + slice->offset +
+                        ptrans->box.y / util_format_get_blockheight(format) * ptrans->stride +
+                        ptrans->box.x / util_format_get_blockwidth(format) * rsc->cpp +
+                        ptrans->box.z * rsc->cube_map_stride;
+        }
+
+
+fail:
+        vc4_resource_transfer_unmap(pctx, ptrans);
+        return NULL;
+}
+
+static void
+vc4_texture_subdata(struct pipe_context *pctx,
+                    struct pipe_resource *prsc,
+                    unsigned level,
+                    unsigned usage,
+                    const struct pipe_box *box,
+                    const void *data,
+                    unsigned stride,
+                    uintptr_t layer_stride)
+{
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        struct vc4_resource_slice *slice = &rsc->slices[level];
+
+        /* For a direct mapping, we can just take the u_transfer path. */
+        if (!rsc->tiled ||
+            box->depth != 1 ||
+            (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE)) {
+                return u_default_texture_subdata(pctx, prsc, level, usage, box,
+                                                 data, stride, layer_stride);
+        }
+
+        /* Otherwise, map and store the texture data directly into the tiled
+         * texture.
+         */
+        void *buf;
+        if (usage & PIPE_MAP_UNSYNCHRONIZED)
+                buf = vc4_bo_map_unsynchronized(rsc->bo);
+        else
+                buf = vc4_bo_map(rsc->bo);
+
+        vc4_store_tiled_image(buf + slice->offset +
+                              box->z * rsc->cube_map_stride,
+                              slice->stride,
+                              (void *)data, stride,
+                              slice->tiling, rsc->cpp,
+                              box);
+}
+
+static void
+vc4_resource_destroy(struct pipe_screen *pscreen,
+                     struct pipe_resource *prsc)
+{
+        struct vc4_screen *screen = vc4_screen(pscreen);
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        vc4_bo_unreference(&rsc->bo);
+
+        if (rsc->scanout)
+                renderonly_scanout_destroy(rsc->scanout, screen->ro);
+
+        free(rsc);
+}
+
+static uint64_t
+vc4_resource_modifier(struct vc4_resource *rsc)
+{
+        if (rsc->tiled)
+                return DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED;
+        else
+                return DRM_FORMAT_MOD_LINEAR;
+}
+
+static bool
+vc4_resource_get_handle(struct pipe_screen *pscreen,
+                        struct pipe_context *pctx,
+                        struct pipe_resource *prsc,
+                        struct winsys_handle *whandle,
+                        unsigned usage)
+{
+        struct vc4_screen *screen = vc4_screen(pscreen);
+        struct vc4_resource *rsc = vc4_resource(prsc);
+
+        whandle->stride = rsc->slices[0].stride;
+        whandle->offset = 0;
+        whandle->modifier = vc4_resource_modifier(rsc);
+
+        /* If we're passing some reference to our BO out to some other part of
+         * the system, then we can't do any optimizations about only us being
+         * the ones seeing it (like BO caching or shadow update avoidance).
+         */
+        rsc->bo->private = false;
+
+        switch (whandle->type) {
+        case WINSYS_HANDLE_TYPE_SHARED:
+                if (screen->ro) {
+                        /* This could probably be supported, assuming that a
+                         * control node was used for pl111.
+                         */
+                        fprintf(stderr, "flink unsupported with pl111\n");
+                        return false;
+                }
+
+                return vc4_bo_flink(rsc->bo, &whandle->handle);
+        case WINSYS_HANDLE_TYPE_KMS:
+                if (screen->ro) {
+                        return renderonly_get_handle(rsc->scanout, whandle);
+                }
+                whandle->handle = rsc->bo->handle;
+                return true;
+        case WINSYS_HANDLE_TYPE_FD:
+                /* FDs are cross-device, so we can export directly from vc4.
+                 */
+                whandle->handle = vc4_bo_get_dmabuf(rsc->bo);
+                return whandle->handle != -1;
+        }
+
+        return false;
+}
+
+static bool
+vc4_resource_get_param(struct pipe_screen *pscreen,
+                       struct pipe_context *pctx, struct pipe_resource *prsc,
+                       unsigned plane, unsigned layer, unsigned level,
+                       enum pipe_resource_param param,
+                       unsigned usage, uint64_t *value)
+{
+        struct vc4_resource *rsc = vc4_resource(prsc);
+
+        switch (param) {
+        case PIPE_RESOURCE_PARAM_STRIDE:
+                *value = rsc->slices[level].stride;
+                return true;
+        case PIPE_RESOURCE_PARAM_OFFSET:
+                *value = 0;
+                return true;
+        case PIPE_RESOURCE_PARAM_MODIFIER:
+                *value = vc4_resource_modifier(rsc);
+                return true;
+        default:
+                return false;
+        }
+}
+
+static void
+vc4_setup_slices(struct vc4_resource *rsc, const char *caller)
+{
+        struct pipe_resource *prsc = &rsc->base;
+        uint32_t width = prsc->width0;
+        uint32_t height = prsc->height0;
+        if (prsc->format == PIPE_FORMAT_ETC1_RGB8) {
+                width = (width + 3) >> 2;
+                height = (height + 3) >> 2;
+        }
+
+        uint32_t pot_width = util_next_power_of_two(width);
+        uint32_t pot_height = util_next_power_of_two(height);
+        uint32_t offset = 0;
+        uint32_t utile_w = vc4_utile_width(rsc->cpp);
+        uint32_t utile_h = vc4_utile_height(rsc->cpp);
+
+        for (int i = prsc->last_level; i >= 0; i--) {
+                struct vc4_resource_slice *slice = &rsc->slices[i];
+
+                uint32_t level_width, level_height;
+                if (i == 0) {
+                        level_width = width;
+                        level_height = height;
+                } else {
+                        level_width = u_minify(pot_width, i);
+                        level_height = u_minify(pot_height, i);
+                }
+
+                if (!rsc->tiled) {
+                        slice->tiling = VC4_TILING_FORMAT_LINEAR;
+                        if (prsc->nr_samples > 1) {
+                                /* MSAA (4x) surfaces are stored as raw tile buffer contents. */
+                                level_width = align(level_width, 32);
+                                level_height = align(level_height, 32);
+                        } else {
+                                level_width = align(level_width, utile_w);
+                        }
+                } else {
+                        if (vc4_size_is_lt(level_width, level_height,
+                                           rsc->cpp)) {
+                                slice->tiling = VC4_TILING_FORMAT_LT;
+                                level_width = align(level_width, utile_w);
+                                level_height = align(level_height, utile_h);
+                        } else {
+                                slice->tiling = VC4_TILING_FORMAT_T;
+                                level_width = align(level_width,
+                                                    4 * 2 * utile_w);
+                                level_height = align(level_height,
+                                                     4 * 2 * utile_h);
+                        }
+                }
+
+                slice->offset = offset;
+                slice->stride = (level_width * rsc->cpp *
+                                 MAX2(prsc->nr_samples, 1));
+                slice->size = level_height * slice->stride;
+
+                offset += slice->size;
+
+                if (VC4_DBG(SURFACE)) {
+                        static const char tiling_chars[] = {
+                                [VC4_TILING_FORMAT_LINEAR] = 'R',
+                                [VC4_TILING_FORMAT_LT] = 'L',
+                                [VC4_TILING_FORMAT_T] = 'T'
+                        };
+                        fprintf(stderr,
+                                "rsc %s %p (format %s: vc4 %d), %dx%d: "
+                                "level %d (%c) -> %dx%d, stride %d@0x%08x\n",
+                                caller, rsc,
+                                util_format_short_name(prsc->format),
+                                rsc->vc4_format,
+                                prsc->width0, prsc->height0,
+                                i, tiling_chars[slice->tiling],
+                                level_width, level_height,
+                                slice->stride, slice->offset);
+                }
+        }
+
+        /* The texture base pointer that has to point to level 0 doesn't have
+         * intra-page bits, so we have to align it, and thus shift up all the
+         * smaller slices.
+         */
+        uint32_t page_align_offset = (align(rsc->slices[0].offset, 4096) -
+                                      rsc->slices[0].offset);
+        if (page_align_offset) {
+                for (int i = 0; i <= prsc->last_level; i++)
+                        rsc->slices[i].offset += page_align_offset;
+        }
+
+        /* Cube map faces appear as whole miptrees at a page-aligned offset
+         * from the first face's miptree.
+         */
+        if (prsc->target == PIPE_TEXTURE_CUBE) {
+                rsc->cube_map_stride = align(rsc->slices[0].offset +
+                                             rsc->slices[0].size, 4096);
+        }
+}
+
+static struct vc4_resource *
+vc4_resource_setup(struct pipe_screen *pscreen,
+                   const struct pipe_resource *tmpl)
+{
+        struct vc4_resource *rsc = CALLOC_STRUCT(vc4_resource);
+        if (!rsc)
+                return NULL;
+        struct pipe_resource *prsc = &rsc->base;
+
+        *prsc = *tmpl;
+
+        pipe_reference_init(&prsc->reference, 1);
+        prsc->screen = pscreen;
+
+        if (prsc->nr_samples <= 1)
+                rsc->cpp = util_format_get_blocksize(tmpl->format);
+        else
+                rsc->cpp = sizeof(uint32_t);
+
+        assert(rsc->cpp);
+
+        return rsc;
+}
+
+static enum vc4_texture_data_type
+get_resource_texture_format(struct pipe_resource *prsc)
+{
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        uint8_t format = vc4_get_tex_format(prsc->format);
+
+        if (!rsc->tiled) {
+                if (prsc->nr_samples > 1) {
+                        return ~0;
+                } else {
+                        if (format == VC4_TEXTURE_TYPE_RGBA8888)
+                                return VC4_TEXTURE_TYPE_RGBA32R;
+                        else
+                                return ~0;
+                }
+        }
+
+        return format;
+}
+
+static struct pipe_resource *
+vc4_resource_create_with_modifiers(struct pipe_screen *pscreen,
+                                   const struct pipe_resource *tmpl,
+                                   const uint64_t *modifiers,
+                                   int count)
+{
+        struct vc4_screen *screen = vc4_screen(pscreen);
+        struct vc4_resource *rsc = vc4_resource_setup(pscreen, tmpl);
+        struct pipe_resource *prsc = &rsc->base;
+        bool linear_ok = drm_find_modifier(DRM_FORMAT_MOD_LINEAR, modifiers, count);
+        /* Use a tiled layout if we can, for better 3D performance. */
+        bool should_tile = true;
+
+        /* VBOs/PBOs are untiled (and 1 height). */
+        if (tmpl->target == PIPE_BUFFER)
+                should_tile = false;
+
+        /* MSAA buffers are linear. */
+        if (tmpl->nr_samples > 1)
+                should_tile = false;
+
+        /* No tiling when we're sharing with another device (pl111). */
+        if (screen->ro && (tmpl->bind & PIPE_BIND_SCANOUT))
+                should_tile = false;
+
+        /* Cursors are always linear, and the user can request linear as well.
+         */
+        if (tmpl->bind & (PIPE_BIND_LINEAR | PIPE_BIND_CURSOR))
+                should_tile = false;
+
+        /* No shared objects with LT format -- the kernel only has T-format
+         * metadata.  LT objects are small enough it's not worth the trouble to
+         * give them metadata to tile.
+         */
+        if ((tmpl->bind & (PIPE_BIND_SHARED | PIPE_BIND_SCANOUT)) &&
+            vc4_size_is_lt(prsc->width0, prsc->height0, rsc->cpp))
+                should_tile = false;
+
+        /* If we're sharing or scanning out, we need the ioctl present to
+         * inform the kernel or the other side.
+         */
+        if ((tmpl->bind & (PIPE_BIND_SHARED |
+                           PIPE_BIND_SCANOUT)) && !screen->has_tiling_ioctl)
+                should_tile = false;
+
+        /* No user-specified modifier; determine our own. */
+        if (count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID) {
+                linear_ok = true;
+                rsc->tiled = should_tile;
+        } else if (should_tile &&
+                   drm_find_modifier(DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED,
+                                 modifiers, count)) {
+                rsc->tiled = true;
+        } else if (linear_ok) {
+                rsc->tiled = false;
+        } else {
+                fprintf(stderr, "Unsupported modifier requested\n");
+                return NULL;
+        }
+
+        if (tmpl->target != PIPE_BUFFER)
+                rsc->vc4_format = get_resource_texture_format(prsc);
+
+        vc4_setup_slices(rsc, "create");
+        if (!vc4_resource_bo_alloc(rsc))
+                goto fail;
+
+        if (screen->has_tiling_ioctl) {
+                uint64_t modifier;
+                if (rsc->tiled)
+                        modifier = DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED;
+                else
+                        modifier = DRM_FORMAT_MOD_LINEAR;
+                struct drm_vc4_set_tiling set_tiling = {
+                        .handle = rsc->bo->handle,
+                        .modifier = modifier,
+                };
+                int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_SET_TILING,
+                                    &set_tiling);
+                if (ret != 0)
+                        goto fail;
+        }
+
+        /* Set up the "scanout resource" (the dmabuf export of our buffer to
+         * the KMS handle) if the buffer might ever have
+         * resource_get_handle(WINSYS_HANDLE_TYPE_KMS) called on it.
+         * create_with_modifiers() doesn't give us usage flags, so we have to
+         * assume that all calls with modifiers are scanout-possible.
+         */
+        if (screen->ro &&
+            ((tmpl->bind & PIPE_BIND_SCANOUT) ||
+             !(count == 1 && modifiers[0] == DRM_FORMAT_MOD_INVALID))) {
+                rsc->scanout =
+                        renderonly_scanout_for_resource(prsc, screen->ro, NULL);
+                if (!rsc->scanout)
+                        goto fail;
+        }
+
+        vc4_bo_label(screen, rsc->bo, "%sresource %dx%d@%d/%d",
+                     (tmpl->bind & PIPE_BIND_SCANOUT) ? "scanout " : "",
+                     tmpl->width0, tmpl->height0,
+                     rsc->cpp * 8, prsc->last_level);
+
+        return prsc;
+fail:
+        vc4_resource_destroy(pscreen, prsc);
+        return NULL;
+}
+
+struct pipe_resource *
+vc4_resource_create(struct pipe_screen *pscreen,
+                    const struct pipe_resource *tmpl)
+{
+        const uint64_t mod = DRM_FORMAT_MOD_INVALID;
+        return vc4_resource_create_with_modifiers(pscreen, tmpl, &mod, 1);
+}
+
+static struct pipe_resource *
+vc4_resource_from_handle(struct pipe_screen *pscreen,
+                         const struct pipe_resource *tmpl,
+                         struct winsys_handle *whandle,
+                         unsigned usage)
+{
+        struct vc4_screen *screen = vc4_screen(pscreen);
+        struct vc4_resource *rsc = vc4_resource_setup(pscreen, tmpl);
+        struct pipe_resource *prsc = &rsc->base;
+        struct vc4_resource_slice *slice = &rsc->slices[0];
+
+        if (!rsc)
+                return NULL;
+
+        switch (whandle->type) {
+        case WINSYS_HANDLE_TYPE_SHARED:
+                rsc->bo = vc4_bo_open_name(screen, whandle->handle);
+                break;
+        case WINSYS_HANDLE_TYPE_FD:
+                rsc->bo = vc4_bo_open_dmabuf(screen, whandle->handle);
+                break;
+        default:
+                fprintf(stderr,
+                        "Attempt to import unsupported handle type %d\n",
+                        whandle->type);
+        }
+
+        if (!rsc->bo)
+                goto fail;
+
+        struct drm_vc4_get_tiling get_tiling = {
+                .handle = rsc->bo->handle,
+        };
+        int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_TILING, &get_tiling);
+
+        if (ret != 0) {
+                whandle->modifier = DRM_FORMAT_MOD_LINEAR;
+        } else if (whandle->modifier == DRM_FORMAT_MOD_INVALID) {
+                whandle->modifier = get_tiling.modifier;
+        } else if (whandle->modifier != get_tiling.modifier) {
+                fprintf(stderr,
+                        "Modifier 0x%" PRIx64 " vs. tiling (0x%" PRIx64 ") mismatch\n",
+                        (uint64_t)whandle->modifier, (uint64_t)get_tiling.modifier);
+                goto fail;
+        }
+
+        switch (whandle->modifier) {
+        case DRM_FORMAT_MOD_LINEAR:
+                rsc->tiled = false;
+                break;
+        case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
+                rsc->tiled = true;
+                break;
+        default:
+                fprintf(stderr,
+                        "Attempt to import unsupported modifier 0x%" PRIx64 "\n",
+                        (uint64_t)whandle->modifier);
+                goto fail;
+        }
+
+        rsc->vc4_format = get_resource_texture_format(prsc);
+        vc4_setup_slices(rsc, "import");
+
+        if (whandle->offset != 0) {
+                if (rsc->tiled) {
+                        fprintf(stderr,
+                                "Attempt to import unsupported "
+                                "winsys offset %u\n",
+                                whandle->offset);
+                        goto fail;
+                }
+
+                rsc->slices[0].offset += whandle->offset;
+
+                if (rsc->slices[0].offset + rsc->slices[0].size >
+                    rsc->bo->size) {
+                        fprintf(stderr, "Attempt to import "
+                                "with overflowing offset (%d + %d > %d)\n",
+                                whandle->offset,
+                                rsc->slices[0].size,
+                                rsc->bo->size);
+                        goto fail;
+                }
+        }
+
+        if (screen->ro) {
+                /* Make sure that renderonly has a handle to our buffer in the
+                 * display's fd, so that a later renderonly_get_handle()
+                 * returns correct handles or GEM names.
+                 */
+                rsc->scanout =
+                        renderonly_create_gpu_import_for_resource(prsc,
+                                                                  screen->ro,
+                                                                  NULL);
+        }
+
+        if (rsc->tiled && whandle->stride != slice->stride) {
+                static bool warned = false;
+                if (!warned) {
+                        warned = true;
+                        fprintf(stderr,
+                                "Attempting to import %dx%d %s with "
+                                "unsupported stride %d instead of %d\n",
+                                prsc->width0, prsc->height0,
+                                util_format_short_name(prsc->format),
+                                whandle->stride,
+                                slice->stride);
+                }
+                goto fail;
+        } else if (!rsc->tiled) {
+                slice->stride = whandle->stride;
+        }
+
+        return prsc;
+
+fail:
+        vc4_resource_destroy(pscreen, prsc);
+        return NULL;
+}
+
+static struct pipe_surface *
+vc4_create_surface(struct pipe_context *pctx,
+                   struct pipe_resource *ptex,
+                   const struct pipe_surface *surf_tmpl)
+{
+        struct vc4_surface *surface = CALLOC_STRUCT(vc4_surface);
+        struct vc4_resource *rsc = vc4_resource(ptex);
+
+        if (!surface)
+                return NULL;
+
+        assert(surf_tmpl->u.tex.first_layer == surf_tmpl->u.tex.last_layer);
+
+        struct pipe_surface *psurf = &surface->base;
+        unsigned level = surf_tmpl->u.tex.level;
+
+        pipe_reference_init(&psurf->reference, 1);
+        pipe_resource_reference(&psurf->texture, ptex);
+
+        psurf->context = pctx;
+        psurf->format = surf_tmpl->format;
+        psurf->width = u_minify(ptex->width0, level);
+        psurf->height = u_minify(ptex->height0, level);
+        psurf->u.tex.level = level;
+        psurf->u.tex.first_layer = surf_tmpl->u.tex.first_layer;
+        psurf->u.tex.last_layer = surf_tmpl->u.tex.last_layer;
+        surface->offset = (rsc->slices[level].offset +
+                           psurf->u.tex.first_layer * rsc->cube_map_stride);
+        surface->tiling = rsc->slices[level].tiling;
+
+        return &surface->base;
+}
+
+static void
+vc4_surface_destroy(struct pipe_context *pctx, struct pipe_surface *psurf)
+{
+        pipe_resource_reference(&psurf->texture, NULL);
+        FREE(psurf);
+}
+
+static void
+vc4_dump_surface_non_msaa(struct pipe_surface *psurf)
+{
+        struct pipe_resource *prsc = psurf->texture;
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        uint32_t *map = vc4_bo_map(rsc->bo);
+        uint32_t stride = rsc->slices[0].stride / 4;
+        uint32_t width = psurf->width;
+        uint32_t height = psurf->height;
+        uint32_t chunk_w = width / 79;
+        uint32_t chunk_h = height / 40;
+        uint32_t found_colors[10] = { 0 };
+        uint32_t num_found_colors = 0;
+
+        if (rsc->vc4_format != VC4_TEXTURE_TYPE_RGBA32R) {
+                fprintf(stderr, "%s: Unsupported format %s\n",
+                        __func__, util_format_short_name(psurf->format));
+                return;
+        }
+
+        for (int by = 0; by < height; by += chunk_h) {
+                for (int bx = 0; bx < width; bx += chunk_w) {
+                        int all_found_color = -1; /* nothing found */
+
+                        for (int y = by; y < MIN2(height, by + chunk_h); y++) {
+                                for (int x = bx; x < MIN2(width, bx + chunk_w); x++) {
+                                        uint32_t pix = map[y * stride + x];
+
+                                        int i;
+                                        for (i = 0; i < num_found_colors; i++) {
+                                                if (pix == found_colors[i])
+                                                        break;
+                                        }
+                                        if (i == num_found_colors &&
+                                            num_found_colors <
+                                            ARRAY_SIZE(found_colors)) {
+                                                found_colors[num_found_colors++] = pix;
+                                        }
+
+                                        if (i < num_found_colors) {
+                                                if (all_found_color == -1)
+                                                        all_found_color = i;
+                                                else if (i != all_found_color)
+                                                        all_found_color = ARRAY_SIZE(found_colors);
+                                        }
+                                }
+                        }
+                        /* If all pixels for this chunk have a consistent
+                         * value, then print a character for it.  Either a
+                         * fixed name (particularly common for piglit tests),
+                         * or a runtime-generated number.
+                         */
+                        if (all_found_color >= 0 &&
+                            all_found_color < ARRAY_SIZE(found_colors)) {
+                                static const struct {
+                                        uint32_t val;
+                                        const char *c;
+                                } named_colors[] = {
+                                        { 0xff000000, "█" },
+                                        { 0x00000000, "█" },
+                                        { 0xffff0000, "r" },
+                                        { 0xff00ff00, "g" },
+                                        { 0xff0000ff, "b" },
+                                        { 0xffffffff, "w" },
+                                };
+                                int i;
+                                for (i = 0; i < ARRAY_SIZE(named_colors); i++) {
+                                        if (named_colors[i].val ==
+                                            found_colors[all_found_color]) {
+                                                fprintf(stderr, "%s",
+                                                        named_colors[i].c);
+                                                break;
+                                        }
+                                }
+                                /* For unnamed colors, print a number and the
+                                 * numbers will have values printed at the
+                                 * end.
+                                 */
+                                if (i == ARRAY_SIZE(named_colors)) {
+                                        fprintf(stderr, "%c",
+                                                '0' + all_found_color);
+                                }
+                        } else {
+                                /* If there's no consistent color, print this.
+                                 */
+                                fprintf(stderr, ".");
+                        }
+                }
+                fprintf(stderr, "\n");
+        }
+
+        for (int i = 0; i < num_found_colors; i++) {
+                fprintf(stderr, "color %d: 0x%08x\n", i, found_colors[i]);
+        }
+}
+
+static uint32_t
+vc4_surface_msaa_get_sample(struct pipe_surface *psurf,
+                            uint32_t x, uint32_t y, uint32_t sample)
+{
+        struct pipe_resource *prsc = psurf->texture;
+        struct vc4_resource *rsc = vc4_resource(prsc);
+        uint32_t tile_w = 32, tile_h = 32;
+        uint32_t tiles_w = DIV_ROUND_UP(psurf->width, 32);
+
+        uint32_t tile_x = x / tile_w;
+        uint32_t tile_y = y / tile_h;
+        uint32_t *tile = (vc4_bo_map(rsc->bo) +
+                          VC4_TILE_BUFFER_SIZE * (tile_y * tiles_w + tile_x));
+        uint32_t subtile_x = x % tile_w;
+        uint32_t subtile_y = y % tile_h;
+
+        uint32_t quad_samples = VC4_MAX_SAMPLES * 4;
+        uint32_t tile_stride = quad_samples * tile_w / 2;
+
+        return *((uint32_t *)tile +
+                 (subtile_y >> 1) * tile_stride +
+                 (subtile_x >> 1) * quad_samples +
+                 ((subtile_y & 1) << 1) +
+                 (subtile_x & 1) +
+                 sample);
+}
+
+static void
+vc4_dump_surface_msaa_char(struct pipe_surface *psurf,
+                           uint32_t start_x, uint32_t start_y,
+                           uint32_t w, uint32_t h)
+{
+        bool all_same_color = true;
+        uint32_t all_pix = 0;
+
+        for (int y = start_y; y < start_y + h; y++) {
+                for (int x = start_x; x < start_x + w; x++) {
+                        for (int s = 0; s < VC4_MAX_SAMPLES; s++) {
+                                uint32_t pix = vc4_surface_msaa_get_sample(psurf,
+                                                                           x, y,
+                                                                           s);
+                                if (x == start_x && y == start_y)
+                                        all_pix = pix;
+                                else if (all_pix != pix)
+                                        all_same_color = false;
+                        }
+                }
+        }
+        if (all_same_color) {
+                static const struct {
+                        uint32_t val;
+                        const char *c;
+                } named_colors[] = {
+                        { 0xff000000, "█" },
+                        { 0x00000000, "█" },
+                        { 0xffff0000, "r" },
+                        { 0xff00ff00, "g" },
+                        { 0xff0000ff, "b" },
+                        { 0xffffffff, "w" },
+                };
+                int i;
+                for (i = 0; i < ARRAY_SIZE(named_colors); i++) {
+                        if (named_colors[i].val == all_pix) {
+                                fprintf(stderr, "%s",
+                                        named_colors[i].c);
+                                return;
+                        }
+                }
+                fprintf(stderr, "x");
+        } else {
+                fprintf(stderr, ".");
+        }
+}
+
+static void
+vc4_dump_surface_msaa(struct pipe_surface *psurf)
+{
+        uint32_t tile_w = 32, tile_h = 32;
+        uint32_t tiles_w = DIV_ROUND_UP(psurf->width, tile_w);
+        uint32_t tiles_h = DIV_ROUND_UP(psurf->height, tile_h);
+        uint32_t char_w = 140, char_h = 60;
+        uint32_t char_w_per_tile = char_w / tiles_w - 1;
+        uint32_t char_h_per_tile = char_h / tiles_h - 1;
+
+        fprintf(stderr, "Surface: %dx%d (%dx MSAA)\n",
+                psurf->width, psurf->height, psurf->texture->nr_samples);
+
+        for (int x = 0; x < (char_w_per_tile + 1) * tiles_w; x++)
+                fprintf(stderr, "-");
+        fprintf(stderr, "\n");
+
+        for (int ty = 0; ty < psurf->height; ty += tile_h) {
+                for (int y = 0; y < char_h_per_tile; y++) {
+
+                        for (int tx = 0; tx < psurf->width; tx += tile_w) {
+                                for (int x = 0; x < char_w_per_tile; x++) {
+                                        uint32_t bx1 = (x * tile_w /
+                                                        char_w_per_tile);
+                                        uint32_t bx2 = ((x + 1) * tile_w /
+                                                        char_w_per_tile);
+                                        uint32_t by1 = (y * tile_h /
+                                                        char_h_per_tile);
+                                        uint32_t by2 = ((y + 1) * tile_h /
+                                                        char_h_per_tile);
+
+                                        vc4_dump_surface_msaa_char(psurf,
+                                                                   tx + bx1,
+                                                                   ty + by1,
+                                                                   bx2 - bx1,
+                                                                   by2 - by1);
+                                }
+                                fprintf(stderr, "|");
+                        }
+                        fprintf(stderr, "\n");
+                }
+
+                for (int x = 0; x < (char_w_per_tile + 1) * tiles_w; x++)
+                        fprintf(stderr, "-");
+                fprintf(stderr, "\n");
+        }
+}
+
+/** Debug routine to dump the contents of an 8888 surface to the console */
+void
+vc4_dump_surface(struct pipe_surface *psurf)
+{
+        if (!psurf)
+                return;
+
+        if (psurf->texture->nr_samples > 1)
+                vc4_dump_surface_msaa(psurf);
+        else
+                vc4_dump_surface_non_msaa(psurf);
+}
+
+static void
+vc4_flush_resource(struct pipe_context *pctx, struct pipe_resource *resource)
+{
+        /* All calls to flush_resource are followed by a flush of the context,
+         * so there's nothing to do.
+         */
+}
+
+void
+vc4_update_shadow_baselevel_texture(struct pipe_context *pctx,
+                                    struct pipe_sampler_view *pview)
+{
+        struct vc4_context *vc4 = vc4_context(pctx);
+        struct vc4_sampler_view *view = vc4_sampler_view(pview);
+        struct vc4_resource *shadow = vc4_resource(view->texture);
+        struct vc4_resource *orig = vc4_resource(pview->texture);
+
+        assert(view->texture != pview->texture);
+
+        if (shadow->writes == orig->writes && orig->bo->private)
+                return;
+
+        perf_debug("Updating %dx%d@%d shadow texture due to %s\n",
+                   orig->base.width0, orig->base.height0,
+                   pview->u.tex.first_level,
+                   pview->u.tex.first_level ? "base level" : "raster layout");
+
+        for (int i = 0; i <= shadow->base.last_level; i++) {
+                unsigned width = u_minify(shadow->base.width0, i);
+                unsigned height = u_minify(shadow->base.height0, i);
+                struct pipe_blit_info info = {
+                        .dst = {
+                                .resource = &shadow->base,
+                                .level = i,
+                                .box = {
+                                        .x = 0,
+                                        .y = 0,
+                                        .z = 0,
+                                        .width = width,
+                                        .height = height,
+                                        .depth = 1,
+                                },
+                                .format = shadow->base.format,
+                        },
+                        .src = {
+                                .resource = &orig->base,
+                                .level = pview->u.tex.first_level + i,
+                                .box = {
+                                        .x = 0,
+                                        .y = 0,
+                                        .z = 0,
+                                        .width = width,
+                                        .height = height,
+                                        .depth = 1,
+                                },
+                                .format = orig->base.format,
+                        },
+                        .mask = util_format_get_mask(orig->base.format),
+                };
+                pctx->blit(pctx, &info);
+        }
+
+        shadow->writes = orig->writes;
+}
+
+/**
+ * Converts a 4-byte index buffer to 2 bytes.
+ *
+ * Since GLES2 only has support for 1 and 2-byte indices, the hardware doesn't
+ * include 4-byte index support, and we have to shrink it down.
+ *
+ * There's no fallback support for when indices end up being larger than 2^16,
+ * though it will at least assertion fail.  Also, if the original index data
+ * was in user memory, it would be nice to not have uploaded it to a VBO
+ * before translating.
+ */
+struct pipe_resource *
+vc4_get_shadow_index_buffer(struct pipe_context *pctx,
+                            const struct pipe_draw_info *info,
+                            uint32_t offset,
+                            uint32_t count,
+                            uint32_t *shadow_offset)
+{
+        struct vc4_context *vc4 = vc4_context(pctx);
+        struct vc4_resource *orig = vc4_resource(info->index.resource);
+        perf_debug("Fallback conversion for %d uint indices\n", count);
+
+        void *data;
+        struct pipe_resource *shadow_rsc = NULL;
+        u_upload_alloc(vc4->uploader, 0, count * 2, 4,
+                       shadow_offset, &shadow_rsc, &data);
+        uint16_t *dst = data;
+
+        struct pipe_transfer *src_transfer = NULL;
+        const uint32_t *src;
+        if (info->has_user_indices) {
+                src = (uint32_t*)((char*)info->index.user + offset);
+        } else {
+                src = pipe_buffer_map_range(pctx, &orig->base,
+                                            offset,
+                                            count * 4,
+                                            PIPE_MAP_READ, &src_transfer);
+        }
+
+        for (int i = 0; i < count; i++) {
+                uint32_t src_index = src[i];
+                assert(src_index <= 0xffff);
+                dst[i] = src_index;
+        }
+
+        if (src_transfer)
+                pctx->buffer_unmap(pctx, src_transfer);
+
+        return shadow_rsc;
+}
+
+static const struct u_transfer_vtbl transfer_vtbl = {
+        .resource_create          = vc4_resource_create,
+        .resource_destroy         = vc4_resource_destroy,
+        .transfer_map             = vc4_resource_transfer_map,
+        .transfer_unmap           = vc4_resource_transfer_unmap,
+        .transfer_flush_region    = u_default_transfer_flush_region,
+};
+
+void
+vc4_resource_screen_init(struct pipe_screen *pscreen)
+{
+        struct vc4_screen *screen = vc4_screen(pscreen);
+
+        pscreen->resource_create = vc4_resource_create;
+        pscreen->resource_create_with_modifiers =
+                vc4_resource_create_with_modifiers;
+        pscreen->resource_from_handle = vc4_resource_from_handle;
+        pscreen->resource_get_handle = vc4_resource_get_handle;
+        pscreen->resource_get_param = vc4_resource_get_param;
+        pscreen->resource_destroy = vc4_resource_destroy;
+        pscreen->transfer_helper = u_transfer_helper_create(&transfer_vtbl,
+                                                            U_TRANSFER_HELPER_MSAA_MAP);
+
+        /* Test if the kernel has GET_TILING; it will return -EINVAL if the
+         * ioctl does not exist, but -ENOENT if we pass an impossible handle.
+         * 0 cannot be a valid GEM object, so use that.
+         */
+        struct drm_vc4_get_tiling get_tiling = {
+                .handle = 0x0,
+        };
+        int ret = vc4_ioctl(screen->fd, DRM_IOCTL_VC4_GET_TILING, &get_tiling);
+        if (ret == -1 && errno == ENOENT)
+                screen->has_tiling_ioctl = true;
+}
+
+void
+vc4_resource_context_init(struct pipe_context *pctx)
+{
+        pctx->buffer_map = u_transfer_helper_transfer_map;
+        pctx->texture_map = u_transfer_helper_transfer_map;
+        pctx->transfer_flush_region = u_transfer_helper_transfer_flush_region;
+        pctx->buffer_unmap = u_transfer_helper_transfer_unmap;
+        pctx->texture_unmap = u_transfer_helper_transfer_unmap;
+        pctx->buffer_subdata = u_default_buffer_subdata;
+        pctx->texture_subdata = vc4_texture_subdata;
+        pctx->create_surface = vc4_create_surface;
+        pctx->surface_destroy = vc4_surface_destroy;
+        pctx->resource_copy_region = util_resource_copy_region;
+        pctx->blit = vc4_blit;
+        pctx->flush_resource = vc4_flush_resource;
+}
Index: mesa/23.x/create-23.2.1-llvm-cross-patch/create.patch.sh
===================================================================
--- mesa/23.x/create-23.2.1-llvm-cross-patch/create.patch.sh	(nonexistent)
+++ mesa/23.x/create-23.2.1-llvm-cross-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=23.2.1
+
+tar --files-from=file.list -xJvf ../mesa-$VERSION.tar.xz
+mv mesa-$VERSION mesa-$VERSION-orig
+
+cp -rf ./mesa-$VERSION-new ./mesa-$VERSION
+
+diff --unified -Nr  mesa-$VERSION-orig  mesa-$VERSION > mesa-$VERSION-llvm-cross.patch
+
+mv mesa-$VERSION-llvm-cross.patch ../patches
+
+rm -rf ./mesa-$VERSION
+rm -rf ./mesa-$VERSION-orig

Property changes on: mesa/23.x/create-23.2.1-llvm-cross-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mesa/23.x/create-23.2.1-llvm-cross-patch/file.list
===================================================================
--- mesa/23.x/create-23.2.1-llvm-cross-patch/file.list	(nonexistent)
+++ mesa/23.x/create-23.2.1-llvm-cross-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+mesa-23.2.1/meson.build
+mesa-23.2.1/src/gallium/targets/opencl/meson.build
Index: mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/meson.build
===================================================================
--- mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/meson.build	(nonexistent)
+++ mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/meson.build	(revision 385)
@@ -0,0 +1,2268 @@
+# Copyright © 2017-2020 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+project(
+  'mesa',
+  ['c', 'cpp'],
+  version : files('VERSION'),
+  license : 'MIT',
+  meson_version : '>= 0.60',
+  default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c11', 'cpp_std=c++17', 'rust_std=2021']
+)
+
+cc = meson.get_compiler('c')
+cpp = meson.get_compiler('cpp')
+
+null_dep = dependency('', required : false)
+
+if get_option('layout') != 'mirror'
+  error('`mirror` is the only build directory layout supported')
+endif
+
+# Arguments for the preprocessor, put these in a separate array from the C and
+# C++ (cpp in meson terminology) arguments since they need to be added to the
+# default arguments for both C and C++.
+pre_args = [
+  '-D__STDC_CONSTANT_MACROS',
+  '-D__STDC_FORMAT_MACROS',
+  '-D__STDC_LIMIT_MACROS',
+  '-DPACKAGE_VERSION="@0@"'.format(meson.project_version()),
+  '-DPACKAGE_BUGREPORT="https://gitlab.freedesktop.org/mesa/mesa/-/issues"',
+]
+# Arguments for c or cpp compiler, can be compiler options
+c_cpp_args = []
+
+c_args = []
+cpp_args = []
+
+with_moltenvk_dir = get_option('moltenvk-dir')
+with_vulkan_icd_dir = get_option('vulkan-icd-dir')
+with_tests = get_option('build-tests')
+with_glcpp_tests = get_option('enable-glcpp-tests')
+with_aco_tests = get_option('build-aco-tests')
+with_glx_read_only_text = get_option('glx-read-only-text')
+with_glx_direct = get_option('glx-direct')
+with_osmesa = get_option('osmesa')
+with_vulkan_overlay_layer = get_option('vulkan-layers').contains('overlay')
+with_vulkan_device_select_layer = get_option('vulkan-layers').contains('device-select')
+with_tools = get_option('tools')
+if with_tools.contains('all')
+  with_tools = [
+    'drm-shim',
+    'dlclose-skip',
+    'etnaviv',
+    'freedreno',
+    'glsl',
+    'intel',
+    'intel-ui',
+    'lima',
+    'nir',
+    'nouveau',
+    'asahi',
+    'imagination',
+  ]
+endif
+
+with_any_vulkan_layers = get_option('vulkan-layers').length() != 0
+with_intel_tools = with_tools.contains('intel') or with_tools.contains('intel-ui')
+with_imgui = with_intel_tools or with_vulkan_overlay_layer
+
+dri_drivers_path = get_option('dri-drivers-path')
+if dri_drivers_path == ''
+  dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
+endif
+dri_search_path = get_option('dri-search-path')
+if dri_search_path == ''
+  dri_search_path = dri_drivers_path
+endif
+
+gbm_backends_path = get_option('gbm-backends-path')
+if gbm_backends_path == ''
+  gbm_backends_path = join_paths(get_option('prefix'), get_option('libdir'), 'gbm')
+endif
+
+# Default shared glapi disabled for windows, enabled elsewhere.
+with_shared_glapi = get_option('shared-glapi') \
+  .disable_auto_if(host_machine.system() == 'windows') \
+  .allowed()
+
+with_opengl = get_option('opengl')
+
+with_gles1 = get_option('gles1') \
+  .require(with_shared_glapi, error_message : 'OpengGL ES 1.x requires shared-glapi') \
+  .allowed()
+
+with_gles2 = get_option('gles2') \
+  .require(with_shared_glapi, error_message : 'OpengGL ES 2.x requires shared-glapi') \
+  .allowed()
+
+pre_args += '-DHAVE_OPENGL=@0@'.format(with_opengl ? '1' : '0')
+pre_args += '-DHAVE_OPENGL_ES_1=@0@'.format(with_gles1 ? '1' : '0')
+pre_args += '-DHAVE_OPENGL_ES_2=@0@'.format(with_gles2 ? '1' : '0')
+
+with_any_opengl = with_opengl or with_gles1 or with_gles2
+# Only build shared_glapi if at least one OpenGL API is enabled
+with_shared_glapi = with_shared_glapi and with_any_opengl
+
+system_has_kms_drm = ['openbsd', 'netbsd', 'freebsd', 'gnu/kfreebsd', 'dragonfly', 'linux', 'sunos', 'android'].contains(host_machine.system())
+
+gallium_drivers = get_option('gallium-drivers')
+if gallium_drivers.contains('auto')
+  if system_has_kms_drm
+    # TODO: PPC, Sparc
+    if ['x86', 'x86_64'].contains(host_machine.cpu_family())
+      gallium_drivers = [
+        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'svga', 'swrast',
+        'iris', 'crocus', 'i915'
+      ]
+    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
+      gallium_drivers = [
+        'v3d', 'vc4', 'freedreno', 'etnaviv', 'nouveau', 'svga',
+        'tegra', 'virgl', 'lima', 'panfrost', 'swrast', 'iris'
+      ]
+    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
+      gallium_drivers = [
+        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'swrast'
+      ]
+    elif ['loongarch64'].contains(host_machine.cpu_family())
+      gallium_drivers = [
+        'r300', 'r600', 'radeonsi', 'nouveau', 'virgl', 'etnaviv', 'swrast'
+      ]
+    else
+      error('Unknown architecture @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+            host_machine.cpu_family()))
+    endif
+  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
+    gallium_drivers = ['swrast']
+  else
+    error('Unknown OS @0@. Please pass -Dgallium-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+          host_machine.system()))
+  endif
+endif
+with_gallium_radeonsi = gallium_drivers.contains('radeonsi')
+with_gallium_r300 = gallium_drivers.contains('r300')
+with_gallium_r600 = gallium_drivers.contains('r600')
+with_gallium_nouveau = gallium_drivers.contains('nouveau')
+with_gallium_freedreno = gallium_drivers.contains('freedreno')
+with_gallium_softpipe = gallium_drivers.contains('swrast')
+with_gallium_vc4 = gallium_drivers.contains('vc4')
+with_gallium_v3d = gallium_drivers.contains('v3d')
+with_gallium_panfrost = gallium_drivers.contains('panfrost')
+with_gallium_etnaviv = gallium_drivers.contains('etnaviv')
+with_gallium_tegra = gallium_drivers.contains('tegra')
+with_gallium_crocus = gallium_drivers.contains('crocus')
+with_gallium_iris = gallium_drivers.contains('iris')
+with_gallium_i915 = gallium_drivers.contains('i915')
+with_gallium_svga = gallium_drivers.contains('svga')
+with_gallium_virgl = gallium_drivers.contains('virgl')
+with_gallium_lima = gallium_drivers.contains('lima')
+with_gallium_zink = gallium_drivers.contains('zink')
+with_gallium_d3d12 = gallium_drivers.contains('d3d12')
+with_gallium_asahi = gallium_drivers.contains('asahi')
+foreach gallium_driver : gallium_drivers
+  pre_args += '-DHAVE_@0@'.format(gallium_driver.to_upper())
+endforeach
+
+freedreno_kmds = get_option('freedreno-kmds')
+# If building only vulkan with only kgsl kmd support, there is no libdrm
+# dependency:
+if freedreno_kmds.length() == 1 and freedreno_kmds.contains('kgsl') and not with_gallium_freedreno
+  system_has_kms_drm = false
+endif
+
+with_gallium = gallium_drivers.length() != 0
+with_gallium_kmsro = system_has_kms_drm and [
+  with_gallium_asahi,
+  with_gallium_etnaviv,
+  with_gallium_freedreno,
+  with_gallium_lima,
+  with_gallium_panfrost,
+  with_gallium_v3d,
+  with_gallium_vc4,
+].contains(true)
+
+with_dri = false
+if with_gallium and system_has_kms_drm
+  _glx = get_option('glx')
+  _egl = get_option('egl')
+  if _glx == 'dri' or _egl.enabled() or (_glx == 'disabled' and _egl.allowed())
+    with_dri = true
+  endif
+endif
+
+_vulkan_drivers = get_option('vulkan-drivers')
+if _vulkan_drivers.contains('auto')
+  if system_has_kms_drm
+    if host_machine.cpu_family().startswith('x86')
+      _vulkan_drivers = ['amd', 'intel', 'intel_hasvk', 'swrast']
+    elif ['arm', 'aarch64'].contains(host_machine.cpu_family())
+      _vulkan_drivers = ['swrast', 'intel']
+    elif ['mips', 'mips64', 'riscv32', 'riscv64'].contains(host_machine.cpu_family())
+      _vulkan_drivers = ['amd', 'swrast']
+    elif ['loongarch64'].contains(host_machine.cpu_family())
+      _vulkan_drivers = ['amd', 'swrast']
+    else
+      error('Unknown architecture @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+            host_machine.cpu_family()))
+    endif
+  elif ['darwin', 'windows', 'cygwin', 'haiku'].contains(host_machine.system())
+    # No vulkan driver supports windows or macOS currently
+    _vulkan_drivers = []
+  else
+    error('Unknown OS @0@. Please pass -Dvulkan-drivers to set driver options. Patches gladly accepted to fix this.'.format(
+          host_machine.system()))
+  endif
+endif
+
+with_intel_vk = _vulkan_drivers.contains('intel')
+with_intel_hasvk = _vulkan_drivers.contains('intel_hasvk')
+with_amd_vk = _vulkan_drivers.contains('amd')
+with_freedreno_vk = _vulkan_drivers.contains('freedreno')
+with_panfrost_vk = _vulkan_drivers.contains('panfrost')
+with_swrast_vk = _vulkan_drivers.contains('swrast')
+with_virtio_vk = _vulkan_drivers.contains('virtio')
+with_broadcom_vk = _vulkan_drivers.contains('broadcom')
+with_imagination_vk = _vulkan_drivers.contains('imagination-experimental')
+with_imagination_srv = get_option('imagination-srv')
+with_microsoft_vk = _vulkan_drivers.contains('microsoft-experimental')
+with_any_vk = _vulkan_drivers.length() != 0
+
+with_any_broadcom = [
+  with_gallium_vc4,
+  with_gallium_v3d,
+  with_broadcom_vk,
+].contains(true)
+
+if ['x86_64'].contains(host_machine.cpu_family())
+  with_intel_clc = get_option('intel-clc') == 'enabled'
+  with_intel_vk_rt = with_intel_vk and get_option('intel-clc') != 'disabled'
+else
+  with_intel_clc = false
+  with_intel_vk_rt = false
+endif
+
+with_any_intel = [
+  with_gallium_crocus,
+  with_gallium_i915,
+  with_gallium_iris,
+  with_intel_clc,
+  with_intel_hasvk,
+  with_intel_tools,
+  with_intel_vk,
+].contains(true)
+
+if with_swrast_vk and not with_gallium_softpipe
+  error('swrast vulkan requires gallium swrast')
+endif
+if with_gallium_tegra and not with_gallium_nouveau
+  error('tegra driver requires nouveau driver')
+endif
+if with_aco_tests and not with_amd_vk
+  error('ACO tests require Radv')
+endif
+
+with_microsoft_clc = get_option('microsoft-clc').enabled()
+with_clc = with_microsoft_clc or with_intel_clc
+with_spirv_to_dxil = get_option('spirv-to-dxil')
+
+if host_machine.system() == 'darwin'
+  with_dri_platform = 'apple'
+  pre_args += '-DBUILDING_MESA'
+elif ['windows', 'cygwin'].contains(host_machine.system())
+  with_dri_platform = 'windows'
+elif system_has_kms_drm
+  with_dri_platform = 'drm'
+else
+  # FIXME: haiku doesn't use dri, and xlib doesn't use dri, probably should
+  # assert here that one of those cases has been met.
+  # FIXME: illumos ends up here as well
+  with_dri_platform = 'none'
+endif
+
+with_vulkan_beta = get_option('vulkan-beta')
+if host_machine.system() == 'darwin'
+  #macOS seems to need beta extensions to build for now:
+  with_vulkan_beta = true
+endif
+if with_vulkan_beta
+  pre_args += '-DVK_ENABLE_BETA_EXTENSIONS'
+endif
+
+_codecs = get_option('video-codecs')
+foreach c : ['vc1dec', 'h264dec', 'h264enc', 'h265dec', 'h265enc']
+   pre_args += '-DVIDEO_CODEC_@0@=@1@'.format(c.to_upper(), _codecs.contains(c).to_int())
+endforeach
+
+_platforms = get_option('platforms')
+if _platforms.contains('auto')
+  if system_has_kms_drm
+    _platforms = ['x11', 'wayland']
+  elif ['darwin', 'cygwin'].contains(host_machine.system())
+    _platforms = ['x11']
+  elif ['haiku'].contains(host_machine.system())
+    _platforms = ['haiku']
+  elif host_machine.system() == 'windows'
+    _platforms = ['windows']
+  else
+    error('Unknown OS @0@. Please pass -Dplatforms to set platforms. Patches gladly accepted to fix this.'.format(
+          host_machine.system()))
+  endif
+endif
+
+with_platform_android = _platforms.contains('android')
+with_platform_x11 = _platforms.contains('x11')
+with_platform_wayland = _platforms.contains('wayland')
+with_platform_haiku = _platforms.contains('haiku')
+with_platform_windows = _platforms.contains('windows')
+
+with_glx = get_option('glx')
+if with_glx == 'auto'
+  if not with_opengl
+    with_glx = 'disabled'
+  elif with_platform_android
+    with_glx = 'disabled'
+  elif with_dri
+    with_glx = 'dri'
+  elif with_platform_haiku
+    with_glx = 'disabled'
+  elif host_machine.system() == 'windows'
+    with_glx = 'disabled'
+  elif with_gallium
+    # Even when building just gallium drivers the user probably wants dri
+    with_glx = 'dri'
+  elif with_platform_x11 and with_any_opengl and not with_any_vk
+    # The automatic behavior should not be to turn on xlib based glx when
+    # building only vulkan drivers
+    with_glx = 'xlib'
+  else
+    with_glx = 'disabled'
+  endif
+endif
+if with_glx == 'dri'
+   if with_gallium
+      with_dri = true
+   endif
+endif
+
+if not with_opengl and with_glx != 'disabled'
+  error('Building GLX without OpenGL is not supported.') \
+endif
+
+if not (with_dri or with_gallium or with_glx != 'disabled')
+  with_gles1 = false
+  with_gles2 = false
+  with_opengl = false
+  with_any_opengl = false
+  with_shared_glapi = false
+endif
+
+with_gbm = get_option('gbm') \
+  .require(system_has_kms_drm, error_message : 'GBM only supports DRM/KMS platforms') \
+  .disable_auto_if(not with_dri) \
+  .allowed()
+
+with_xlib_lease = get_option('xlib-lease') \
+  .require(with_platform_x11 and system_has_kms_drm, error_message : 'xlib-lease requires X11 and KMS/DRM support') \
+  .allowed()
+
+with_egl = get_option('egl') \
+  .require(host_machine.system() != 'darwin', error_message : 'EGL not supported on MacOS') \
+  .require(with_platform_windows or with_platform_haiku or with_dri or with_platform_android, error_message : 'EGL requires DRI, Haiku, Windows or Android') \
+  .require(with_shared_glapi, error_message : 'EGL requires shared-glapi') \
+  .require(with_glx != 'xlib', error_message :'EGL requires DRI, but GLX is being built with xlib support') \
+  .disable_auto_if(with_platform_haiku) \
+  .allowed()
+
+if with_egl
+  _platforms += 'surfaceless'
+  if with_gbm and not with_platform_android
+    _platforms += 'drm'
+  endif
+
+  egl_native_platform = get_option('egl-native-platform')
+  if egl_native_platform.contains('auto')
+    egl_native_platform = _platforms[0]
+  endif
+endif
+
+if with_egl and not _platforms.contains(egl_native_platform)
+  error('-Degl-native-platform does not specify an enabled platform')
+endif
+
+if 'x11' in _platforms
+  _platforms += 'xcb'
+endif
+
+foreach platform : _platforms
+  pre_args += '-DHAVE_@0@_PLATFORM'.format(platform.to_upper())
+endforeach
+
+if with_platform_android and get_option('platform-sdk-version') >= 29
+  # By default the NDK compiler, at least, emits emutls references instead of
+  # ELF TLS, even when building targeting newer API levels.  Make it actually do
+  # ELF TLS instead.
+  c_cpp_args += '-fno-emulated-tls'
+endif
+
+# -mtls-dialect=gnu2 speeds up non-initial-exec TLS significantly but requires
+# full toolchain (including libc) support.
+have_mtls_dialect = false
+foreach c_arg : get_option('c_args')
+  if c_arg.startswith('-mtls-dialect=')
+    have_mtls_dialect = true
+    break
+  endif
+endforeach
+if not have_mtls_dialect
+  # need .run to check libc support. meson aborts when calling .run when
+  # cross-compiling, but because this is just an optimization we can skip it
+  if meson.is_cross_build() and not meson.can_run_host_binaries()
+    warning('cannot auto-detect -mtls-dialect when cross-compiling, using compiler default')
+  else
+    # -fpic to force dynamic tls, otherwise TLS relaxation defeats check
+    gnu2_test = cc.run('int __thread x; int main() { return x; }',
+                       args: ['-mtls-dialect=gnu2', '-fpic'],
+                       name: '-mtls-dialect=gnu2')
+    if gnu2_test.returncode() == 0 and (
+          # check for lld 13 bug: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5665
+          host_machine.cpu_family() != 'x86_64' or
+          # get_linker_id misses LDFLAGS=-fuse-ld=lld: https://github.com/mesonbuild/meson/issues/6377
+          #cc.get_linker_id() != 'ld.lld' or
+          cc.links('''int __thread x; int y; int main() { __asm__(
+                "leaq x@TLSDESC(%rip), %rax\n"
+                "movq y@GOTPCREL(%rip), %rdx\n"
+                "call *x@TLSCALL(%rax)\n"); }''', name: 'split TLSDESC')
+          )
+      c_cpp_args += '-mtls-dialect=gnu2'
+    endif
+  endif
+endif
+
+if with_glx != 'disabled'
+  if not (with_platform_x11 and with_any_opengl)
+    error('Cannot build GLX support without X11 platform support and at least one OpenGL API')
+  elif with_glx == 'xlib'
+    if not with_gallium
+      error('xlib based GLX requires at least one gallium driver')
+    elif not with_gallium_softpipe
+      error('xlib based GLX requires softpipe or llvmpipe.')
+    elif with_dri
+      error('xlib conflicts with any dri driver')
+    endif
+  elif with_glx == 'dri'
+    if not with_shared_glapi
+      error('dri based GLX requires shared-glapi')
+    endif
+  endif
+endif
+
+with_glvnd = get_option('glvnd')
+glvnd_vendor_name = get_option('glvnd-vendor-name')
+if with_glvnd
+  if with_platform_windows
+    error('glvnd cannot be used on Windows')
+  elif with_glx == 'xlib'
+    error('Cannot build glvnd support for GLX that is not DRI based.')
+  elif with_glx == 'disabled' and not with_egl
+    error('glvnd requires DRI based GLX and/or EGL')
+  endif
+  if get_option('egl-lib-suffix') != ''
+    error('''EGL lib suffix can't be used with libglvnd''')
+  endif
+endif
+
+if with_vulkan_icd_dir == ''
+  with_vulkan_icd_dir = join_paths(get_option('datadir'), 'vulkan/icd.d')
+endif
+
+# GNU/Hurd includes egl_dri2, without drm.
+with_dri2 = (with_dri or with_any_vk) and (with_dri_platform == 'drm' or
+  host_machine.system() == 'gnu')
+with_dri3 = get_option('dri3').disable_auto_if(not (system_has_kms_drm and with_dri2)).allowed()
+
+if with_any_vk and (with_platform_x11 and not with_dri3)
+  error('Vulkan drivers require dri3 for X11 support')
+endif
+if with_dri
+  if with_glx == 'disabled' and not with_egl and not with_gbm
+    error('building dri drivers require at least one windowing system')
+  endif
+endif
+
+if with_gallium_kmsro and (with_platform_x11 and not with_dri3)
+  error('kmsro requires dri3 for X11 support')
+endif
+
+dep_dxheaders = null_dep
+if with_gallium_d3d12 or with_microsoft_clc or with_microsoft_vk
+  dep_dxheaders = dependency('directx-headers', required : false)
+  if not dep_dxheaders.found()
+    dep_dxheaders = dependency('DirectX-Headers',
+      version : '>= 1.610.0',
+      fallback : ['DirectX-Headers', 'dep_dxheaders'],
+      required : with_gallium_d3d12 or with_microsoft_vk
+    )
+  endif
+endif
+
+_with_gallium_d3d12_video = get_option('gallium-d3d12-video')
+with_gallium_d3d12_video = false
+if with_gallium_d3d12 and not _with_gallium_d3d12_video.disabled()
+  with_gallium_d3d12_video = true
+  pre_args += '-DHAVE_GALLIUM_D3D12_VIDEO'
+endif
+
+_vdpau_drivers = [
+  with_gallium_d3d12_video,
+  with_gallium_nouveau,
+  with_gallium_r600,
+  with_gallium_radeonsi,
+  with_gallium_virgl,
+]
+
+vdpau = get_option('gallium-vdpau') \
+  .require(system_has_kms_drm, error_message : 'VDPAU state tracker can only be build on unix-like OSes.') \
+  .require(with_platform_x11, error_message : 'VDPAU state tracker requires X11 support.') \
+  .require(_vdpau_drivers.contains(true), error_message : 'VDPAU state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video, virgl).') 
+
+dep_vdpau = dependency('vdpau', version : '>= 1.1', required : vdpau)
+if dep_vdpau.found()
+  dep_vdpau = dep_vdpau.partial_dependency(compile_args : true)
+  pre_args += '-DHAVE_ST_VDPAU'
+endif
+with_gallium_vdpau = dep_vdpau.found()
+
+vdpau_drivers_path = get_option('vdpau-libs-path')
+if vdpau_drivers_path == ''
+  vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau')
+endif
+
+if with_vulkan_overlay_layer or with_aco_tests or with_amd_vk or with_intel_vk
+  prog_glslang = find_program('glslangValidator', native : true)
+  if run_command(prog_glslang, [ '--quiet', '--version' ], check : false).returncode() == 0
+    glslang_quiet = ['--quiet']
+  else
+    glslang_quiet = []
+  endif
+endif
+
+dep_xv = null_dep
+_omx = get_option('gallium-omx')
+if not system_has_kms_drm
+  if ['auto', 'disabled'].contains(_omx)
+    _omx = 'disabled'
+  else
+    error('OMX state tracker can only be built on unix-like OSes.')
+  endif
+elif not (with_gallium_r600 or with_gallium_radeonsi or with_gallium_nouveau)
+  if ['auto', 'disabled'].contains(_omx)
+    _omx = 'disabled'
+  else
+    error('OMX state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau.')
+  endif
+endif
+with_gallium_omx = _omx
+dep_omx = null_dep
+dep_omx_other = []
+if ['auto', 'bellagio'].contains(_omx)
+  dep_omx = dependency(
+    'libomxil-bellagio', required : _omx == 'bellagio'
+  )
+  if dep_omx.found()
+    with_gallium_omx = 'bellagio'
+  endif
+endif
+if ['auto', 'tizonia'].contains(_omx)
+  if with_dri and with_egl
+    dep_omx = dependency(
+      'libtizonia', version : '>= 0.10.0',
+      required : _omx == 'tizonia',
+    )
+    dep_omx_other = [
+      dependency('libtizplatform', required : _omx == 'tizonia'),
+      dependency('tizilheaders', required : _omx == 'tizonia'),
+    ]
+    if dep_omx.found() and dep_omx_other[0].found() and dep_omx_other[1].found()
+      with_gallium_omx = 'tizonia'
+    endif
+  elif _omx == 'tizonia'
+    error('OMX-Tizonia state tracker requires dri and egl')
+  endif
+endif
+if _omx == 'auto'
+  with_gallium_omx = 'disabled'
+else
+  with_gallium_omx = _omx
+endif
+
+pre_args += [
+  '-DENABLE_ST_OMX_BELLAGIO=' + (with_gallium_omx == 'bellagio' ? '1' : '0'),
+  '-DENABLE_ST_OMX_TIZONIA=' + (with_gallium_omx == 'tizonia' ? '1' : '0'),
+]
+
+
+omx_drivers_path = get_option('omx-libs-path')
+
+if with_gallium_omx != 'disabled'
+  # Figure out where to put the omx driver.
+  # FIXME: this could all be vastly simplified by adding a 'defined_variable'
+  # argument to meson's get_variable method.
+  if omx_drivers_path == ''
+    _omx_libdir = dep_omx.get_variable(pkgconfig : 'libdir')
+    _omx_drivers_dir = dep_omx.get_variable(pkgconfig : 'pluginsdir')
+    if _omx_libdir == get_option('libdir')
+      omx_drivers_path = _omx_drivers_dir
+    else
+      _omx_base_dir = []
+      # This will fail on windows. Does OMX run on windows?
+      _omx_libdir = _omx_libdir.split('/')
+      _omx_drivers_dir = _omx_drivers_dir.split('/')
+      foreach o : _omx_drivers_dir
+        if not _omx_libdir.contains(o)
+          _omx_base_dir += o
+        endif
+      endforeach
+      omx_drivers_path = join_paths(get_option('libdir'), _omx_base_dir)
+    endif
+  endif
+endif
+
+_va_drivers = [
+  with_gallium_d3d12_video,
+  with_gallium_nouveau,
+  with_gallium_r600,
+  with_gallium_radeonsi,
+  with_gallium_virgl,
+]
+
+_va = get_option('gallium-va') \
+  .require(_va_drivers.contains(true),
+           error_message : 'VA state tracker requires at least one of the following gallium drivers: r600, radeonsi, nouveau, d3d12 (with option gallium-d3d12-video), virgl.')
+_dep_va_name = host_machine.system() == 'windows' ? 'libva-win32' : 'libva'
+dep_va = dependency(_dep_va_name, version : '>= 1.8.0', required : _va)
+if dep_va.found()
+  dep_va_headers = dep_va.partial_dependency(compile_args : true)
+  if cc.has_header_symbol('va/va.h', 'VASurfaceAttribDRMFormatModifiers',
+                          dependencies: dep_va_headers)
+    pre_args += '-DHAVE_VA_SURFACE_ATTRIB_DRM_FORMAT_MODIFIERS'
+  endif
+endif
+with_gallium_va = dep_va.found()
+
+va_drivers_path = get_option('va-libs-path')
+if va_drivers_path == ''
+  va_drivers_path = join_paths(get_option('libdir'), 'dri')
+endif
+
+with_gallium_xa = get_option('gallium-xa') \
+  .require(system_has_kms_drm, error_message : 'XA state tracker can only be built on unix-like OSes.') \
+  .require(with_gallium_nouveau or with_gallium_freedreno or with_gallium_i915 or with_gallium_svga,
+           error_message : 'XA state tracker requires at least one of the following gallium drivers: nouveau, freedreno, i915, svga.') \
+  .allowed()
+
+d3d_drivers_path = get_option('d3d-drivers-path')
+if d3d_drivers_path == ''
+  d3d_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'd3d')
+endif
+
+with_gallium_st_nine =  get_option('gallium-nine')
+if with_gallium_st_nine
+  if not with_gallium_softpipe
+    error('The nine state tracker requires gallium softpipe/llvmpipe.')
+  elif not [
+             with_gallium_crocus,
+             with_gallium_freedreno,
+             with_gallium_i915,
+             with_gallium_iris,
+             with_gallium_nouveau,
+             with_gallium_panfrost,
+             with_gallium_r300,
+             with_gallium_r600,
+             with_gallium_radeonsi,
+             with_gallium_svga,
+             with_gallium_zink,
+           ].contains(true)
+    error('The nine state tracker requires at least one non-swrast gallium driver.')
+  endif
+  if not with_dri3
+    error('Using nine with wine requires dri3')
+  endif
+endif
+with_gallium_st_d3d10umd =  get_option('gallium-d3d10umd')
+if with_gallium_st_d3d10umd
+  if not with_gallium_softpipe
+    error('The d3d10umd state tracker requires gallium softpipe/llvmpipe.')
+  endif
+endif
+_power8 = get_option('power8')
+if _power8.allowed()
+  if host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
+    if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.8')
+      error('Altivec is not supported with gcc version < 4.8.')
+    endif
+    if cc.compiles('''
+        #include <altivec.h>
+        int main() {
+          vector unsigned char r;
+          vector unsigned int v = vec_splat_u32 (1);
+          r = __builtin_vec_vgbbd ((vector unsigned char) v);
+          return 0;
+        }''',
+        args : '-mpower8-vector',
+        name : 'POWER8 intrinsics')
+      pre_args += ['-D_ARCH_PWR8']
+      c_cpp_args += '-mpower8-vector'
+    elif _power8.enabled()
+      error('POWER8 intrinsic support required but not found.')
+    endif
+  endif
+endif
+
+if get_option('vmware-mks-stats')
+  if not with_gallium_svga
+    error('vmware-mks-stats requires gallium VMware/svga driver.')
+  endif
+  pre_args += '-DVMX86_STATS=1'
+endif
+
+_opencl = get_option('gallium-opencl')
+_rtti = get_option('cpp_rtti')
+if _opencl != 'disabled'
+  if not with_gallium
+    error('OpenCL Clover implementation requires at least one gallium driver.')
+  endif
+  if not _rtti
+    error('The Clover OpenCL state tracker requires rtti')
+  endif
+
+  with_clc = true
+  with_gallium_opencl = true
+  with_opencl_icd = _opencl == 'icd'
+else
+  with_gallium_opencl = false
+  with_opencl_icd = false
+endif
+
+with_gallium_rusticl = get_option('gallium-rusticl')
+if with_gallium_rusticl
+  if not with_gallium
+    error('rusticl requires at least one gallium driver.')
+  endif
+
+  if meson.version().version_compare('< 1.0.0')
+    error('rusticl requires meson 1.0.0 or newer')
+  endif
+
+  add_languages('rust', required: true)
+
+  with_clc = true
+endif
+
+dep_clc = null_dep
+if with_clc
+  dep_clc = dependency('libclc')
+endif
+
+gl_pkgconfig_c_flags = []
+with_glx_indirect_rendering = false
+if with_platform_x11
+  if with_glx == 'xlib'
+    pre_args += '-DUSE_XSHM'
+  else
+    with_glx_indirect_rendering = true
+    pre_args += '-DGLX_INDIRECT_RENDERING'
+    if with_glx_direct
+      pre_args += '-DGLX_DIRECT_RENDERING'
+    endif
+    if with_dri_platform == 'drm'
+      pre_args += '-DGLX_USE_DRM'
+    elif with_dri_platform == 'apple'
+      pre_args += '-DGLX_USE_APPLEGL'
+    elif with_dri_platform == 'windows'
+      pre_args += '-DGLX_USE_WINDOWSGL'
+    endif
+  endif
+endif
+
+with_glapi_export_proto_entry_points = false
+if with_shared_glapi and not with_glx_indirect_rendering
+  # Imply !defined(GLX_INDIRECT_RENDERING)
+  with_glapi_export_proto_entry_points = true
+endif
+pre_args += '-DGLAPI_EXPORT_PROTO_ENTRY_POINTS=@0@'.format(with_glapi_export_proto_entry_points ? '1' : '0')
+
+with_android_stub = get_option('android-stub')
+if with_android_stub and not with_platform_android
+  error('`-D android-stub=true` makes no sense without `-D platforms=android`')
+endif
+
+with_libbacktrace = get_option('android-libbacktrace') \
+  .require(with_platform_android, error_message : '`-D android-libbacktrace=enabled` makes no sense without `-D platforms=android`') \
+  .disable_auto_if(not with_platform_android) \
+  .allowed()
+
+if with_libbacktrace
+  cpp_args += '-DWITH_LIBBACKTRACE'
+endif
+
+if with_platform_android
+  dep_android_mapper4 = null_dep
+  if not with_android_stub
+    dep_android = [
+      dependency('cutils'),
+      dependency('hardware'),
+      dependency('sync'),
+    ]
+    if with_libbacktrace
+      dep_android += dependency('backtrace')
+    endif
+    if get_option('platform-sdk-version') >= 26
+      dep_android += dependency('nativewindow')
+    endif
+    if get_option('platform-sdk-version') >= 30
+      dep_android_mapper4 = dependency('android.hardware.graphics.mapper', version : '>= 4.0', required : false)
+    endif
+  endif
+  pre_args += [
+    '-DANDROID',
+    '-DANDROID_API_LEVEL=' + get_option('platform-sdk-version').to_string()
+  ]
+endif
+
+# On Android, seccomp kills the process on kernels without
+# CONFIG_KCMP/CONFIG_CHECKPOINT_RESTORE if it attemps to use KCMP.
+# Since we can't detect that, err on the side of caution and disable
+# KCMP by default on Android.
+if get_option('allow-kcmp') \
+    .disable_auto_if(with_platform_android) \
+    .allowed()
+  pre_args += '-DALLOW_KCMP'
+endif
+
+prog_python = import('python').find_installation('python3')
+has_mako = run_command(
+  prog_python, '-c',
+  '''
+from distutils.version import StrictVersion
+import mako
+assert StrictVersion(mako.__version__) >= StrictVersion("0.8.0")
+  ''', check: false)
+if has_mako.returncode() != 0
+  error('Python (3.x) mako module >= 0.8.0 required to build mesa.')
+endif
+
+if cc.get_id() == 'gcc' and cc.version().version_compare('< 4.4.6')
+  error('When using GCC, version 4.4.6 or later is required.')
+endif
+
+# Support systems without ETIME (e.g. FreeBSD)
+if cc.get_define('ETIME', prefix : '#include <errno.h>') == ''
+  pre_args += '-DETIME=ETIMEDOUT'
+endif
+
+# Define DEBUG for debug builds only (debugoptimized is not included on this one)
+if get_option('buildtype') == 'debug'
+  pre_args += '-DDEBUG'
+endif
+
+with_shader_cache = get_option('shader-cache') \
+  .require(host_machine.system() != 'windows', error_message : 'Shader Cache does not currently work on Windows') \
+  .allowed() 
+
+if with_shader_cache
+  pre_args += '-DENABLE_SHADER_CACHE'
+  if not get_option('shader-cache-default')
+    pre_args += '-DSHADER_CACHE_DISABLE_BY_DEFAULT'
+  endif
+
+  shader_cache_max_size = get_option('shader-cache-max-size')
+  if shader_cache_max_size != ''
+    pre_args += '-DMESA_SHADER_CACHE_MAX_SIZE="@0@"'.format(shader_cache_max_size)
+  endif
+endif
+
+# Check for GCC style builtins
+foreach b : ['bswap32', 'bswap64', 'clz', 'clzll', 'ctz', 'expect', 'ffs',
+             'ffsll', 'popcount', 'popcountll', 'unreachable', 'types_compatible_p']
+  if cc.has_function(b)
+    pre_args += '-DHAVE___BUILTIN_@0@'.format(b.to_upper())
+  endif
+endforeach
+
+# check for GCC __attribute__
+_attributes = [
+  'const', 'flatten', 'malloc', 'pure', 'unused', 'warn_unused_result',
+  'weak', 'format', 'packed', 'returns_nonnull', 'alias', 'noreturn',
+]
+foreach a : cc.get_supported_function_attributes(_attributes)
+  pre_args += '-DHAVE_FUNC_ATTRIBUTE_@0@'.format(a.to_upper())
+endforeach
+if cc.has_function_attribute('visibility:hidden')
+  pre_args += '-DHAVE_FUNC_ATTRIBUTE_VISIBILITY'
+endif
+if cc.compiles('__uint128_t foo(void) { return 0; }',
+               name : '__uint128_t')
+  pre_args += '-DHAVE_UINT128'
+endif
+
+if cc.has_function('reallocarray')
+   pre_args += '-DHAVE_REALLOCARRAY'
+endif
+if cc.has_function('fmemopen')
+   pre_args += '-DHAVE_FMEMOPEN'
+endif
+
+# TODO: this is very incomplete
+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd', 'haiku', 'android'].contains(host_machine.system())
+  pre_args += '-D_GNU_SOURCE'
+elif host_machine.system() == 'sunos'
+  pre_args += '-D__EXTENSIONS__'
+elif host_machine.system() == 'windows'
+  pre_args += [
+    '-D_WINDOWS', '-D_WIN32_WINNT=0x0A00', '-DWINVER=0x0A00',
+    '-DPIPE_SUBSYSTEM_WINDOWS_USER',
+    '-D_USE_MATH_DEFINES',  # XXX: scons didn't use this for mingw
+  ]
+  if cc.get_argument_syntax() == 'msvc'
+    pre_args += [
+      '-DVC_EXTRALEAN',
+      '-D_CRT_SECURE_NO_WARNINGS',
+      '-D_CRT_SECURE_NO_DEPRECATE',
+      '-D_SCL_SECURE_NO_WARNINGS',
+      '-D_SCL_SECURE_NO_DEPRECATE',
+      '-D_ALLOW_KEYWORD_MACROS',
+      '-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
+      '-DNOMINMAX',
+    ]
+  else
+    # When the target is not mingw/ucrt
+    # NOTE: clang's stddef.h are conflict with mingw/ucrt's stddef.h
+    # So do not include headers that defined in clang for detecting
+    # _UCRT
+    if cc.compiles('''
+      #include <string.h>
+      #if defined(__MINGW32__) && defined(_UCRT)
+      #error
+      #endif
+      int main(void) { return 0; }''')
+      pre_args += ['-D__MSVCRT_VERSION__=0x0700']
+    endif
+  endif
+elif host_machine.system() == 'openbsd'
+  pre_args += '-D_ISOC11_SOURCE'
+endif
+
+# Check for generic C arguments
+c_msvc_compat_args = []
+no_override_init_args = []
+cpp_msvc_compat_args = []
+ld_args_gc_sections = []
+if cc.get_argument_syntax() == 'msvc'
+  _trial = [
+    '/wd4018',  # signed/unsigned mismatch
+    '/wd4056',  # overflow in floating-point constant arithmetic
+    '/wd4244',  # conversion from 'type1' to 'type2', possible loss of data
+    '/wd4267',  # 'var' : conversion from 'size_t' to 'type', possible loss of data
+    '/wd4305',  # truncation from 'type1' to 'type2'
+    '/wd4351',  # new behavior: elements of array 'array' will be default initialized
+    '/wd4756',  # overflow in constant arithmetic
+    '/wd4800',  # forcing value to bool 'true' or 'false' (performance warning)
+    '/wd4996',  # disabled deprecated POSIX name warnings
+    '/wd4291',  # no matching operator delete found
+    '/wd4146',  # unary minus operator applied to unsigned type, result still unsigned
+    '/wd4200',  # nonstandard extension used: zero-sized array in struct/union
+    '/wd4624',  # destructor was implicitly defined as deleted [from LLVM]
+    '/wd4309',  # 'initializing': truncation of constant value
+    '/wd4838',  # conversion from 'int' to 'const char' requires a narrowing conversion
+    '/wd5105',  # macro expansion producing 'defined' has undefined behavior (winbase.h, need Windows SDK upgrade)
+    '/we4020',  # Error when passing the wrong number of parameters
+    '/we4024',  # Error when passing different type of parameter
+    '/we4189',  # 'identifier' : local variable is initialized but not referenced
+    '/Zc:__cplusplus', #Set __cplusplus macro to match the /std:c++<version> on the command line
+  ]
+  c_args += cc.get_supported_arguments(_trial)
+  cpp_args += cpp.get_supported_arguments(_trial)
+else
+  _trial_c = [
+    '-Werror=implicit-function-declaration',
+    '-Werror=missing-prototypes',
+    '-Werror=return-type',
+    '-Werror=empty-body',
+    '-Werror=incompatible-pointer-types',
+    '-Werror=int-conversion',
+    '-Wimplicit-fallthrough',
+    '-Wmisleading-indentation',
+    '-Wno-missing-field-initializers',
+    '-Wno-format-truncation',
+    '-Wno-nonnull-compare',
+    '-fno-math-errno',
+    '-fno-trapping-math',
+    '-Qunused-arguments',
+    '-fno-common',
+    # Clang
+    '-Wno-microsoft-enum-value',
+    '-Wno-unused-function',
+  ]
+  _trial_cpp = [
+    '-Werror=return-type',
+    '-Werror=empty-body',
+    '-Wmisleading-indentation',
+    '-Wno-non-virtual-dtor',
+    '-Wno-missing-field-initializers',
+    '-Wno-format-truncation',
+    '-fno-math-errno',
+    '-fno-trapping-math',
+    '-Qunused-arguments',
+    # Some classes use custom new operator which zeroes memory, however
+    # gcc does aggressive dead-store elimination which threats all writes
+    # to the memory before the constructor as "dead stores".
+    # For now we disable this optimization.
+    '-flifetime-dse=1',
+    # Clang
+    '-Wno-microsoft-enum-value',
+  ]
+
+  # MinGW chokes on format specifiers and I can't get it all working
+  if not (cc.get_argument_syntax() == 'gcc' and host_machine.system() == 'windows')
+    _trial_c += ['-Werror=format', '-Wformat-security']
+    _trial_cpp += ['-Werror=format', '-Wformat-security']
+  endif
+
+  # FreeBSD annotated <pthread.h> but Mesa isn't ready
+  if not (cc.get_id() == 'clang' and host_machine.system() == 'freebsd')
+    _trial_c += ['-Werror=thread-safety']
+  endif
+
+  # If the compiler supports it, put function and data symbols in their
+  # own sections and GC the sections after linking.  This lets drivers
+  # drop shared code unused by that specific driver (particularly
+  # relevant for Vulkan drivers).
+  if cc.links('static char unused() { return 5; } int main() { return 0; }',
+              args : '-Wl,--gc-sections', name : 'gc-sections')
+    ld_args_gc_sections += '-Wl,--gc-sections'
+    _trial_c += ['-ffunction-sections', '-fdata-sections']
+    _trial_cpp += ['-ffunction-sections', '-fdata-sections']
+  endif
+
+  # Variables that are only used for assertions are considered unused when assertions
+  # are disabled. Don't treat this as an error, since we build with -Werror even if
+  # assertions are disabled.
+  if get_option('b_ndebug') == 'true' or (get_option('buildtype') == 'release' and get_option('b_ndebug') == 'if-release')
+    _trial_c += ['-Wno-unused-variable', '-Wno-unused-but-set-variable', '/wd4189']
+    _trial_cpp += ['-Wno-unused-variable', '-Wno-unused-but-set-variable', '/wd4189']
+  endif
+
+  c_args += cc.get_supported_arguments(_trial_c)
+  cpp_args += cpp.get_supported_arguments(_trial_cpp)
+
+  no_override_init_args += cc.get_supported_arguments(
+    ['-Wno-override-init', '-Wno-initializer-overrides']
+  )
+
+  # Check for C and C++ arguments for MSVC compatibility. These are only used
+  # in parts of the mesa code base that need to compile with MSVC, mainly
+  # common code
+  _trial_msvc = ['-Werror=pointer-arith', '-Werror=vla', '-Werror=gnu-empty-initializer']
+  c_msvc_compat_args += cc.get_supported_arguments(_trial_msvc)
+  cpp_msvc_compat_args += cpp.get_supported_arguments(_trial_msvc)
+endif
+
+# set linker arguments
+if host_machine.system() == 'windows'
+  if cc.get_argument_syntax() == 'msvc'
+    add_project_link_arguments(
+      '/fixed:no',
+      '/dynamicbase',
+      '/nxcompat',
+      language : ['c', 'cpp'],
+    )
+    if get_option('buildtype') != 'debug'
+      add_project_link_arguments(
+        '/incremental:no',
+        language : ['c', 'cpp'],
+      )
+    endif
+  else
+    add_project_link_arguments(
+      cc.get_supported_link_arguments(
+        '-Wl,--nxcompat',
+        '-Wl,--dynamicbase',
+        '-static-libgcc',
+        '-static-libstdc++',
+      ),
+      language : ['c'],
+    )
+    add_project_link_arguments(
+      cpp.get_supported_link_arguments(
+        '-Wl,--nxcompat',
+        '-Wl,--dynamicbase',
+        '-static-libgcc',
+        '-static-libstdc++',
+      ),
+      language : ['cpp'],
+    )
+  endif
+endif
+
+sse2_arg = []
+sse2_args = []
+sse41_args = []
+with_sse41 = false
+if host_machine.cpu_family().startswith('x86')
+  pre_args += '-DUSE_SSE41'
+  with_sse41 = true
+
+  if cc.get_id() != 'msvc'
+    sse41_args = ['-msse4.1']
+
+    if host_machine.cpu_family() == 'x86'
+      # x86_64 have sse2 by default, so sse2 args only for x86
+      sse2_arg = ['-msse2', '-mfpmath=sse']
+      sse2_args = [sse2_arg, '-mstackrealign']
+      if get_option('sse2')
+        # These settings make generated GCC code match MSVC and follow
+        # GCC advice on https://gcc.gnu.org/wiki/FloatingPointMath#x86note
+        #
+        # NOTE: We need to ensure stack is realigned given that we
+        # produce shared objects, and have no control over the stack
+        # alignment policy of the application. Therefore we need
+        # -mstackrealign or -mincoming-stack-boundary=2.
+        #
+        # XXX: We could have SSE without -mstackrealign if we always used
+        # __attribute__((force_align_arg_pointer)), but that's not
+        # always the case.
+        c_cpp_args += sse2_args
+        # sse2_args are adopted into c_cpp_args to avoid duplicated sse2 command line args
+        sse2_arg = []
+        sse2_args = []
+      else
+        # GCC on x86 (not x86_64) with -msse* assumes a 16 byte aligned stack, but
+        # that's not guaranteed
+        sse41_args += '-mstackrealign'
+      endif
+    endif
+  endif
+endif
+
+# Check for GCC style atomics
+dep_atomic = null_dep
+
+if cc.compiles('''#include <stdint.h>
+                  int main() {
+                    struct {
+                      uint64_t *v;
+                    } x;
+                    return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
+                           (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
+
+                  }''',
+               name : 'GCC atomic builtins')
+  pre_args += '-DUSE_GCC_ATOMIC_BUILTINS'
+
+  # Not all atomic calls can be turned into lock-free instructions, in which
+  # GCC will make calls into the libatomic library. Check whether we need to
+  # link with -latomic.
+  #
+  # This can happen for 64-bit atomic operations on 32-bit architectures such
+  # as ARM.
+  if not cc.links('''#include <stdint.h>
+                     int main() {
+                       struct {
+                         uint64_t *v;
+                       } x;
+                       return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) &
+                              (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL);
+                     }''',
+                  name : 'GCC atomic builtins required -latomic')
+    dep_atomic = cc.find_library('atomic')
+  endif
+endif
+if not cc.links('''#include <stdint.h>
+                   uint64_t v;
+                   int main() {
+                     return __sync_add_and_fetch(&v, (uint64_t)1);
+                   }''',
+                dependencies : dep_atomic,
+                name : 'GCC 64bit atomics')
+  pre_args += '-DMISSING_64BIT_ATOMICS'
+endif
+
+dep_ws2_32 = cc.find_library('ws2_32', required : with_platform_windows)
+
+# TODO: shared/static? Is this even worth doing?
+
+with_asm_arch = ''
+if host_machine.cpu_family() == 'x86'
+  if system_has_kms_drm or host_machine.system() == 'gnu'
+    with_asm_arch = 'x86'
+    pre_args += ['-DUSE_X86_ASM']
+
+    if with_glx_read_only_text
+      pre_args += ['-DGLX_X86_READONLY_TEXT']
+    endif
+  endif
+elif host_machine.cpu_family() == 'x86_64'
+  if system_has_kms_drm
+    with_asm_arch = 'x86_64'
+    pre_args += ['-DUSE_X86_64_ASM']
+  endif
+elif host_machine.cpu_family() == 'arm'
+  if system_has_kms_drm
+    with_asm_arch = 'arm'
+    pre_args += ['-DUSE_ARM_ASM']
+  endif
+elif host_machine.cpu_family() == 'aarch64'
+  if system_has_kms_drm
+    with_asm_arch = 'aarch64'
+    pre_args += ['-DUSE_AARCH64_ASM']
+  endif
+elif host_machine.cpu_family() == 'sparc64'
+  if system_has_kms_drm
+    with_asm_arch = 'sparc'
+    pre_args += ['-DUSE_SPARC_ASM']
+  endif
+elif host_machine.cpu_family() == 'ppc64' and host_machine.endian() == 'little'
+  if system_has_kms_drm
+    with_asm_arch = 'ppc64le'
+    pre_args += ['-DUSE_PPC64LE_ASM']
+  endif
+elif host_machine.cpu_family() == 'mips64' and host_machine.endian() == 'little'
+  if system_has_kms_drm
+    with_asm_arch = 'mips64el'
+    pre_args += ['-DUSE_MIPS64EL_ASM']
+  endif
+elif host_machine.cpu_family() == 'loongarch64'
+  if system_has_kms_drm
+    with_asm_arch = 'loongarch64'
+    pre_args += ['-DUSE_LOONGARCH64_ASM']
+  endif
+endif
+
+# Check for standard headers and functions
+if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
+  cc.has_header_symbol('sys/sysmacros.h', 'minor') and
+  cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
+  pre_args += '-DMAJOR_IN_SYSMACROS'
+endif
+if (cc.has_header_symbol('sys/mkdev.h', 'major') and
+  cc.has_header_symbol('sys/mkdev.h', 'minor') and
+  cc.has_header_symbol('sys/mkdev.h', 'makedev'))
+  pre_args += '-DMAJOR_IN_MKDEV'
+endif
+
+if cc.check_header('sched.h')
+  pre_args += '-DHAS_SCHED_H'
+  if cc.has_function('sched_getaffinity')
+    pre_args += '-DHAS_SCHED_GETAFFINITY'
+  endif
+endif
+
+if not ['linux'].contains(host_machine.system())
+  # Deprecated on Linux and requires <sys/types.h> on FreeBSD and OpenBSD
+  if cc.check_header('sys/sysctl.h', prefix : '#include <sys/types.h>')
+    pre_args += '-DHAVE_SYS_SYSCTL_H'
+  endif
+endif
+
+foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h', 'sys/shm.h',
+             'cet.h', 'pthread_np.h', 'renderdoc_app.h', 'sys/inotify.h']
+  if cc.check_header(h)
+    pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify())
+  endif
+endforeach
+
+functions_to_detect = {
+  'strtof': '',
+  'mkostemp': '',
+  'memfd_create': '',
+  'random_r': '',
+  'flock': '',
+  'strtok_r': '',
+  'getrandom': '',
+  'qsort_s': '',
+  'posix_fallocate': '',
+}
+
+foreach f, prefix: functions_to_detect
+  if cc.has_function(f, prefix: prefix)
+    pre_args += '-DHAVE_@0@'.format(f.to_upper())
+  endif
+endforeach
+
+if cpp.links('''
+    #define _GNU_SOURCE
+    #include <stdlib.h>
+
+    static int dcomp(const void *l, const void *r, void *t) { return 0; }
+
+    int main(int ac, char **av) {
+      int arr[] = { 1 };
+      void *t = NULL;
+      qsort_r((void*)&arr[0], 1, 1, dcomp, t);
+      return (0);
+    }''',
+    args : pre_args,
+    name : 'GNU qsort_r')
+  pre_args += '-DHAVE_GNU_QSORT_R'
+elif cpp.links('''
+    #include <stdlib.h>
+
+    static int dcomp(void *t, const void *l, const void *r) { return 0; }
+
+    int main(int ac, char **av) {
+      int arr[] = { 1 };
+      void *t = NULL;
+      qsort_r((void*)&arr[0], 1, 1, t, dcomp);
+      return (0);
+    }''',
+    args : pre_args,
+    name : 'BSD qsort_r')
+  pre_args += '-DHAVE_BSD_QSORT_R'
+endif
+
+if cc.has_header_symbol('time.h', 'struct timespec')
+   pre_args += '-DHAVE_STRUCT_TIMESPEC'
+endif
+
+with_c11_threads = false
+if cc.has_function('thrd_create', prefix: '#include <threads.h>')
+  if with_platform_android
+    # Current only Android's c11 <threads.h> are verified
+    pre_args += '-DHAVE_THRD_CREATE'
+    with_c11_threads = true
+  endif
+endif
+
+if cc.has_header_symbol('errno.h', 'program_invocation_name',
+                        args : '-D_GNU_SOURCE')
+   pre_args += '-DHAVE_PROGRAM_INVOCATION_NAME'
+elif with_tools.contains('intel')
+  error('Intel tools require the program_invocation_name variable')
+endif
+
+if cc.has_header_symbol('math.h', 'issignaling',
+                        args : '-D_GNU_SOURCE')
+   pre_args += '-DHAVE_ISSIGNALING'
+endif
+
+# MinGW provides a __builtin_posix_memalign function, but not a posix_memalign.
+# This means that this check will succeed, but then compilation will later
+# fail. MSVC doesn't have this function at all, so only check for it on
+# non-windows platforms.
+if host_machine.system() != 'windows'
+  if cc.has_function('posix_memalign')
+    pre_args += '-DHAVE_POSIX_MEMALIGN'
+  endif
+endif
+
+if cc.has_member('struct dirent', 'd_type', prefix: '''#include <sys/types.h>
+   #include <dirent.h>''')
+   pre_args += '-DHAVE_DIRENT_D_TYPE'
+endif
+
+# strtod locale support
+if cc.links('''
+    #define _GNU_SOURCE
+    #include <stdlib.h>
+    #include <locale.h>
+    #ifdef HAVE_XLOCALE_H
+    #include <xlocale.h>
+    #endif
+    int main() {
+      locale_t loc = newlocale(LC_CTYPE_MASK, "C", NULL);
+      const char *s = "1.0";
+      char *end;
+      double d = strtod_l(s, end, loc);
+      float f = strtof_l(s, end, loc);
+      freelocale(loc);
+      return 0;
+    }''',
+    args : pre_args,
+    name : 'strtod has locale support')
+  pre_args += '-DHAVE_STRTOD_L'
+endif
+
+# Check for some linker flags
+ld_args_bsymbolic = []
+if cc.links('int main() { return 0; }', args : '-Wl,-Bsymbolic', name : 'Bsymbolic')
+  ld_args_bsymbolic += '-Wl,-Bsymbolic'
+endif
+with_ld_version_script = false
+if cc.links('int main() { return 0; }',
+            args : '-Wl,--version-script=@0@'.format(
+              join_paths(meson.current_source_dir(), 'build-support/conftest.map')),
+            name : 'version-script')
+  with_ld_version_script = true
+endif
+with_ld_dynamic_list = false
+if cc.links('int main() { return 0; }',
+            args : '-Wl,--dynamic-list=@0@'.format(
+              join_paths(meson.current_source_dir(), 'build-support/conftest.dyn')),
+            name : 'dynamic-list')
+  with_ld_dynamic_list = true
+endif
+
+ld_args_build_id = cc.get_supported_link_arguments('-Wl,--build-id=sha1')
+
+# check for dl support
+dep_dl = null_dep
+if host_machine.system() != 'windows'
+  if not cc.has_function('dlopen')
+    dep_dl = cc.find_library('dl', required : true)
+  endif
+  if cc.has_function('dladdr', dependencies : dep_dl)
+    # This is really only required for util/disk_cache.h
+    pre_args += '-DHAVE_DLADDR'
+  endif
+endif
+
+if cc.has_function('dl_iterate_phdr')
+  pre_args += '-DHAVE_DL_ITERATE_PHDR'
+elif with_intel_vk or with_intel_hasvk
+  error('Intel "Anvil" Vulkan driver requires the dl_iterate_phdr function')
+endif
+
+# only used in Iris and ANV
+if with_any_intel and ['x86', 'x86_64'].contains(host_machine.cpu_family())
+  pre_args += '-DSUPPORT_INTEL_INTEGRATED_GPUS'
+endif
+
+if get_option('intel-xe-kmd').enabled()
+  pre_args += '-DINTEL_XE_KMD_SUPPORTED'
+endif
+
+if with_intel_hasvk and host_machine.cpu_family().startswith('x86') == false
+  error('Intel "hasvk" Vulkan driver requires x86 or x86_64 CPU family')
+endif
+
+if with_gallium_crocus and host_machine.cpu_family().startswith('x86') == false
+  error('Intel "crocus" Gallium driver requires x86 or x86_64 CPU family')
+endif
+
+if with_gallium_i915 and host_machine.cpu_family().startswith('x86') == false
+  error('Intel "i915" Gallium driver requires x86 or x86_64 CPU family')
+endif
+
+# Determine whether or not the rt library is needed for time functions
+if host_machine.system() == 'windows' or cc.has_function('clock_gettime')
+  dep_clock = null_dep
+else
+  dep_clock = cc.find_library('rt')
+endif
+
+dep_zlib = dependency('zlib', version : '>= 1.2.3',
+                      fallback : ['zlib', 'zlib_dep'],
+                      required : get_option('zlib'))
+if dep_zlib.found()
+  pre_args += '-DHAVE_ZLIB'
+endif
+
+dep_zstd = dependency('libzstd', required : get_option('zstd'))
+if dep_zstd.found()
+  pre_args += '-DHAVE_ZSTD'
+endif
+
+with_compression = dep_zlib.found() or dep_zstd.found()
+if with_compression
+  pre_args += '-DHAVE_COMPRESSION'
+elif with_shader_cache
+  error('Shader Cache requires compression')
+endif
+
+if host_machine.system() == 'windows'
+  # For MSVC and MinGW we aren't using pthreads, and dependency('threads') will add linkage
+  # to pthread for MinGW, so leave the dependency null_dep for Windows. For Windows linking to
+  # kernel32 is enough for c11/threads.h and it's already linked by meson by default
+  dep_thread = null_dep
+else
+  dep_thread = dependency('threads')
+endif
+if dep_thread.found()
+  pre_args += '-DHAVE_PTHREAD'
+  if host_machine.system() != 'netbsd' and cc.has_function(
+      'pthread_setaffinity_np',
+      dependencies : dep_thread,
+      prefix : '#include <pthread.h>',
+      args : '-D_GNU_SOURCE')
+    pre_args += '-DHAVE_PTHREAD_SETAFFINITY'
+  endif
+endif
+
+with_expat = get_option('expat') \
+  .disable_auto_if(with_platform_android or with_platform_windows)
+
+if host_machine.system() == 'darwin'
+  dep_expat = meson.get_compiler('c').find_library('expat', required : with_expat)
+else
+  dep_expat = dependency('expat', fallback : ['expat', 'expat_dep'],
+                         required : with_expat)
+endif
+
+# TODO: with Meson 1.1.0 this can be replaced with with_expat.enable_if(with_intel_tools)
+if with_intel_tools and not dep_expat.found()
+  error('Intel tools require expat')
+endif
+
+# We don't require expat on Android or Windows
+use_xmlconfig = get_option('xmlconfig') \
+  .require(not (with_platform_android or with_platform_windows),
+           error_message : 'xmlconfig not available on Android or Windows') \
+  .require(dep_expat.found(),
+           error_message : 'requires expat') \
+  .allowed()
+  
+# Predefined macros for windows
+if host_machine.system() == 'windows'
+  pre_args += '-DWIN32_LEAN_AND_MEAN' # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
+endif
+# this only exists on linux so either this is linux and it will be found, or
+# it's not linux and wont
+dep_m = cc.find_library('m', required : false)
+
+if host_machine.system() == 'windows'
+  dep_regex = meson.get_compiler('c').find_library('regex', required : false)
+  if not dep_regex.found()
+    dep_regex = declare_dependency(compile_args : ['-DNO_REGEX'])
+  endif
+else
+  dep_regex = null_dep
+endif
+
+if with_platform_haiku
+  dep_network = cc.find_library('network')
+endif
+
+dep_futex = null_dep
+if host_machine.system() == 'windows'
+  if (get_option('min-windows-version') < 8)
+    pre_args += '-DWINDOWS_NO_FUTEX'
+  else
+    dep_futex = cc.find_library('synchronization', required : true)
+  endif
+endif
+
+# Check for libdrm. Various drivers have different libdrm version requirements,
+# but we always want to use the same version for all libdrm modules. That means
+# even if driver foo requires 2.4.0 and driver bar requires 2.4.3, if foo and
+# bar are both on use 2.4.3 for both of them
+dep_libdrm_amdgpu = null_dep
+dep_libdrm_radeon = null_dep
+dep_libdrm_nouveau = null_dep
+dep_libdrm_intel = null_dep
+
+_drm_amdgpu_ver = '2.4.110'
+_drm_radeon_ver = '2.4.71'
+_drm_nouveau_ver = '2.4.102'
+_drm_intel_ver = '2.4.75'
+_drm_ver = '2.4.109'
+
+_libdrm_checks = [
+  ['intel', with_gallium_i915],
+  ['amdgpu', (with_amd_vk and not with_platform_windows) or with_gallium_radeonsi],
+  ['radeon', (with_gallium_radeonsi or with_gallium_r300 or with_gallium_r600)],
+  ['nouveau', with_gallium_nouveau],
+]
+
+# Loop over the enables versions and get the highest libdrm requirement for all
+# active drivers.
+_drm_blame = ''
+foreach d : _libdrm_checks
+  ver = get_variable('_drm_@0@_ver'.format(d[0]))
+  if d[1] and ver.version_compare('>' + _drm_ver)
+    _drm_ver = ver
+    _drm_blame = d[0]
+  endif
+endforeach
+if _drm_blame != ''
+  message('libdrm @0@ needed because @1@ has the highest requirement'.format(_drm_ver, _drm_blame))
+endif
+
+# Then get each libdrm module
+foreach d : _libdrm_checks
+  if d[1]
+    set_variable(
+      'dep_libdrm_' + d[0],
+      dependency('libdrm_' + d[0], version : '>=' + _drm_ver)
+    )
+  endif
+endforeach
+
+with_gallium_drisw_kms = false
+if system_has_kms_drm
+  dep_libdrm = dependency(
+    'libdrm', version : '>=' + _drm_ver,
+    # GNU/Hurd includes egl_dri2, without drm.
+    required : (with_dri2 and host_machine.system() != 'gnu') or with_dri3
+  )
+else
+  # We should prevent libdrm from being available when the target doesn't have it to avoid transitive
+  # dependencies (such as vk-runtime) linking to it
+  dep_libdrm = null_dep
+endif
+if dep_libdrm.found()
+  pre_args += '-DHAVE_LIBDRM'
+  if with_dri_platform == 'drm' and with_dri
+    with_gallium_drisw_kms = true
+  endif
+endif
+
+dep_libudev = dependency('libudev', required : false)
+if dep_libudev.found()
+  pre_args += '-DHAVE_LIBUDEV'
+endif
+
+llvm_modules = ['bitwriter', 'engine', 'mcdisassembler', 'mcjit', 'core', 'executionengine', 'scalaropts', 'transformutils', 'instcombine']
+llvm_optional_modules = ['coroutines']
+if with_amd_vk or with_gallium_radeonsi or with_gallium_r600
+  llvm_modules += ['amdgpu', 'bitreader', 'ipo']
+  if with_gallium_r600
+    llvm_modules += 'asmparser'
+  endif
+endif
+if with_gallium_opencl
+  llvm_modules += [
+    'linker', 'coverage', 'instrumentation', 'ipo', 'irreader',
+    'lto', 'option', 'objcarcopts', 'profiledata'
+  ]
+  # all-targets is needed to support static linking LLVM build with multiple targets
+  # windowsdriver is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
+  llvm_optional_modules += ['all-targets', 'frontendopenmp', 'windowsdriver']
+endif
+if with_clc
+  llvm_modules += ['coverage', 'target', 'linker', 'irreader', 'option', 'libdriver', 'lto']
+  # all-targets is needed to support static linking LLVM build with multiple targets.
+  # windowsdriver is needded with LLVM>=15 and frontendhlsl is needed with LLVM>=16,
+  # but we don't know what LLVM version we are using yet
+  llvm_optional_modules += ['all-targets', 'windowsdriver', 'frontendhlsl']
+endif
+draw_with_llvm = get_option('draw-use-llvm')
+if draw_with_llvm
+  llvm_modules += 'native'
+  # lto is needded with LLVM>=15, but we don't know what LLVM verrsion we are using yet
+  llvm_optional_modules += ['lto']
+endif
+
+if with_amd_vk or with_gallium_radeonsi
+  _llvm_version = '>= 15.0.0'
+elif with_intel_clc
+  _llvm_version = '>= 13.0.0'
+elif with_gallium_opencl
+  _llvm_version = '>= 11.0.0'
+elif with_clc
+  _llvm_version = '>= 10.0.0'
+else
+  _llvm_version = '>= 5.0.0'
+endif
+
+_shared_llvm = get_option('shared-llvm') \
+  .disable_auto_if(host_machine.system() == 'windows') \
+  .allowed()
+
+_llvm = get_option('llvm')
+dep_llvm = null_dep
+with_llvm = false
+if _llvm.allowed()
+  dep_llvm = dependency(
+    'llvm',
+    version : _llvm_version,
+    modules : llvm_modules,
+    optional_modules : llvm_optional_modules,
+    required : (
+      with_amd_vk or with_gallium_radeonsi or with_gallium_opencl or with_clc
+      or _llvm.enabled()
+    ),
+    static : not _shared_llvm,
+    fallback : ['llvm', 'dep_llvm'],
+    include_type : 'preserve',
+  )
+  with_llvm = dep_llvm.found()
+endif
+if with_llvm
+  pre_args += '-DLLVM_AVAILABLE'
+  pre_args += '-DMESA_LLVM_VERSION_STRING="@0@"'.format(dep_llvm.version())
+  pre_args += '-DLLVM_IS_SHARED=@0@'.format(_shared_llvm.to_int())
+
+  if draw_with_llvm
+    pre_args += '-DDRAW_LLVM_AVAILABLE'
+  elif with_swrast_vk
+    error('Lavapipe requires LLVM draw support.')
+  endif
+
+  if host_machine.system() != 'windows'
+    # LLVM can be built without rtti, turning off rtti changes the ABI of C++
+    # programs, so we need to build all C++ code in mesa without rtti as well to
+    # ensure that linking works. Note that Win32 compilers does handle mismatching RTTI
+    # without issues, so only apply this for other compilers.
+    if dep_llvm.type_name() == 'internal'
+      _llvm_rtti = subproject('llvm').get_variable('has_rtti', true)
+    else
+      # The CMake finder will return 'ON', the llvm-config will return 'YES'
+      _llvm_rtti = ['ON', 'YES'].contains(dep_llvm.get_variable(cmake : 'LLVM_ENABLE_RTTI', configtool: 'has-rtti'))
+    endif
+    if _rtti != _llvm_rtti
+      if _llvm_rtti
+        error('LLVM was built with RTTI, cannot build Mesa with RTTI disabled. Remove cpp_rtti disable switch or use LLVM built without LLVM_ENABLE_RTTI.')
+      else
+        error('LLVM was built without RTTI, so Mesa must also disable RTTI. Use an LLVM built with LLVM_ENABLE_RTTI or add cpp_rtti=false.')
+      endif
+    endif
+  endif
+
+  if cc.get_argument_syntax() == 'msvc'
+    # Suppress "/DELAYLOAD:ole32.dll/shell32.dll ignored" warnings that LLVM adds
+    add_project_link_arguments(
+      '/ignore:4199',
+      language : ['c', 'cpp'],
+    )
+  endif
+elif with_amd_vk and with_aco_tests
+  error('ACO tests require LLVM, but LLVM is disabled.')
+elif with_gallium_radeonsi or with_swrast_vk
+  error('The following drivers require LLVM: RadeonSI, Lavapipe. One of these is enabled, but LLVM is disabled.')
+elif with_gallium_opencl
+  error('The OpenCL "Clover" state tracker requires LLVM, but LLVM is disabled.')
+elif with_clc
+  error('The CLC compiler requires LLVM, but LLVM is disabled.')
+else
+  draw_with_llvm = false
+endif
+
+with_opencl_spirv = (_opencl != 'disabled' and get_option('opencl-spirv')) or with_intel_clc or with_microsoft_clc or with_gallium_rusticl
+if with_opencl_spirv
+  chosen_llvm_version_array = dep_llvm.version().split('.')
+  chosen_llvm_version_major = chosen_llvm_version_array[0].to_int()
+  chosen_llvm_version_minor = chosen_llvm_version_array[1].to_int()
+
+  # Require an SPIRV-LLVM-Translator version compatible with the chosen LLVM
+  # one.
+
+  # This first version check is still needed as maybe LLVM 8.0 was picked but
+  # we do not want to accept SPIRV-LLVM-Translator 8.0.0.1 as that version
+  # does not have the required API and those are only available starting from
+  # 8.0.1.3.
+  _llvmspirvlib_min_version = '>= 8.0.1.3'
+  if with_intel_clc
+    _llvmspirvlib_min_version = '>= 13.0.0.0'
+  endif
+
+  _llvmspirvlib_version = [
+    _llvmspirvlib_min_version,
+    '>= @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor),
+    '< @0@.@1@'.format(chosen_llvm_version_major, chosen_llvm_version_minor + 1) ]
+
+  dep_spirv_tools = dependency('SPIRV-Tools', required : true, version : '>= 2018.0')
+  # LLVMSPIRVLib is available at https://github.com/KhronosGroup/SPIRV-LLVM-Translator
+  dep_llvmspirvlib = dependency('LLVMSPIRVLib', required : true, version : _llvmspirvlib_version)
+else
+  dep_spirv_tools = null_dep
+  dep_llvmspirvlib = null_dep
+endif
+
+dep_clang = null_dep
+if with_clc
+  llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
+
+  dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
+
+  if not dep_clang.found() or not _shared_llvm
+    clang_modules = [
+      'clangBasic', 'clangAST', 'clangCodeGen', 'clangLex',
+      'clangDriver', 'clangFrontend', 'clangFrontendTool',
+      'clangHandleCXX', 'clangHandleLLVM', 'clangSerialization',
+      'clangSema', 'clangParse', 'clangEdit', 'clangAnalysis'
+    ]
+    if dep_llvm.version().version_compare('>= 15.0')
+      clang_modules += 'clangSupport'
+    endif
+    if dep_llvm.version().version_compare('>= 16.0')
+      clang_modules += 'clangASTMatchers'
+    endif
+
+    dep_clang = []
+    foreach m : clang_modules
+      dep_clang += cpp.find_library(m, dirs : llvm_libdir, required : true)
+    endforeach
+  endif
+endif
+
+# Be explicit about only using this lib on Windows, to avoid picking
+# up random libs with the generic name 'libversion'
+dep_version = null_dep
+if host_machine.system() == 'windows'
+  dep_version = cpp.find_library('version')
+endif
+
+dep_elf = dependency('libelf', required : false)
+if not with_platform_windows and not dep_elf.found()
+  dep_elf = cc.find_library('elf', required : false)
+endif
+if dep_elf.found()
+  pre_args += '-DUSE_LIBELF'
+endif
+
+dep_glvnd = null_dep
+if with_glvnd
+  dep_glvnd = dependency('libglvnd', version : '>= 1.3.2')
+  pre_args += '-DUSE_LIBGLVND=1'
+endif
+
+dep_valgrind = dependency('valgrind', required : get_option('valgrind'))
+if dep_valgrind.found()
+  pre_args += '-DHAVE_VALGRIND'
+endif
+
+# AddressSanitizer's leak reports need all the symbols to be present at exit to
+# decode well, which runs afoul of our dlopen()/dlclose()ing of the DRI drivers.
+# Set a flag so we can skip the dlclose for asan builds.
+if ['address', 'address,undefined'].contains(get_option('b_sanitize'))
+  asan_c_args = ['-DBUILT_WITH_ASAN=1']
+else
+  asan_c_args = ['-DBUILT_WITH_ASAN=0']
+endif
+
+yacc_is_bison = true
+needs_flex_bison = with_any_opengl or with_freedreno_vk or with_intel_tools or with_gallium
+
+if build_machine.system() == 'windows'
+  # Prefer the winflexbison versions, they're much easier to install and have
+  # better windows support.
+
+  prog_flex = find_program('win_flex', required : false)
+  if prog_flex.found()
+    # windows compatibility (uses <io.h> instead of <unistd.h> and _isatty,
+    # _fileno functions)
+    prog_flex = [prog_flex, '--wincompat']
+  else
+    prog_flex = [find_program('flex', 'lex', required : needs_flex_bison, disabler : true)]
+  endif
+  # Force flex to use const keyword in prototypes, as relies on __cplusplus or
+  # __STDC__ macro to determine whether it's safe to use const keyword
+  prog_flex += '-DYY_USE_CONST='
+
+  prog_flex_cpp = prog_flex
+  # Convince win_flex to use <inttypes.h> for C++ files
+  # Note that we are using a C99 version here rather than C11,
+  # because using a C11 version can cause the MSVC CRT headers to define
+  # static_assert to _Static_assert, which breaks other parts of the CRT
+  prog_flex_cpp += '-D__STDC_VERSION__=199901'
+
+  prog_bison = find_program('win_bison', required : false)
+  if not prog_bison.found()
+    prog_bison = find_program('bison', 'yacc', required : needs_flex_bison, disabler : true)
+  endif
+else
+  prog_bison = find_program('bison', required : false)
+
+  if not prog_bison.found()
+    prog_bison = find_program('byacc', required : needs_flex_bison, disabler : true)
+    yacc_is_bison = false
+  endif
+
+  # Disable deprecated keyword warnings, since we have to use them for
+  # old-bison compat.  See discussion in
+  # https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2161
+  if find_program('bison', required : false, version : '> 2.3').found()
+    prog_bison = [prog_bison, '-Wno-deprecated']
+  endif
+
+  prog_flex = find_program('flex', required : needs_flex_bison, disabler : true)
+  prog_flex_cpp = prog_flex
+endif
+
+dep_selinux = null_dep
+if get_option('selinux')
+  dep_selinux = dependency('libselinux')
+  pre_args += '-DMESA_SELINUX'
+endif
+
+_libunwind = get_option('libunwind') \
+  .require(not with_platform_android, error_message : 'Android requires the use of the backtrace library, not libunwind')
+if host_machine.system() == 'darwin'
+  dep_unwind = meson.get_compiler('c').find_library('System', required : _libunwind)
+else
+  dep_unwind = dependency('libunwind', required : _libunwind)
+endif
+if dep_unwind.found()
+  pre_args += '-DHAVE_LIBUNWIND'
+endif
+
+if with_osmesa
+  if not with_gallium_softpipe
+    error('OSMesa gallium requires gallium softpipe or llvmpipe.')
+  endif
+  if host_machine.system() == 'windows'
+    osmesa_lib_name = 'osmesa'
+  else
+    osmesa_lib_name = 'OSMesa'
+  endif
+endif
+
+# TODO: symbol mangling
+
+if with_platform_wayland
+  dep_wl_scanner = dependency('wayland-scanner', native: true)
+  prog_wl_scanner = find_program(dep_wl_scanner.get_variable(pkgconfig : 'wayland_scanner'))
+  if dep_wl_scanner.version().version_compare('>= 1.15')
+    wl_scanner_arg = 'private-code'
+  else
+    wl_scanner_arg = 'code'
+  endif
+  dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.24')
+  dep_wayland_client = dependency('wayland-client', version : '>=1.18')
+  dep_wayland_server = dependency('wayland-server', version : '>=1.18')
+  if with_egl
+    dep_wayland_egl = dependency('wayland-egl-backend', version : '>= 3')
+    dep_wayland_egl_headers = dep_wayland_egl.partial_dependency(compile_args : true)
+  endif
+  pre_args += '-DWL_HIDE_DEPRECATED'
+endif
+
+dep_x11 = null_dep
+dep_xext = null_dep
+dep_xfixes = null_dep
+dep_x11_xcb = null_dep
+dep_xcb = null_dep
+dep_xcb_keysyms = null_dep
+dep_xcb_glx = null_dep
+dep_xcb_dri2 = null_dep
+dep_xcb_dri3 = null_dep
+dep_dri2proto = null_dep
+dep_glproto = null_dep
+dep_xxf86vm = null_dep
+dep_xcb_dri3 = null_dep
+dep_xcb_present = null_dep
+dep_xcb_sync = null_dep
+dep_xcb_xfixes = null_dep
+dep_xshmfence = null_dep
+dep_xcb_xrandr = null_dep
+dep_xcb_shm = null_dep
+dep_xlib_xrandr = null_dep
+dep_openmp = null_dep
+
+# Even if we find OpenMP, Gitlab CI fails to link with gcc/i386 and clang/anyarch.
+if host_machine.cpu_family() == 'x86_64' and cc.get_id() == 'gcc'
+  dep_openmp = dependency('openmp', required : false)
+  if dep_openmp.found()
+    pre_args += ['-DHAVE_OPENMP']
+  endif
+endif
+
+with_dri3_modifiers = false
+with_xcb_keysyms = false
+if with_platform_x11
+  if with_glx == 'xlib'
+    dep_x11 = dependency('x11')
+    dep_xext = dependency('xext')
+    dep_xcb = dependency('xcb')
+    dep_xcb_xrandr = dependency('xcb-randr')
+  elif with_glx == 'dri'
+    dep_x11 = dependency('x11')
+    dep_xext = dependency('xext')
+    dep_xfixes = dependency('xfixes', version : '>= 2.0')
+    dep_xcb_glx = dependency('xcb-glx', version : '>= 1.8.1')
+    dep_xcb_shm = dependency('xcb-shm')
+  endif
+  if (with_any_vk or with_glx == 'dri' or with_egl or
+       (with_gallium_vdpau or with_gallium_va or
+        with_gallium_omx != 'disabled'))
+    dep_xcb = dependency('xcb')
+    dep_xcb_keysyms = dependency('xcb-keysyms', required : false)
+    with_xcb_keysyms = dep_xcb_keysyms.found()
+    if with_xcb_keysyms
+      pre_args += '-DXCB_KEYSYMS_AVAILABLE'
+    endif
+    dep_x11_xcb = dependency('x11-xcb')
+    if with_dri_platform == 'drm' and not dep_libdrm.found()
+      error('libdrm required for gallium video statetrackers when using x11')
+    endif
+  endif
+  if with_any_vk or with_egl or (with_glx == 'dri' and with_dri_platform == 'drm')
+    dep_xcb_dri2 = dependency('xcb-dri2', version : '>= 1.8')
+
+    if with_dri3
+      dep_xcb_dri3 = dependency('xcb-dri3')
+      dep_xcb_present = dependency('xcb-present')
+      # until xcb-dri3 has been around long enough to make a hard-dependency:
+      if (dep_xcb_dri3.version().version_compare('>= 1.13') and
+          dep_xcb_present.version().version_compare('>= 1.13'))
+        with_dri3_modifiers = true
+      endif
+      dep_xcb_shm = dependency('xcb-shm')
+      dep_xcb_sync = dependency('xcb-sync')
+      dep_xshmfence = dependency('xshmfence', version : '>= 1.1')
+    endif
+  endif
+  if with_glx == 'dri' or with_glx == 'xlib'
+    dep_glproto = dependency('glproto', version : '>= 1.4.14')
+  endif
+  if with_glx == 'dri'
+    if with_dri_platform == 'drm'
+      dep_dri2proto = dependency('dri2proto', version : '>= 2.8')
+      if with_glx_direct
+        dep_xxf86vm = dependency('xxf86vm')
+      endif
+    endif
+  endif
+  if (with_egl or
+      with_dri3 or (
+      with_gallium_vdpau or with_gallium_xa or
+      with_gallium_omx != 'disabled'))
+    dep_xcb_xfixes = dependency('xcb-xfixes')
+  endif
+  if with_xlib_lease or with_any_vk
+    dep_xcb_xrandr = dependency('xcb-randr')
+  endif
+  if with_xlib_lease
+    dep_xlib_xrandr = dependency('xrandr', version : '>= 1.3')
+  endif
+endif
+
+if with_dri
+  pre_args += '-DHAVE_DRI'
+endif
+if with_dri2
+  pre_args += '-DHAVE_DRI2'
+endif
+if with_dri3
+  pre_args += '-DHAVE_DRI3'
+endif
+if with_dri3_modifiers
+  pre_args += '-DHAVE_DRI3_MODIFIERS'
+endif
+if with_gallium_drisw_kms
+  pre_args += '-DHAVE_DRISW_KMS'
+endif
+
+if get_option('gallium-extra-hud')
+  pre_args += '-DHAVE_GALLIUM_EXTRA_HUD=1'
+endif
+
+dep_lmsensors = cc.find_library('sensors', required : get_option('lmsensors'))
+if dep_lmsensors.found()
+  pre_args += '-DHAVE_LIBSENSORS=1'
+endif
+
+_shader_replacement = get_option('custom-shader-replacement')
+if _shader_replacement == ''
+else
+  pre_args += '-DCUSTOM_SHADER_REPLACEMENT'
+endif
+
+with_perfetto = get_option('perfetto')
+with_datasources = get_option('datasources')
+with_any_datasource = with_datasources.length() != 0
+if with_perfetto
+  dep_perfetto = dependency('perfetto', fallback: ['perfetto', 'dep_perfetto'])
+  pre_args += '-DHAVE_PERFETTO'
+endif
+
+add_project_arguments(pre_args, language : ['c', 'cpp'])
+add_project_arguments(c_cpp_args, language : ['c', 'cpp'])
+
+add_project_arguments(c_args,   language : ['c'])
+add_project_arguments(cpp_args, language : ['cpp'])
+
+gl_priv_reqs = []
+
+if with_glx == 'xlib'
+  gl_priv_reqs += ['x11', 'xext', 'xcb']
+elif with_glx == 'dri'
+  gl_priv_reqs += [
+    'x11', 'xext', 'xfixes', 'x11-xcb', 'xcb',
+    'xcb-glx >= 1.8.1']
+  if with_dri_platform == 'drm'
+    gl_priv_reqs += 'xcb-dri2 >= 1.8'
+    if with_glx_direct
+      gl_priv_reqs += 'xxf86vm'
+    endif
+  endif
+endif
+if dep_libdrm.found()
+  gl_priv_reqs += 'libdrm >= 2.4.75'
+endif
+
+gl_priv_libs = []
+if dep_thread.found()
+  gl_priv_libs += ['-lpthread', '-pthread']
+endif
+if dep_m.found()
+  gl_priv_libs += '-lm'
+endif
+if dep_dl.found()
+  gl_priv_libs += '-ldl'
+endif
+
+# FIXME: autotools lists this as incomplete
+gbm_priv_libs = []
+if dep_dl.found()
+  gbm_priv_libs += '-ldl'
+endif
+
+pkg = import('pkgconfig')
+
+if host_machine.system() == 'windows'
+  prog_dumpbin = find_program('dumpbin', required : false)
+  with_symbols_check = prog_dumpbin.found() and with_tests
+  if with_symbols_check
+    symbols_check_args = ['--dumpbin', prog_dumpbin.full_path()]
+  endif
+else
+  prog_nm = find_program('nm')
+  with_symbols_check = with_tests
+  symbols_check_args = ['--nm', prog_nm.full_path()]
+endif
+
+# This quirk needs to be applied to sources with functions defined in assembly
+# as GCC LTO drops them. See: https://bugs.freedesktop.org/show_bug.cgi?id=109391
+gcc_lto_quirk = (cc.get_id() == 'gcc') ? ['-fno-lto'] : []
+
+devenv = environment()
+
+dir_compiler_nir = join_paths(meson.current_source_dir(), 'src/compiler/nir/')
+dir_source_root = meson.project_source_root()
+
+
+subdir('include')
+subdir('bin')
+subdir('src')
+
+meson.add_devenv(devenv)
+
+summary(
+  {
+    'prefix': get_option('prefix'),
+    'libdir': get_option('libdir'),
+    'includedir': get_option('includedir'),
+  },
+  section: 'Directories'
+)
+
+summary(
+  {
+    'c_cpp_args': c_cpp_args,
+  },
+  section: 'Common C and C++ arguments'
+)
+
+summary(
+  {
+    'OpenGL': with_opengl,
+    'ES1': with_gles1,
+    'ES2': with_gles2,
+    'Shared glapi': with_shared_glapi,
+  },
+  section: 'OpenGL', bool_yn: true
+)
+
+summary(
+  {
+    'Platform': with_dri_platform,
+    'Driver dir': dri_drivers_path,
+  },
+  section: 'DRI', bool_yn: true, list_sep: ' '
+)
+
+summary(
+  {
+    'Enabled': with_glx != 'disabled',
+    'Provider': with_glx == 'disabled' ? 'None' : with_glx
+  },
+  section: 'GLX', bool_yn: true, list_sep: ' '
+)
+
+egl_summary = {'Enabled': with_egl}
+if with_egl
+  egl_drivers = []
+  if with_dri
+    egl_drivers += 'builtin:egl_dri2'
+  endif
+  if with_dri3
+    egl_drivers += 'builtin:egl_dri3'
+  endif
+  if with_platform_windows
+    egl_drivers += 'builtin:wgl'
+  endif
+  egl_summary += {'Drivers': egl_drivers}
+  egl_summary += {'Platforms': _platforms}
+endif
+summary(egl_summary, section: 'EGL', bool_yn: true, list_sep: ' ')
+
+gbm_summary = {'Enabled': with_gbm}
+if with_gbm
+  gbm_summary += {'Backends path': gbm_backends_path}
+endif
+summary(gbm_summary, section: 'GBM', bool_yn: true, list_sep: ' ')
+
+vulkan_summary = {'Drivers': _vulkan_drivers.length() != 0 ? _vulkan_drivers : false }
+if with_any_vk
+  vulkan_summary += {'Platforms': _platforms}
+  vulkan_summary += {'ICD dir': with_vulkan_icd_dir}
+  if with_any_vulkan_layers
+    vulkan_summary += {'Layers': get_option('vulkan-layers')}
+  endif
+  vulkan_summary += {'Video codecs': _codecs.length() != 0 ? _codecs : false}
+  vulkan_summary += {'Intel Ray tracing': with_intel_vk_rt}
+endif
+summary(vulkan_summary, section: 'Vulkan', bool_yn: true, list_sep: ' ')
+
+llvm_summary = {'Enabled': with_llvm}
+if with_llvm
+  llvm_summary += {'Version': dep_llvm.version()}
+endif
+summary(llvm_summary, section: 'LLVM', bool_yn: true, list_sep: ' ')
+
+gallium_summary = {'Enabled': with_gallium}
+if with_gallium
+  gallium_summary += {'Drivers': gallium_drivers}
+  gallium_summary += {'Platforms': _platforms}
+
+  gallium_frontends = ['mesa']
+  if with_gallium_xa
+    gallium_frontends += 'xa'
+  endif
+  if with_gallium_vdpau
+    gallium_frontends += 'vdpau'
+  endif
+  if with_gallium_omx != 'disabled'
+    gallium_frontends += 'omx' + with_gallium_omx
+  endif
+  if with_gallium_va
+    gallium_frontends += 'va'
+  endif
+  if with_gallium_st_nine
+    gallium_frontends += 'nine'
+  endif
+  if with_gallium_opencl
+    gallium_frontends += 'clover'
+  endif
+  if with_gallium_rusticl
+    gallium_frontends += 'rusticl'
+  endif
+  gallium_summary += {'Frontends': gallium_frontends}
+  gallium_summary += {'Off-screen rendering (OSMesa)': with_osmesa ? 'lib' + osmesa_lib_name : false}
+  gallium_summary += {'HUD lm-sensors': dep_lmsensors.found()}
+endif
+summary(gallium_summary, section: 'Gallium', bool_yn: true, list_sep: ' ')
+
+perfetto_summary = {'Enabled': with_perfetto}
+if with_perfetto and with_any_datasource
+  perfetto_summary += {'Data source': with_datasources}
+endif
+summary(perfetto_summary, section: 'Perfetto', bool_yn: true, list_sep: ' ')
Index: mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/src/gallium/targets/opencl/meson.build
===================================================================
--- mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/src/gallium/targets/opencl/meson.build	(nonexistent)
+++ mesa/23.x/create-23.2.1-llvm-cross-patch/mesa-23.2.1-new/src/gallium/targets/opencl/meson.build	(revision 385)
@@ -0,0 +1,136 @@
+# Copyright © 2017 Intel Corporation
+
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to deal
+# in the Software without restriction, including without limitation the rights
+# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+# copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+# SOFTWARE.
+
+opencl_link_args = []
+opencl_link_deps = []
+opencl_version = '1'
+
+if with_ld_version_script
+  opencl_link_args += [
+    '-Wl,--version-script', join_paths(meson.current_source_dir(), 'opencl.sym')
+  ]
+  opencl_link_deps += files('opencl.sym')
+endif
+
+llvm_libdir = dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir')
+opencl_libname = with_opencl_icd ? 'MesaOpenCL' : 'OpenCL'
+
+polly_dep = null_dep
+polly_isl_dep = null_dep
+if dep_llvm.version().version_compare('>=10.0.0')
+  polly_dep = cpp.find_library('Polly', dirs : llvm_libdir, required : false)
+  polly_isl_dep = cpp.find_library('PollyISL', dirs : llvm_libdir, required : false)
+endif
+
+dep_clang = cpp.find_library('clang-cpp', dirs : llvm_libdir, required : false)
+
+# meson will return clang-cpp from system dirs if it's not found in llvm_libdir
+linker_rpath_arg = '-Wl,--rpath=@0@'.format(llvm_libdir)
+clang_test_code = '''
+  #include <clang/Basic/Version.h>
+  int main (void) {
+    size_t found_pos = clang::getClangFullVersion().find(CLANG_VERSION_STRING);
+    return found_pos == ::std::string::npos ? 1 : 0;
+  }
+'''
+can_check_clang = (not meson.is_cross_build() or meson.can_run_host_binaries()) and cpp.has_link_argument(linker_rpath_arg)
+can_check_clang = false
+if can_check_clang
+  test_run = cpp.run(clang_test_code, name : 'dep-clang-usable',
+                     dependencies : [dep_llvm, dep_clang], args : linker_rpath_arg)
+  dep_clang_usable = test_run.compiled() and test_run.returncode() == 0
+else
+  dep_clang_usable = true
+endif
+if not _shared_llvm or not (dep_clang.found() and dep_clang_usable)
+  dep_clang = [
+    cpp.find_library('clangCodeGen', dirs : llvm_libdir),
+    cpp.find_library('clangFrontendTool', dirs : llvm_libdir),
+    cpp.find_library('clangFrontend', dirs : llvm_libdir),
+    cpp.find_library('clangDriver', dirs : llvm_libdir),
+    cpp.find_library('clangSerialization', dirs : llvm_libdir),
+    cpp.find_library('clangParse', dirs : llvm_libdir),
+    cpp.find_library('clangSema', dirs : llvm_libdir),
+    cpp.find_library('clangAnalysis', dirs : llvm_libdir),
+    cpp.find_library('clangAST', dirs : llvm_libdir),
+    cpp.find_library('clangASTMatchers', dirs : llvm_libdir),
+    cpp.find_library('clangEdit', dirs : llvm_libdir),
+    cpp.find_library('clangLex', dirs : llvm_libdir),
+    cpp.find_library('clangBasic', dirs : llvm_libdir),
+    polly_dep, polly_isl_dep,
+  ]
+  if dep_llvm.version().version_compare('>= 15.0')
+    dep_clang += cpp.find_library('clangSupport', dirs : llvm_libdir)
+  endif
+
+  # check clang once more
+  if can_check_clang
+    test_run = cpp.run(clang_test_code, name : 'dep-clang-usable',
+                       dependencies : [dep_llvm, dep_clang], args : linker_rpath_arg)
+    if not test_run.compiled() or test_run.returncode() != 0
+      error('No usable clang found!')
+    endif
+  endif
+endif
+
+ocldef_in = files(opencl_libname + '.def.in')[0]
+ocldef = custom_target(
+  'ocldef.def',
+  input: ocldef_in,
+  output : 'ocldef.def',
+  command : gen_vs_module_defs_normal_command,
+)
+
+libopencl = shared_library(
+  opencl_libname,
+  [],
+  vs_module_defs : ocldef,
+  link_args : [ld_args_gc_sections, opencl_link_args],
+  link_depends : opencl_link_deps,
+  link_whole : libclover,
+  link_with : [libpipe_loader_dynamic, libgallium],
+  dependencies : [
+    idep_mesautil,
+    dep_clock, dep_dl, dep_unwind, dep_elf, dep_clang, dep_version
+  ],
+  name_prefix : host_machine.system() == 'windows' ? '' : [],  # otherwise mingw will create libOpenCL-1.dll or libMesaOpenCL-1.dll
+  version : '@0@.0.0'.format(opencl_version),
+  soversion : host_machine.system() == 'windows' ? '' : opencl_version,
+  install : true,
+)
+
+if with_opencl_icd
+  _config = configuration_data()
+  _config.set('OPENCL_LIBNAME', 'MesaOpenCL')
+  _config.set('OPENCL_VERSION', opencl_version)
+  configure_file(
+    configuration : _config,
+    input : 'mesa.icd.in',
+    output : 'mesa.icd',
+    install : true,
+    install_dir : join_paths(get_option('sysconfdir'), 'OpenCL', 'vendors'),
+  )
+
+  # .so is hardcoded in the icd as well
+  devenv.prepend(
+    'OCL_ICD_FILENAMES',
+    meson.current_build_dir() / 'libMesaOpenCL.so.@0@'.format(opencl_version)
+  )
+endif
Index: mesa/23.x/patches/README
===================================================================
--- mesa/23.x/patches/README	(nonexistent)
+++ mesa/23.x/patches/README	(revision 385)
@@ -0,0 +1,8 @@
+
+/* begin *
+
+   mesa-23.2.1-llvm-cross.patch         - Do not try run on cross; do not use -isystem
+                                          includes;
+   mesa-23.2.1-gallium-vc4-format.patch - Suppress printf() errors.
+
+ * end */
Index: mesa/23.x/patches
===================================================================
--- mesa/23.x/patches	(nonexistent)
+++ mesa/23.x/patches	(revision 385)

Property changes on: mesa/23.x/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mesa/23.x
===================================================================
--- mesa/23.x	(nonexistent)
+++ mesa/23.x	(revision 385)

Property changes on: mesa/23.x
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/Makefile
===================================================================
--- mozilla/Makefile	(nonexistent)
+++ mozilla/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: mozilla/firefox/Makefile
===================================================================
--- mozilla/firefox/Makefile	(nonexistent)
+++ mozilla/firefox/Makefile	(revision 385)
@@ -0,0 +1,63 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mozilla-firefox
+
+versions    = 118.0.2 122.0.1
+pkgname     = firefox
+suffix      = source.tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/firefox-118.0.2-riscv64gc.patch
+patches    += $(CURDIR)/patches/firefox-118.0.2-x86.patch
+
+patches    += $(CURDIR)/patches/firefox-122.0.1-riscv64gc.patch
+patches    += $(CURDIR)/patches/firefox-122.0.1-x86.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-118.0.2-riscv64gc-patch ; ./create.patch.sh ) ; \
+	 ( cd create-118.0.2-x86-patch       ; ./create.patch.sh ) ; \
+	 ( cd create-122.0.1-riscv64gc-patch ; ./create.patch.sh ) ; \
+	 ( cd create-122.0.1-x86-patch       ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mozilla/firefox/create-118.0.2-riscv64gc-patch/create.patch.sh
===================================================================
--- mozilla/firefox/create-118.0.2-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox/create-118.0.2-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=118.0.2
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-riscv64gc.patch
+
+mv firefox-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox/create-118.0.2-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-118.0.2-riscv64gc-patch/file.list
===================================================================
--- mozilla/firefox/create-118.0.2-riscv64gc-patch/file.list	(nonexistent)
+++ mozilla/firefox/create-118.0.2-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+firefox-118.0.2/build/autoconf/config.guess
+firefox-118.0.2/build/autoconf/config.sub
Index: mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.guess
===================================================================
--- mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.guess	(nonexistent)
+++ mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.sub
===================================================================
--- mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.sub	(nonexistent)
+++ mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox/create-118.0.2-riscv64gc-patch/firefox-118.0.2-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-118.0.2-x86-patch/create.patch.sh
===================================================================
--- mozilla/firefox/create-118.0.2-x86-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox/create-118.0.2-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=118.0.2
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-x86.patch
+
+mv firefox-$VERSION-x86.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox/create-118.0.2-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-118.0.2-x86-patch/file.list
===================================================================
--- mozilla/firefox/create-118.0.2-x86-patch/file.list	(nonexistent)
+++ mozilla/firefox/create-118.0.2-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-118.0.2/modules/fdlibm/src/math_private.h
Index: mozilla/firefox/create-118.0.2-x86-patch/firefox-118.0.2-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozilla/firefox/create-118.0.2-x86-patch/firefox-118.0.2-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozilla/firefox/create-118.0.2-x86-patch/firefox-118.0.2-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,964 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "mozilla/EndianUtils.h"
+
+#include "fdlibm.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+typedef float       __float_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if defined(amd64) || defined(__i386__)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
+
+#if defined(__i386__)
+static __inline int
+irintf(float x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm_acos
+#define acosf fdlibm_acosf
+#define asin fdlibm_asin
+#define asinf fdlibm_asinf
+#define atan fdlibm_atan
+#define atanf fdlibm_atanf
+#define atan2 fdlibm_atan2
+#define cos fdlibm_cos
+#define cosf fdlibm_cosf
+#define sin fdlibm_sin
+#define sinf fdlibm_sinf
+#define tan fdlibm_tan
+#define tanf fdlibm_tanf
+#define cosh fdlibm_cosh
+#define sinh fdlibm_sinh
+#define tanh fdlibm_tanh
+#define exp fdlibm_exp
+#define expf fdlibm_expf
+#define exp2 fdlibm_exp2
+#define exp2f fdlibm_exp2f
+#define log fdlibm_log
+#define logf fdlibm_logf
+#define log10 fdlibm_log10
+#define log10f fdlibm_log10f
+#define pow fdlibm_pow
+#define powf fdlibm_powf
+#define ceil fdlibm_ceil
+#define ceilf fdlibm_ceilf
+#define fabs fdlibm_fabs
+#define fabsf fdlibm_fabsf
+#define floor fdlibm_floor
+#define acosh fdlibm_acosh
+#define asinh fdlibm_asinh
+#define atanh fdlibm_atanh
+#define cbrt fdlibm_cbrt
+#define expm1 fdlibm_expm1
+#define hypot fdlibm_hypot
+#define hypotf fdlibm_hypotf
+#define log1p fdlibm_log1p
+#define log2 fdlibm_log2
+#define scalb fdlibm_scalb
+#define copysign fdlibm_copysign
+#define scalbn fdlibm_scalbn
+#define scalbnf fdlibm_scalbnf
+#define trunc fdlibm_trunc
+#define truncf fdlibm_truncf
+#define floorf fdlibm_floorf
+#define nearbyint fdlibm_nearbyint
+#define nearbyintf fdlibm_nearbyintf
+#define rint fdlibm_rint
+#define rintf fdlibm_rintf
+#define sqrtf fdlibm_sqrtf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozilla/firefox/create-122.0.1-riscv64gc-patch/create.patch.sh
===================================================================
--- mozilla/firefox/create-122.0.1-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox/create-122.0.1-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=122.0.1
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-riscv64gc.patch
+
+mv firefox-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox/create-122.0.1-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-122.0.1-riscv64gc-patch/file.list
===================================================================
--- mozilla/firefox/create-122.0.1-riscv64gc-patch/file.list	(nonexistent)
+++ mozilla/firefox/create-122.0.1-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+firefox-122.0.1/build/autoconf/config.guess
+firefox-122.0.1/build/autoconf/config.sub
Index: mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.guess
===================================================================
--- mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.guess	(nonexistent)
+++ mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.sub
===================================================================
--- mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.sub	(nonexistent)
+++ mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox/create-122.0.1-riscv64gc-patch/firefox-122.0.1-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-122.0.1-x86-patch/create.patch.sh
===================================================================
--- mozilla/firefox/create-122.0.1-x86-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox/create-122.0.1-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=122.0.1
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-x86.patch
+
+mv firefox-$VERSION-x86.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox/create-122.0.1-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox/create-122.0.1-x86-patch/file.list
===================================================================
--- mozilla/firefox/create-122.0.1-x86-patch/file.list	(nonexistent)
+++ mozilla/firefox/create-122.0.1-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-122.0.1/modules/fdlibm/src/math_private.h
Index: mozilla/firefox/create-122.0.1-x86-patch/firefox-122.0.1-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozilla/firefox/create-122.0.1-x86-patch/firefox-122.0.1-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozilla/firefox/create-122.0.1-x86-patch/firefox-122.0.1-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,964 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "mozilla/EndianUtils.h"
+
+#include "fdlibm.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+typedef float       __float_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if defined(amd64) || defined(__i386__)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
+
+#if defined(__i386__)
+static __inline int
+irintf(float x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm_acos
+#define acosf fdlibm_acosf
+#define asin fdlibm_asin
+#define asinf fdlibm_asinf
+#define atan fdlibm_atan
+#define atanf fdlibm_atanf
+#define atan2 fdlibm_atan2
+#define cos fdlibm_cos
+#define cosf fdlibm_cosf
+#define sin fdlibm_sin
+#define sinf fdlibm_sinf
+#define tan fdlibm_tan
+#define tanf fdlibm_tanf
+#define cosh fdlibm_cosh
+#define sinh fdlibm_sinh
+#define tanh fdlibm_tanh
+#define exp fdlibm_exp
+#define expf fdlibm_expf
+#define exp2 fdlibm_exp2
+#define exp2f fdlibm_exp2f
+#define log fdlibm_log
+#define logf fdlibm_logf
+#define log10 fdlibm_log10
+#define log10f fdlibm_log10f
+#define pow fdlibm_pow
+#define powf fdlibm_powf
+#define ceil fdlibm_ceil
+#define ceilf fdlibm_ceilf
+#define fabs fdlibm_fabs
+#define fabsf fdlibm_fabsf
+#define floor fdlibm_floor
+#define acosh fdlibm_acosh
+#define asinh fdlibm_asinh
+#define atanh fdlibm_atanh
+#define cbrt fdlibm_cbrt
+#define expm1 fdlibm_expm1
+#define hypot fdlibm_hypot
+#define hypotf fdlibm_hypotf
+#define log1p fdlibm_log1p
+#define log2 fdlibm_log2
+#define scalb fdlibm_scalb
+#define copysign fdlibm_copysign
+#define scalbn fdlibm_scalbn
+#define scalbnf fdlibm_scalbnf
+#define trunc fdlibm_trunc
+#define truncf fdlibm_truncf
+#define floorf fdlibm_floorf
+#define nearbyint fdlibm_nearbyint
+#define nearbyintf fdlibm_nearbyintf
+#define rint fdlibm_rint
+#define rintf fdlibm_rintf
+#define sqrtf fdlibm_sqrtf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozilla/firefox/patches/README
===================================================================
--- mozilla/firefox/patches/README	(nonexistent)
+++ mozilla/firefox/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: mozilla/firefox/patches
===================================================================
--- mozilla/firefox/patches	(nonexistent)
+++ mozilla/firefox/patches	(revision 385)

Property changes on: mozilla/firefox/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/firefox
===================================================================
--- mozilla/firefox	(nonexistent)
+++ mozilla/firefox	(revision 385)

Property changes on: mozilla/firefox
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/firefox-esr/Makefile
===================================================================
--- mozilla/firefox-esr/Makefile	(nonexistent)
+++ mozilla/firefox-esr/Makefile	(revision 385)
@@ -0,0 +1,58 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mozilla-firefox-esr
+
+versions    = 115.8.0
+pkgname     = firefox
+suffix      = source.tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/firefox-115.8.0-riscv64gc.patch
+patches    += $(CURDIR)/patches/firefox-115.8.0-x86.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-115.8.0-riscv64gc-patch ; ./create.patch.sh ) ; \
+	 ( cd create-115.8.0-x86-patch       ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/create.patch.sh
===================================================================
--- mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.8.0
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-riscv64gc.patch
+
+mv firefox-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/file.list
===================================================================
--- mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/file.list	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+firefox-115.8.0/build/autoconf/config.guess
+firefox-115.8.0/build/autoconf/config.sub
Index: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.guess
===================================================================
--- mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.guess	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.sub
===================================================================
--- mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.sub	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/firefox-esr/create-115.8.0-riscv64gc-patch/firefox-115.8.0-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox-esr/create-115.8.0-x86-patch/create.patch.sh
===================================================================
--- mozilla/firefox-esr/create-115.8.0-x86-patch/create.patch.sh	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.8.0
+
+tar --files-from=file.list -xJvf ../firefox-$VERSION.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-x86.patch
+
+mv firefox-$VERSION-x86.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozilla/firefox-esr/create-115.8.0-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/firefox-esr/create-115.8.0-x86-patch/file.list
===================================================================
--- mozilla/firefox-esr/create-115.8.0-x86-patch/file.list	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-115.8.0/modules/fdlibm/src/math_private.h
Index: mozilla/firefox-esr/create-115.8.0-x86-patch/firefox-115.8.0-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozilla/firefox-esr/create-115.8.0-x86-patch/firefox-115.8.0-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozilla/firefox-esr/create-115.8.0-x86-patch/firefox-115.8.0-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,962 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "mozilla/EndianUtils.h"
+
+#include "fdlibm.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+typedef float       __float_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if defined(amd64) || defined(__i386__)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
+
+#if defined(__i386__)
+static __inline int
+irintf(float x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm::acos
+#define acosf fdlibm::acosf
+#define asin fdlibm::asin
+#define asinf fdlibm::asinf
+#define atan fdlibm::atan
+#define atanf fdlibm::atanf
+#define atan2 fdlibm::atan2
+#define cos fdlibm::cos
+#define cosf fdlibm::cosf
+#define sin fdlibm::sin
+#define sinf fdlibm::sinf
+#define tan fdlibm::tan
+#define tanf fdlibm::tanf
+#define cosh fdlibm::cosh
+#define sinh fdlibm::sinh
+#define tanh fdlibm::tanh
+#define exp fdlibm::exp
+#define expf fdlibm::expf
+#define exp2 fdlibm::exp2
+#define exp2f fdlibm::exp2f
+#define log fdlibm::log
+#define logf fdlibm::logf
+#define log10 fdlibm::log10
+#define pow fdlibm::pow
+#define powf fdlibm::powf
+#define ceil fdlibm::ceil
+#define ceilf fdlibm::ceilf
+#define fabs fdlibm::fabs
+#define fabsf fdlibm::fabsf
+#define floor fdlibm::floor
+#define acosh fdlibm::acosh
+#define asinh fdlibm::asinh
+#define atanh fdlibm::atanh
+#define cbrt fdlibm::cbrt
+#define expm1 fdlibm::expm1
+#define hypot fdlibm::hypot
+#define log1p fdlibm::log1p
+#define log2 fdlibm::log2
+#define scalb fdlibm::scalb
+#define copysign fdlibm::copysign
+#define scalbn fdlibm::scalbn
+#define scalbnf fdlibm::scalbnf
+#define trunc fdlibm::trunc
+#define truncf fdlibm::truncf
+#define floorf fdlibm::floorf
+#define nearbyint fdlibm::nearbyint
+#define nearbyintf fdlibm::nearbyintf
+#define rint fdlibm::rint
+#define rintf fdlibm::rintf
+#define sqrtf fdlibm::sqrtf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozilla/firefox-esr/patches/README
===================================================================
--- mozilla/firefox-esr/patches/README	(nonexistent)
+++ mozilla/firefox-esr/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: mozilla/firefox-esr/patches
===================================================================
--- mozilla/firefox-esr/patches	(nonexistent)
+++ mozilla/firefox-esr/patches	(revision 385)

Property changes on: mozilla/firefox-esr/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/firefox-esr
===================================================================
--- mozilla/firefox-esr	(nonexistent)
+++ mozilla/firefox-esr	(revision 385)

Property changes on: mozilla/firefox-esr
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/thunderbird/Makefile
===================================================================
--- mozilla/thunderbird/Makefile	(nonexistent)
+++ mozilla/thunderbird/Makefile	(revision 385)
@@ -0,0 +1,67 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mozilla-thunderbird
+
+versions    = 115.3.1 115.7.0
+pkgname     = thunderbird
+suffix      = source.tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/thunderbird-115.3.1-metainfo.patch
+patches    += $(CURDIR)/patches/thunderbird-115.3.1-riscv64gc.patch
+patches    += $(CURDIR)/patches/thunderbird-115.3.1-x86.patch
+
+patches    += $(CURDIR)/patches/thunderbird-115.7.0-metainfo.patch
+patches    += $(CURDIR)/patches/thunderbird-115.7.0-riscv64gc.patch
+patches    += $(CURDIR)/patches/thunderbird-115.7.0-x86.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-115.3.1-metainfo-patch  ; ./create.patch.sh ) ; \
+	 ( cd create-115.3.1-riscv64gc-patch ; ./create.patch.sh ) ; \
+	 ( cd create-115.3.1-x86-patch       ; ./create.patch.sh ) ; \
+	 ( cd create-115.7.0-metainfo-patch  ; ./create.patch.sh ) ; \
+	 ( cd create-115.7.0-riscv64gc-patch ; ./create.patch.sh ) ; \
+	 ( cd create-115.7.0-x86-patch       ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mozilla/thunderbird/create-115.3.1-metainfo-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.3.1-metainfo-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-metainfo-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.3.1
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-metainfo.patch
+
+mv thunderbird-$VERSION-metainfo.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.3.1-metainfo-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.3.1-metainfo-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.3.1-metainfo-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-metainfo-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+thunderbird-115.3.1/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml
Index: mozilla/thunderbird/create-115.3.1-metainfo-patch/thunderbird-115.3.1-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml
===================================================================
--- mozilla/thunderbird/create-115.3.1-metainfo-patch/thunderbird-115.3.1-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-metainfo-patch/thunderbird-115.3.1-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml	(revision 385)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+  <id>net.thunderbird.Thunderbird</id>
+  <launchable type="desktop-id">thunderbird.desktop</launchable>
+  <metadata_license>CC0-1.0</metadata_license>
+  <name>Thunderbird</name>
+  <summary>Thunderbird is a free and open source email, newsfeed, chat, and calendaring client</summary>
+  <description>
+    <!-- From https://www.thunderbird.net/en-US/about/  -->
+    <p>
+      Thunderbird is a free and open source email, newsfeed, chat, and
+      calendaring client, that’s easy to set up and customize. One of the core
+      principles of Thunderbird is the use and promotion of open standards -
+      this focus is a rejection of our world of closed platforms and services
+      that can’t communicate with each other. We want our users to have freedom
+      and choice in how they communicate.
+    </p>
+    <p>
+      Thunderbird is an open source project, which means anyone can contribute
+      ideas, designs, code, and time helping fellow users.
+    </p>
+  </description>
+  <categories>
+    <category>Calendar</category>
+    <category>Email</category>
+    <category>Office</category>
+  </categories>
+
+  <url type="homepage">https://www.thunderbird.net/</url>
+  <url type="bugtracker">https://bugzilla.mozilla.org/</url>
+  <url type="faq">https://support.mozilla.org/kb/thunderbird-faq/</url>
+  <url type="help">https://support.mozilla.org/products/thunderbird/</url>
+  <url type="donation">https://give.thunderbird.net/</url>
+  <url type="translate">https://www.thunderbird.net/en-US/get-involved/#translation</url>
+
+  <project_group>Mozilla</project_group>
+  <project_license>MPL-2.0</project_license>
+  <developer_name>Thunderbird Project</developer_name>
+
+  <icon type="remote" width="256" height="256">https://www.thunderbird.net/media/img/thunderbird/thunderbird-256.png</icon>
+
+  <mimetypes>
+    <mimetype>message/rfc822</mimetype>
+    <mimetype>x-scheme-handler/mailto</mimetype>
+    <mimetype>text/calendar</mimetype>
+    <mimetype>text/vcard</mimetype>
+    <mimetype>text/x-vcard</mimetype>
+  </mimetypes>
+
+  <!-- distributors: yes, this is a real person -->
+  <update_contact>tb-builds@thunderbird.net</update_contact>
+</component>
Index: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.3.1-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.3.1
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-riscv64gc.patch
+
+mv thunderbird-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.3.1-riscv64gc-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+thunderbird-115.3.1/build/autoconf/config.guess
+thunderbird-115.3.1/build/autoconf/config.sub
Index: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.guess
===================================================================
--- mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.guess	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.sub
===================================================================
--- mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.sub	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/thunderbird/create-115.3.1-riscv64gc-patch/thunderbird-115.3.1-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.3.1-x86-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.3.1-x86-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.3.1
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-x86.patch
+
+mv thunderbird-$VERSION-x86.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.3.1-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.3.1-x86-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.3.1-x86-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+thunderbird-115.3.1/modules/fdlibm/src/math_private.h
Index: mozilla/thunderbird/create-115.3.1-x86-patch/thunderbird-115.3.1-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozilla/thunderbird/create-115.3.1-x86-patch/thunderbird-115.3.1-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozilla/thunderbird/create-115.3.1-x86-patch/thunderbird-115.3.1-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,962 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "mozilla/EndianUtils.h"
+
+#include "fdlibm.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+typedef float       __float_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if defined(amd64) || defined(__i386__)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
+
+#if defined(__i386__)
+static __inline int
+irintf(float x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm::acos
+#define acosf fdlibm::acosf
+#define asin fdlibm::asin
+#define asinf fdlibm::asinf
+#define atan fdlibm::atan
+#define atanf fdlibm::atanf
+#define atan2 fdlibm::atan2
+#define cos fdlibm::cos
+#define cosf fdlibm::cosf
+#define sin fdlibm::sin
+#define sinf fdlibm::sinf
+#define tan fdlibm::tan
+#define tanf fdlibm::tanf
+#define cosh fdlibm::cosh
+#define sinh fdlibm::sinh
+#define tanh fdlibm::tanh
+#define exp fdlibm::exp
+#define expf fdlibm::expf
+#define exp2 fdlibm::exp2
+#define exp2f fdlibm::exp2f
+#define log fdlibm::log
+#define logf fdlibm::logf
+#define log10 fdlibm::log10
+#define pow fdlibm::pow
+#define powf fdlibm::powf
+#define ceil fdlibm::ceil
+#define ceilf fdlibm::ceilf
+#define fabs fdlibm::fabs
+#define fabsf fdlibm::fabsf
+#define floor fdlibm::floor
+#define acosh fdlibm::acosh
+#define asinh fdlibm::asinh
+#define atanh fdlibm::atanh
+#define cbrt fdlibm::cbrt
+#define expm1 fdlibm::expm1
+#define hypot fdlibm::hypot
+#define log1p fdlibm::log1p
+#define log2 fdlibm::log2
+#define scalb fdlibm::scalb
+#define copysign fdlibm::copysign
+#define scalbn fdlibm::scalbn
+#define scalbnf fdlibm::scalbnf
+#define trunc fdlibm::trunc
+#define truncf fdlibm::truncf
+#define floorf fdlibm::floorf
+#define nearbyint fdlibm::nearbyint
+#define nearbyintf fdlibm::nearbyintf
+#define rint fdlibm::rint
+#define rintf fdlibm::rintf
+#define sqrtf fdlibm::sqrtf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozilla/thunderbird/create-115.7.0-metainfo-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.7.0-metainfo-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-metainfo-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.7.0
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-metainfo.patch
+
+mv thunderbird-$VERSION-metainfo.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.7.0-metainfo-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.7.0-metainfo-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.7.0-metainfo-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-metainfo-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+thunderbird-115.7.0/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml
Index: mozilla/thunderbird/create-115.7.0-metainfo-patch/thunderbird-115.7.0-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml
===================================================================
--- mozilla/thunderbird/create-115.7.0-metainfo-patch/thunderbird-115.7.0-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-metainfo-patch/thunderbird-115.7.0-new/comm/mail/branding/thunderbird/net.thunderbird.Thunderbird.appdata.xml	(revision 385)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop-application">
+  <id>net.thunderbird.Thunderbird</id>
+  <launchable type="desktop-id">thunderbird.desktop</launchable>
+  <metadata_license>CC0-1.0</metadata_license>
+  <name>Thunderbird</name>
+  <summary>Thunderbird is a free and open source email, newsfeed, chat, and calendaring client</summary>
+  <description>
+    <!-- From https://www.thunderbird.net/en-US/about/  -->
+    <p>
+      Thunderbird is a free and open source email, newsfeed, chat, and
+      calendaring client, that’s easy to set up and customize. One of the core
+      principles of Thunderbird is the use and promotion of open standards -
+      this focus is a rejection of our world of closed platforms and services
+      that can’t communicate with each other. We want our users to have freedom
+      and choice in how they communicate.
+    </p>
+    <p>
+      Thunderbird is an open source project, which means anyone can contribute
+      ideas, designs, code, and time helping fellow users.
+    </p>
+  </description>
+  <categories>
+    <category>Calendar</category>
+    <category>Email</category>
+    <category>Office</category>
+  </categories>
+
+  <url type="homepage">https://www.thunderbird.net/</url>
+  <url type="bugtracker">https://bugzilla.mozilla.org/</url>
+  <url type="faq">https://support.mozilla.org/kb/thunderbird-faq/</url>
+  <url type="help">https://support.mozilla.org/products/thunderbird/</url>
+  <url type="donation">https://give.thunderbird.net/</url>
+  <url type="translate">https://www.thunderbird.net/en-US/get-involved/#translation</url>
+
+  <project_group>Mozilla</project_group>
+  <project_license>MPL-2.0</project_license>
+  <developer_name>Thunderbird Project</developer_name>
+
+  <icon type="remote" width="256" height="256">https://www.thunderbird.net/media/img/thunderbird/thunderbird-256.png</icon>
+
+  <mimetypes>
+    <mimetype>message/rfc822</mimetype>
+    <mimetype>x-scheme-handler/mailto</mimetype>
+    <mimetype>text/calendar</mimetype>
+    <mimetype>text/vcard</mimetype>
+    <mimetype>text/x-vcard</mimetype>
+  </mimetypes>
+
+  <!-- distributors: yes, this is a real person -->
+  <update_contact>tb-builds@thunderbird.net</update_contact>
+</component>
Index: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.7.0-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.7.0
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-riscv64gc.patch
+
+mv thunderbird-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.7.0-riscv64gc-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+thunderbird-115.7.0/build/autoconf/config.guess
+thunderbird-115.7.0/build/autoconf/config.sub
Index: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.guess
===================================================================
--- mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.guess	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.sub
===================================================================
--- mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.sub	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozilla/thunderbird/create-115.7.0-riscv64gc-patch/thunderbird-115.7.0-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.7.0-x86-patch/create.patch.sh
===================================================================
--- mozilla/thunderbird/create-115.7.0-x86-patch/create.patch.sh	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=115.7.0
+
+tar --files-from=file.list -xJvf ../thunderbird-$VERSION.source.tar.xz
+mv thunderbird-$VERSION thunderbird-$VERSION-orig
+
+cp -rf ./thunderbird-$VERSION-new ./thunderbird-$VERSION
+
+diff --unified -Nr  thunderbird-$VERSION-orig  thunderbird-$VERSION > thunderbird-$VERSION-x86.patch
+
+mv thunderbird-$VERSION-x86.patch ../patches
+
+rm -rf ./thunderbird-$VERSION
+rm -rf ./thunderbird-$VERSION-orig

Property changes on: mozilla/thunderbird/create-115.7.0-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozilla/thunderbird/create-115.7.0-x86-patch/file.list
===================================================================
--- mozilla/thunderbird/create-115.7.0-x86-patch/file.list	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+thunderbird-115.7.0/modules/fdlibm/src/math_private.h
Index: mozilla/thunderbird/create-115.7.0-x86-patch/thunderbird-115.7.0-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozilla/thunderbird/create-115.7.0-x86-patch/thunderbird-115.7.0-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozilla/thunderbird/create-115.7.0-x86-patch/thunderbird-115.7.0-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,962 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "mozilla/EndianUtils.h"
+
+#include "fdlibm.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+typedef float       __float_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if defined(amd64) || defined(__i386__)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#define	i64rint(x)	((int64_t)(x))	/* only needed for ld128 so not opt. */
+
+#if defined(__i386__)
+static __inline int
+irintf(float x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+
+static __inline int
+irintd(double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#if defined(__amd64__) || defined(__i386__)
+static __inline int
+irintl(long double x)
+{
+	int n;
+
+	__asm("fistl %0" : "=m" (n) : "t" (x));
+	return (n);
+}
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm::acos
+#define acosf fdlibm::acosf
+#define asin fdlibm::asin
+#define asinf fdlibm::asinf
+#define atan fdlibm::atan
+#define atanf fdlibm::atanf
+#define atan2 fdlibm::atan2
+#define cos fdlibm::cos
+#define cosf fdlibm::cosf
+#define sin fdlibm::sin
+#define sinf fdlibm::sinf
+#define tan fdlibm::tan
+#define tanf fdlibm::tanf
+#define cosh fdlibm::cosh
+#define sinh fdlibm::sinh
+#define tanh fdlibm::tanh
+#define exp fdlibm::exp
+#define expf fdlibm::expf
+#define exp2 fdlibm::exp2
+#define exp2f fdlibm::exp2f
+#define log fdlibm::log
+#define logf fdlibm::logf
+#define log10 fdlibm::log10
+#define pow fdlibm::pow
+#define powf fdlibm::powf
+#define ceil fdlibm::ceil
+#define ceilf fdlibm::ceilf
+#define fabs fdlibm::fabs
+#define fabsf fdlibm::fabsf
+#define floor fdlibm::floor
+#define acosh fdlibm::acosh
+#define asinh fdlibm::asinh
+#define atanh fdlibm::atanh
+#define cbrt fdlibm::cbrt
+#define expm1 fdlibm::expm1
+#define hypot fdlibm::hypot
+#define log1p fdlibm::log1p
+#define log2 fdlibm::log2
+#define scalb fdlibm::scalb
+#define copysign fdlibm::copysign
+#define scalbn fdlibm::scalbn
+#define scalbnf fdlibm::scalbnf
+#define trunc fdlibm::trunc
+#define truncf fdlibm::truncf
+#define floorf fdlibm::floorf
+#define nearbyint fdlibm::nearbyint
+#define nearbyintf fdlibm::nearbyintf
+#define rint fdlibm::rint
+#define rintf fdlibm::rintf
+#define sqrtf fdlibm::sqrtf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozilla/thunderbird/patches/README
===================================================================
--- mozilla/thunderbird/patches/README	(nonexistent)
+++ mozilla/thunderbird/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: mozilla/thunderbird/patches
===================================================================
--- mozilla/thunderbird/patches	(nonexistent)
+++ mozilla/thunderbird/patches	(revision 385)

Property changes on: mozilla/thunderbird/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla/thunderbird
===================================================================
--- mozilla/thunderbird	(nonexistent)
+++ mozilla/thunderbird	(revision 385)

Property changes on: mozilla/thunderbird
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozilla
===================================================================
--- mozilla	(nonexistent)
+++ mozilla	(revision 385)

Property changes on: mozilla
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozjs/Makefile
===================================================================
--- mozjs/Makefile	(nonexistent)
+++ mozjs/Makefile	(revision 385)
@@ -0,0 +1,76 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mozjs
+
+versions    = 102.15.0
+pkgname     = firefox
+suffix      = esr.source.tar.xz
+
+tarballs    = $(addsuffix $(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/firefox-102.15.0-copy-headers.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-emitter.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-icu-sources.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-init.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-remove-sloppy-m4.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-riscv64gc.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-skip-failing-tests.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-soname.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-spidermonkey-checks.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-tests.patch
+patches    += $(CURDIR)/patches/firefox-102.15.0-x86.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-102.15.0-copy-headers-patch        ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-emitter-patch             ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-icu-sources-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-init-patch                ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-remove-sloppy-m4-patch    ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-riscv64gc-patch           ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-skip-failing-tests-patch  ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-soname-patch              ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-spidermonkey-checks-patch ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-tests-patch               ; ./create.patch.sh ) ; \
+	 ( cd create-102.15.0-x86-patch                 ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: mozjs/create-102.15.0-copy-headers-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-copy-headers-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-copy-headers-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-copy-headers.patch
+
+mv firefox-$VERSION-copy-headers.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-copy-headers-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-copy-headers-patch/file.list
===================================================================
--- mozjs/create-102.15.0-copy-headers-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-copy-headers-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/python/mozbuild/mozbuild/backend/recursivemake.py
Index: mozjs/create-102.15.0-copy-headers-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/backend/recursivemake.py
===================================================================
--- mozjs/create-102.15.0-copy-headers-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/backend/recursivemake.py	(nonexistent)
+++ mozjs/create-102.15.0-copy-headers-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/backend/recursivemake.py	(revision 385)
@@ -0,0 +1,1905 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+import io
+import logging
+import os
+import re
+import six
+
+from collections import defaultdict, namedtuple
+from itertools import chain
+from operator import itemgetter
+from six import StringIO
+
+from mozpack.manifests import InstallManifest
+import mozpack.path as mozpath
+
+from mozbuild import frontend
+from mozbuild.frontend.context import (
+    AbsolutePath,
+    Path,
+    RenamedSourcePath,
+    SourcePath,
+    ObjDirPath,
+)
+from .common import CommonBackend
+from .make import MakeBackend
+from ..frontend.data import (
+    BaseLibrary,
+    BaseProgram,
+    BaseRustLibrary,
+    ChromeManifestEntry,
+    ComputedFlags,
+    ConfigFileSubstitution,
+    ContextDerived,
+    Defines,
+    DirectoryTraversal,
+    ExternalLibrary,
+    FinalTargetFiles,
+    FinalTargetPreprocessedFiles,
+    GeneratedFile,
+    HostDefines,
+    HostLibrary,
+    HostProgram,
+    HostRustProgram,
+    HostSimpleProgram,
+    HostSources,
+    InstallationTarget,
+    JARManifest,
+    Linkable,
+    LocalInclude,
+    LocalizedFiles,
+    LocalizedPreprocessedFiles,
+    ObjdirFiles,
+    ObjdirPreprocessedFiles,
+    PerSourceFlag,
+    Program,
+    HostSharedLibrary,
+    RustProgram,
+    RustTests,
+    SandboxedWasmLibrary,
+    SharedLibrary,
+    SimpleProgram,
+    Sources,
+    StaticLibrary,
+    TestManifest,
+    VariablePassthru,
+    WasmSources,
+    XPIDLModule,
+)
+from ..util import ensureParentDir, FileAvoidWrite, OrderedDefaultDict, pairwise
+from ..makeutil import Makefile
+from mozbuild.shellutil import quote as shell_quote
+
+# To protect against accidentally adding logic to Makefiles that belong in moz.build,
+# we check if moz.build-like variables are defined in Makefiles. If they are, we throw
+# an error to encourage the usage of moz.build instead.
+_MOZBUILD_ONLY_VARIABLES = set(frontend.context.VARIABLES.keys()) - {
+    # The migration to moz.build from Makefiles still isn't complete, and there's still
+    # some straggling Makefile logic that uses variables that only moz.build should
+    # use.
+    # These remaining variables are excluded from our blacklist. As the variables here
+    # are migrated from Makefiles in the future, they should be removed from this
+    # "override" list.
+    "XPI_NAME",
+    "USE_EXTENSION_MANIFEST",
+    "CFLAGS",
+    "CXXFLAGS",
+}
+
+DEPRECATED_VARIABLES = [
+    "ALLOW_COMPILER_WARNINGS",
+    "EXPORT_LIBRARY",
+    "EXTRA_LIBS",
+    "FAIL_ON_WARNINGS",
+    "HOST_LIBS",
+    "LIBXUL_LIBRARY",
+    "MOCHITEST_A11Y_FILES",
+    "MOCHITEST_BROWSER_FILES",
+    "MOCHITEST_BROWSER_FILES_PARTS",
+    "MOCHITEST_CHROME_FILES",
+    "MOCHITEST_FILES",
+    "MOCHITEST_FILES_PARTS",
+    "MOCHITEST_METRO_FILES",
+    "MOCHITEST_ROBOCOP_FILES",
+    "MODULE_OPTIMIZE_FLAGS",
+    "MOZ_CHROME_FILE_FORMAT",
+    "SHORT_LIBNAME",
+    "TESTING_JS_MODULES",
+    "TESTING_JS_MODULE_DIR",
+]
+
+MOZBUILD_VARIABLES_MESSAGE = "It should only be defined in moz.build files."
+
+DEPRECATED_VARIABLES_MESSAGE = (
+    "This variable has been deprecated. It does nothing. It must be removed "
+    "in order to build."
+)
+
+
+def make_quote(s):
+    return s.replace("#", "\#").replace("$", "$$")
+
+
+class BackendMakeFile(object):
+    """Represents a generated backend.mk file.
+
+    This is both a wrapper around a file handle as well as a container that
+    holds accumulated state.
+
+    It's worth taking a moment to explain the make dependencies. The
+    generated backend.mk as well as the Makefile.in (if it exists) are in the
+    GLOBAL_DEPS list. This means that if one of them changes, all targets
+    in that Makefile are invalidated. backend.mk also depends on all of its
+    input files.
+
+    It's worth considering the effect of file mtimes on build behavior.
+
+    Since we perform an "all or none" traversal of moz.build files (the whole
+    tree is scanned as opposed to individual files), if we were to blindly
+    write backend.mk files, the net effect of updating a single mozbuild file
+    in the tree is all backend.mk files have new mtimes. This would in turn
+    invalidate all make targets across the whole tree! This would effectively
+    undermine incremental builds as any mozbuild change would cause the entire
+    tree to rebuild!
+
+    The solution is to not update the mtimes of backend.mk files unless they
+    actually change. We use FileAvoidWrite to accomplish this.
+    """
+
+    def __init__(self, srcdir, objdir, environment, topsrcdir, topobjdir, dry_run):
+        self.topsrcdir = topsrcdir
+        self.srcdir = srcdir
+        self.objdir = objdir
+        self.relobjdir = mozpath.relpath(objdir, topobjdir)
+        self.environment = environment
+        self.name = mozpath.join(objdir, "backend.mk")
+
+        self.xpt_name = None
+
+        self.fh = FileAvoidWrite(self.name, capture_diff=True, dry_run=dry_run)
+        self.fh.write("# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT EDIT.\n")
+        self.fh.write("\n")
+
+    def write(self, buf):
+        self.fh.write(buf)
+
+    def write_once(self, buf):
+        buf = six.ensure_text(buf)
+        if "\n" + buf not in six.ensure_text(self.fh.getvalue()):
+            self.write(buf)
+
+    # For compatibility with makeutil.Makefile
+    def add_statement(self, stmt):
+        self.write("%s\n" % stmt)
+
+    def close(self):
+        if self.xpt_name:
+            # We just recompile all xpidls because it's easier and less error
+            # prone.
+            self.fh.write("NONRECURSIVE_TARGETS += export\n")
+            self.fh.write("NONRECURSIVE_TARGETS_export += xpidl\n")
+            self.fh.write(
+                "NONRECURSIVE_TARGETS_export_xpidl_DIRECTORY = "
+                "$(DEPTH)/xpcom/xpidl\n"
+            )
+            self.fh.write("NONRECURSIVE_TARGETS_export_xpidl_TARGETS += " "export\n")
+
+        return self.fh.close()
+
+    @property
+    def diff(self):
+        return self.fh.diff
+
+
+class RecursiveMakeTraversal(object):
+    """
+    Helper class to keep track of how the "traditional" recursive make backend
+    recurses subdirectories. This is useful until all adhoc rules are removed
+    from Makefiles.
+
+    Each directory may have one or more types of subdirectories:
+        - (normal) dirs
+        - tests
+    """
+
+    SubDirectoryCategories = ["dirs", "tests"]
+    SubDirectoriesTuple = namedtuple("SubDirectories", SubDirectoryCategories)
+
+    class SubDirectories(SubDirectoriesTuple):
+        def __new__(self):
+            return RecursiveMakeTraversal.SubDirectoriesTuple.__new__(self, [], [])
+
+    def __init__(self):
+        self._traversal = {}
+        self._attached = set()
+
+    def add(self, dir, dirs=[], tests=[]):
+        """
+        Adds a directory to traversal, registering its subdirectories,
+        sorted by categories. If the directory was already added to
+        traversal, adds the new subdirectories to the already known lists.
+        """
+        subdirs = self._traversal.setdefault(dir, self.SubDirectories())
+        for key, value in (("dirs", dirs), ("tests", tests)):
+            assert key in self.SubDirectoryCategories
+            # Callers give us generators
+            value = list(value)
+            getattr(subdirs, key).extend(value)
+            self._attached |= set(value)
+
+    @staticmethod
+    def default_filter(current, subdirs):
+        """
+        Default filter for use with compute_dependencies and traverse.
+        """
+        return current, [], subdirs.dirs + subdirs.tests
+
+    def call_filter(self, current, filter):
+        """
+        Helper function to call a filter from compute_dependencies and
+        traverse.
+        """
+        return filter(current, self.get_subdirs(current))
+
+    def compute_dependencies(self, filter=None):
+        """
+        Compute make dependencies corresponding to the registered directory
+        traversal.
+
+        filter is a function with the following signature:
+            def filter(current, subdirs)
+        where current is the directory being traversed, and subdirs the
+        SubDirectories instance corresponding to it.
+        The filter function returns a tuple (filtered_current, filtered_parallel,
+        filtered_dirs) where filtered_current is either current or None if
+        the current directory is to be skipped, and filtered_parallel and
+        filtered_dirs are lists of parallel directories and sequential
+        directories, which can be rearranged from whatever is given in the
+        SubDirectories members.
+
+        The default filter corresponds to a default recursive traversal.
+
+        """
+        filter = filter or self.default_filter
+
+        deps = {}
+
+        def recurse(start_node, prev_nodes=None):
+            current, parallel, sequential = self.call_filter(start_node, filter)
+            if current is not None:
+                if start_node != "":
+                    deps[start_node] = prev_nodes
+                prev_nodes = (start_node,)
+            if start_node not in self._traversal:
+                return prev_nodes
+            parallel_nodes = []
+            for node in parallel:
+                nodes = recurse(node, prev_nodes)
+                if nodes and nodes != ("",):
+                    parallel_nodes.extend(nodes)
+            if parallel_nodes:
+                prev_nodes = tuple(parallel_nodes)
+            for dir in sequential:
+                prev_nodes = recurse(dir, prev_nodes)
+            return prev_nodes
+
+        return recurse(""), deps
+
+    def traverse(self, start, filter=None):
+        """
+        Iterate over the filtered subdirectories, following the traditional
+        make traversal order.
+        """
+        if filter is None:
+            filter = self.default_filter
+
+        current, parallel, sequential = self.call_filter(start, filter)
+        if current is not None:
+            yield start
+        if start not in self._traversal:
+            return
+        for node in parallel:
+            for n in self.traverse(node, filter):
+                yield n
+        for dir in sequential:
+            for d in self.traverse(dir, filter):
+                yield d
+
+    def get_subdirs(self, dir):
+        """
+        Returns all direct subdirectories under the given directory.
+        """
+        result = self._traversal.get(dir, self.SubDirectories())
+        if dir == "":
+            unattached = set(self._traversal) - self._attached - set([""])
+            if unattached:
+                new_result = self.SubDirectories()
+                new_result.dirs.extend(result.dirs)
+                new_result.dirs.extend(sorted(unattached))
+                new_result.tests.extend(result.tests)
+                result = new_result
+        return result
+
+
+class RecursiveMakeBackend(MakeBackend):
+    """Backend that integrates with the existing recursive make build system.
+
+    This backend facilitates the transition from Makefile.in to moz.build
+    files.
+
+    This backend performs Makefile.in -> Makefile conversion. It also writes
+    out .mk files containing content derived from moz.build files. Both are
+    consumed by the recursive make builder.
+
+    This backend may eventually evolve to write out non-recursive make files.
+    However, as long as there are Makefile.in files in the tree, we are tied to
+    recursive make and thus will need this backend.
+    """
+
+    def _init(self):
+        MakeBackend._init(self)
+
+        self._backend_files = {}
+        self._idl_dirs = set()
+
+        self._makefile_in_count = 0
+        self._makefile_out_count = 0
+
+        self._test_manifests = {}
+
+        self.backend_input_files.add(
+            mozpath.join(self.environment.topobjdir, "config", "autoconf.mk")
+        )
+
+        self._install_manifests = defaultdict(InstallManifest)
+        # The build system relies on some install manifests always existing
+        # even if they are empty, because the directories are still filled
+        # by the build system itself, and the install manifests are only
+        # used for a "magic" rm -rf.
+        self._install_manifests["dist_public"]
+        self._install_manifests["dist_private"]
+
+        self._traversal = RecursiveMakeTraversal()
+        self._compile_graph = OrderedDefaultDict(set)
+        self._rust_targets = set()
+        self._rust_lib_targets = set()
+        self._gkrust_target = None
+        self._pre_compile = set()
+
+        self._no_skip = {
+            "pre-export": set(),
+            "export": set(),
+            "libs": set(),
+            "misc": set(),
+            "tools": set(),
+            "check": set(),
+            "syms": set(),
+        }
+
+    def summary(self):
+        summary = super(RecursiveMakeBackend, self).summary()
+        summary.extend(
+            "; {makefile_in:d} -> {makefile_out:d} Makefile",
+            makefile_in=self._makefile_in_count,
+            makefile_out=self._makefile_out_count,
+        )
+        return summary
+
+    def _get_backend_file_for(self, obj):
+        # For generated files that we put in the export or misc tiers, we use the
+        # top-level backend file, except for localized files, which we need to keep
+        # in each directory for dependencies from jar manifests for l10n repacks.
+        if (
+            isinstance(obj, GeneratedFile)
+            and not obj.required_during_compile
+            and not obj.localized
+        ):
+            objdir = self.environment.topobjdir
+        else:
+            objdir = obj.objdir
+
+        if objdir not in self._backend_files:
+            self._backend_files[objdir] = BackendMakeFile(
+                obj.srcdir,
+                objdir,
+                obj.config,
+                obj.topsrcdir,
+                self.environment.topobjdir,
+                self.dry_run,
+            )
+        return self._backend_files[objdir]
+
+    def consume_object(self, obj):
+        """Write out build files necessary to build with recursive make."""
+
+        if not isinstance(obj, ContextDerived):
+            return False
+
+        backend_file = self._get_backend_file_for(obj)
+
+        consumed = CommonBackend.consume_object(self, obj)
+
+        # CommonBackend handles XPIDLModule, but we want to do
+        # some extra things for them.
+        if isinstance(obj, XPIDLModule):
+            backend_file.xpt_name = "%s.xpt" % obj.name
+            self._idl_dirs.add(obj.relobjdir)
+
+        # If CommonBackend acknowledged the object, we're done with it.
+        if consumed:
+            return True
+
+        if not isinstance(obj, Defines):
+            self.consume_object(obj.defines)
+
+        if isinstance(obj, Linkable):
+            self._process_test_support_file(obj)
+
+        if isinstance(obj, DirectoryTraversal):
+            self._process_directory_traversal(obj, backend_file)
+        elif isinstance(obj, ConfigFileSubstitution):
+            # Other ConfigFileSubstitution should have been acked by
+            # CommonBackend.
+            assert os.path.basename(obj.output_path) == "Makefile"
+            self._create_makefile(obj)
+        elif isinstance(obj, Sources):
+            suffix_map = {
+                ".s": "ASFILES",
+                ".c": "CSRCS",
+                ".m": "CMSRCS",
+                ".mm": "CMMSRCS",
+                ".cpp": "CPPSRCS",
+                ".S": "SSRCS",
+            }
+            variables = [suffix_map[obj.canonical_suffix]]
+            for files, base, cls, prefix in (
+                (obj.static_files, backend_file.srcdir, SourcePath, ""),
+                (obj.generated_files, backend_file.objdir, ObjDirPath, "!"),
+            ):
+                for f in sorted(files):
+                    p = self._pretty_path(
+                        cls(obj._context, prefix + mozpath.relpath(f, base)),
+                        backend_file,
+                    )
+                    for var in variables:
+                        backend_file.write("%s += %s\n" % (var, p))
+            self._compile_graph[mozpath.join(backend_file.relobjdir, "target-objects")]
+        elif isinstance(obj, HostSources):
+            suffix_map = {
+                ".c": "HOST_CSRCS",
+                ".mm": "HOST_CMMSRCS",
+                ".cpp": "HOST_CPPSRCS",
+            }
+            variables = [suffix_map[obj.canonical_suffix]]
+            for files, base, cls, prefix in (
+                (obj.static_files, backend_file.srcdir, SourcePath, ""),
+                (obj.generated_files, backend_file.objdir, ObjDirPath, "!"),
+            ):
+                for f in sorted(files):
+                    p = self._pretty_path(
+                        cls(obj._context, prefix + mozpath.relpath(f, base)),
+                        backend_file,
+                    )
+                    for var in variables:
+                        backend_file.write("%s += %s\n" % (var, p))
+            self._compile_graph[mozpath.join(backend_file.relobjdir, "host-objects")]
+        elif isinstance(obj, WasmSources):
+            suffix_map = {".c": "WASM_CSRCS", ".cpp": "WASM_CPPSRCS"}
+            variables = [suffix_map[obj.canonical_suffix]]
+            for files, base, cls, prefix in (
+                (obj.static_files, backend_file.srcdir, SourcePath, ""),
+                (obj.generated_files, backend_file.objdir, ObjDirPath, "!"),
+            ):
+                for f in sorted(files):
+                    p = self._pretty_path(
+                        cls(obj._context, prefix + mozpath.relpath(f, base)),
+                        backend_file,
+                    )
+                    for var in variables:
+                        backend_file.write("%s += %s\n" % (var, p))
+            self._compile_graph[mozpath.join(backend_file.relobjdir, "target-objects")]
+        elif isinstance(obj, VariablePassthru):
+            # Sorted so output is consistent and we don't bump mtimes.
+            for k, v in sorted(obj.variables.items()):
+                if isinstance(v, list):
+                    for item in v:
+                        backend_file.write(
+                            "%s += %s\n" % (k, make_quote(shell_quote(item)))
+                        )
+                elif isinstance(v, bool):
+                    if v:
+                        backend_file.write("%s := 1\n" % k)
+                elif isinstance(v, Path):
+                    path = self._pretty_path(Path(obj._context, v), backend_file)
+                    backend_file.write("%s := %s\n" % (k, path))
+                else:
+                    backend_file.write("%s := %s\n" % (k, v))
+        elif isinstance(obj, HostDefines):
+            self._process_defines(obj, backend_file, which="HOST_DEFINES")
+        elif isinstance(obj, Defines):
+            self._process_defines(obj, backend_file)
+
+        elif isinstance(obj, GeneratedFile):
+            if obj.required_before_export:
+                tier = "pre-export"
+            elif obj.required_before_compile:
+                tier = "export"
+            elif obj.required_during_compile:
+                tier = "pre-compile"
+            else:
+                tier = "misc"
+            relobjdir = mozpath.relpath(obj.objdir, self.environment.topobjdir)
+            if tier == "pre-compile":
+                self._pre_compile.add(relobjdir)
+            else:
+                self._no_skip[tier].add(relobjdir)
+            backend_file.write_once("include $(topsrcdir)/config/AB_rCD.mk\n")
+            relobjdir = mozpath.relpath(obj.objdir, backend_file.objdir)
+            # For generated files that we handle in the top-level backend file,
+            # we want to have a `directory/tier` target depending on the file.
+            # For the others, we want a `tier` target.
+            if tier != "pre-compile" and relobjdir:
+                tier = "%s/%s" % (relobjdir, tier)
+            for stmt in self._format_statements_for_generated_file(
+                obj, tier, extra_dependencies="backend.mk" if obj.flags else ""
+            ):
+                backend_file.write(stmt + "\n")
+
+        elif isinstance(obj, JARManifest):
+            self._no_skip["misc"].add(backend_file.relobjdir)
+            backend_file.write("JAR_MANIFEST := %s\n" % obj.path.full_path)
+
+        elif isinstance(obj, RustProgram):
+            self._process_rust_program(obj, backend_file)
+            # Hook the program into the compile graph.
+            build_target = self._build_target_for_obj(obj)
+            self._compile_graph[build_target]
+            self._rust_targets.add(build_target)
+
+        elif isinstance(obj, HostRustProgram):
+            self._process_host_rust_program(obj, backend_file)
+            # Hook the program into the compile graph.
+            build_target = self._build_target_for_obj(obj)
+            self._compile_graph[build_target]
+            self._rust_targets.add(build_target)
+
+        elif isinstance(obj, RustTests):
+            self._process_rust_tests(obj, backend_file)
+
+        elif isinstance(obj, Program):
+            self._process_program(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+            self._no_skip["syms"].add(backend_file.relobjdir)
+
+        elif isinstance(obj, HostProgram):
+            self._process_host_program(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+
+        elif isinstance(obj, SimpleProgram):
+            self._process_simple_program(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+            self._no_skip["syms"].add(backend_file.relobjdir)
+
+        elif isinstance(obj, HostSimpleProgram):
+            self._process_host_simple_program(obj.program, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+
+        elif isinstance(obj, LocalInclude):
+            self._process_local_include(obj.path, backend_file)
+
+        elif isinstance(obj, PerSourceFlag):
+            self._process_per_source_flag(obj, backend_file)
+
+        elif isinstance(obj, ComputedFlags):
+            self._process_computed_flags(obj, backend_file)
+
+        elif isinstance(obj, InstallationTarget):
+            self._process_installation_target(obj, backend_file)
+
+        elif isinstance(obj, BaseRustLibrary):
+            self.backend_input_files.add(obj.cargo_file)
+            self._process_rust_library(obj, backend_file)
+            # No need to call _process_linked_libraries, because Rust
+            # libraries are self-contained objects at this point.
+
+            # Hook the library into the compile graph.
+            build_target = self._build_target_for_obj(obj)
+            self._compile_graph[build_target]
+            self._rust_targets.add(build_target)
+            self._rust_lib_targets.add(build_target)
+            if obj.is_gkrust:
+                self._gkrust_target = build_target
+
+        elif isinstance(obj, SharedLibrary):
+            self._process_shared_library(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+            self._no_skip["syms"].add(backend_file.relobjdir)
+
+        elif isinstance(obj, StaticLibrary):
+            self._process_static_library(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+
+        elif isinstance(obj, SandboxedWasmLibrary):
+            self._process_sandboxed_wasm_library(obj, backend_file)
+            self._no_skip["syms"].add(backend_file.relobjdir)
+
+        elif isinstance(obj, HostLibrary):
+            self._process_linked_libraries(obj, backend_file)
+
+        elif isinstance(obj, HostSharedLibrary):
+            self._process_host_shared_library(obj, backend_file)
+            self._process_linked_libraries(obj, backend_file)
+
+        elif isinstance(obj, ObjdirFiles):
+            self._process_objdir_files(obj, obj.files, backend_file)
+
+        elif isinstance(obj, ObjdirPreprocessedFiles):
+            self._process_final_target_pp_files(
+                obj, obj.files, backend_file, "OBJDIR_PP_FILES"
+            )
+
+        elif isinstance(obj, LocalizedFiles):
+            self._process_localized_files(obj, obj.files, backend_file)
+
+        elif isinstance(obj, LocalizedPreprocessedFiles):
+            self._process_localized_pp_files(obj, obj.files, backend_file)
+
+        elif isinstance(obj, FinalTargetFiles):
+            self._process_final_target_files(obj, obj.files, backend_file)
+
+        elif isinstance(obj, FinalTargetPreprocessedFiles):
+            self._process_final_target_pp_files(
+                obj, obj.files, backend_file, "DIST_FILES"
+            )
+
+        elif isinstance(obj, ChromeManifestEntry):
+            self._process_chrome_manifest_entry(obj, backend_file)
+
+        elif isinstance(obj, TestManifest):
+            self._process_test_manifest(obj, backend_file)
+
+        else:
+            return False
+
+        return True
+
+    def _fill_root_mk(self):
+        """
+        Create two files, root.mk and root-deps.mk, the first containing
+        convenience variables, and the other dependency definitions for a
+        hopefully proper directory traversal.
+        """
+        for tier, no_skip in self._no_skip.items():
+            self.log(
+                logging.DEBUG,
+                "fill_root_mk",
+                {"number": len(no_skip), "tier": tier},
+                "Using {number} directories during {tier}",
+            )
+
+        def should_skip(tier, dir):
+            if tier in self._no_skip:
+                return dir not in self._no_skip[tier]
+            return False
+
+        # Traverse directories in parallel, and skip static dirs
+        def parallel_filter(current, subdirs):
+            all_subdirs = subdirs.dirs + subdirs.tests
+            if should_skip(tier, current) or current.startswith("subtiers/"):
+                current = None
+            return current, all_subdirs, []
+
+        # build everything in parallel, including static dirs
+        # Because of bug 925236 and possible other unknown race conditions,
+        # don't parallelize the libs tier.
+        def libs_filter(current, subdirs):
+            if should_skip("libs", current) or current.startswith("subtiers/"):
+                current = None
+            return current, [], subdirs.dirs + subdirs.tests
+
+        # Because of bug 925236 and possible other unknown race conditions,
+        # don't parallelize the tools tier. There aren't many directories for
+        # this tier anyways.
+        def tools_filter(current, subdirs):
+            if should_skip("tools", current) or current.startswith("subtiers/"):
+                current = None
+            return current, [], subdirs.dirs + subdirs.tests
+
+        filters = [
+            ("export", parallel_filter),
+            ("libs", libs_filter),
+            ("misc", parallel_filter),
+            ("tools", tools_filter),
+            ("check", parallel_filter),
+        ]
+
+        root_deps_mk = Makefile()
+
+        # Fill the dependencies for traversal of each tier.
+        for tier, filter in sorted(filters, key=itemgetter(0)):
+            main, all_deps = self._traversal.compute_dependencies(filter)
+            for dir, deps in sorted(all_deps.items()):
+                if deps is not None or (dir in self._idl_dirs and tier == "export"):
+                    rule = root_deps_mk.create_rule(["%s/%s" % (dir, tier)])
+                    if deps:
+                        rule.add_dependencies(
+                            "%s/%s" % (d, tier) for d in sorted(deps) if d
+                        )
+            rule = root_deps_mk.create_rule(["recurse_%s" % tier])
+            if main:
+                rule.add_dependencies("%s/%s" % (d, tier) for d in sorted(main))
+
+        rule = root_deps_mk.create_rule(["recurse_pre-compile"])
+        rule.add_dependencies("%s/pre-compile" % d for d in sorted(self._pre_compile))
+
+        targets_with_pre_compile = sorted(
+            t for t in self._compile_graph if mozpath.dirname(t) in self._pre_compile
+        )
+        for t in targets_with_pre_compile:
+            relobjdir = mozpath.dirname(t)
+            rule = root_deps_mk.create_rule([t])
+            rule.add_dependencies(["%s/pre-compile" % relobjdir])
+
+        all_compile_deps = (
+            six.moves.reduce(lambda x, y: x | y, self._compile_graph.values())
+            if self._compile_graph
+            else set()
+        )
+        # Include the following as dependencies of the top recursion target for
+        # compilation:
+        # - nodes that are not dependended upon by anything. Typically, this
+        #   would include programs, that need to be recursed, but that nothing
+        #   depends on.
+        # - nodes that have no dependencies of their own. Technically, this is
+        #   not necessary, because other things have dependencies on them, and
+        #   they all end up rooting to nodes from the above category. But the
+        #   way make works[1] is such that there can be benefits listing them
+        #   as direct dependencies of the top recursion target, to somehow
+        #   prioritize them.
+        #   1. See bug 1262241 comment 5.
+        compile_roots = [
+            t
+            for t, deps in six.iteritems(self._compile_graph)
+            if not deps or t not in all_compile_deps
+        ]
+
+        def add_category_rules(category, roots, graph):
+            rule = root_deps_mk.create_rule(["recurse_%s" % category])
+            # Directories containing rust compilations don't generally depend
+            # on other directories in the tree, so putting them first here will
+            # start them earlier in the build.
+            rust_roots = sorted(r for r in roots if r in self._rust_targets)
+            rust_libs = sorted(r for r in roots if r in self._rust_lib_targets)
+            if category == "compile" and rust_roots:
+                rust_rule = root_deps_mk.create_rule(["recurse_rust"])
+                rust_rule.add_dependencies(rust_roots)
+                # Ensure our cargo invocations are serialized, and gecko comes
+                # first. Cargo will lock on the build output directory anyway,
+                # so trying to run things in parallel is not useful. Dependencies
+                # for gecko are especially expensive to build and parallelize
+                # poorly, so prioritizing these will save some idle time in full
+                # builds.
+                for prior_target, target in pairwise(
+                    sorted(
+                        [t for t in rust_libs], key=lambda t: t != self._gkrust_target
+                    )
+                ):
+                    r = root_deps_mk.create_rule([target])
+                    r.add_dependencies([prior_target])
+
+            rule.add_dependencies(chain(rust_roots, sorted(roots)))
+            for target, deps in sorted(graph.items()):
+                if deps:
+                    rule = root_deps_mk.create_rule([target])
+                    rule.add_dependencies(sorted(deps))
+
+        non_default_roots = defaultdict(list)
+        non_default_graphs = defaultdict(lambda: OrderedDefaultDict(set))
+
+        for root in compile_roots:
+            # If this is a non-default target, separate the root from the
+            # rest of the compile graph.
+            target_name = mozpath.basename(root)
+
+            if target_name not in ("target", "target-objects", "host", "host-objects"):
+                non_default_roots[target_name].append(root)
+                non_default_graphs[target_name][root] = self._compile_graph[root]
+                del self._compile_graph[root]
+
+        for root in chain(*non_default_roots.values()):
+            compile_roots.remove(root)
+            dirname = mozpath.dirname(root)
+            # If a directory only contains non-default compile targets, we don't
+            # attempt to dump symbols there.
+            if (
+                dirname in self._no_skip["syms"]
+                and "%s/target" % dirname not in self._compile_graph
+            ):
+                self._no_skip["syms"].remove(dirname)
+
+        add_category_rules("compile", compile_roots, self._compile_graph)
+        for category, graph in sorted(six.iteritems(non_default_graphs)):
+            add_category_rules(category, non_default_roots[category], graph)
+
+        root_mk = Makefile()
+
+        # Fill root.mk with the convenience variables.
+        for tier, filter in filters:
+            all_dirs = self._traversal.traverse("", filter)
+            root_mk.add_statement("%s_dirs := %s" % (tier, " ".join(all_dirs)))
+
+        # Need a list of compile targets because we can't use pattern rules:
+        # https://savannah.gnu.org/bugs/index.php?42833
+        root_mk.add_statement(
+            "pre_compile_targets := %s"
+            % " ".join(sorted("%s/pre-compile" % p for p in self._pre_compile))
+        )
+        root_mk.add_statement(
+            "compile_targets := %s"
+            % " ".join(sorted(set(self._compile_graph.keys()) | all_compile_deps))
+        )
+        root_mk.add_statement(
+            "syms_targets := %s"
+            % " ".join(sorted(set("%s/syms" % d for d in self._no_skip["syms"])))
+        )
+        root_mk.add_statement(
+            "rust_targets := %s" % " ".join(sorted(self._rust_targets))
+        )
+
+        root_mk.add_statement(
+            "non_default_tiers := %s" % " ".join(sorted(non_default_roots.keys()))
+        )
+
+        for category, graphs in sorted(six.iteritems(non_default_graphs)):
+            category_dirs = [mozpath.dirname(target) for target in graphs.keys()]
+            root_mk.add_statement("%s_dirs := %s" % (category, " ".join(category_dirs)))
+
+        root_mk.add_statement("include root-deps.mk")
+
+        with self._write_file(
+            mozpath.join(self.environment.topobjdir, "root.mk")
+        ) as root:
+            root_mk.dump(root, removal_guard=False)
+
+        with self._write_file(
+            mozpath.join(self.environment.topobjdir, "root-deps.mk")
+        ) as root_deps:
+            root_deps_mk.dump(root_deps, removal_guard=False)
+
+    def _add_unified_build_rules(
+        self,
+        makefile,
+        unified_source_mapping,
+        unified_files_makefile_variable="unified_files",
+        include_curdir_build_rules=True,
+    ):
+
+        # In case it's a generator.
+        unified_source_mapping = sorted(unified_source_mapping)
+
+        explanation = (
+            "\n"
+            "# We build files in 'unified' mode by including several files\n"
+            "# together into a single source file.  This cuts down on\n"
+            "# compilation times and debug information size."
+        )
+        makefile.add_statement(explanation)
+
+        all_sources = " ".join(source for source, _ in unified_source_mapping)
+        makefile.add_statement(
+            "%s := %s" % (unified_files_makefile_variable, all_sources)
+        )
+
+        if include_curdir_build_rules:
+            makefile.add_statement(
+                "\n"
+                '# Make sometimes gets confused between "foo" and "$(CURDIR)/foo".\n'
+                "# Help it out by explicitly specifiying dependencies."
+            )
+            makefile.add_statement(
+                "all_absolute_unified_files := \\\n"
+                "  $(addprefix $(CURDIR)/,$(%s))" % unified_files_makefile_variable
+            )
+            rule = makefile.create_rule(["$(all_absolute_unified_files)"])
+            rule.add_dependencies(["$(CURDIR)/%: %"])
+
+    def _check_blacklisted_variables(self, makefile_in, makefile_content):
+        if "EXTERNALLY_MANAGED_MAKE_FILE" in makefile_content:
+            # Bypass the variable restrictions for externally managed makefiles.
+            return
+
+        for l in makefile_content.splitlines():
+            l = l.strip()
+            # Don't check comments
+            if l.startswith("#"):
+                continue
+            for x in chain(_MOZBUILD_ONLY_VARIABLES, DEPRECATED_VARIABLES):
+                if x not in l:
+                    continue
+
+                # Finding the variable name in the Makefile is not enough: it
+                # may just appear as part of something else, like DIRS appears
+                # in GENERATED_DIRS.
+                if re.search(r"\b%s\s*[:?+]?=" % x, l):
+                    if x in _MOZBUILD_ONLY_VARIABLES:
+                        message = MOZBUILD_VARIABLES_MESSAGE
+                    else:
+                        message = DEPRECATED_VARIABLES_MESSAGE
+                    raise Exception(
+                        "Variable %s is defined in %s. %s" % (x, makefile_in, message)
+                    )
+
+    def consume_finished(self):
+        CommonBackend.consume_finished(self)
+
+        for objdir, backend_file in sorted(self._backend_files.items()):
+            srcdir = backend_file.srcdir
+            with self._write_file(fh=backend_file) as bf:
+                makefile_in = mozpath.join(srcdir, "Makefile.in")
+                makefile = mozpath.join(objdir, "Makefile")
+
+                # If Makefile.in exists, use it as a template. Otherwise,
+                # create a stub.
+                stub = not os.path.exists(makefile_in)
+                if not stub:
+                    self.log(
+                        logging.DEBUG,
+                        "substitute_makefile",
+                        {"path": makefile},
+                        "Substituting makefile: {path}",
+                    )
+                    self._makefile_in_count += 1
+
+                    # In the export and libs tiers, we don't skip directories
+                    # containing a Makefile.in.
+                    # topobjdir is handled separatedly, don't do anything for
+                    # it.
+                    if bf.relobjdir:
+                        for tier in ("export", "libs"):
+                            self._no_skip[tier].add(bf.relobjdir)
+                else:
+                    self.log(
+                        logging.DEBUG,
+                        "stub_makefile",
+                        {"path": makefile},
+                        "Creating stub Makefile: {path}",
+                    )
+
+                obj = self.Substitution()
+                obj.output_path = makefile
+                obj.input_path = makefile_in
+                obj.topsrcdir = backend_file.topsrcdir
+                obj.topobjdir = bf.environment.topobjdir
+                obj.config = bf.environment
+                self._create_makefile(obj, stub=stub)
+                with io.open(obj.output_path, encoding="utf-8") as fh:
+                    content = fh.read()
+                    # Directories with a Makefile containing a tools target, or
+                    # XPI_PKGNAME can't be skipped and must run during the
+                    # 'tools' tier.
+                    for t in ("XPI_PKGNAME", "tools"):
+                        if t not in content:
+                            continue
+                        if t == "tools" and not re.search(
+                            "(?:^|\s)tools.*::", content, re.M
+                        ):
+                            continue
+                        if objdir == self.environment.topobjdir:
+                            continue
+                        self._no_skip["tools"].add(
+                            mozpath.relpath(objdir, self.environment.topobjdir)
+                        )
+
+                    # Directories with a Makefile containing a check target
+                    # can't be skipped and must run during the 'check' tier.
+                    if re.search("(?:^|\s)check.*::", content, re.M):
+                        self._no_skip["check"].add(
+                            mozpath.relpath(objdir, self.environment.topobjdir)
+                        )
+
+                    # Detect any Makefile.ins that contain variables on the
+                    # moz.build-only list
+                    self._check_blacklisted_variables(makefile_in, content)
+
+        self._fill_root_mk()
+
+        # Make the master test manifest files.
+        for flavor, t in self._test_manifests.items():
+            install_prefix, manifests = t
+            manifest_stem = mozpath.join(install_prefix, "%s.ini" % flavor)
+            self._write_master_test_manifest(
+                mozpath.join(self.environment.topobjdir, "_tests", manifest_stem),
+                manifests,
+            )
+
+            # Catch duplicate inserts.
+            try:
+                self._install_manifests["_tests"].add_optional_exists(manifest_stem)
+            except ValueError:
+                pass
+
+        self._write_manifests("install", self._install_manifests)
+
+        ensureParentDir(mozpath.join(self.environment.topobjdir, "dist", "foo"))
+
+    def _pretty_path_parts(self, path, backend_file):
+        assert isinstance(path, Path)
+        if isinstance(path, SourcePath):
+            if path.full_path.startswith(backend_file.srcdir):
+                return "$(srcdir)", path.full_path[len(backend_file.srcdir) :]
+            if path.full_path.startswith(backend_file.topsrcdir):
+                return "$(topsrcdir)", path.full_path[len(backend_file.topsrcdir) :]
+        elif isinstance(path, ObjDirPath):
+            if path.full_path.startswith(backend_file.objdir):
+                return "", path.full_path[len(backend_file.objdir) + 1 :]
+            if path.full_path.startswith(self.environment.topobjdir):
+                return "$(DEPTH)", path.full_path[len(self.environment.topobjdir) :]
+
+        return "", path.full_path
+
+    def _pretty_path(self, path, backend_file):
+        return "".join(self._pretty_path_parts(path, backend_file))
+
+    def _process_unified_sources(self, obj):
+        backend_file = self._get_backend_file_for(obj)
+
+        suffix_map = {
+            ".c": "UNIFIED_CSRCS",
+            ".m": "UNIFIED_CMSRCS",
+            ".mm": "UNIFIED_CMMSRCS",
+            ".cpp": "UNIFIED_CPPSRCS",
+        }
+
+        var = suffix_map[obj.canonical_suffix]
+        non_unified_var = var[len("UNIFIED_") :]
+
+        if obj.have_unified_mapping:
+            self._add_unified_build_rules(
+                backend_file,
+                obj.unified_source_mapping,
+                unified_files_makefile_variable=var,
+                include_curdir_build_rules=False,
+            )
+            backend_file.write("%s += $(%s)\n" % (non_unified_var, var))
+        else:
+            # Sorted so output is consistent and we don't bump mtimes.
+            source_files = list(sorted(obj.files))
+
+            backend_file.write("%s += %s\n" % (non_unified_var, " ".join(source_files)))
+
+        self._compile_graph[mozpath.join(backend_file.relobjdir, "target-objects")]
+
+    def _process_directory_traversal(self, obj, backend_file):
+        """Process a data.DirectoryTraversal instance."""
+        fh = backend_file.fh
+
+        def relativize(base, dirs):
+            return (mozpath.relpath(d.translated, base) for d in dirs)
+
+        if obj.dirs:
+            fh.write(
+                "DIRS := %s\n" % " ".join(relativize(backend_file.objdir, obj.dirs))
+            )
+            self._traversal.add(
+                backend_file.relobjdir,
+                dirs=relativize(self.environment.topobjdir, obj.dirs),
+            )
+
+        # The directory needs to be registered whether subdirectories have been
+        # registered or not.
+        self._traversal.add(backend_file.relobjdir)
+
+    def _process_defines(self, obj, backend_file, which="DEFINES"):
+        """Output the DEFINES rules to the given backend file."""
+        defines = list(obj.get_defines())
+        if defines:
+            defines = " ".join(shell_quote(d) for d in defines)
+            backend_file.write_once("%s += %s\n" % (which, defines))
+
+    def _process_installation_target(self, obj, backend_file):
+        # A few makefiles need to be able to override the following rules via
+        # make XPI_NAME=blah commands, so we default to the lazy evaluation as
+        # much as possible here to avoid breaking things.
+        if obj.xpiname:
+            backend_file.write("XPI_NAME = %s\n" % (obj.xpiname))
+        if obj.subdir:
+            backend_file.write("DIST_SUBDIR = %s\n" % (obj.subdir))
+        if obj.target and not obj.is_custom():
+            backend_file.write("FINAL_TARGET = $(DEPTH)/%s\n" % (obj.target))
+        else:
+            backend_file.write(
+                "FINAL_TARGET = $(if $(XPI_NAME),$(DIST)/xpi-stage/$(XPI_NAME),"
+                "$(DIST)/bin)$(DIST_SUBDIR:%=/%)\n"
+            )
+
+        if not obj.enabled:
+            backend_file.write("NO_DIST_INSTALL := 1\n")
+
+    def _handle_idl_manager(self, manager):
+        build_files = self._install_manifests["xpidl"]
+
+        for p in ("Makefile", "backend.mk", ".deps/.mkdir.done"):
+            build_files.add_optional_exists(p)
+
+        for stem in manager.idl_stems():
+            self._install_manifests["dist_include"].add_optional_exists("%s.h" % stem)
+
+        for module in manager.modules:
+            build_files.add_optional_exists(mozpath.join(".deps", "%s.pp" % module))
+
+        modules = manager.modules
+        xpt_modules = sorted(modules.keys())
+
+        mk = Makefile()
+        all_directories = set()
+
+        for module_name in xpt_modules:
+            module = manager.modules[module_name]
+            all_directories |= module.directories
+            deps = sorted(module.idl_files)
+
+            # It may seem strange to have the .idl files listed as
+            # prerequisites both here and in the auto-generated .pp files.
+            # It is necessary to list them here to handle the case where a
+            # new .idl is added to an xpt. If we add a new .idl and nothing
+            # else has changed, the new .idl won't be referenced anywhere
+            # except in the command invocation. Therefore, the .xpt won't
+            # be rebuilt because the dependencies say it is up to date. By
+            # listing the .idls here, we ensure the make file has a
+            # reference to the new .idl. Since the new .idl presumably has
+            # an mtime newer than the .xpt, it will trigger xpt generation.
+
+            mk.add_statement("%s_deps := %s" % (module_name, " ".join(deps)))
+
+            build_files.add_optional_exists("%s.xpt" % module_name)
+
+        mk.add_statement("all_idl_dirs := %s" % " ".join(sorted(all_directories)))
+
+        rules = StringIO()
+        mk.dump(rules, removal_guard=False)
+
+        # Create dependency for output header so we force regeneration if the
+        # header was deleted. This ideally should not be necessary. However,
+        # some processes (such as PGO at the time this was implemented) wipe
+        # out dist/include without regard to our install manifests.
+
+        obj = self.Substitution()
+        obj.output_path = mozpath.join(
+            self.environment.topobjdir, "config", "makefiles", "xpidl", "Makefile"
+        )
+        obj.input_path = mozpath.join(
+            self.environment.topsrcdir, "config", "makefiles", "xpidl", "Makefile.in"
+        )
+        obj.topsrcdir = self.environment.topsrcdir
+        obj.topobjdir = self.environment.topobjdir
+        obj.config = self.environment
+        self._create_makefile(
+            obj,
+            extra=dict(
+                xpidl_rules=rules.getvalue(), xpidl_modules=" ".join(xpt_modules)
+            ),
+        )
+
+    def _process_program(self, obj, backend_file):
+        backend_file.write(
+            "PROGRAM = %s\n" % self._pretty_path(obj.output_path, backend_file)
+        )
+        if not obj.cxx_link and not self.environment.bin_suffix:
+            backend_file.write("PROG_IS_C_ONLY_%s := 1\n" % obj.program)
+
+    def _process_host_program(self, program, backend_file):
+        backend_file.write(
+            "HOST_PROGRAM = %s\n" % self._pretty_path(program.output_path, backend_file)
+        )
+
+    def _process_rust_program_base(
+        self, obj, backend_file, target_variable, target_cargo_variable
+    ):
+        backend_file.write_once("CARGO_FILE := %s\n" % obj.cargo_file)
+        backend_file.write_once("CARGO_TARGET_DIR := .\n")
+        backend_file.write("%s += %s\n" % (target_variable, obj.location))
+        backend_file.write("%s += %s\n" % (target_cargo_variable, obj.name))
+
+    def _process_rust_program(self, obj, backend_file):
+        self._process_rust_program_base(
+            obj, backend_file, "RUST_PROGRAMS", "RUST_CARGO_PROGRAMS"
+        )
+
+    def _process_host_rust_program(self, obj, backend_file):
+        self._process_rust_program_base(
+            obj, backend_file, "HOST_RUST_PROGRAMS", "HOST_RUST_CARGO_PROGRAMS"
+        )
+
+    def _process_rust_tests(self, obj, backend_file):
+        if obj.config.substs.get("MOZ_RUST_TESTS"):
+            # If --enable-rust-tests has been set, run these as a part of
+            # make check.
+            self._no_skip["check"].add(backend_file.relobjdir)
+            backend_file.write("check:: force-cargo-test-run\n")
+        build_target = self._build_target_for_obj(obj)
+        self._compile_graph[build_target]
+        self._process_non_default_target(obj, "force-cargo-test-run", backend_file)
+        backend_file.write_once("CARGO_FILE := $(srcdir)/Cargo.toml\n")
+        backend_file.write_once("RUST_TESTS := %s\n" % " ".join(obj.names))
+        backend_file.write_once("RUST_TEST_FEATURES := %s\n" % " ".join(obj.features))
+
+    def _process_simple_program(self, obj, backend_file):
+        if obj.is_unit_test:
+            backend_file.write("CPP_UNIT_TESTS += %s\n" % obj.program)
+            assert obj.cxx_link
+        else:
+            backend_file.write("SIMPLE_PROGRAMS += %s\n" % obj.program)
+            if not obj.cxx_link and not self.environment.bin_suffix:
+                backend_file.write("PROG_IS_C_ONLY_%s := 1\n" % obj.program)
+
+    def _process_host_simple_program(self, program, backend_file):
+        backend_file.write("HOST_SIMPLE_PROGRAMS += %s\n" % program)
+
+    def _process_test_support_file(self, obj):
+        # Ensure test support programs and libraries are tracked by an
+        # install manifest for the benefit of the test packager.
+        if not obj.install_target.startswith("_tests"):
+            return
+
+        dest_basename = None
+        if isinstance(obj, BaseLibrary):
+            dest_basename = obj.lib_name
+        elif isinstance(obj, BaseProgram):
+            dest_basename = obj.program
+        if dest_basename is None:
+            return
+
+        self._install_manifests["_tests"].add_optional_exists(
+            mozpath.join(obj.install_target[len("_tests") + 1 :], dest_basename)
+        )
+
+    def _process_test_manifest(self, obj, backend_file):
+        # Much of the logic in this function could be moved to CommonBackend.
+        for source in obj.source_relpaths:
+            self.backend_input_files.add(mozpath.join(obj.topsrcdir, source))
+
+        # Don't allow files to be defined multiple times unless it is allowed.
+        # We currently allow duplicates for non-test files or test files if
+        # the manifest is listed as a duplicate.
+        for source, (dest, is_test) in obj.installs.items():
+            try:
+                self._install_manifests["_test_files"].add_link(source, dest)
+            except ValueError:
+                if not obj.dupe_manifest and is_test:
+                    raise
+
+        for base, pattern, dest in obj.pattern_installs:
+            try:
+                self._install_manifests["_test_files"].add_pattern_link(
+                    base, pattern, dest
+                )
+            except ValueError:
+                if not obj.dupe_manifest:
+                    raise
+
+        for dest in obj.external_installs:
+            try:
+                self._install_manifests["_test_files"].add_optional_exists(dest)
+            except ValueError:
+                if not obj.dupe_manifest:
+                    raise
+
+        m = self._test_manifests.setdefault(obj.flavor, (obj.install_prefix, set()))
+        m[1].add(obj.manifest_obj_relpath)
+
+        try:
+            from reftest import ReftestManifest
+
+            if isinstance(obj.manifest, ReftestManifest):
+                # Mark included files as part of the build backend so changes
+                # result in re-config.
+                self.backend_input_files |= obj.manifest.manifests
+        except ImportError:
+            # Ignore errors caused by the reftest module not being present.
+            # This can happen when building SpiderMonkey standalone, for example.
+            pass
+
+    def _process_local_include(self, local_include, backend_file):
+        d, path = self._pretty_path_parts(local_include, backend_file)
+        if isinstance(local_include, ObjDirPath) and not d:
+            # path doesn't start with a slash in this case
+            d = "$(CURDIR)/"
+        elif d == "$(DEPTH)":
+            d = "$(topobjdir)"
+        quoted_path = shell_quote(path) if path else path
+        if quoted_path != path:
+            path = quoted_path[0] + d + quoted_path[1:]
+        else:
+            path = d + path
+        backend_file.write("LOCAL_INCLUDES += -I%s\n" % path)
+
+    def _process_per_source_flag(self, per_source_flag, backend_file):
+        for flag in per_source_flag.flags:
+            backend_file.write(
+                "%s_FLAGS += %s\n" % (mozpath.basename(per_source_flag.file_name), flag)
+            )
+
+    def _process_computed_flags(self, computed_flags, backend_file):
+        for var, flags in computed_flags.get_flags():
+            backend_file.write(
+                "COMPUTED_%s += %s\n"
+                % (var, " ".join(make_quote(shell_quote(f)) for f in flags))
+            )
+
+    def _process_non_default_target(self, libdef, target_name, backend_file):
+        backend_file.write("%s:: %s\n" % (libdef.output_category, target_name))
+        backend_file.write("MOZBUILD_NON_DEFAULT_TARGETS += %s\n" % target_name)
+
+    def _process_shared_library(self, libdef, backend_file):
+        backend_file.write_once("LIBRARY_NAME := %s\n" % libdef.basename)
+        backend_file.write("FORCE_SHARED_LIB := 1\n")
+        backend_file.write("IMPORT_LIBRARY := %s\n" % libdef.import_name)
+        backend_file.write("SHARED_LIBRARY := %s\n" % libdef.lib_name)
+        if libdef.soname:
+            backend_file.write("DSO_SONAME := %s\n" % libdef.soname)
+        if libdef.symbols_file:
+            if libdef.symbols_link_arg:
+                backend_file.write("EXTRA_DSO_LDOPTS += %s\n" % libdef.symbols_link_arg)
+        if not libdef.cxx_link:
+            backend_file.write("LIB_IS_C_ONLY := 1\n")
+        if libdef.output_category:
+            self._process_non_default_target(libdef, libdef.lib_name, backend_file)
+            # Override the install rule target for this library. This is hacky,
+            # but can go away as soon as we start building libraries in their
+            # final location (bug 1459764).
+            backend_file.write("SHARED_LIBRARY_TARGET := %s\n" % libdef.output_category)
+
+    def _process_static_library(self, libdef, backend_file):
+        backend_file.write_once("LIBRARY_NAME := %s\n" % libdef.basename)
+        backend_file.write("FORCE_STATIC_LIB := 1\n")
+        backend_file.write("REAL_LIBRARY := %s\n" % libdef.lib_name)
+        if libdef.no_expand_lib:
+            backend_file.write("NO_EXPAND_LIBS := 1\n")
+
+    def _process_sandboxed_wasm_library(self, libdef, backend_file):
+        backend_file.write("WASM_ARCHIVE := %s\n" % libdef.basename)
+
+    def _process_rust_library(self, libdef, backend_file):
+        backend_file.write_once(
+            "%s := %s\n" % (libdef.LIB_FILE_VAR, libdef.import_name)
+        )
+        backend_file.write_once("CARGO_FILE := $(srcdir)/Cargo.toml\n")
+        # Need to normalize the path so Cargo sees the same paths from all
+        # possible invocations of Cargo with this CARGO_TARGET_DIR.  Otherwise,
+        # Cargo's dependency calculations don't work as we expect and we wind
+        # up recompiling lots of things.
+        target_dir = mozpath.normpath(backend_file.environment.topobjdir)
+        backend_file.write("CARGO_TARGET_DIR := %s\n" % target_dir)
+        if libdef.features:
+            backend_file.write(
+                "%s := %s\n" % (libdef.FEATURES_VAR, " ".join(libdef.features))
+            )
+        if libdef.output_category:
+            self._process_non_default_target(libdef, libdef.import_name, backend_file)
+
+    def _process_host_shared_library(self, libdef, backend_file):
+        backend_file.write("HOST_SHARED_LIBRARY = %s\n" % libdef.lib_name)
+
+    def _build_target_for_obj(self, obj):
+        if hasattr(obj, "output_category") and obj.output_category:
+            target_name = obj.output_category
+        else:
+            target_name = obj.KIND
+        if target_name == "wasm":
+            target_name = "target"
+        return "%s/%s" % (
+            mozpath.relpath(obj.objdir, self.environment.topobjdir),
+            target_name,
+        )
+
+    def _process_linked_libraries(self, obj, backend_file):
+        def pretty_relpath(lib, name):
+            return os.path.normpath(
+                mozpath.join(mozpath.relpath(lib.objdir, obj.objdir), name)
+            )
+
+        objs, shared_libs, os_libs, static_libs = self._expand_libs(obj)
+
+        obj_target = obj.name
+        if isinstance(obj, Program):
+            obj_target = self._pretty_path(obj.output_path, backend_file)
+
+        objs_ref = " \\\n    ".join(os.path.relpath(o, obj.objdir) for o in objs)
+        # Don't bother with a list file if we're only linking objects built
+        # in this directory or building a real static library. This
+        # accommodates clang-plugin, where we would otherwise pass an
+        # incorrect list file format to the host compiler as well as when
+        # creating an archive with AR, which doesn't understand list files.
+        if (
+            objs == obj.objs
+            and not isinstance(obj, (HostLibrary, StaticLibrary, SandboxedWasmLibrary))
+            or isinstance(obj, (StaticLibrary, SandboxedWasmLibrary))
+            and obj.no_expand_lib
+        ):
+            backend_file.write_once("%s_OBJS := %s\n" % (obj.name, objs_ref))
+            backend_file.write("%s: %s\n" % (obj_target, objs_ref))
+        elif not isinstance(obj, (HostLibrary, StaticLibrary, SandboxedWasmLibrary)):
+            list_file_path = "%s.list" % obj.name.replace(".", "_")
+            list_file_ref = self._make_list_file(
+                obj.KIND, obj.objdir, objs, list_file_path
+            )
+            backend_file.write_once("%s_OBJS := %s\n" % (obj.name, list_file_ref))
+            backend_file.write_once("%s: %s\n" % (obj_target, list_file_path))
+            backend_file.write("%s: %s\n" % (obj_target, objs_ref))
+
+        for lib in shared_libs:
+            assert obj.KIND != "host" and obj.KIND != "wasm"
+            backend_file.write_once(
+                "SHARED_LIBS += %s\n" % pretty_relpath(lib, lib.import_name)
+            )
+
+        # We have to link any Rust libraries after all intermediate static
+        # libraries have been listed to ensure that the Rust libraries are
+        # searched after the C/C++ objects that might reference Rust symbols.
+        var = "HOST_LIBS" if obj.KIND == "host" else "STATIC_LIBS"
+        for lib in chain(
+            (l for l in static_libs if not isinstance(l, BaseRustLibrary)),
+            (l for l in static_libs if isinstance(l, BaseRustLibrary)),
+        ):
+            backend_file.write_once(
+                "%s += %s\n" % (var, pretty_relpath(lib, lib.import_name))
+            )
+
+        for lib in os_libs:
+            if obj.KIND == "target":
+                backend_file.write_once("OS_LIBS += %s\n" % lib)
+            elif obj.KIND == "host":
+                backend_file.write_once("HOST_EXTRA_LIBS += %s\n" % lib)
+
+        if not isinstance(obj, (StaticLibrary, HostLibrary)) or obj.no_expand_lib:
+            # This will create the node even if there aren't any linked libraries.
+            build_target = self._build_target_for_obj(obj)
+            self._compile_graph[build_target]
+
+            # Make the build target depend on all the target/host-objects that
+            # recursively are linked into it.
+            def recurse_libraries(obj):
+                for lib in obj.linked_libraries:
+                    if (
+                        isinstance(lib, (StaticLibrary, HostLibrary))
+                        and not lib.no_expand_lib
+                    ):
+                        recurse_libraries(lib)
+                    elif not isinstance(lib, ExternalLibrary):
+                        self._compile_graph[build_target].add(
+                            self._build_target_for_obj(lib)
+                        )
+                relobjdir = mozpath.relpath(obj.objdir, self.environment.topobjdir)
+                objects_target = mozpath.join(relobjdir, "%s-objects" % obj.KIND)
+                if objects_target in self._compile_graph:
+                    self._compile_graph[build_target].add(objects_target)
+
+            recurse_libraries(obj)
+
+        # Process library-based defines
+        self._process_defines(obj.lib_defines, backend_file)
+
+    def _add_install_target(self, backend_file, install_target, tier, dest, files):
+        self._no_skip[tier].add(backend_file.relobjdir)
+        for f in files:
+            backend_file.write("%s_FILES += %s\n" % (install_target, f))
+        backend_file.write("%s_DEST := %s\n" % (install_target, dest))
+        backend_file.write("%s_TARGET := %s\n" % (install_target, tier))
+        backend_file.write("INSTALL_TARGETS += %s\n" % install_target)
+
+    def _process_final_target_files(self, obj, files, backend_file):
+        target = obj.install_target
+        path = mozpath.basedir(
+            target, ("dist/bin", "dist/xpi-stage", "_tests", "dist/include")
+        )
+        if not path:
+            raise Exception("Cannot install to " + target)
+
+        # Exports are not interesting to artifact builds.
+        if path == "dist/include" and self.environment.is_artifact_build:
+            return
+
+        manifest = path.replace("/", "_")
+        install_manifest = self._install_manifests[manifest]
+        reltarget = mozpath.relpath(target, path)
+
+        for path, files in files.walk():
+            target_var = (mozpath.join(target, path) if path else target).replace(
+                "/", "_"
+            )
+            # We don't necessarily want to combine these, because non-wildcard
+            # absolute files tend to be libraries, and we don't want to mix
+            # those in with objdir headers that will be installed during export.
+            # (See bug 1642882 for details.)
+            objdir_files = []
+            absolute_files = []
+
+            for f in files:
+                assert not isinstance(f, RenamedSourcePath)
+                dest_dir = mozpath.join(reltarget, path)
+                dest_file = mozpath.join(dest_dir, f.target_basename)
+                if not isinstance(f, ObjDirPath):
+                    if "*" in f:
+                        if f.startswith("/") or isinstance(f, AbsolutePath):
+                            basepath, wild = os.path.split(f.full_path)
+                            if "*" in basepath:
+                                raise Exception(
+                                    "Wildcards are only supported in the filename part"
+                                    " of srcdir-relative or absolute paths."
+                                )
+
+                            install_manifest.add_pattern_copy(basepath, wild, dest_dir)
+                        else:
+                            install_manifest.add_pattern_copy(f.srcdir, f, dest_dir)
+                    elif isinstance(f, AbsolutePath):
+                        if not f.full_path.lower().endswith((".dll", ".pdb", ".so")):
+                            raise Exception(
+                                "Absolute paths installed to FINAL_TARGET_FILES must"
+                                " only be shared libraries or associated debug"
+                                " information."
+                            )
+                        install_manifest.add_optional_exists(dest_file)
+                        absolute_files.append(f.full_path)
+                    else:
+                        install_manifest.add_copy(f.full_path, dest_file)
+                else:
+                    install_manifest.add_optional_exists(dest_file)
+                    objdir_files.append(self._pretty_path(f, backend_file))
+            install_location = "$(DEPTH)/%s" % mozpath.join(target, path)
+            if objdir_files:
+                tier = "export" if obj.install_target == "dist/include" else "misc"
+                # We cannot generate multilocale.txt during misc at the moment.
+                if objdir_files[0] == "multilocale.txt":
+                    tier = "libs"
+                self._add_install_target(
+                    backend_file, target_var, tier, install_location, objdir_files
+                )
+            if absolute_files:
+                # Unfortunately, we can't use _add_install_target because on
+                # Windows, the absolute file paths that we want to install
+                # from often have spaces.  So we write our own rule.
+                self._no_skip["misc"].add(backend_file.relobjdir)
+                backend_file.write(
+                    "misc::\n%s\n"
+                    % "\n".join(
+                        "\t$(INSTALL) %s %s"
+                        % (make_quote(shell_quote(f)), install_location)
+                        for f in absolute_files
+                    )
+                )
+
+    def _process_final_target_pp_files(self, obj, files, backend_file, name):
+        # Bug 1177710 - We'd like to install these via manifests as
+        # preprocessed files. But they currently depend on non-standard flags
+        # being added via some Makefiles, so for now we just pass them through
+        # to the underlying Makefile.in.
+        #
+        # Note that if this becomes a manifest, OBJDIR_PP_FILES will likely
+        # still need to use PP_TARGETS internally because we can't have an
+        # install manifest for the root of the objdir.
+        for i, (path, files) in enumerate(files.walk()):
+            self._no_skip["misc"].add(backend_file.relobjdir)
+            var = "%s_%d" % (name, i)
+            for f in files:
+                backend_file.write(
+                    "%s += %s\n" % (var, self._pretty_path(f, backend_file))
+                )
+            backend_file.write(
+                "%s_PATH := $(DEPTH)/%s\n"
+                % (var, mozpath.join(obj.install_target, path))
+            )
+            backend_file.write("%s_TARGET := misc\n" % var)
+            backend_file.write("PP_TARGETS += %s\n" % var)
+
+    def _write_localized_files_files(self, files, name, backend_file):
+        for f in files:
+            if not isinstance(f, ObjDirPath):
+                # The emitter asserts that all srcdir files start with `en-US/`
+                e, f = f.split("en-US/")
+                assert not e
+                if "*" in f:
+                    # We can't use MERGE_FILE for wildcards because it takes
+                    # only the first match internally. This is only used
+                    # in one place in the tree currently so we'll hardcode
+                    # that specific behavior for now.
+                    backend_file.write(
+                        "%s += $(wildcard $(LOCALE_SRCDIR)/%s)\n" % (name, f)
+                    )
+                else:
+                    backend_file.write("%s += $(call MERGE_FILE,%s)\n" % (name, f))
+            else:
+                # Objdir files are allowed from LOCALIZED_GENERATED_FILES
+                backend_file.write(
+                    "%s += %s\n" % (name, self._pretty_path(f, backend_file))
+                )
+
+    def _process_localized_files(self, obj, files, backend_file):
+        target = obj.install_target
+        path = mozpath.basedir(target, ("dist/bin",))
+        if not path:
+            raise Exception("Cannot install localized files to " + target)
+        for i, (path, files) in enumerate(files.walk()):
+            name = "LOCALIZED_FILES_%d" % i
+            self._no_skip["misc"].add(backend_file.relobjdir)
+            self._write_localized_files_files(files, name + "_FILES", backend_file)
+            # Use FINAL_TARGET here because some l10n repack rules set
+            # XPI_NAME to generate langpacks.
+            backend_file.write("%s_DEST = $(FINAL_TARGET)/%s\n" % (name, path))
+            backend_file.write("%s_TARGET := misc\n" % name)
+            backend_file.write("INSTALL_TARGETS += %s\n" % name)
+
+    def _process_localized_pp_files(self, obj, files, backend_file):
+        target = obj.install_target
+        path = mozpath.basedir(target, ("dist/bin",))
+        if not path:
+            raise Exception("Cannot install localized files to " + target)
+        for i, (path, files) in enumerate(files.walk()):
+            name = "LOCALIZED_PP_FILES_%d" % i
+            self._no_skip["misc"].add(backend_file.relobjdir)
+            self._write_localized_files_files(files, name, backend_file)
+            # Use FINAL_TARGET here because some l10n repack rules set
+            # XPI_NAME to generate langpacks.
+            backend_file.write("%s_PATH = $(FINAL_TARGET)/%s\n" % (name, path))
+            backend_file.write("%s_TARGET := misc\n" % name)
+            # Localized files will have different content in different
+            # localizations, and some preprocessed files may not have
+            # any preprocessor directives.
+            backend_file.write(
+                "%s_FLAGS := --silence-missing-directive-warnings\n" % name
+            )
+            backend_file.write("PP_TARGETS += %s\n" % name)
+
+    def _process_objdir_files(self, obj, files, backend_file):
+        # We can't use an install manifest for the root of the objdir, since it
+        # would delete all the other files that get put there by the build
+        # system.
+        for i, (path, files) in enumerate(files.walk()):
+            self._no_skip["misc"].add(backend_file.relobjdir)
+            for f in files:
+                backend_file.write(
+                    "OBJDIR_%d_FILES += %s\n" % (i, self._pretty_path(f, backend_file))
+                )
+            backend_file.write("OBJDIR_%d_DEST := $(topobjdir)/%s\n" % (i, path))
+            backend_file.write("OBJDIR_%d_TARGET := misc\n" % i)
+            backend_file.write("INSTALL_TARGETS += OBJDIR_%d\n" % i)
+
+    def _process_chrome_manifest_entry(self, obj, backend_file):
+        fragment = Makefile()
+        rule = fragment.create_rule(targets=["misc:"])
+
+        top_level = mozpath.join(obj.install_target, "chrome.manifest")
+        if obj.path != top_level:
+            args = [
+                mozpath.join("$(DEPTH)", top_level),
+                make_quote(
+                    shell_quote(
+                        "manifest %s" % mozpath.relpath(obj.path, obj.install_target)
+                    )
+                ),
+            ]
+            rule.add_commands(["$(call py_action,buildlist,%s)" % " ".join(args)])
+        args = [
+            mozpath.join("$(DEPTH)", obj.path),
+            make_quote(shell_quote(str(obj.entry))),
+        ]
+        rule.add_commands(["$(call py_action,buildlist,%s)" % " ".join(args)])
+        fragment.dump(backend_file.fh, removal_guard=False)
+
+        self._no_skip["misc"].add(obj.relsrcdir)
+
+    def _write_manifests(self, dest, manifests):
+        man_dir = mozpath.join(self.environment.topobjdir, "_build_manifests", dest)
+
+        for k, manifest in manifests.items():
+            with self._write_file(mozpath.join(man_dir, k)) as fh:
+                manifest.write(fileobj=fh)
+
+    def _write_master_test_manifest(self, path, manifests):
+        with self._write_file(path) as master:
+            master.write(
+                "# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n\n"
+            )
+
+            for manifest in sorted(manifests):
+                master.write("[include:%s]\n" % manifest)
+
+    class Substitution(object):
+        """BaseConfigSubstitution-like class for use with _create_makefile."""
+
+        __slots__ = ("input_path", "output_path", "topsrcdir", "topobjdir", "config")
+
+    def _create_makefile(self, obj, stub=False, extra=None):
+        """Creates the given makefile. Makefiles are treated the same as
+        config files, but some additional header and footer is added to the
+        output.
+
+        When the stub argument is True, no source file is used, and a stub
+        makefile with the default header and footer only is created.
+        """
+        with self._get_preprocessor(obj) as pp:
+            if extra:
+                pp.context.update(extra)
+            if not pp.context.get("autoconfmk", ""):
+                pp.context["autoconfmk"] = "autoconf.mk"
+            pp.handleLine(
+                "# THIS FILE WAS AUTOMATICALLY GENERATED. DO NOT MODIFY BY HAND.\n"
+            )
+            pp.handleLine("DEPTH := @DEPTH@\n")
+            pp.handleLine("topobjdir := @topobjdir@\n")
+            pp.handleLine("topsrcdir := @top_srcdir@\n")
+            pp.handleLine("srcdir := @srcdir@\n")
+            pp.handleLine("srcdir_rel := @srcdir_rel@\n")
+            pp.handleLine("relativesrcdir := @relativesrcdir@\n")
+            pp.handleLine("include $(DEPTH)/config/@autoconfmk@\n")
+            if not stub:
+                pp.do_include(obj.input_path)
+            # Empty line to avoid failures when last line in Makefile.in ends
+            # with a backslash.
+            pp.handleLine("\n")
+            pp.handleLine("include $(topsrcdir)/config/recurse.mk\n")
+        if not stub:
+            # Adding the Makefile.in here has the desired side-effect
+            # that if the Makefile.in disappears, this will force
+            # moz.build traversal. This means that when we remove empty
+            # Makefile.in files, the old file will get replaced with
+            # the autogenerated one automatically.
+            self.backend_input_files.add(obj.input_path)
+
+        self._makefile_out_count += 1
+
+    def _handle_linked_rust_crates(self, obj, extern_crate_file):
+        backend_file = self._get_backend_file_for(obj)
+
+        backend_file.write("RS_STATICLIB_CRATE_SRC := %s\n" % extern_crate_file)
+
+    def _handle_ipdl_sources(
+        self,
+        ipdl_dir,
+        sorted_ipdl_sources,
+        sorted_nonstatic_ipdl_sources,
+        sorted_static_ipdl_sources,
+    ):
+        # Write out a master list of all IPDL source files.
+        mk = Makefile()
+
+        sorted_nonstatic_ipdl_basenames = list()
+        for source in sorted_nonstatic_ipdl_sources:
+            basename = os.path.basename(source)
+            sorted_nonstatic_ipdl_basenames.append(basename)
+            rule = mk.create_rule([basename])
+            rule.add_dependencies([source])
+            rule.add_commands(
+                [
+                    "$(RM) $@",
+                    "$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) "
+                    "$< -o $@)",
+                ]
+            )
+
+        mk.add_statement(
+            "ALL_IPDLSRCS := %s %s"
+            % (
+                " ".join(sorted_nonstatic_ipdl_basenames),
+                " ".join(sorted_static_ipdl_sources),
+            )
+        )
+
+        # Preprocessed ipdl files are generated in ipdl_dir.
+        mk.add_statement(
+            "IPDLDIRS := %s %s"
+            % (
+                ipdl_dir,
+                " ".join(
+                    sorted(set(mozpath.dirname(p) for p in sorted_static_ipdl_sources))
+                ),
+            )
+        )
+
+        with self._write_file(mozpath.join(ipdl_dir, "ipdlsrcs.mk")) as ipdls:
+            mk.dump(ipdls, removal_guard=False)
+
+    def _handle_webidl_build(
+        self,
+        bindings_dir,
+        unified_source_mapping,
+        webidls,
+        expected_build_output_files,
+        global_define_files,
+    ):
+        include_dir = mozpath.join(self.environment.topobjdir, "dist", "include")
+        for f in expected_build_output_files:
+            if f.startswith(include_dir):
+                self._install_manifests["dist_include"].add_optional_exists(
+                    mozpath.relpath(f, include_dir)
+                )
+
+        # We pass WebIDL info to make via a completely generated make file.
+        mk = Makefile()
+        mk.add_statement(
+            "nonstatic_webidl_files := %s"
+            % " ".join(sorted(webidls.all_non_static_basenames()))
+        )
+        mk.add_statement(
+            "globalgen_sources := %s" % " ".join(sorted(global_define_files))
+        )
+        mk.add_statement(
+            "test_sources := %s"
+            % " ".join(sorted("%sBinding.cpp" % s for s in webidls.all_test_stems()))
+        )
+
+        # Add rules to preprocess bindings.
+        # This should ideally be using PP_TARGETS. However, since the input
+        # filenames match the output filenames, the existing PP_TARGETS rules
+        # result in circular dependencies and other make weirdness. One
+        # solution is to rename the input or output files repsectively. See
+        # bug 928195 comment 129.
+        for source in sorted(webidls.all_preprocessed_sources()):
+            basename = os.path.basename(source)
+            rule = mk.create_rule([basename])
+            # GLOBAL_DEPS would be used here, but due to the include order of
+            # our makefiles it's not set early enough to be useful, so we use
+            # WEBIDL_PP_DEPS, which has analagous content.
+            rule.add_dependencies([source, "$(WEBIDL_PP_DEPS)"])
+            rule.add_commands(
+                [
+                    # Remove the file before writing so bindings that go from
+                    # static to preprocessed don't end up writing to a symlink,
+                    # which would modify content in the source directory.
+                    "$(RM) $@",
+                    "$(call py_action,preprocessor,$(DEFINES) $(ACDEFINES) "
+                    "$< -o $@)",
+                ]
+            )
+
+        self._add_unified_build_rules(
+            mk,
+            unified_source_mapping,
+            unified_files_makefile_variable="unified_binding_cpp_files",
+        )
+
+        webidls_mk = mozpath.join(bindings_dir, "webidlsrcs.mk")
+        with self._write_file(webidls_mk) as fh:
+            mk.dump(fh, removal_guard=False)
+
+        # Add the test directory to the compile graph.
+        if self.environment.substs.get("ENABLE_TESTS"):
+            self._compile_graph[
+                mozpath.join(
+                    mozpath.relpath(bindings_dir, self.environment.topobjdir),
+                    "test",
+                    "target-objects",
+                )
+            ]
+
+    def _format_generated_file_input_name(self, path, obj):
+        if obj.localized:
+            # Localized generated files can have locale-specific inputs, which
+            # are indicated by paths starting with `en-US/` or containing
+            # `locales/en-US/`.
+            if "locales/en-US" in path:
+                # We need an "absolute source path" relative to
+                # topsrcdir, like "/source/path".
+                if not path.startswith("/"):
+                    path = "/" + mozpath.relpath(path.full_path, obj.topsrcdir)
+                e, f = path.split("locales/en-US/", 1)
+                assert f
+                return "$(call MERGE_RELATIVE_FILE,{},{}locales)".format(
+                    f, e if not e.startswith("/") else e[len("/") :]
+                )
+            elif path.startswith("en-US/"):
+                e, f = path.split("en-US/", 1)
+                assert not e
+                return "$(call MERGE_FILE,%s)" % f
+            return self._pretty_path(path, self._get_backend_file_for(obj))
+        else:
+            return self._pretty_path(path, self._get_backend_file_for(obj))
+
+    def _format_generated_file_output_name(self, path, obj):
+        if not isinstance(path, Path):
+            path = ObjDirPath(obj._context, "!" + path)
+        return self._pretty_path(path, self._get_backend_file_for(obj))
Index: mozjs/create-102.15.0-emitter-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-emitter-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-emitter-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-emitter.patch
+
+mv firefox-$VERSION-emitter.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-emitter-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-emitter-patch/file.list
===================================================================
--- mozjs/create-102.15.0-emitter-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-emitter-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+firefox-102.15.0/python/mozbuild/mozbuild/frontend/emitter.py
+firefox-102.15.0/python/mozbuild/mozbuild/test/frontend/test_emitter.py
Index: mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/frontend/emitter.py
===================================================================
--- mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/frontend/emitter.py	(nonexistent)
+++ mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/frontend/emitter.py	(revision 385)
@@ -0,0 +1,1889 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+import logging
+import os
+import six
+import sys
+import time
+import traceback
+
+from collections import defaultdict, OrderedDict
+from mach.mixin.logging import LoggingMixin
+from mozbuild.util import memoize, OrderedDefaultDict
+
+import mozpack.path as mozpath
+import mozinfo
+import pytoml
+
+from .data import (
+    BaseRustProgram,
+    ChromeManifestEntry,
+    ComputedFlags,
+    ConfigFileSubstitution,
+    Defines,
+    DirectoryTraversal,
+    Exports,
+    FinalTargetFiles,
+    FinalTargetPreprocessedFiles,
+    GeneratedFile,
+    ExternalStaticLibrary,
+    ExternalSharedLibrary,
+    HostDefines,
+    HostLibrary,
+    HostProgram,
+    HostRustProgram,
+    HostSharedLibrary,
+    HostSimpleProgram,
+    HostSources,
+    InstallationTarget,
+    IPDLCollection,
+    JARManifest,
+    Library,
+    Linkable,
+    LocalInclude,
+    LocalizedFiles,
+    LocalizedPreprocessedFiles,
+    ObjdirFiles,
+    ObjdirPreprocessedFiles,
+    PerSourceFlag,
+    WebIDLCollection,
+    Program,
+    RustLibrary,
+    HostRustLibrary,
+    RustProgram,
+    RustTests,
+    SandboxedWasmLibrary,
+    SharedLibrary,
+    SimpleProgram,
+    Sources,
+    StaticLibrary,
+    TestHarnessFiles,
+    TestManifest,
+    UnifiedSources,
+    VariablePassthru,
+    WasmDefines,
+    WasmSources,
+    XPCOMComponentManifests,
+    XPIDLModule,
+)
+from mozpack.chrome.manifest import Manifest
+
+from .reader import SandboxValidationError
+
+from ..testing import TEST_MANIFESTS, REFTEST_FLAVORS, SupportFilesConverter
+
+from .context import Context, SourcePath, ObjDirPath, Path, SubContext
+
+from mozbuild.base import ExecutionSummary
+
+
+class TreeMetadataEmitter(LoggingMixin):
+    """Converts the executed mozbuild files into data structures.
+
+    This is a bridge between reader.py and data.py. It takes what was read by
+    reader.BuildReader and converts it into the classes defined in the data
+    module.
+    """
+
+    def __init__(self, config):
+        self.populate_logger()
+
+        self.config = config
+
+        mozinfo.find_and_update_from_json(config.topobjdir)
+
+        self.info = dict(mozinfo.info)
+
+        self._libs = OrderedDefaultDict(list)
+        self._binaries = OrderedDict()
+        self._compile_dirs = set()
+        self._host_compile_dirs = set()
+        self._wasm_compile_dirs = set()
+        self._asm_compile_dirs = set()
+        self._compile_flags = dict()
+        self._compile_as_flags = dict()
+        self._linkage = []
+        self._static_linking_shared = set()
+        self._crate_verified_local = set()
+        self._crate_directories = dict()
+        self._idls = defaultdict(set)
+
+        # Keep track of external paths (third party build systems), starting
+        # from what we run a subconfigure in. We'll eliminate some directories
+        # as we traverse them with moz.build (e.g. js/src).
+        subconfigures = os.path.join(self.config.topobjdir, "subconfigures")
+        paths = []
+        if os.path.exists(subconfigures):
+            paths = open(subconfigures).read().splitlines()
+        self._external_paths = set(mozpath.normsep(d) for d in paths)
+
+        self._emitter_time = 0.0
+        self._object_count = 0
+        self._test_files_converter = SupportFilesConverter()
+
+    def summary(self):
+        return ExecutionSummary(
+            "Processed into {object_count:d} build config descriptors in "
+            "{execution_time:.2f}s",
+            execution_time=self._emitter_time,
+            object_count=self._object_count,
+        )
+
+    def emit(self, output, emitfn=None):
+        """Convert the BuildReader output into data structures.
+
+        The return value from BuildReader.read_topsrcdir() (a generator) is
+        typically fed into this function.
+        """
+        contexts = {}
+        emitfn = emitfn or self.emit_from_context
+
+        def emit_objs(objs):
+            for o in objs:
+                self._object_count += 1
+                yield o
+
+        for out in output:
+            # Nothing in sub-contexts is currently of interest to us. Filter
+            # them all out.
+            if isinstance(out, SubContext):
+                continue
+
+            if isinstance(out, Context):
+                # Keep all contexts around, we will need them later.
+                contexts[os.path.normcase(out.objdir)] = out
+
+                start = time.time()
+                # We need to expand the generator for the timings to work.
+                objs = list(emitfn(out))
+                self._emitter_time += time.time() - start
+
+                for o in emit_objs(objs):
+                    yield o
+
+            else:
+                raise Exception("Unhandled output type: %s" % type(out))
+
+        # Don't emit Linkable objects when COMPILE_ENVIRONMENT is not set
+        if self.config.substs.get("COMPILE_ENVIRONMENT"):
+            start = time.time()
+            objs = list(self._emit_libs_derived(contexts))
+            self._emitter_time += time.time() - start
+
+            for o in emit_objs(objs):
+                yield o
+
+    def _emit_libs_derived(self, contexts):
+
+        # First aggregate idl sources.
+        webidl_attrs = [
+            ("GENERATED_EVENTS_WEBIDL_FILES", lambda c: c.generated_events_sources),
+            ("GENERATED_WEBIDL_FILES", lambda c: c.generated_sources),
+            ("PREPROCESSED_TEST_WEBIDL_FILES", lambda c: c.preprocessed_test_sources),
+            ("PREPROCESSED_WEBIDL_FILES", lambda c: c.preprocessed_sources),
+            ("TEST_WEBIDL_FILES", lambda c: c.test_sources),
+            ("WEBIDL_FILES", lambda c: c.sources),
+            ("WEBIDL_EXAMPLE_INTERFACES", lambda c: c.example_interfaces),
+        ]
+        ipdl_attrs = [
+            ("IPDL_SOURCES", lambda c: c.sources),
+            ("PREPROCESSED_IPDL_SOURCES", lambda c: c.preprocessed_sources),
+        ]
+        xpcom_attrs = [("XPCOM_MANIFESTS", lambda c: c.manifests)]
+
+        idl_sources = {}
+        for root, cls, attrs in (
+            (self.config.substs.get("WEBIDL_ROOT"), WebIDLCollection, webidl_attrs),
+            (self.config.substs.get("IPDL_ROOT"), IPDLCollection, ipdl_attrs),
+            (
+                self.config.substs.get("XPCOM_ROOT"),
+                XPCOMComponentManifests,
+                xpcom_attrs,
+            ),
+        ):
+            if root:
+                collection = cls(contexts[os.path.normcase(root)])
+                for var, src_getter in attrs:
+                    src_getter(collection).update(self._idls[var])
+
+                idl_sources[root] = collection.all_source_files()
+                if isinstance(collection, WebIDLCollection):
+                    # Test webidl sources are added here as a somewhat special
+                    # case.
+                    idl_sources[mozpath.join(root, "test")] = [
+                        s for s in collection.all_test_cpp_basenames()
+                    ]
+
+                yield collection
+
+        # Next do FINAL_LIBRARY linkage.
+        for lib in (l for libs in self._libs.values() for l in libs):
+            if not isinstance(lib, (StaticLibrary, RustLibrary)) or not lib.link_into:
+                continue
+            if lib.link_into not in self._libs:
+                raise SandboxValidationError(
+                    'FINAL_LIBRARY ("%s") does not match any LIBRARY_NAME'
+                    % lib.link_into,
+                    contexts[os.path.normcase(lib.objdir)],
+                )
+            candidates = self._libs[lib.link_into]
+
+            # When there are multiple candidates, but all are in the same
+            # directory and have a different type, we want all of them to
+            # have the library linked. The typical usecase is when building
+            # both a static and a shared library in a directory, and having
+            # that as a FINAL_LIBRARY.
+            if (
+                len(set(type(l) for l in candidates)) == len(candidates)
+                and len(set(l.objdir for l in candidates)) == 1
+            ):
+                for c in candidates:
+                    c.link_library(lib)
+            else:
+                raise SandboxValidationError(
+                    'FINAL_LIBRARY ("%s") matches a LIBRARY_NAME defined in '
+                    "multiple places:\n    %s"
+                    % (lib.link_into, "\n    ".join(l.objdir for l in candidates)),
+                    contexts[os.path.normcase(lib.objdir)],
+                )
+
+        # ...and USE_LIBS linkage.
+        for context, obj, variable in self._linkage:
+            self._link_libraries(context, obj, variable, idl_sources)
+
+        def recurse_refs(lib):
+            for o in lib.refs:
+                yield o
+                if isinstance(o, StaticLibrary):
+                    for q in recurse_refs(o):
+                        yield q
+
+        # Check that all static libraries refering shared libraries in
+        # USE_LIBS are linked into a shared library or program.
+        for lib in self._static_linking_shared:
+            if all(isinstance(o, StaticLibrary) for o in recurse_refs(lib)):
+                shared_libs = sorted(
+                    l.basename
+                    for l in lib.linked_libraries
+                    if isinstance(l, SharedLibrary)
+                )
+                raise SandboxValidationError(
+                    'The static "%s" library is not used in a shared library '
+                    "or a program, but USE_LIBS contains the following shared "
+                    "library names:\n    %s\n\nMaybe you can remove the "
+                    'static "%s" library?'
+                    % (lib.basename, "\n    ".join(shared_libs), lib.basename),
+                    contexts[os.path.normcase(lib.objdir)],
+                )
+
+        @memoize
+        def rust_libraries(obj):
+            libs = []
+            for o in obj.linked_libraries:
+                if isinstance(o, (HostRustLibrary, RustLibrary)):
+                    libs.append(o)
+                elif isinstance(o, (HostLibrary, StaticLibrary, SandboxedWasmLibrary)):
+                    libs.extend(rust_libraries(o))
+            return libs
+
+        def check_rust_libraries(obj):
+            rust_libs = set(rust_libraries(obj))
+            if len(rust_libs) <= 1:
+                return
+            if isinstance(obj, (Library, HostLibrary)):
+                what = '"%s" library' % obj.basename
+            else:
+                what = '"%s" program' % obj.name
+            raise SandboxValidationError(
+                "Cannot link the following Rust libraries into the %s:\n"
+                "%s\nOnly one is allowed."
+                % (
+                    what,
+                    "\n".join(
+                        "  - %s" % r.basename
+                        for r in sorted(rust_libs, key=lambda r: r.basename)
+                    ),
+                ),
+                contexts[os.path.normcase(obj.objdir)],
+            )
+
+        # Propagate LIBRARY_DEFINES to all child libraries recursively.
+        def propagate_defines(outerlib, defines):
+            outerlib.lib_defines.update(defines)
+            for lib in outerlib.linked_libraries:
+                # Propagate defines only along FINAL_LIBRARY paths, not USE_LIBS
+                # paths.
+                if (
+                    isinstance(lib, StaticLibrary)
+                    and lib.link_into == outerlib.basename
+                ):
+                    propagate_defines(lib, defines)
+
+        for lib in (l for libs in self._libs.values() for l in libs):
+            if isinstance(lib, Library):
+                propagate_defines(lib, lib.lib_defines)
+            check_rust_libraries(lib)
+            yield lib
+
+        for lib in (l for libs in self._libs.values() for l in libs):
+            lib_defines = list(lib.lib_defines.get_defines())
+            if lib_defines:
+                objdir_flags = self._compile_flags[lib.objdir]
+                objdir_flags.resolve_flags("LIBRARY_DEFINES", lib_defines)
+
+                objdir_flags = self._compile_as_flags.get(lib.objdir)
+                if objdir_flags:
+                    objdir_flags.resolve_flags("LIBRARY_DEFINES", lib_defines)
+
+        for flags_obj in self._compile_flags.values():
+            yield flags_obj
+
+        for flags_obj in self._compile_as_flags.values():
+            yield flags_obj
+
+        for obj in self._binaries.values():
+            if isinstance(obj, Linkable):
+                check_rust_libraries(obj)
+            yield obj
+
+    LIBRARY_NAME_VAR = {
+        "host": "HOST_LIBRARY_NAME",
+        "target": "LIBRARY_NAME",
+        "wasm": "SANDBOXED_WASM_LIBRARY_NAME",
+    }
+
+    ARCH_VAR = {"host": "HOST_OS_ARCH", "target": "OS_TARGET"}
+
+    STDCXXCOMPAT_NAME = {"host": "host_stdc++compat", "target": "stdc++compat"}
+
+    def _link_libraries(self, context, obj, variable, extra_sources):
+        """Add linkage declarations to a given object."""
+        assert isinstance(obj, Linkable)
+
+        if context.objdir in extra_sources:
+            # All "extra sources" are .cpp for the moment, and happen to come
+            # first in order.
+            obj.sources[".cpp"] = extra_sources[context.objdir] + obj.sources[".cpp"]
+
+        for path in context.get(variable, []):
+            self._link_library(context, obj, variable, path)
+
+        # Link system libraries from OS_LIBS/HOST_OS_LIBS.
+        for lib in context.get(variable.replace("USE", "OS"), []):
+            obj.link_system_library(lib)
+
+        # We have to wait for all the self._link_library calls above to have
+        # happened for obj.cxx_link to be final.
+        # FIXME: Theoretically, HostSharedLibrary shouldn't be here (bug
+        # 1474022).
+        if (
+            not isinstance(
+                obj, (StaticLibrary, HostLibrary, HostSharedLibrary, BaseRustProgram)
+            )
+            and obj.cxx_link
+        ):
+            if (
+                context.config.substs.get("MOZ_STDCXX_COMPAT")
+                and context.config.substs.get(self.ARCH_VAR.get(obj.KIND)) == "Linux"
+            ):
+                self._link_library(
+                    context, obj, variable, self.STDCXXCOMPAT_NAME[obj.KIND]
+                )
+            if obj.KIND == "target":
+                for lib in context.config.substs.get("STLPORT_LIBS", []):
+                    obj.link_system_library(lib)
+
+    def _link_library(self, context, obj, variable, path):
+        force_static = path.startswith("static:") and obj.KIND == "target"
+        if force_static:
+            path = path[7:]
+        name = mozpath.basename(path)
+        dir = mozpath.dirname(path)
+        candidates = [l for l in self._libs[name] if l.KIND == obj.KIND]
+        if dir:
+            if dir.startswith("/"):
+                dir = mozpath.normpath(mozpath.join(obj.topobjdir, dir[1:]))
+            else:
+                dir = mozpath.normpath(mozpath.join(obj.objdir, dir))
+            dir = mozpath.relpath(dir, obj.topobjdir)
+            candidates = [l for l in candidates if l.relobjdir == dir]
+            if not candidates:
+                # If the given directory is under one of the external
+                # (third party) paths, use a fake library reference to
+                # there.
+                for d in self._external_paths:
+                    if dir.startswith("%s/" % d):
+                        candidates = [
+                            self._get_external_library(dir, name, force_static)
+                        ]
+                        break
+
+            if not candidates:
+                raise SandboxValidationError(
+                    '%s contains "%s", but there is no "%s" %s in %s.'
+                    % (variable, path, name, self.LIBRARY_NAME_VAR[obj.KIND], dir),
+                    context,
+                )
+
+        if len(candidates) > 1:
+            # If there's more than one remaining candidate, it could be
+            # that there are instances for the same library, in static and
+            # shared form.
+            libs = {}
+            for l in candidates:
+                key = mozpath.join(l.relobjdir, l.basename)
+                if force_static:
+                    if isinstance(l, StaticLibrary):
+                        libs[key] = l
+                else:
+                    if key in libs and isinstance(l, SharedLibrary):
+                        libs[key] = l
+                    if key not in libs:
+                        libs[key] = l
+            candidates = list(libs.values())
+            if force_static and not candidates:
+                if dir:
+                    raise SandboxValidationError(
+                        '%s contains "static:%s", but there is no static '
+                        '"%s" %s in %s.'
+                        % (variable, path, name, self.LIBRARY_NAME_VAR[obj.KIND], dir),
+                        context,
+                    )
+                raise SandboxValidationError(
+                    '%s contains "static:%s", but there is no static "%s" '
+                    "%s in the tree"
+                    % (variable, name, name, self.LIBRARY_NAME_VAR[obj.KIND]),
+                    context,
+                )
+
+        if not candidates:
+            raise SandboxValidationError(
+                '%s contains "%s", which does not match any %s in the tree.'
+                % (variable, path, self.LIBRARY_NAME_VAR[obj.KIND]),
+                context,
+            )
+
+        elif len(candidates) > 1:
+            paths = (mozpath.join(l.relsrcdir, "moz.build") for l in candidates)
+            raise SandboxValidationError(
+                '%s contains "%s", which matches a %s defined in multiple '
+                "places:\n    %s"
+                % (
+                    variable,
+                    path,
+                    self.LIBRARY_NAME_VAR[obj.KIND],
+                    "\n    ".join(paths),
+                ),
+                context,
+            )
+
+        elif force_static and not isinstance(candidates[0], StaticLibrary):
+            raise SandboxValidationError(
+                '%s contains "static:%s", but there is only a shared "%s" '
+                "in %s. You may want to add FORCE_STATIC_LIB=True in "
+                '%s/moz.build, or remove "static:".'
+                % (
+                    variable,
+                    path,
+                    name,
+                    candidates[0].relobjdir,
+                    candidates[0].relobjdir,
+                ),
+                context,
+            )
+
+        elif isinstance(obj, StaticLibrary) and isinstance(
+            candidates[0], SharedLibrary
+        ):
+            self._static_linking_shared.add(obj)
+        obj.link_library(candidates[0])
+
+    @memoize
+    def _get_external_library(self, dir, name, force_static):
+        # Create ExternalStaticLibrary or ExternalSharedLibrary object with a
+        # context more or less truthful about where the external library is.
+        context = Context(config=self.config)
+        context.add_source(mozpath.join(self.config.topsrcdir, dir, "dummy"))
+        if force_static:
+            return ExternalStaticLibrary(context, name)
+        else:
+            return ExternalSharedLibrary(context, name)
+
+    def _parse_cargo_file(self, context):
+        """Parse the Cargo.toml file in context and return a Python object
+        representation of it.  Raise a SandboxValidationError if the Cargo.toml
+        file does not exist.  Return a tuple of (config, cargo_file)."""
+        cargo_file = mozpath.join(context.srcdir, "Cargo.toml")
+        if not os.path.exists(cargo_file):
+            raise SandboxValidationError(
+                "No Cargo.toml file found in %s" % cargo_file, context
+            )
+        with open(cargo_file, "r") as f:
+            return pytoml.load(f), cargo_file
+
+    def _verify_deps(
+        self, context, crate_dir, crate_name, dependencies, description="Dependency"
+    ):
+        """Verify that a crate's dependencies all specify local paths."""
+        for dep_crate_name, values in six.iteritems(dependencies):
+            # A simple version number.
+            if isinstance(values, (six.binary_type, six.text_type)):
+                raise SandboxValidationError(
+                    "%s %s of crate %s does not list a path"
+                    % (description, dep_crate_name, crate_name),
+                    context,
+                )
+
+            dep_path = values.get("path", None)
+            if not dep_path:
+                raise SandboxValidationError(
+                    "%s %s of crate %s does not list a path"
+                    % (description, dep_crate_name, crate_name),
+                    context,
+                )
+
+            # Try to catch the case where somebody listed a
+            # local path for development.
+            if os.path.isabs(dep_path):
+                raise SandboxValidationError(
+                    "%s %s of crate %s has a non-relative path"
+                    % (description, dep_crate_name, crate_name),
+                    context,
+                )
+
+            if not os.path.exists(
+                mozpath.join(context.config.topsrcdir, crate_dir, dep_path)
+            ):
+                raise SandboxValidationError(
+                    "%s %s of crate %s refers to a non-existent path"
+                    % (description, dep_crate_name, crate_name),
+                    context,
+                )
+
+    def _rust_library(
+        self, context, libname, static_args, is_gkrust=False, cls=RustLibrary
+    ):
+        # We need to note any Rust library for linking purposes.
+        config, cargo_file = self._parse_cargo_file(context)
+        crate_name = config["package"]["name"]
+
+        if crate_name != libname:
+            raise SandboxValidationError(
+                "library %s does not match Cargo.toml-defined package %s"
+                % (libname, crate_name),
+                context,
+            )
+
+        # Check that the [lib.crate-type] field is correct
+        lib_section = config.get("lib", None)
+        if not lib_section:
+            raise SandboxValidationError(
+                "Cargo.toml for %s has no [lib] section" % libname, context
+            )
+
+        crate_type = lib_section.get("crate-type", None)
+        if not crate_type:
+            raise SandboxValidationError(
+                "Can't determine a crate-type for %s from Cargo.toml" % libname, context
+            )
+
+        crate_type = crate_type[0]
+        if crate_type != "staticlib":
+            raise SandboxValidationError(
+                "crate-type %s is not permitted for %s" % (crate_type, libname), context
+            )
+
+        dependencies = set(six.iterkeys(config.get("dependencies", {})))
+
+        features = context.get(cls.FEATURES_VAR, [])
+        unique_features = set(features)
+        if len(features) != len(unique_features):
+            raise SandboxValidationError(
+                "features for %s should not contain duplicates: %s"
+                % (libname, features),
+                context,
+            )
+
+        return cls(
+            context,
+            libname,
+            cargo_file,
+            crate_type,
+            dependencies,
+            features,
+            is_gkrust,
+            **static_args,
+        )
+
+    def _handle_linkables(self, context, passthru, generated_files):
+        linkables = []
+        host_linkables = []
+        wasm_linkables = []
+
+        def add_program(prog, var):
+            if var.startswith("HOST_"):
+                host_linkables.append(prog)
+            else:
+                linkables.append(prog)
+
+        def check_unique_binary(program, kind):
+            if program in self._binaries:
+                raise SandboxValidationError(
+                    'Cannot use "%s" as %s name, '
+                    "because it is already used in %s"
+                    % (program, kind, self._binaries[program].relsrcdir),
+                    context,
+                )
+
+        for kind, cls in [("PROGRAM", Program), ("HOST_PROGRAM", HostProgram)]:
+            program = context.get(kind)
+            if program:
+                check_unique_binary(program, kind)
+                self._binaries[program] = cls(context, program)
+                self._linkage.append(
+                    (
+                        context,
+                        self._binaries[program],
+                        kind.replace("PROGRAM", "USE_LIBS"),
+                    )
+                )
+                add_program(self._binaries[program], kind)
+
+        all_rust_programs = []
+        for kind, cls in [
+            ("RUST_PROGRAMS", RustProgram),
+            ("HOST_RUST_PROGRAMS", HostRustProgram),
+        ]:
+            programs = context[kind]
+            if not programs:
+                continue
+
+            all_rust_programs.append((programs, kind, cls))
+
+        # Verify Rust program definitions.
+        if all_rust_programs:
+            config, cargo_file = self._parse_cargo_file(context)
+            bin_section = config.get("bin", None)
+            if not bin_section:
+                raise SandboxValidationError(
+                    "Cargo.toml in %s has no [bin] section" % context.srcdir, context
+                )
+
+            defined_binaries = {b["name"] for b in bin_section}
+
+            for programs, kind, cls in all_rust_programs:
+                for program in programs:
+                    if program not in defined_binaries:
+                        raise SandboxValidationError(
+                            "Cannot find Cargo.toml definition for %s" % program,
+                            context,
+                        )
+
+                    check_unique_binary(program, kind)
+                    self._binaries[program] = cls(context, program, cargo_file)
+                    add_program(self._binaries[program], kind)
+
+        for kind, cls in [
+            ("SIMPLE_PROGRAMS", SimpleProgram),
+            ("CPP_UNIT_TESTS", SimpleProgram),
+            ("HOST_SIMPLE_PROGRAMS", HostSimpleProgram),
+        ]:
+            for program in context[kind]:
+                if program in self._binaries:
+                    raise SandboxValidationError(
+                        'Cannot use "%s" in %s, '
+                        "because it is already used in %s"
+                        % (program, kind, self._binaries[program].relsrcdir),
+                        context,
+                    )
+                self._binaries[program] = cls(
+                    context, program, is_unit_test=kind == "CPP_UNIT_TESTS"
+                )
+                self._linkage.append(
+                    (
+                        context,
+                        self._binaries[program],
+                        "HOST_USE_LIBS"
+                        if kind == "HOST_SIMPLE_PROGRAMS"
+                        else "USE_LIBS",
+                    )
+                )
+                add_program(self._binaries[program], kind)
+
+        host_libname = context.get("HOST_LIBRARY_NAME")
+        libname = context.get("LIBRARY_NAME")
+
+        if host_libname:
+            if host_libname == libname:
+                raise SandboxValidationError(
+                    "LIBRARY_NAME and HOST_LIBRARY_NAME must have a different value",
+                    context,
+                )
+
+            is_rust_library = context.get("IS_RUST_LIBRARY")
+            if is_rust_library:
+                lib = self._rust_library(context, host_libname, {}, cls=HostRustLibrary)
+            elif context.get("FORCE_SHARED_LIB"):
+                lib = HostSharedLibrary(context, host_libname)
+            else:
+                lib = HostLibrary(context, host_libname)
+            self._libs[host_libname].append(lib)
+            self._linkage.append((context, lib, "HOST_USE_LIBS"))
+            host_linkables.append(lib)
+
+        final_lib = context.get("FINAL_LIBRARY")
+        if not libname and final_lib:
+            # If no LIBRARY_NAME is given, create one.
+            libname = context.relsrcdir.replace("/", "_")
+
+        static_lib = context.get("FORCE_STATIC_LIB")
+        shared_lib = context.get("FORCE_SHARED_LIB")
+
+        static_name = context.get("STATIC_LIBRARY_NAME")
+        shared_name = context.get("SHARED_LIBRARY_NAME")
+
+        is_framework = context.get("IS_FRAMEWORK")
+
+        soname = context.get("SONAME")
+
+        lib_defines = context.get("LIBRARY_DEFINES")
+
+        wasm_lib = context.get("SANDBOXED_WASM_LIBRARY_NAME")
+
+        shared_args = {}
+        static_args = {}
+
+        if final_lib:
+            if static_lib:
+                raise SandboxValidationError(
+                    "FINAL_LIBRARY implies FORCE_STATIC_LIB. "
+                    "Please remove the latter.",
+                    context,
+                )
+            if shared_lib:
+                raise SandboxValidationError(
+                    "FINAL_LIBRARY conflicts with FORCE_SHARED_LIB. "
+                    "Please remove one.",
+                    context,
+                )
+            if is_framework:
+                raise SandboxValidationError(
+                    "FINAL_LIBRARY conflicts with IS_FRAMEWORK. " "Please remove one.",
+                    context,
+                )
+            static_args["link_into"] = final_lib
+            static_lib = True
+
+        if libname:
+            if is_framework:
+                if soname:
+                    raise SandboxValidationError(
+                        "IS_FRAMEWORK conflicts with SONAME. " "Please remove one.",
+                        context,
+                    )
+                shared_lib = True
+                shared_args["variant"] = SharedLibrary.FRAMEWORK
+
+            if not static_lib and not shared_lib:
+                static_lib = True
+
+            if static_name:
+                if not static_lib:
+                    raise SandboxValidationError(
+                        "STATIC_LIBRARY_NAME requires FORCE_STATIC_LIB", context
+                    )
+                static_args["real_name"] = static_name
+
+            if shared_name:
+                if not shared_lib:
+                    raise SandboxValidationError(
+                        "SHARED_LIBRARY_NAME requires FORCE_SHARED_LIB", context
+                    )
+                shared_args["real_name"] = shared_name
+
+            if soname:
+                if not shared_lib:
+                    raise SandboxValidationError(
+                        "SONAME requires FORCE_SHARED_LIB", context
+                    )
+                shared_args["soname"] = soname
+
+            if context.get("NO_EXPAND_LIBS"):
+                if not static_lib:
+                    raise SandboxValidationError(
+                        "NO_EXPAND_LIBS can only be set for static libraries.", context
+                    )
+                static_args["no_expand_lib"] = True
+
+            if shared_lib and static_lib:
+                if not static_name and not shared_name:
+                    raise SandboxValidationError(
+                        "Both FORCE_STATIC_LIB and FORCE_SHARED_LIB are True, "
+                        "but neither STATIC_LIBRARY_NAME or "
+                        "SHARED_LIBRARY_NAME is set. At least one is required.",
+                        context,
+                    )
+                if static_name and not shared_name and static_name == libname:
+                    raise SandboxValidationError(
+                        "Both FORCE_STATIC_LIB and FORCE_SHARED_LIB are True, "
+                        "but STATIC_LIBRARY_NAME is the same as LIBRARY_NAME, "
+                        "and SHARED_LIBRARY_NAME is unset. Please either "
+                        "change STATIC_LIBRARY_NAME or LIBRARY_NAME, or set "
+                        "SHARED_LIBRARY_NAME.",
+                        context,
+                    )
+                if shared_name and not static_name and shared_name == libname:
+                    raise SandboxValidationError(
+                        "Both FORCE_STATIC_LIB and FORCE_SHARED_LIB are True, "
+                        "but SHARED_LIBRARY_NAME is the same as LIBRARY_NAME, "
+                        "and STATIC_LIBRARY_NAME is unset. Please either "
+                        "change SHARED_LIBRARY_NAME or LIBRARY_NAME, or set "
+                        "STATIC_LIBRARY_NAME.",
+                        context,
+                    )
+                if shared_name and static_name and shared_name == static_name:
+                    raise SandboxValidationError(
+                        "Both FORCE_STATIC_LIB and FORCE_SHARED_LIB are True, "
+                        "but SHARED_LIBRARY_NAME is the same as "
+                        "STATIC_LIBRARY_NAME. Please change one of them.",
+                        context,
+                    )
+
+            symbols_file = context.get("SYMBOLS_FILE")
+            if symbols_file:
+                if not shared_lib:
+                    raise SandboxValidationError(
+                        "SYMBOLS_FILE can only be used with a SHARED_LIBRARY.", context
+                    )
+                if context.get("DEFFILE"):
+                    raise SandboxValidationError(
+                        "SYMBOLS_FILE cannot be used along DEFFILE.", context
+                    )
+                if isinstance(symbols_file, SourcePath):
+                    if not os.path.exists(symbols_file.full_path):
+                        raise SandboxValidationError(
+                            "Path specified in SYMBOLS_FILE does not exist: %s "
+                            "(resolved to %s)" % (symbols_file, symbols_file.full_path),
+                            context,
+                        )
+                    shared_args["symbols_file"] = True
+                else:
+                    if symbols_file.target_basename not in generated_files:
+                        raise SandboxValidationError(
+                            (
+                                "Objdir file specified in SYMBOLS_FILE not in "
+                                + "GENERATED_FILES: %s"
+                            )
+                            % (symbols_file,),
+                            context,
+                        )
+                    shared_args["symbols_file"] = symbols_file.target_basename
+
+            if shared_lib:
+                lib = SharedLibrary(context, libname, **shared_args)
+                self._libs[libname].append(lib)
+                self._linkage.append((context, lib, "USE_LIBS"))
+                linkables.append(lib)
+                if not lib.installed:
+                    generated_files.add(lib.lib_name)
+                if symbols_file and isinstance(symbols_file, SourcePath):
+                    script = mozpath.join(
+                        mozpath.dirname(mozpath.dirname(__file__)),
+                        "action",
+                        "generate_symbols_file.py",
+                    )
+                    defines = ()
+                    if lib.defines:
+                        defines = lib.defines.get_defines()
+                    yield GeneratedFile(
+                        context,
+                        script,
+                        "generate_symbols_file",
+                        lib.symbols_file,
+                        [symbols_file],
+                        defines,
+                        required_during_compile=[lib.symbols_file],
+                    )
+            if static_lib:
+                is_rust_library = context.get("IS_RUST_LIBRARY")
+                if is_rust_library:
+                    lib = self._rust_library(
+                        context,
+                        libname,
+                        static_args,
+                        is_gkrust=bool(context.get("IS_GKRUST")),
+                    )
+                else:
+                    lib = StaticLibrary(context, libname, **static_args)
+                self._libs[libname].append(lib)
+                self._linkage.append((context, lib, "USE_LIBS"))
+                linkables.append(lib)
+
+            if lib_defines:
+                if not libname:
+                    raise SandboxValidationError(
+                        "LIBRARY_DEFINES needs a " "LIBRARY_NAME to take effect",
+                        context,
+                    )
+                lib.lib_defines.update(lib_defines)
+
+        if wasm_lib:
+            if wasm_lib == libname:
+                raise SandboxValidationError(
+                    "SANDBOXED_WASM_LIBRARY_NAME and LIBRARY_NAME must have a "
+                    "different value.",
+                    context,
+                )
+            if wasm_lib == host_libname:
+                raise SandboxValidationError(
+                    "SANDBOXED_WASM_LIBRARY_NAME and HOST_LIBRARY_NAME must "
+                    "have a different value.",
+                    context,
+                )
+            if wasm_lib == shared_name:
+                raise SandboxValidationError(
+                    "SANDBOXED_WASM_LIBRARY_NAME and SHARED_NAME must have a "
+                    "different value.",
+                    context,
+                )
+            if wasm_lib == static_name:
+                raise SandboxValidationError(
+                    "SANDBOXED_WASM_LIBRARY_NAME and STATIC_NAME must have a "
+                    "different value.",
+                    context,
+                )
+            lib = SandboxedWasmLibrary(context, wasm_lib)
+            self._libs[libname].append(lib)
+            wasm_linkables.append(lib)
+            self._wasm_compile_dirs.add(context.objdir)
+
+        seen = {}
+        for symbol in ("SOURCES", "UNIFIED_SOURCES"):
+            for src in context.get(symbol, []):
+                basename = os.path.splitext(os.path.basename(src))[0]
+                if basename in seen:
+                    other_src, where = seen[basename]
+                    extra = ""
+                    if "UNIFIED_SOURCES" in (symbol, where):
+                        extra = " in non-unified builds"
+                    raise SandboxValidationError(
+                        f"{src} from {symbol} would have the same object name "
+                        f"as {other_src} from {where}{extra}.",
+                        context,
+                    )
+                seen[basename] = (src, symbol)
+
+        # Only emit sources if we have linkables defined in the same context.
+        # Note the linkables are not emitted in this function, but much later,
+        # after aggregation (because of e.g. USE_LIBS processing).
+        if not (linkables or host_linkables or wasm_linkables):
+            return
+
+        self._compile_dirs.add(context.objdir)
+
+        if host_linkables and not all(
+            isinstance(l, HostRustLibrary) for l in host_linkables
+        ):
+            self._host_compile_dirs.add(context.objdir)
+            # TODO: objdirs with only host things in them shouldn't need target
+            # flags, but there's at least one Makefile.in (in
+            # build/unix/elfhack) that relies on the value of LDFLAGS being
+            # passed to one-off rules.
+            self._compile_dirs.add(context.objdir)
+
+        sources = defaultdict(list)
+        gen_sources = defaultdict(list)
+        all_flags = {}
+        for symbol in ("SOURCES", "HOST_SOURCES", "UNIFIED_SOURCES", "WASM_SOURCES"):
+            srcs = sources[symbol]
+            gen_srcs = gen_sources[symbol]
+            context_srcs = context.get(symbol, [])
+            seen_sources = set()
+            for f in context_srcs:
+                if f in seen_sources:
+                    raise SandboxValidationError(
+                        "Source file should only "
+                        "be added to %s once: %s" % (symbol, f),
+                        context,
+                    )
+                seen_sources.add(f)
+                full_path = f.full_path
+                if isinstance(f, SourcePath):
+                    srcs.append(full_path)
+                else:
+                    assert isinstance(f, Path)
+                    gen_srcs.append(full_path)
+                if symbol == "SOURCES":
+                    context_flags = context_srcs[f]
+                    if context_flags:
+                        all_flags[full_path] = context_flags
+
+                if isinstance(f, SourcePath) and not os.path.exists(full_path):
+                    raise SandboxValidationError(
+                        "File listed in %s does not "
+                        "exist: '%s'" % (symbol, full_path),
+                        context,
+                    )
+
+        # Process the .cpp files generated by IPDL as generated sources within
+        # the context which declared the IPDL_SOURCES attribute.
+        ipdl_root = self.config.substs.get("IPDL_ROOT")
+        for symbol in ("IPDL_SOURCES", "PREPROCESSED_IPDL_SOURCES"):
+            context_srcs = context.get(symbol, [])
+            for f in context_srcs:
+                root, ext = mozpath.splitext(mozpath.basename(f))
+
+                suffix_map = {
+                    ".ipdlh": [".cpp"],
+                    ".ipdl": [".cpp", "Child.cpp", "Parent.cpp"],
+                }
+                if ext not in suffix_map:
+                    raise SandboxValidationError(
+                        "Unexpected extension for IPDL source %s" % ext
+                    )
+
+                gen_sources["UNIFIED_SOURCES"].extend(
+                    mozpath.join(ipdl_root, root + suffix) for suffix in suffix_map[ext]
+                )
+
+        no_pgo = context.get("NO_PGO")
+        no_pgo_sources = [f for f, flags in six.iteritems(all_flags) if flags.no_pgo]
+        if no_pgo:
+            if no_pgo_sources:
+                raise SandboxValidationError(
+                    "NO_PGO and SOURCES[...].no_pgo " "cannot be set at the same time",
+                    context,
+                )
+            passthru.variables["NO_PROFILE_GUIDED_OPTIMIZE"] = no_pgo
+        if no_pgo_sources:
+            passthru.variables["NO_PROFILE_GUIDED_OPTIMIZE"] = no_pgo_sources
+
+        # A map from "canonical suffixes" for a particular source file
+        # language to the range of suffixes associated with that language.
+        #
+        # We deliberately don't list the canonical suffix in the suffix list
+        # in the definition; we'll add it in programmatically after defining
+        # things.
+        suffix_map = {
+            ".s": set([".asm"]),
+            ".c": set(),
+            ".m": set(),
+            ".mm": set(),
+            ".cpp": set([".cc", ".cxx"]),
+            ".S": set(),
+        }
+
+        # The inverse of the above, mapping suffixes to their canonical suffix.
+        canonicalized_suffix_map = {}
+        for suffix, alternatives in six.iteritems(suffix_map):
+            alternatives.add(suffix)
+            for a in alternatives:
+                canonicalized_suffix_map[a] = suffix
+
+        # A map from moz.build variables to the canonical suffixes of file
+        # kinds that can be listed therein.
+        all_suffixes = list(suffix_map.keys())
+        varmap = dict(
+            SOURCES=(Sources, all_suffixes),
+            HOST_SOURCES=(HostSources, [".c", ".mm", ".cpp"]),
+            UNIFIED_SOURCES=(UnifiedSources, [".c", ".mm", ".m", ".cpp"]),
+        )
+        # Only include a WasmSources context if there are any WASM_SOURCES.
+        # (This is going to matter later because we inject an extra .c file to
+        # compile with the wasm compiler if, and only if, there are any WASM
+        # sources.)
+        if sources["WASM_SOURCES"] or gen_sources["WASM_SOURCES"]:
+            varmap["WASM_SOURCES"] = (WasmSources, [".c", ".cpp"])
+        # Track whether there are any C++ source files.
+        # Technically this won't do the right thing for SIMPLE_PROGRAMS in
+        # a directory with mixed C and C++ source, but it's not that important.
+        cxx_sources = defaultdict(bool)
+
+        # Source files to track for linkables associated with this context.
+        ctxt_sources = defaultdict(lambda: defaultdict(list))
+
+        for variable, (klass, suffixes) in varmap.items():
+            # Group static and generated files by their canonical suffixes, and
+            # ensure we haven't been given filetypes that we don't recognize.
+            by_canonical_suffix = defaultdict(lambda: {"static": [], "generated": []})
+            for srcs, key in (
+                (sources[variable], "static"),
+                (gen_sources[variable], "generated"),
+            ):
+                for f in srcs:
+                    canonical_suffix = canonicalized_suffix_map.get(
+                        mozpath.splitext(f)[1]
+                    )
+                    if canonical_suffix not in suffixes:
+                        raise SandboxValidationError(
+                            "%s has an unknown file type." % f, context
+                        )
+                    by_canonical_suffix[canonical_suffix][key].append(f)
+
+            # Yield an object for each canonical suffix, grouping generated and
+            # static sources together to allow them to be unified together.
+            for canonical_suffix in sorted(by_canonical_suffix.keys()):
+                if canonical_suffix in (".cpp", ".mm"):
+                    cxx_sources[variable] = True
+                elif canonical_suffix in (".s", ".S"):
+                    self._asm_compile_dirs.add(context.objdir)
+                src_group = by_canonical_suffix[canonical_suffix]
+                obj = klass(
+                    context,
+                    src_group["static"],
+                    src_group["generated"],
+                    canonical_suffix,
+                )
+                srcs = list(obj.files)
+                if isinstance(obj, UnifiedSources) and obj.have_unified_mapping:
+                    srcs = sorted(dict(obj.unified_source_mapping).keys())
+                ctxt_sources[variable][canonical_suffix] += srcs
+                yield obj
+
+        if ctxt_sources:
+            for linkable in linkables:
+                for target_var in ("SOURCES", "UNIFIED_SOURCES"):
+                    for suffix, srcs in ctxt_sources[target_var].items():
+                        linkable.sources[suffix] += srcs
+            for host_linkable in host_linkables:
+                for suffix, srcs in ctxt_sources["HOST_SOURCES"].items():
+                    host_linkable.sources[suffix] += srcs
+            for wasm_linkable in wasm_linkables:
+                for suffix, srcs in ctxt_sources["WASM_SOURCES"].items():
+                    wasm_linkable.sources[suffix] += srcs
+
+        for f, flags in sorted(six.iteritems(all_flags)):
+            if flags.flags:
+                ext = mozpath.splitext(f)[1]
+                yield PerSourceFlag(context, f, flags.flags)
+
+        # If there are any C++ sources, set all the linkables defined here
+        # to require the C++ linker.
+        for vars, linkable_items in (
+            (("SOURCES", "UNIFIED_SOURCES"), linkables),
+            (("HOST_SOURCES",), host_linkables),
+        ):
+            for var in vars:
+                if cxx_sources[var]:
+                    for l in linkable_items:
+                        l.cxx_link = True
+                    break
+
+    def emit_from_context(self, context):
+        """Convert a Context to tree metadata objects.
+
+        This is a generator of mozbuild.frontend.data.ContextDerived instances.
+        """
+
+        # We only want to emit an InstallationTarget if one of the consulted
+        # variables is defined. Later on, we look up FINAL_TARGET, which has
+        # the side-effect of populating it. So, we need to do this lookup
+        # early.
+        if any(k in context for k in ("FINAL_TARGET", "XPI_NAME", "DIST_SUBDIR")):
+            yield InstallationTarget(context)
+
+        # We always emit a directory traversal descriptor. This is needed by
+        # the recursive make backend.
+        for o in self._emit_directory_traversal_from_context(context):
+            yield o
+
+        for obj in self._process_xpidl(context):
+            yield obj
+
+        computed_flags = ComputedFlags(context, context["COMPILE_FLAGS"])
+        computed_link_flags = ComputedFlags(context, context["LINK_FLAGS"])
+        computed_host_flags = ComputedFlags(context, context["HOST_COMPILE_FLAGS"])
+        computed_as_flags = ComputedFlags(context, context["ASM_FLAGS"])
+        computed_wasm_flags = ComputedFlags(context, context["WASM_FLAGS"])
+
+        # Proxy some variables as-is until we have richer classes to represent
+        # them. We should aim to keep this set small because it violates the
+        # desired abstraction of the build definition away from makefiles.
+        passthru = VariablePassthru(context)
+        varlist = [
+            "EXTRA_DSO_LDOPTS",
+            "RCFILE",
+            "RCINCLUDE",
+            "WIN32_EXE_LDFLAGS",
+            "USE_EXTENSION_MANIFEST",
+        ]
+        for v in varlist:
+            if v in context and context[v]:
+                passthru.variables[v] = context[v]
+
+        if (
+            context.config.substs.get("OS_TARGET") == "WINNT"
+            and context["DELAYLOAD_DLLS"]
+        ):
+            if context.config.substs.get("CC_TYPE") != "clang":
+                context["LDFLAGS"].extend(
+                    [("-DELAYLOAD:%s" % dll) for dll in context["DELAYLOAD_DLLS"]]
+                )
+            else:
+                context["LDFLAGS"].extend(
+                    [
+                        ("-Wl,-Xlink=-DELAYLOAD:%s" % dll)
+                        for dll in context["DELAYLOAD_DLLS"]
+                    ]
+                )
+            context["OS_LIBS"].append("delayimp")
+
+        for v in ["CMFLAGS", "CMMFLAGS"]:
+            if v in context and context[v]:
+                passthru.variables["MOZBUILD_" + v] = context[v]
+
+        for v in ["CXXFLAGS", "CFLAGS"]:
+            if v in context and context[v]:
+                computed_flags.resolve_flags("MOZBUILD_%s" % v, context[v])
+
+        for v in ["WASM_CFLAGS", "WASM_CXXFLAGS"]:
+            if v in context and context[v]:
+                computed_wasm_flags.resolve_flags("MOZBUILD_%s" % v, context[v])
+
+        for v in ["HOST_CXXFLAGS", "HOST_CFLAGS"]:
+            if v in context and context[v]:
+                computed_host_flags.resolve_flags("MOZBUILD_%s" % v, context[v])
+
+        if "LDFLAGS" in context and context["LDFLAGS"]:
+            computed_link_flags.resolve_flags("MOZBUILD", context["LDFLAGS"])
+
+        deffile = context.get("DEFFILE")
+        if deffile and context.config.substs.get("OS_TARGET") == "WINNT":
+            if isinstance(deffile, SourcePath):
+                if not os.path.exists(deffile.full_path):
+                    raise SandboxValidationError(
+                        "Path specified in DEFFILE does not exist: %s "
+                        "(resolved to %s)" % (deffile, deffile.full_path),
+                        context,
+                    )
+                path = mozpath.relpath(deffile.full_path, context.objdir)
+            else:
+                path = deffile.target_basename
+
+            if context.config.substs.get("GNU_CC"):
+                computed_link_flags.resolve_flags("DEFFILE", [path])
+            else:
+                computed_link_flags.resolve_flags("DEFFILE", ["-DEF:" + path])
+
+        dist_install = context["DIST_INSTALL"]
+        if dist_install is True:
+            passthru.variables["DIST_INSTALL"] = True
+        elif dist_install is False:
+            passthru.variables["NO_DIST_INSTALL"] = True
+
+        # Ideally, this should be done in templates, but this is difficult at
+        # the moment because USE_STATIC_LIBS can be set after a template
+        # returns. Eventually, with context-based templates, it will be
+        # possible.
+        if context.config.substs.get(
+            "OS_ARCH"
+        ) == "WINNT" and not context.config.substs.get("GNU_CC"):
+            use_static_lib = context.get(
+                "USE_STATIC_LIBS"
+            ) and not context.config.substs.get("MOZ_ASAN")
+            rtl_flag = "-MT" if use_static_lib else "-MD"
+            if context.config.substs.get("MOZ_DEBUG") and not context.config.substs.get(
+                "MOZ_NO_DEBUG_RTL"
+            ):
+                rtl_flag += "d"
+            computed_flags.resolve_flags("RTL", [rtl_flag])
+            if not context.config.substs.get("CROSS_COMPILE"):
+                computed_host_flags.resolve_flags("RTL", [rtl_flag])
+
+        generated_files = set()
+        localized_generated_files = set()
+        for obj in self._process_generated_files(context):
+            for f in obj.outputs:
+                generated_files.add(f)
+                if obj.localized:
+                    localized_generated_files.add(f)
+            yield obj
+
+        for path in context["CONFIGURE_SUBST_FILES"]:
+            sub = self._create_substitution(ConfigFileSubstitution, context, path)
+            generated_files.add(str(sub.relpath))
+            yield sub
+
+        for defines_var, cls, backend_flags in (
+            ("DEFINES", Defines, (computed_flags, computed_as_flags)),
+            ("HOST_DEFINES", HostDefines, (computed_host_flags,)),
+            ("WASM_DEFINES", WasmDefines, (computed_wasm_flags,)),
+        ):
+            defines = context.get(defines_var)
+            if defines:
+                defines_obj = cls(context, defines)
+                if isinstance(defines_obj, Defines):
+                    # DEFINES have consumers outside the compile command line,
+                    # HOST_DEFINES do not.
+                    yield defines_obj
+            else:
+                # If we don't have explicitly set defines we need to make sure
+                # initialized values if present end up in computed flags.
+                defines_obj = cls(context, context[defines_var])
+
+            defines_from_obj = list(defines_obj.get_defines())
+            if defines_from_obj:
+                for flags in backend_flags:
+                    flags.resolve_flags(defines_var, defines_from_obj)
+
+        idl_vars = (
+            "GENERATED_EVENTS_WEBIDL_FILES",
+            "GENERATED_WEBIDL_FILES",
+            "PREPROCESSED_TEST_WEBIDL_FILES",
+            "PREPROCESSED_WEBIDL_FILES",
+            "TEST_WEBIDL_FILES",
+            "WEBIDL_FILES",
+            "IPDL_SOURCES",
+            "PREPROCESSED_IPDL_SOURCES",
+            "XPCOM_MANIFESTS",
+        )
+        for context_var in idl_vars:
+            for name in context.get(context_var, []):
+                self._idls[context_var].add(mozpath.join(context.srcdir, name))
+        # WEBIDL_EXAMPLE_INTERFACES do not correspond to files.
+        for name in context.get("WEBIDL_EXAMPLE_INTERFACES", []):
+            self._idls["WEBIDL_EXAMPLE_INTERFACES"].add(name)
+
+        local_includes = []
+        for local_include in context.get("LOCAL_INCLUDES", []):
+            full_path = local_include.full_path
+            if not isinstance(local_include, ObjDirPath):
+                if not os.path.exists(full_path):
+                    raise SandboxValidationError(
+                        "Path specified in LOCAL_INCLUDES does not exist: %s (resolved to %s)"
+                        % (local_include, full_path),
+                        context,
+                    )
+                if not os.path.isdir(full_path):
+                    raise SandboxValidationError(
+                        "Path specified in LOCAL_INCLUDES "
+                        "is a filename, but a directory is required: %s "
+                        "(resolved to %s)" % (local_include, full_path),
+                        context,
+                    )
+            include_obj = LocalInclude(context, local_include)
+            local_includes.append(include_obj.path.full_path)
+            yield include_obj
+
+        computed_flags.resolve_flags(
+            "LOCAL_INCLUDES", ["-I%s" % p for p in local_includes]
+        )
+        computed_as_flags.resolve_flags(
+            "LOCAL_INCLUDES", ["-I%s" % p for p in local_includes]
+        )
+        computed_host_flags.resolve_flags(
+            "LOCAL_INCLUDES", ["-I%s" % p for p in local_includes]
+        )
+        computed_wasm_flags.resolve_flags(
+            "LOCAL_INCLUDES", ["-I%s" % p for p in local_includes]
+        )
+
+        for obj in self._handle_linkables(context, passthru, generated_files):
+            yield obj
+
+        generated_files.update(
+            [
+                "%s%s" % (k, self.config.substs.get("BIN_SUFFIX", ""))
+                for k in self._binaries.keys()
+            ]
+        )
+
+        components = []
+        for var, cls in (
+            ("EXPORTS", Exports),
+            ("FINAL_TARGET_FILES", FinalTargetFiles),
+            ("FINAL_TARGET_PP_FILES", FinalTargetPreprocessedFiles),
+            ("LOCALIZED_FILES", LocalizedFiles),
+            ("LOCALIZED_PP_FILES", LocalizedPreprocessedFiles),
+            ("OBJDIR_FILES", ObjdirFiles),
+            ("OBJDIR_PP_FILES", ObjdirPreprocessedFiles),
+            ("TEST_HARNESS_FILES", TestHarnessFiles),
+        ):
+            all_files = context.get(var)
+            if not all_files:
+                continue
+            if dist_install is False and var != "TEST_HARNESS_FILES":
+                raise SandboxValidationError(
+                    "%s cannot be used with DIST_INSTALL = False" % var, context
+                )
+            has_prefs = False
+            has_resources = False
+            for base, files in all_files.walk():
+                if var == "TEST_HARNESS_FILES" and not base:
+                    raise SandboxValidationError(
+                        "Cannot install files to the root of TEST_HARNESS_FILES",
+                        context,
+                    )
+                if base == "components":
+                    components.extend(files)
+                if base == "defaults/pref":
+                    has_prefs = True
+                if mozpath.split(base)[0] == "res":
+                    has_resources = True
+                for f in files:
+                    if (
+                        var
+                        in (
+                            "FINAL_TARGET_PP_FILES",
+                            "OBJDIR_PP_FILES",
+                            "LOCALIZED_PP_FILES",
+                        )
+                        and not isinstance(f, SourcePath)
+                    ):
+                        raise SandboxValidationError(
+                            ("Only source directory paths allowed in " + "%s: %s")
+                            % (var, f),
+                            context,
+                        )
+                    if var.startswith("LOCALIZED_"):
+                        if isinstance(f, SourcePath):
+                            if f.startswith("en-US/"):
+                                pass
+                            elif "locales/en-US/" in f:
+                                pass
+                            else:
+                                raise SandboxValidationError(
+                                    "%s paths must start with `en-US/` or "
+                                    "contain `locales/en-US/`: %s" % (var, f),
+                                    context,
+                                )
+
+                    if not isinstance(f, ObjDirPath):
+                        path = f.full_path
+                        if "*" not in path and not os.path.exists(path):
+                            raise SandboxValidationError(
+                                "File listed in %s does not exist: %s" % (var, path),
+                                context,
+                            )
+                    else:
+                        # TODO: Bug 1254682 - The '/' check is to allow
+                        # installing files generated from other directories,
+                        # which is done occasionally for tests. However, it
+                        # means we don't fail early if the file isn't actually
+                        # created by the other moz.build file.
+                        if f.target_basename not in generated_files and "/" not in f:
+                            raise SandboxValidationError(
+                                (
+                                    "Objdir file listed in %s not in "
+                                    + "GENERATED_FILES: %s"
+                                )
+                                % (var, f),
+                                context,
+                            )
+
+                        if var.startswith("LOCALIZED_"):
+                            # Further require that LOCALIZED_FILES are from
+                            # LOCALIZED_GENERATED_FILES.
+                            if f.target_basename not in localized_generated_files:
+                                raise SandboxValidationError(
+                                    (
+                                        "Objdir file listed in %s not in "
+                                        + "LOCALIZED_GENERATED_FILES: %s"
+                                    )
+                                    % (var, f),
+                                    context,
+                                )
+                        else:
+                            # Additionally, don't allow LOCALIZED_GENERATED_FILES to be used
+                            # in anything *but* LOCALIZED_FILES.
+                            if f.target_basename in localized_generated_files:
+                                raise SandboxValidationError(
+                                    (
+                                        "Outputs of LOCALIZED_GENERATED_FILES cannot "
+                                        "be used in %s: %s"
+                                    )
+                                    % (var, f),
+                                    context,
+                                )
+
+            # Addons (when XPI_NAME is defined) and Applications (when
+            # DIST_SUBDIR is defined) use a different preferences directory
+            # (default/preferences) from the one the GRE uses (defaults/pref).
+            # Hence, we move the files from the latter to the former in that
+            # case.
+            if has_prefs and (context.get("XPI_NAME") or context.get("DIST_SUBDIR")):
+                all_files.defaults.preferences += all_files.defaults.pref
+                del all_files.defaults._children["pref"]
+
+            if has_resources and (
+                context.get("DIST_SUBDIR") or context.get("XPI_NAME")
+            ):
+                raise SandboxValidationError(
+                    "RESOURCES_FILES cannot be used with DIST_SUBDIR or " "XPI_NAME.",
+                    context,
+                )
+
+            yield cls(context, all_files)
+
+        for c in components:
+            if c.endswith(".manifest"):
+                yield ChromeManifestEntry(
+                    context,
+                    "chrome.manifest",
+                    Manifest("components", mozpath.basename(c)),
+                )
+
+        rust_tests = context.get("RUST_TESTS", [])
+        if rust_tests:
+            # TODO: more sophisticated checking of the declared name vs.
+            # contents of the Cargo.toml file.
+            features = context.get("RUST_TEST_FEATURES", [])
+
+            yield RustTests(context, rust_tests, features)
+
+        for obj in self._process_test_manifests(context):
+            yield obj
+
+        for obj in self._process_jar_manifests(context):
+            yield obj
+
+        computed_as_flags.resolve_flags("MOZBUILD", context.get("ASFLAGS"))
+
+        if context.get("USE_NASM") is True:
+            nasm = context.config.substs.get("NASM")
+            if not nasm:
+                raise SandboxValidationError("nasm is not available", context)
+            passthru.variables["AS"] = nasm
+            passthru.variables["AS_DASH_C_FLAG"] = ""
+            passthru.variables["ASOUTOPTION"] = "-o "
+            computed_as_flags.resolve_flags(
+                "OS", context.config.substs.get("NASM_ASFLAGS", [])
+            )
+
+        if context.get("USE_INTEGRATED_CLANGCL_AS") is True:
+            if context.config.substs.get("CC_TYPE") != "clang-cl":
+                raise SandboxValidationError("clang-cl is not available", context)
+            passthru.variables["AS"] = context.config.substs.get("CC")
+            passthru.variables["AS_DASH_C_FLAG"] = "-c"
+            passthru.variables["ASOUTOPTION"] = "-o "
+
+        if passthru.variables:
+            yield passthru
+
+        if context.objdir in self._compile_dirs:
+            self._compile_flags[context.objdir] = computed_flags
+            yield computed_link_flags
+
+        if context.objdir in self._asm_compile_dirs:
+            self._compile_as_flags[context.objdir] = computed_as_flags
+
+        if context.objdir in self._host_compile_dirs:
+            yield computed_host_flags
+
+        if context.objdir in self._wasm_compile_dirs:
+            yield computed_wasm_flags
+
+    def _create_substitution(self, cls, context, path):
+        sub = cls(context)
+        sub.input_path = "%s.in" % path.full_path
+        sub.output_path = path.translated
+        sub.relpath = path
+
+        return sub
+
+    def _process_xpidl(self, context):
+        # XPIDL source files get processed and turned into .h and .xpt files.
+        # If there are multiple XPIDL files in a directory, they get linked
+        # together into a final .xpt, which has the name defined by
+        # XPIDL_MODULE.
+        xpidl_module = context["XPIDL_MODULE"]
+
+        if not xpidl_module:
+            if context["XPIDL_SOURCES"]:
+                raise SandboxValidationError(
+                    "XPIDL_MODULE must be defined if " "XPIDL_SOURCES is defined.",
+                    context,
+                )
+            return
+
+        if not context["XPIDL_SOURCES"]:
+            raise SandboxValidationError(
+                "XPIDL_MODULE cannot be defined " "unless there are XPIDL_SOURCES",
+                context,
+            )
+
+        if context["DIST_INSTALL"] is False:
+            self.log(
+                logging.WARN,
+                "mozbuild_warning",
+                dict(path=context.main_path),
+                "{path}: DIST_INSTALL = False has no effect on XPIDL_SOURCES.",
+            )
+
+        for idl in context["XPIDL_SOURCES"]:
+            if not os.path.exists(idl.full_path):
+                raise SandboxValidationError(
+                    "File %s from XPIDL_SOURCES " "does not exist" % idl.full_path,
+                    context,
+                )
+
+        yield XPIDLModule(context, xpidl_module, context["XPIDL_SOURCES"])
+
+    def _process_generated_files(self, context):
+        for path in context["CONFIGURE_DEFINE_FILES"]:
+            script = mozpath.join(
+                mozpath.dirname(mozpath.dirname(__file__)),
+                "action",
+                "process_define_files.py",
+            )
+            yield GeneratedFile(
+                context,
+                script,
+                "process_define_file",
+                six.text_type(path),
+                [Path(context, path + ".in")],
+            )
+
+        generated_files = context.get("GENERATED_FILES") or []
+        localized_generated_files = context.get("LOCALIZED_GENERATED_FILES") or []
+        if not (generated_files or localized_generated_files):
+            return
+
+        for (localized, gen) in (
+            (False, generated_files),
+            (True, localized_generated_files),
+        ):
+            for f in gen:
+                flags = gen[f]
+                outputs = f
+                inputs = []
+                if flags.script:
+                    method = "main"
+                    script = SourcePath(context, flags.script).full_path
+
+                    # Deal with cases like "C:\\path\\to\\script.py:function".
+                    if ".py:" in script:
+                        script, method = script.rsplit(".py:", 1)
+                        script += ".py"
+
+                    if not os.path.exists(script):
+                        raise SandboxValidationError(
+                            "Script for generating %s does not exist: %s" % (f, script),
+                            context,
+                        )
+                    if os.path.splitext(script)[1] != ".py":
+                        raise SandboxValidationError(
+                            "Script for generating %s does not end in .py: %s"
+                            % (f, script),
+                            context,
+                        )
+                else:
+                    script = None
+                    method = None
+
+                for i in flags.inputs:
+                    p = Path(context, i)
+                    if isinstance(p, SourcePath) and not os.path.exists(p.full_path):
+                        raise SandboxValidationError(
+                            "Input for generating %s does not exist: %s"
+                            % (f, p.full_path),
+                            context,
+                        )
+                    inputs.append(p)
+
+                yield GeneratedFile(
+                    context,
+                    script,
+                    method,
+                    outputs,
+                    inputs,
+                    flags.flags,
+                    localized=localized,
+                    force=flags.force,
+                )
+
+    def _process_test_manifests(self, context):
+        for prefix, info in TEST_MANIFESTS.items():
+            for path, manifest in context.get("%s_MANIFESTS" % prefix, []):
+                for obj in self._process_test_manifest(context, info, path, manifest):
+                    yield obj
+
+        for flavor in REFTEST_FLAVORS:
+            for path, manifest in context.get("%s_MANIFESTS" % flavor.upper(), []):
+                for obj in self._process_reftest_manifest(
+                    context, flavor, path, manifest
+                ):
+                    yield obj
+
+    def _process_test_manifest(self, context, info, manifest_path, mpmanifest):
+        flavor, install_root, install_subdir, package_tests = info
+
+        path = manifest_path.full_path
+        manifest_dir = mozpath.dirname(path)
+        manifest_reldir = mozpath.dirname(
+            mozpath.relpath(path, context.config.topsrcdir)
+        )
+        manifest_sources = [
+            mozpath.relpath(pth, context.config.topsrcdir)
+            for pth in mpmanifest.source_files
+        ]
+        install_prefix = mozpath.join(install_root, install_subdir)
+
+        try:
+            if not mpmanifest.tests:
+                raise SandboxValidationError("Empty test manifest: %s" % path, context)
+
+            defaults = mpmanifest.manifest_defaults[os.path.normpath(path)]
+            obj = TestManifest(
+                context,
+                path,
+                mpmanifest,
+                flavor=flavor,
+                install_prefix=install_prefix,
+                relpath=mozpath.join(manifest_reldir, mozpath.basename(path)),
+                sources=manifest_sources,
+                dupe_manifest="dupe-manifest" in defaults,
+            )
+
+            filtered = mpmanifest.tests
+
+            missing = [t["name"] for t in filtered if not os.path.exists(t["path"])]
+            if missing:
+                raise SandboxValidationError(
+                    "Test manifest (%s) lists "
+                    "test that does not exist: %s" % (path, ", ".join(missing)),
+                    context,
+                )
+
+            out_dir = mozpath.join(install_prefix, manifest_reldir)
+
+            def process_support_files(test):
+                install_info = self._test_files_converter.convert_support_files(
+                    test, install_root, manifest_dir, out_dir
+                )
+
+                obj.pattern_installs.extend(install_info.pattern_installs)
+                for source, dest in install_info.installs:
+                    obj.installs[source] = (dest, False)
+                obj.external_installs |= install_info.external_installs
+                for install_path in install_info.deferred_installs:
+                    if all(
+                        [
+                            "*" not in install_path,
+                            not os.path.isfile(
+                                mozpath.join(context.config.topsrcdir, install_path[2:])
+                            ),
+                            install_path not in install_info.external_installs,
+                        ]
+                    ):
+                        raise SandboxValidationError(
+                            "Error processing test "
+                            "manifest %s: entry in support-files not present "
+                            "in the srcdir: %s" % (path, install_path),
+                            context,
+                        )
+
+                obj.deferred_installs |= install_info.deferred_installs
+
+            for test in filtered:
+                obj.tests.append(test)
+
+                # Some test files are compiled and should not be copied into the
+                # test package. They function as identifiers rather than files.
+                if package_tests:
+                    manifest_relpath = mozpath.relpath(
+                        test["path"], mozpath.dirname(test["manifest"])
+                    )
+                    obj.installs[mozpath.normpath(test["path"])] = (
+                        (mozpath.join(out_dir, manifest_relpath)),
+                        True,
+                    )
+
+                process_support_files(test)
+
+            for path, m_defaults in mpmanifest.manifest_defaults.items():
+                process_support_files(m_defaults)
+
+            # We also copy manifests into the output directory,
+            # including manifests from [include:foo] directives.
+            for mpath in mpmanifest.manifests():
+                mpath = mozpath.normpath(mpath)
+                out_path = mozpath.join(out_dir, mozpath.basename(mpath))
+                obj.installs[mpath] = (out_path, False)
+
+            # Some manifests reference files that are auto generated as
+            # part of the build or shouldn't be installed for some
+            # reason. Here, we prune those files from the install set.
+            # FUTURE we should be able to detect autogenerated files from
+            # other build metadata. Once we do that, we can get rid of this.
+            for f in defaults.get("generated-files", "").split():
+                # We re-raise otherwise the stack trace isn't informative.
+                try:
+                    del obj.installs[mozpath.join(manifest_dir, f)]
+                except KeyError:
+                    raise SandboxValidationError(
+                        "Error processing test "
+                        "manifest %s: entry in generated-files not present "
+                        "elsewhere in manifest: %s" % (path, f),
+                        context,
+                    )
+
+            yield obj
+        except (AssertionError, Exception):
+            raise SandboxValidationError(
+                "Error processing test "
+                "manifest file %s: %s"
+                % (path, "\n".join(traceback.format_exception(*sys.exc_info()))),
+                context,
+            )
+
+    def _process_reftest_manifest(self, context, flavor, manifest_path, manifest):
+        manifest_full_path = manifest_path.full_path
+        manifest_reldir = mozpath.dirname(
+            mozpath.relpath(manifest_full_path, context.config.topsrcdir)
+        )
+
+        # reftest manifests don't come from manifest parser. But they are
+        # similar enough that we can use the same emitted objects. Note
+        # that we don't perform any installs for reftests.
+        obj = TestManifest(
+            context,
+            manifest_full_path,
+            manifest,
+            flavor=flavor,
+            install_prefix="%s/" % flavor,
+            relpath=mozpath.join(manifest_reldir, mozpath.basename(manifest_path)),
+        )
+        obj.tests = list(sorted(manifest.tests, key=lambda t: t["path"]))
+
+        yield obj
+
+    def _process_jar_manifests(self, context):
+        jar_manifests = context.get("JAR_MANIFESTS", [])
+        if len(jar_manifests) > 1:
+            raise SandboxValidationError(
+                "While JAR_MANIFESTS is a list, "
+                "it is currently limited to one value.",
+                context,
+            )
+
+        for path in jar_manifests:
+            yield JARManifest(context, path)
+
+        # Temporary test to look for jar.mn files that creep in without using
+        # the new declaration. Before, we didn't require jar.mn files to
+        # declared anywhere (they were discovered). This will detect people
+        # relying on the old behavior.
+        if os.path.exists(os.path.join(context.srcdir, "jar.mn")):
+            if "jar.mn" not in jar_manifests:
+                raise SandboxValidationError(
+                    "A jar.mn exists but it "
+                    "is not referenced in the moz.build file. "
+                    "Please define JAR_MANIFESTS.",
+                    context,
+                )
+
+    def _emit_directory_traversal_from_context(self, context):
+        o = DirectoryTraversal(context)
+        o.dirs = context.get("DIRS", [])
+
+        # Some paths have a subconfigure, yet also have a moz.build. Those
+        # shouldn't end up in self._external_paths.
+        if o.objdir:
+            self._external_paths -= {o.relobjdir}
+
+        yield o
Index: mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/test/frontend/test_emitter.py
===================================================================
--- mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/test/frontend/test_emitter.py	(nonexistent)
+++ mozjs/create-102.15.0-emitter-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/test/frontend/test_emitter.py	(revision 385)
@@ -0,0 +1,1850 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+import os
+import six
+import unittest
+
+from mozunit import main
+
+from mozbuild.frontend.context import ObjDirPath, Path
+from mozbuild.frontend.data import (
+    ComputedFlags,
+    ConfigFileSubstitution,
+    Defines,
+    DirectoryTraversal,
+    Exports,
+    FinalTargetPreprocessedFiles,
+    GeneratedFile,
+    HostProgram,
+    HostRustLibrary,
+    HostRustProgram,
+    HostSources,
+    IPDLCollection,
+    JARManifest,
+    LocalInclude,
+    LocalizedFiles,
+    LocalizedPreprocessedFiles,
+    Program,
+    RustLibrary,
+    RustProgram,
+    SharedLibrary,
+    SimpleProgram,
+    Sources,
+    StaticLibrary,
+    TestHarnessFiles,
+    TestManifest,
+    UnifiedSources,
+    VariablePassthru,
+    WasmSources,
+)
+from mozbuild.frontend.emitter import TreeMetadataEmitter
+from mozbuild.frontend.reader import (
+    BuildReader,
+    BuildReaderError,
+    SandboxValidationError,
+)
+
+from mozbuild.test.common import MockConfig
+
+import mozpack.path as mozpath
+
+
+data_path = mozpath.abspath(mozpath.dirname(__file__))
+data_path = mozpath.join(data_path, "data")
+
+
+class TestEmitterBasic(unittest.TestCase):
+    def setUp(self):
+        self._old_env = dict(os.environ)
+        os.environ.pop("MOZ_OBJDIR", None)
+
+    def tearDown(self):
+        os.environ.clear()
+        os.environ.update(self._old_env)
+
+    def reader(self, name, enable_tests=False, extra_substs=None):
+        substs = dict(
+            ENABLE_TESTS="1" if enable_tests else "",
+            BIN_SUFFIX=".prog",
+            HOST_BIN_SUFFIX=".hostprog",
+            OS_TARGET="WINNT",
+            COMPILE_ENVIRONMENT="1",
+            STL_FLAGS=["-I/path/to/topobjdir/dist/stl_wrappers"],
+            VISIBILITY_FLAGS=["-include", "$(topsrcdir)/config/gcc_hidden.h"],
+            OBJ_SUFFIX="obj",
+            WASM_OBJ_SUFFIX="wasm",
+            WASM_CFLAGS=["-foo"],
+        )
+        if extra_substs:
+            substs.update(extra_substs)
+        config = MockConfig(mozpath.join(data_path, name), extra_substs=substs)
+
+        return BuildReader(config)
+
+    def read_topsrcdir(self, reader, filter_common=True):
+        emitter = TreeMetadataEmitter(reader.config)
+        objs = list(emitter.emit(reader.read_topsrcdir()))
+        self.assertGreater(len(objs), 0)
+
+        filtered = []
+        for obj in objs:
+            if filter_common and isinstance(obj, DirectoryTraversal):
+                continue
+
+            filtered.append(obj)
+
+        return filtered
+
+    def test_dirs_traversal_simple(self):
+        reader = self.reader("traversal-simple")
+        objs = self.read_topsrcdir(reader, filter_common=False)
+        self.assertEqual(len(objs), 4)
+
+        for o in objs:
+            self.assertIsInstance(o, DirectoryTraversal)
+            self.assertTrue(os.path.isabs(o.context_main_path))
+            self.assertEqual(len(o.context_all_paths), 1)
+
+        reldirs = [o.relsrcdir for o in objs]
+        self.assertEqual(reldirs, ["", "foo", "foo/biz", "bar"])
+
+        dirs = [[d.full_path for d in o.dirs] for o in objs]
+        self.assertEqual(
+            dirs,
+            [
+                [
+                    mozpath.join(reader.config.topsrcdir, "foo"),
+                    mozpath.join(reader.config.topsrcdir, "bar"),
+                ],
+                [mozpath.join(reader.config.topsrcdir, "foo", "biz")],
+                [],
+                [],
+            ],
+        )
+
+    def test_traversal_all_vars(self):
+        reader = self.reader("traversal-all-vars")
+        objs = self.read_topsrcdir(reader, filter_common=False)
+        self.assertEqual(len(objs), 2)
+
+        for o in objs:
+            self.assertIsInstance(o, DirectoryTraversal)
+
+        reldirs = set([o.relsrcdir for o in objs])
+        self.assertEqual(reldirs, set(["", "regular"]))
+
+        for o in objs:
+            reldir = o.relsrcdir
+
+            if reldir == "":
+                self.assertEqual(
+                    [d.full_path for d in o.dirs],
+                    [mozpath.join(reader.config.topsrcdir, "regular")],
+                )
+
+    def test_traversal_all_vars_enable_tests(self):
+        reader = self.reader("traversal-all-vars", enable_tests=True)
+        objs = self.read_topsrcdir(reader, filter_common=False)
+        self.assertEqual(len(objs), 3)
+
+        for o in objs:
+            self.assertIsInstance(o, DirectoryTraversal)
+
+        reldirs = set([o.relsrcdir for o in objs])
+        self.assertEqual(reldirs, set(["", "regular", "test"]))
+
+        for o in objs:
+            reldir = o.relsrcdir
+
+            if reldir == "":
+                self.assertEqual(
+                    [d.full_path for d in o.dirs],
+                    [
+                        mozpath.join(reader.config.topsrcdir, "regular"),
+                        mozpath.join(reader.config.topsrcdir, "test"),
+                    ],
+                )
+
+    def test_config_file_substitution(self):
+        reader = self.reader("config-file-substitution")
+        objs = self.read_topsrcdir(reader)
+        self.assertEqual(len(objs), 2)
+
+        self.assertIsInstance(objs[0], ConfigFileSubstitution)
+        self.assertIsInstance(objs[1], ConfigFileSubstitution)
+
+        topobjdir = mozpath.abspath(reader.config.topobjdir)
+        self.assertEqual(objs[0].relpath, "foo")
+        self.assertEqual(
+            mozpath.normpath(objs[0].output_path),
+            mozpath.normpath(mozpath.join(topobjdir, "foo")),
+        )
+        self.assertEqual(
+            mozpath.normpath(objs[1].output_path),
+            mozpath.normpath(mozpath.join(topobjdir, "bar")),
+        )
+
+    def test_variable_passthru(self):
+        reader = self.reader("variable-passthru")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], VariablePassthru)
+
+        wanted = {
+            "NO_DIST_INSTALL": True,
+            "RCFILE": "foo.rc",
+            "RCINCLUDE": "bar.rc",
+            "WIN32_EXE_LDFLAGS": ["-subsystem:console"],
+        }
+
+        variables = objs[0].variables
+        maxDiff = self.maxDiff
+        self.maxDiff = None
+        self.assertEqual(wanted, variables)
+        self.maxDiff = maxDiff
+
+    def test_compile_flags(self):
+        reader = self.reader(
+            "compile-flags", extra_substs={"WARNINGS_AS_ERRORS": "-Werror"}
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["STL"], reader.config.substs["STL_FLAGS"])
+        self.assertEqual(
+            flags.flags["VISIBILITY"], reader.config.substs["VISIBILITY_FLAGS"]
+        )
+        self.assertEqual(flags.flags["WARNINGS_AS_ERRORS"], ["-Werror"])
+        self.assertEqual(flags.flags["MOZBUILD_CFLAGS"], ["-Wall", "-funroll-loops"])
+        self.assertEqual(flags.flags["MOZBUILD_CXXFLAGS"], ["-funroll-loops", "-Wall"])
+
+    def test_asflags(self):
+        reader = self.reader("asflags", extra_substs={"ASFLAGS": ["-safeseh"]})
+        as_sources, sources, ldflags, lib, flags, asflags = self.read_topsrcdir(reader)
+        self.assertIsInstance(asflags, ComputedFlags)
+        self.assertEqual(asflags.flags["OS"], reader.config.substs["ASFLAGS"])
+        self.assertEqual(asflags.flags["MOZBUILD"], ["-no-integrated-as"])
+
+    def test_debug_flags(self):
+        reader = self.reader(
+            "compile-flags",
+            extra_substs={"MOZ_DEBUG_FLAGS": "-g", "MOZ_DEBUG_SYMBOLS": "1"},
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["DEBUG"], ["-g"])
+
+    def test_disable_debug_flags(self):
+        reader = self.reader(
+            "compile-flags",
+            extra_substs={"MOZ_DEBUG_FLAGS": "-g", "MOZ_DEBUG_SYMBOLS": ""},
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["DEBUG"], [])
+
+    def test_link_flags(self):
+        reader = self.reader(
+            "link-flags",
+            extra_substs={
+                "OS_LDFLAGS": ["-Wl,rpath-link=/usr/lib"],
+                "MOZ_OPTIMIZE": "",
+                "MOZ_OPTIMIZE_LDFLAGS": ["-Wl,-dead_strip"],
+                "MOZ_DEBUG_LDFLAGS": ["-framework ExceptionHandling"],
+            },
+        )
+        sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertEqual(ldflags.flags["OS"], reader.config.substs["OS_LDFLAGS"])
+        self.assertEqual(
+            ldflags.flags["MOZBUILD"], ["-Wl,-U_foo", "-framework Foo", "-x"]
+        )
+        self.assertEqual(ldflags.flags["OPTIMIZE"], [])
+
+    def test_debug_ldflags(self):
+        reader = self.reader(
+            "link-flags",
+            extra_substs={
+                "MOZ_DEBUG_SYMBOLS": "1",
+                "MOZ_DEBUG_LDFLAGS": ["-framework ExceptionHandling"],
+            },
+        )
+        sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertEqual(ldflags.flags["OS"], reader.config.substs["MOZ_DEBUG_LDFLAGS"])
+
+    def test_windows_opt_link_flags(self):
+        reader = self.reader(
+            "link-flags",
+            extra_substs={
+                "OS_ARCH": "WINNT",
+                "GNU_CC": "",
+                "MOZ_OPTIMIZE": "1",
+                "MOZ_DEBUG_LDFLAGS": ["-DEBUG"],
+                "MOZ_DEBUG_SYMBOLS": "1",
+                "MOZ_OPTIMIZE_FLAGS": [],
+                "MOZ_OPTIMIZE_LDFLAGS": [],
+            },
+        )
+        sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIn("-DEBUG", ldflags.flags["OS"])
+        self.assertIn("-OPT:REF,ICF", ldflags.flags["OS"])
+
+    def test_windows_dmd_link_flags(self):
+        reader = self.reader(
+            "link-flags",
+            extra_substs={
+                "OS_ARCH": "WINNT",
+                "GNU_CC": "",
+                "MOZ_DMD": "1",
+                "MOZ_DEBUG_LDFLAGS": ["-DEBUG"],
+                "MOZ_DEBUG_SYMBOLS": "1",
+                "MOZ_OPTIMIZE": "1",
+                "MOZ_OPTIMIZE_FLAGS": [],
+            },
+        )
+        sources, ldflags, lib, compile_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertEqual(ldflags.flags["OS"], ["-DEBUG", "-OPT:REF,ICF"])
+
+    def test_host_compile_flags(self):
+        reader = self.reader(
+            "host-compile-flags",
+            extra_substs={
+                "HOST_CXXFLAGS": ["-Wall", "-Werror"],
+                "HOST_CFLAGS": ["-Werror", "-Wall"],
+            },
+        )
+        sources, ldflags, flags, lib, target_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(
+            flags.flags["HOST_CXXFLAGS"], reader.config.substs["HOST_CXXFLAGS"]
+        )
+        self.assertEqual(
+            flags.flags["HOST_CFLAGS"], reader.config.substs["HOST_CFLAGS"]
+        )
+        self.assertEqual(
+            set(flags.flags["HOST_DEFINES"]),
+            set(["-DFOO", '-DBAZ="abcd"', "-UQUX", "-DBAR=7", "-DVALUE=xyz"]),
+        )
+        self.assertEqual(
+            flags.flags["MOZBUILD_HOST_CFLAGS"], ["-funroll-loops", "-host-arg"]
+        )
+        self.assertEqual(flags.flags["MOZBUILD_HOST_CXXFLAGS"], [])
+
+    def test_host_no_optimize_flags(self):
+        reader = self.reader(
+            "host-compile-flags",
+            extra_substs={"MOZ_OPTIMIZE": "", "MOZ_OPTIMIZE_FLAGS": ["-O2"]},
+        )
+        sources, ldflags, flags, lib, target_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["HOST_OPTIMIZE"], [])
+
+    def test_host_optimize_flags(self):
+        reader = self.reader(
+            "host-compile-flags",
+            extra_substs={"MOZ_OPTIMIZE": "1", "MOZ_OPTIMIZE_FLAGS": ["-O2"]},
+        )
+        sources, ldflags, flags, lib, target_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["HOST_OPTIMIZE"], ["-O2"])
+
+    def test_cross_optimize_flags(self):
+        reader = self.reader(
+            "host-compile-flags",
+            extra_substs={
+                "MOZ_OPTIMIZE": "1",
+                "MOZ_OPTIMIZE_FLAGS": ["-O2"],
+                "HOST_OPTIMIZE_FLAGS": ["-O3"],
+                "CROSS_COMPILE": "1",
+            },
+        )
+        sources, ldflags, flags, lib, target_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["HOST_OPTIMIZE"], ["-O3"])
+
+    def test_host_rtl_flag(self):
+        reader = self.reader(
+            "host-compile-flags", extra_substs={"OS_ARCH": "WINNT", "MOZ_DEBUG": "1"}
+        )
+        sources, ldflags, flags, lib, target_flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["RTL"], ["-MDd"])
+
+    def test_compile_flags_validation(self):
+        reader = self.reader("compile-flags-field-validation")
+
+        with six.assertRaisesRegex(self, BuildReaderError, "Invalid value."):
+            self.read_topsrcdir(reader)
+
+        reader = self.reader("compile-flags-type-validation")
+        with six.assertRaisesRegex(
+            self, BuildReaderError, "A list of strings must be provided"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_compile_flags_templates(self):
+        reader = self.reader(
+            "compile-flags-templates",
+            extra_substs={
+                "NSPR_CFLAGS": ["-I/nspr/path"],
+                "NSS_CFLAGS": ["-I/nss/path"],
+                "MOZ_JPEG_CFLAGS": ["-I/jpeg/path"],
+                "MOZ_PNG_CFLAGS": ["-I/png/path"],
+                "MOZ_ZLIB_CFLAGS": ["-I/zlib/path"],
+                "MOZ_PIXMAN_CFLAGS": ["-I/pixman/path"],
+            },
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["STL"], [])
+        self.assertEqual(flags.flags["VISIBILITY"], [])
+        self.assertEqual(
+            flags.flags["OS_INCLUDES"],
+            [
+                "-I/nspr/path",
+                "-I/nss/path",
+                "-I/jpeg/path",
+                "-I/png/path",
+                "-I/zlib/path",
+                "-I/pixman/path",
+            ],
+        )
+
+    def test_disable_stl_wrapping(self):
+        reader = self.reader("disable-stl-wrapping")
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["STL"], [])
+
+    def test_visibility_flags(self):
+        reader = self.reader("visibility-flags")
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(flags.flags["VISIBILITY"], [])
+
+    def test_defines_in_flags(self):
+        reader = self.reader("compile-defines")
+        defines, sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(
+            flags.flags["LIBRARY_DEFINES"], ["-DMOZ_LIBRARY_DEFINE=MOZ_TEST"]
+        )
+        self.assertEqual(flags.flags["DEFINES"], ["-DMOZ_TEST_DEFINE"])
+
+    def test_resolved_flags_error(self):
+        reader = self.reader("resolved-flags-error")
+        with six.assertRaisesRegex(
+            self,
+            BuildReaderError,
+            "`DEFINES` may not be set in COMPILE_FLAGS from moz.build",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_includes_in_flags(self):
+        reader = self.reader("compile-includes")
+        defines, sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(
+            flags.flags["BASE_INCLUDES"],
+            ["-I%s" % reader.config.topsrcdir, "-I%s" % reader.config.topobjdir],
+        )
+        self.assertEqual(
+            flags.flags["EXTRA_INCLUDES"],
+            ["-I%s/dist/include" % reader.config.topobjdir],
+        )
+        self.assertEqual(
+            flags.flags["LOCAL_INCLUDES"], ["-I%s/subdir" % reader.config.topsrcdir]
+        )
+
+    def test_allow_compiler_warnings(self):
+        reader = self.reader(
+            "allow-compiler-warnings", extra_substs={"WARNINGS_AS_ERRORS": "-Werror"}
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertEqual(flags.flags["WARNINGS_AS_ERRORS"], [])
+
+    def test_disable_compiler_warnings(self):
+        reader = self.reader(
+            "disable-compiler-warnings", extra_substs={"WARNINGS_CFLAGS": "-Wall"}
+        )
+        sources, ldflags, lib, flags = self.read_topsrcdir(reader)
+        self.assertEqual(flags.flags["WARNINGS_CFLAGS"], [])
+
+    def test_use_nasm(self):
+        # When nasm is not available, this should raise.
+        reader = self.reader("use-nasm")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "nasm is not available"
+        ):
+            self.read_topsrcdir(reader)
+
+        # When nasm is available, this should work.
+        reader = self.reader(
+            "use-nasm", extra_substs=dict(NASM="nasm", NASM_ASFLAGS="-foo")
+        )
+
+        sources, passthru, ldflags, lib, flags, asflags = self.read_topsrcdir(reader)
+
+        self.assertIsInstance(passthru, VariablePassthru)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertIsInstance(asflags, ComputedFlags)
+
+        self.assertEqual(asflags.flags["OS"], reader.config.substs["NASM_ASFLAGS"])
+
+        maxDiff = self.maxDiff
+        self.maxDiff = None
+        self.assertEqual(
+            passthru.variables,
+            {"AS": "nasm", "AS_DASH_C_FLAG": "", "ASOUTOPTION": "-o "},
+        )
+        self.maxDiff = maxDiff
+
+    def test_generated_files(self):
+        reader = self.reader("generated-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        for o in objs:
+            self.assertIsInstance(o, GeneratedFile)
+            self.assertFalse(o.localized)
+            self.assertFalse(o.force)
+
+        expected = ["bar.c", "foo.c", ("xpidllex.py", "xpidlyacc.py")]
+        for o, f in zip(objs, expected):
+            expected_filename = f if isinstance(f, tuple) else (f,)
+            self.assertEqual(o.outputs, expected_filename)
+            self.assertEqual(o.script, None)
+            self.assertEqual(o.method, None)
+            self.assertEqual(o.inputs, [])
+
+    def test_generated_files_force(self):
+        reader = self.reader("generated-files-force")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        for o in objs:
+            self.assertIsInstance(o, GeneratedFile)
+            self.assertEqual(o.force, "bar.c" in o.outputs)
+
+    def test_localized_generated_files(self):
+        reader = self.reader("localized-generated-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 2)
+        for o in objs:
+            self.assertIsInstance(o, GeneratedFile)
+            self.assertTrue(o.localized)
+
+        expected = ["abc.ini", ("bar", "baz")]
+        for o, f in zip(objs, expected):
+            expected_filename = f if isinstance(f, tuple) else (f,)
+            self.assertEqual(o.outputs, expected_filename)
+            self.assertEqual(o.script, None)
+            self.assertEqual(o.method, None)
+            self.assertEqual(o.inputs, [])
+
+    def test_localized_generated_files_force(self):
+        reader = self.reader("localized-generated-files-force")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 2)
+        for o in objs:
+            self.assertIsInstance(o, GeneratedFile)
+            self.assertTrue(o.localized)
+            self.assertEqual(o.force, "abc.ini" in o.outputs)
+
+    def test_localized_files_from_generated(self):
+        """Test that using LOCALIZED_GENERATED_FILES and then putting the output in
+        LOCALIZED_FILES as an objdir path works.
+        """
+        reader = self.reader("localized-files-from-generated")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 2)
+        self.assertIsInstance(objs[0], GeneratedFile)
+        self.assertIsInstance(objs[1], LocalizedFiles)
+
+    def test_localized_files_not_localized_generated(self):
+        """Test that using GENERATED_FILES and then putting the output in
+        LOCALIZED_FILES as an objdir path produces an error.
+        """
+        reader = self.reader("localized-files-not-localized-generated")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Objdir file listed in LOCALIZED_FILES not in LOCALIZED_GENERATED_FILES:",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_localized_generated_files_final_target_files(self):
+        """Test that using LOCALIZED_GENERATED_FILES and then putting the output in
+        FINAL_TARGET_FILES as an objdir path produces an error.
+        """
+        reader = self.reader("localized-generated-files-final-target-files")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Outputs of LOCALIZED_GENERATED_FILES cannot be used in FINAL_TARGET_FILES:",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_generated_files_method_names(self):
+        reader = self.reader("generated-files-method-names")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 2)
+        for o in objs:
+            self.assertIsInstance(o, GeneratedFile)
+
+        expected = ["bar.c", "foo.c"]
+        expected_method_names = ["make_bar", "main"]
+        for o, expected_filename, expected_method in zip(
+            objs, expected, expected_method_names
+        ):
+            self.assertEqual(o.outputs, (expected_filename,))
+            self.assertEqual(o.method, expected_method)
+            self.assertEqual(o.inputs, [])
+
+    def test_generated_files_absolute_script(self):
+        reader = self.reader("generated-files-absolute-script")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+
+        o = objs[0]
+        self.assertIsInstance(o, GeneratedFile)
+        self.assertEqual(o.outputs, ("bar.c",))
+        self.assertRegex(o.script, "script.py$")
+        self.assertEqual(o.method, "make_bar")
+        self.assertEqual(o.inputs, [])
+
+    def test_generated_files_no_script(self):
+        reader = self.reader("generated-files-no-script")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Script for generating bar.c does not exist"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_generated_files_no_inputs(self):
+        reader = self.reader("generated-files-no-inputs")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Input for generating foo.c does not exist"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_generated_files_no_python_script(self):
+        reader = self.reader("generated-files-no-python-script")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Script for generating bar.c does not end in .py",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_exports(self):
+        reader = self.reader("exports")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], Exports)
+
+        expected = [
+            ("", ["foo.h", "bar.h", "baz.h"]),
+            ("mozilla", ["mozilla1.h", "mozilla2.h"]),
+            ("mozilla/dom", ["dom1.h", "dom2.h", "dom3.h"]),
+            ("mozilla/gfx", ["gfx.h"]),
+            ("nspr/private", ["pprio.h", "pprthred.h"]),
+            ("vpx", ["mem.h", "mem2.h"]),
+        ]
+        for (expect_path, expect_headers), (actual_path, actual_headers) in zip(
+            expected, [(path, list(seq)) for path, seq in objs[0].files.walk()]
+        ):
+            self.assertEqual(expect_path, actual_path)
+            self.assertEqual(expect_headers, actual_headers)
+
+    def test_exports_missing(self):
+        """
+        Missing files in EXPORTS is an error.
+        """
+        reader = self.reader("exports-missing")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "File listed in EXPORTS does not exist:"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_exports_missing_generated(self):
+        """
+        An objdir file in EXPORTS that is not in GENERATED_FILES is an error.
+        """
+        reader = self.reader("exports-missing-generated")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Objdir file listed in EXPORTS not in GENERATED_FILES:",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_exports_generated(self):
+        reader = self.reader("exports-generated")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 2)
+        self.assertIsInstance(objs[0], GeneratedFile)
+        self.assertIsInstance(objs[1], Exports)
+        exports = [(path, list(seq)) for path, seq in objs[1].files.walk()]
+        self.assertEqual(
+            exports, [("", ["foo.h"]), ("mozilla", ["mozilla1.h", "!mozilla2.h"])]
+        )
+        path, files = exports[1]
+        self.assertIsInstance(files[1], ObjDirPath)
+
+    def test_test_harness_files(self):
+        reader = self.reader("test-harness-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], TestHarnessFiles)
+
+        expected = {
+            "mochitest": ["runtests.py", "utils.py"],
+            "testing/mochitest": ["mochitest.py", "mochitest.ini"],
+        }
+
+        for path, strings in objs[0].files.walk():
+            self.assertTrue(path in expected)
+            basenames = sorted(mozpath.basename(s) for s in strings)
+            self.assertEqual(sorted(expected[path]), basenames)
+
+    def test_test_harness_files_root(self):
+        reader = self.reader("test-harness-files-root")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Cannot install files to the root of TEST_HARNESS_FILES",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_program(self):
+        reader = self.reader("program")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 6)
+        self.assertIsInstance(objs[0], Sources)
+        self.assertIsInstance(objs[1], ComputedFlags)
+        self.assertIsInstance(objs[2], ComputedFlags)
+        self.assertIsInstance(objs[3], Program)
+        self.assertIsInstance(objs[4], SimpleProgram)
+        self.assertIsInstance(objs[5], SimpleProgram)
+
+        self.assertEqual(objs[3].program, "test_program.prog")
+        self.assertEqual(objs[4].program, "test_program1.prog")
+        self.assertEqual(objs[5].program, "test_program2.prog")
+
+        self.assertEqual(objs[3].name, "test_program.prog")
+        self.assertEqual(objs[4].name, "test_program1.prog")
+        self.assertEqual(objs[5].name, "test_program2.prog")
+
+        self.assertEqual(
+            objs[4].objs,
+            [
+                mozpath.join(
+                    reader.config.topobjdir,
+                    "test_program1.%s" % reader.config.substs["OBJ_SUFFIX"],
+                )
+            ],
+        )
+        self.assertEqual(
+            objs[5].objs,
+            [
+                mozpath.join(
+                    reader.config.topobjdir,
+                    "test_program2.%s" % reader.config.substs["OBJ_SUFFIX"],
+                )
+            ],
+        )
+
+    def test_program_paths(self):
+        """Various moz.build settings that change the destination of PROGRAM should be
+        accurately reflected in Program.output_path."""
+        reader = self.reader("program-paths")
+        objs = self.read_topsrcdir(reader)
+        prog_paths = [o.output_path for o in objs if isinstance(o, Program)]
+        self.assertEqual(
+            prog_paths,
+            [
+                "!/dist/bin/dist-bin.prog",
+                "!/dist/bin/foo/dist-subdir.prog",
+                "!/final/target/final-target.prog",
+                "!not-installed.prog",
+            ],
+        )
+
+    def test_host_program_paths(self):
+        """The destination of a HOST_PROGRAM (almost always dist/host/bin)
+        should be accurately reflected in Program.output_path."""
+        reader = self.reader("host-program-paths")
+        objs = self.read_topsrcdir(reader)
+        prog_paths = [o.output_path for o in objs if isinstance(o, HostProgram)]
+        self.assertEqual(
+            prog_paths,
+            [
+                "!/dist/host/bin/final-target.hostprog",
+                "!/dist/host/bin/dist-host-bin.hostprog",
+                "!not-installed.hostprog",
+            ],
+        )
+
+    def test_test_manifest_missing_manifest(self):
+        """A missing manifest file should result in an error."""
+        reader = self.reader("test-manifest-missing-manifest")
+
+        with six.assertRaisesRegex(self, BuildReaderError, "Missing files"):
+            self.read_topsrcdir(reader)
+
+    def test_empty_test_manifest_rejected(self):
+        """A test manifest without any entries is rejected."""
+        reader = self.reader("test-manifest-empty")
+
+        with six.assertRaisesRegex(self, SandboxValidationError, "Empty test manifest"):
+            self.read_topsrcdir(reader)
+
+    def test_test_manifest_just_support_files(self):
+        """A test manifest with no tests but support-files is not supported."""
+        reader = self.reader("test-manifest-just-support")
+
+        with six.assertRaisesRegex(self, SandboxValidationError, "Empty test manifest"):
+            self.read_topsrcdir(reader)
+
+    def test_test_manifest_dupe_support_files(self):
+        """A test manifest with dupe support-files in a single test is not
+        supported.
+        """
+        reader = self.reader("test-manifest-dupes")
+
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "bar.js appears multiple times "
+            "in a test manifest under a support-files field, please omit the duplicate entry.",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_test_manifest_absolute_support_files(self):
+        """Support files starting with '/' are placed relative to the install root"""
+        reader = self.reader("test-manifest-absolute-support")
+
+        objs = self.read_topsrcdir(reader)
+        self.assertEqual(len(objs), 1)
+        o = objs[0]
+        self.assertEqual(len(o.installs), 3)
+        expected = [
+            mozpath.normpath(mozpath.join(o.install_prefix, "../.well-known/foo.txt")),
+            mozpath.join(o.install_prefix, "absolute-support.ini"),
+            mozpath.join(o.install_prefix, "test_file.js"),
+        ]
+        paths = sorted([v[0] for v in o.installs.values()])
+        self.assertEqual(paths, expected)
+
+    @unittest.skip("Bug 1304316 - Items in the second set but not the first")
+    def test_test_manifest_shared_support_files(self):
+        """Support files starting with '!' are given separate treatment, so their
+        installation can be resolved when running tests.
+        """
+        reader = self.reader("test-manifest-shared-support")
+        supported, child = self.read_topsrcdir(reader)
+
+        expected_deferred_installs = {
+            "!/child/test_sub.js",
+            "!/child/another-file.sjs",
+            "!/child/data/**",
+        }
+
+        self.assertEqual(len(supported.installs), 3)
+        self.assertEqual(set(supported.deferred_installs), expected_deferred_installs)
+        self.assertEqual(len(child.installs), 3)
+        self.assertEqual(len(child.pattern_installs), 1)
+
+    def test_test_manifest_deffered_install_missing(self):
+        """A non-existent shared support file reference produces an error."""
+        reader = self.reader("test-manifest-shared-missing")
+
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "entry in support-files not present in the srcdir",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_test_manifest_install_includes(self):
+        """Ensure that any [include:foo.ini] are copied to the objdir."""
+        reader = self.reader("test-manifest-install-includes")
+
+        objs = self.read_topsrcdir(reader)
+        self.assertEqual(len(objs), 1)
+        o = objs[0]
+        self.assertEqual(len(o.installs), 3)
+        self.assertEqual(o.manifest_relpath, "mochitest.ini")
+        self.assertEqual(o.manifest_obj_relpath, "mochitest.ini")
+        expected = [
+            mozpath.normpath(mozpath.join(o.install_prefix, "common.ini")),
+            mozpath.normpath(mozpath.join(o.install_prefix, "mochitest.ini")),
+            mozpath.normpath(mozpath.join(o.install_prefix, "test_foo.html")),
+        ]
+        paths = sorted([v[0] for v in o.installs.values()])
+        self.assertEqual(paths, expected)
+
+    def test_test_manifest_includes(self):
+        """Ensure that manifest objects from the emitter list a correct manifest."""
+        reader = self.reader("test-manifest-emitted-includes")
+        [obj] = self.read_topsrcdir(reader)
+
+        # Expected manifest leafs for our tests.
+        expected_manifests = {
+            "reftest1.html": "reftest.list",
+            "reftest1-ref.html": "reftest.list",
+            "reftest2.html": "included-reftest.list",
+            "reftest2-ref.html": "included-reftest.list",
+        }
+
+        for t in obj.tests:
+            self.assertTrue(t["manifest"].endswith(expected_manifests[t["name"]]))
+
+    def test_test_manifest_keys_extracted(self):
+        """Ensure all metadata from test manifests is extracted."""
+        reader = self.reader("test-manifest-keys-extracted")
+
+        objs = [o for o in self.read_topsrcdir(reader) if isinstance(o, TestManifest)]
+
+        self.assertEqual(len(objs), 8)
+
+        metadata = {
+            "a11y.ini": {
+                "flavor": "a11y",
+                "installs": {"a11y.ini": False, "test_a11y.js": True},
+                "pattern-installs": 1,
+            },
+            "browser.ini": {
+                "flavor": "browser-chrome",
+                "installs": {
+                    "browser.ini": False,
+                    "test_browser.js": True,
+                    "support1": False,
+                    "support2": False,
+                },
+            },
+            "mochitest.ini": {
+                "flavor": "mochitest",
+                "installs": {"mochitest.ini": False, "test_mochitest.js": True},
+                "external": {"external1", "external2"},
+            },
+            "chrome.ini": {
+                "flavor": "chrome",
+                "installs": {"chrome.ini": False, "test_chrome.js": True},
+            },
+            "xpcshell.ini": {
+                "flavor": "xpcshell",
+                "dupe": True,
+                "installs": {
+                    "xpcshell.ini": False,
+                    "test_xpcshell.js": True,
+                    "head1": False,
+                    "head2": False,
+                },
+            },
+            "reftest.list": {"flavor": "reftest", "installs": {}},
+            "crashtest.list": {"flavor": "crashtest", "installs": {}},
+            "python.ini": {"flavor": "python", "installs": {"python.ini": False}},
+        }
+
+        for o in objs:
+            m = metadata[mozpath.basename(o.manifest_relpath)]
+
+            self.assertTrue(o.path.startswith(o.directory))
+            self.assertEqual(o.flavor, m["flavor"])
+            self.assertEqual(o.dupe_manifest, m.get("dupe", False))
+
+            external_normalized = set(mozpath.basename(p) for p in o.external_installs)
+            self.assertEqual(external_normalized, m.get("external", set()))
+
+            self.assertEqual(len(o.installs), len(m["installs"]))
+            for path in o.installs.keys():
+                self.assertTrue(path.startswith(o.directory))
+                relpath = path[len(o.directory) + 1 :]
+
+                self.assertIn(relpath, m["installs"])
+                self.assertEqual(o.installs[path][1], m["installs"][relpath])
+
+            if "pattern-installs" in m:
+                self.assertEqual(len(o.pattern_installs), m["pattern-installs"])
+
+    def test_test_manifest_unmatched_generated(self):
+        reader = self.reader("test-manifest-unmatched-generated")
+
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "entry in generated-files not present elsewhere",
+        ):
+            self.read_topsrcdir(reader),
+
+    def test_test_manifest_parent_support_files_dir(self):
+        """support-files referencing a file in a parent directory works."""
+        reader = self.reader("test-manifest-parent-support-files-dir")
+
+        objs = [o for o in self.read_topsrcdir(reader) if isinstance(o, TestManifest)]
+
+        self.assertEqual(len(objs), 1)
+
+        o = objs[0]
+
+        expected = mozpath.join(o.srcdir, "support-file.txt")
+        self.assertIn(expected, o.installs)
+        self.assertEqual(
+            o.installs[expected],
+            ("testing/mochitest/tests/child/support-file.txt", False),
+        )
+
+    def test_test_manifest_missing_test_error(self):
+        """Missing test files should result in error."""
+        reader = self.reader("test-manifest-missing-test-file")
+
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "lists test that does not exist: test_missing.html",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_test_manifest_missing_test_error_unfiltered(self):
+        """Missing test files should result in error, even when the test list is not filtered."""
+        reader = self.reader("test-manifest-missing-test-file-unfiltered")
+
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "lists test that does not exist: missing.js"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_ipdl_sources(self):
+        reader = self.reader(
+            "ipdl_sources",
+            extra_substs={"IPDL_ROOT": mozpath.abspath("/path/to/topobjdir")},
+        )
+        objs = self.read_topsrcdir(reader)
+        ipdl_collection = objs[0]
+        self.assertIsInstance(ipdl_collection, IPDLCollection)
+
+        ipdls = set(
+            mozpath.relpath(p, ipdl_collection.topsrcdir)
+            for p in ipdl_collection.all_regular_sources()
+        )
+        expected = set(
+            ["bar/bar.ipdl", "bar/bar2.ipdlh", "foo/foo.ipdl", "foo/foo2.ipdlh"]
+        )
+
+        self.assertEqual(ipdls, expected)
+
+        pp_ipdls = set(
+            mozpath.relpath(p, ipdl_collection.topsrcdir)
+            for p in ipdl_collection.all_preprocessed_sources()
+        )
+        expected = set(["bar/bar1.ipdl", "foo/foo1.ipdl"])
+        self.assertEqual(pp_ipdls, expected)
+
+    def test_local_includes(self):
+        """Test that LOCAL_INCLUDES is emitted correctly."""
+        reader = self.reader("local_includes")
+        objs = self.read_topsrcdir(reader)
+
+        local_includes = [o.path for o in objs if isinstance(o, LocalInclude)]
+        expected = ["/bar/baz", "foo"]
+
+        self.assertEqual(local_includes, expected)
+
+        local_includes = [o.path.full_path for o in objs if isinstance(o, LocalInclude)]
+        expected = [
+            mozpath.join(reader.config.topsrcdir, "bar/baz"),
+            mozpath.join(reader.config.topsrcdir, "foo"),
+        ]
+
+        self.assertEqual(local_includes, expected)
+
+    def test_local_includes_file(self):
+        """Test that a filename can't be used in LOCAL_INCLUDES."""
+        reader = self.reader("local_includes-filename")
+
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Path specified in LOCAL_INCLUDES is a filename",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_generated_includes(self):
+        """Test that GENERATED_INCLUDES is emitted correctly."""
+        reader = self.reader("generated_includes")
+        objs = self.read_topsrcdir(reader)
+
+        generated_includes = [o.path for o in objs if isinstance(o, LocalInclude)]
+        expected = ["!/bar/baz", "!foo"]
+
+        self.assertEqual(generated_includes, expected)
+
+        generated_includes = [
+            o.path.full_path for o in objs if isinstance(o, LocalInclude)
+        ]
+        expected = [
+            mozpath.join(reader.config.topobjdir, "bar/baz"),
+            mozpath.join(reader.config.topobjdir, "foo"),
+        ]
+
+        self.assertEqual(generated_includes, expected)
+
+    def test_defines(self):
+        reader = self.reader("defines")
+        objs = self.read_topsrcdir(reader)
+
+        defines = {}
+        for o in objs:
+            if isinstance(o, Defines):
+                defines = o.defines
+
+        expected = {
+            "BAR": 7,
+            "BAZ": '"abcd"',
+            "FOO": True,
+            "VALUE": "xyz",
+            "QUX": False,
+        }
+
+        self.assertEqual(defines, expected)
+
+    def test_jar_manifests(self):
+        reader = self.reader("jar-manifests")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        for obj in objs:
+            self.assertIsInstance(obj, JARManifest)
+            self.assertIsInstance(obj.path, Path)
+
+    def test_jar_manifests_multiple_files(self):
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "limited to one value"
+        ):
+            reader = self.reader("jar-manifests-multiple-files")
+            self.read_topsrcdir(reader)
+
+    def test_xpidl_module_no_sources(self):
+        """XPIDL_MODULE without XPIDL_SOURCES should be rejected."""
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "XPIDL_MODULE " "cannot be defined"
+        ):
+            reader = self.reader("xpidl-module-no-sources")
+            self.read_topsrcdir(reader)
+
+    def test_xpidl_module_missing_sources(self):
+        """Missing XPIDL_SOURCES should be rejected."""
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "File .* " "from XPIDL_SOURCES does not exist"
+        ):
+            reader = self.reader("missing-xpidl")
+            self.read_topsrcdir(reader)
+
+    def test_missing_local_includes(self):
+        """LOCAL_INCLUDES containing non-existent directories should be rejected."""
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Path specified in " "LOCAL_INCLUDES does not exist",
+        ):
+            reader = self.reader("missing-local-includes")
+            self.read_topsrcdir(reader)
+
+    def test_library_defines(self):
+        """Test that LIBRARY_DEFINES is propagated properly."""
+        reader = self.reader("library-defines")
+        objs = self.read_topsrcdir(reader)
+
+        libraries = [o for o in objs if isinstance(o, StaticLibrary)]
+        library_flags = [
+            o
+            for o in objs
+            if isinstance(o, ComputedFlags) and "LIBRARY_DEFINES" in o.flags
+        ]
+        expected = {
+            "liba": "-DIN_LIBA",
+            "libb": "-DIN_LIBB -DIN_LIBA",
+            "libc": "-DIN_LIBA -DIN_LIBB",
+            "libd": "",
+        }
+        defines = {}
+        for lib in libraries:
+            defines[lib.basename] = " ".join(lib.lib_defines.get_defines())
+        self.assertEqual(expected, defines)
+        defines_in_flags = {}
+        for flags in library_flags:
+            defines_in_flags[flags.relobjdir] = " ".join(
+                flags.flags["LIBRARY_DEFINES"] or []
+            )
+        self.assertEqual(expected, defines_in_flags)
+
+    def test_sources(self):
+        """Test that SOURCES works properly."""
+        reader = self.reader("sources")
+        objs = self.read_topsrcdir(reader)
+
+        as_flags = objs.pop()
+        self.assertIsInstance(as_flags, ComputedFlags)
+        computed_flags = objs.pop()
+        self.assertIsInstance(computed_flags, ComputedFlags)
+        # The third to last object is a Linkable.
+        linkable = objs.pop()
+        self.assertTrue(linkable.cxx_link)
+        ld_flags = objs.pop()
+        self.assertIsInstance(ld_flags, ComputedFlags)
+        self.assertEqual(len(objs), 6)
+        for o in objs:
+            self.assertIsInstance(o, Sources)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in objs}
+        self.assertEqual(len(suffix_map), 6)
+
+        expected = {
+            ".cpp": ["a.cpp", "b.cc", "c.cxx"],
+            ".c": ["d.c"],
+            ".m": ["e.m"],
+            ".mm": ["f.mm"],
+            ".S": ["g.S"],
+            ".s": ["h.s", "i.asm"],
+        }
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.files, [mozpath.join(reader.config.topsrcdir, f) for f in files]
+            )
+
+            for f in files:
+                self.assertIn(
+                    mozpath.join(
+                        reader.config.topobjdir,
+                        "%s.%s"
+                        % (mozpath.splitext(f)[0], reader.config.substs["OBJ_SUFFIX"]),
+                    ),
+                    linkable.objs,
+                )
+
+    def test_sources_just_c(self):
+        """Test that a linkable with no C++ sources doesn't have cxx_link set."""
+        reader = self.reader("sources-just-c")
+        objs = self.read_topsrcdir(reader)
+
+        as_flags = objs.pop()
+        self.assertIsInstance(as_flags, ComputedFlags)
+        flags = objs.pop()
+        self.assertIsInstance(flags, ComputedFlags)
+        # The third to last object is a Linkable.
+        linkable = objs.pop()
+        self.assertFalse(linkable.cxx_link)
+
+    def test_linkables_cxx_link(self):
+        """Test that linkables transitively set cxx_link properly."""
+        reader = self.reader("test-linkables-cxx-link")
+        got_results = 0
+        for obj in self.read_topsrcdir(reader):
+            if isinstance(obj, SharedLibrary):
+                if obj.basename == "cxx_shared":
+                    self.assertEqual(
+                        obj.name,
+                        "%scxx_shared%s"
+                        % (reader.config.dll_prefix, reader.config.dll_suffix),
+                    )
+                    self.assertTrue(obj.cxx_link)
+                    got_results += 1
+                elif obj.basename == "just_c_shared":
+                    self.assertEqual(
+                        obj.name,
+                        "%sjust_c_shared%s"
+                        % (reader.config.dll_prefix, reader.config.dll_suffix),
+                    )
+                    self.assertFalse(obj.cxx_link)
+                    got_results += 1
+        self.assertEqual(got_results, 2)
+
+    def test_generated_sources(self):
+        """Test that GENERATED_SOURCES works properly."""
+        reader = self.reader("generated-sources")
+        objs = self.read_topsrcdir(reader)
+
+        as_flags = objs.pop()
+        self.assertIsInstance(as_flags, ComputedFlags)
+        flags = objs.pop()
+        self.assertIsInstance(flags, ComputedFlags)
+        # The third to last object is a Linkable.
+        linkable = objs.pop()
+        self.assertTrue(linkable.cxx_link)
+        flags = objs.pop()
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(len(objs), 6)
+
+        generated_sources = [
+            o for o in objs if isinstance(o, Sources) and o.generated_files
+        ]
+        self.assertEqual(len(generated_sources), 6)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in generated_sources}
+        self.assertEqual(len(suffix_map), 6)
+
+        expected = {
+            ".cpp": ["a.cpp", "b.cc", "c.cxx"],
+            ".c": ["d.c"],
+            ".m": ["e.m"],
+            ".mm": ["f.mm"],
+            ".S": ["g.S"],
+            ".s": ["h.s", "i.asm"],
+        }
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.generated_files,
+                [mozpath.join(reader.config.topobjdir, f) for f in files],
+            )
+
+            for f in files:
+                self.assertIn(
+                    mozpath.join(
+                        reader.config.topobjdir,
+                        "%s.%s"
+                        % (mozpath.splitext(f)[0], reader.config.substs["OBJ_SUFFIX"]),
+                    ),
+                    linkable.objs,
+                )
+
+    def test_host_sources(self):
+        """Test that HOST_SOURCES works properly."""
+        reader = self.reader("host-sources")
+        objs = self.read_topsrcdir(reader)
+
+        # This objdir will generate target flags.
+        flags = objs.pop()
+        self.assertIsInstance(flags, ComputedFlags)
+        # The second to last object is a Linkable
+        linkable = objs.pop()
+        self.assertTrue(linkable.cxx_link)
+        # This objdir will also generate host flags.
+        host_flags = objs.pop()
+        self.assertIsInstance(host_flags, ComputedFlags)
+        # ...and ldflags.
+        ldflags = objs.pop()
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertEqual(len(objs), 3)
+        for o in objs:
+            self.assertIsInstance(o, HostSources)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in objs}
+        self.assertEqual(len(suffix_map), 3)
+
+        expected = {
+            ".cpp": ["a.cpp", "b.cc", "c.cxx"],
+            ".c": ["d.c"],
+            ".mm": ["e.mm", "f.mm"],
+        }
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.files, [mozpath.join(reader.config.topsrcdir, f) for f in files]
+            )
+
+            for f in files:
+                self.assertIn(
+                    mozpath.join(
+                        reader.config.topobjdir,
+                        "host_%s.%s"
+                        % (mozpath.splitext(f)[0], reader.config.substs["OBJ_SUFFIX"]),
+                    ),
+                    linkable.objs,
+                )
+
+    def test_wasm_sources(self):
+        """Test that WASM_SOURCES works properly."""
+        reader = self.reader(
+            "wasm-sources", extra_substs={"WASM_CC": "clang", "WASM_CXX": "clang++"}
+        )
+        objs = list(self.read_topsrcdir(reader))
+
+        # The second to last object is a linkable.
+        linkable = objs[-2]
+        # Other than that, we only care about the WasmSources objects.
+        objs = objs[:2]
+        for o in objs:
+            self.assertIsInstance(o, WasmSources)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in objs}
+        self.assertEqual(len(suffix_map), 2)
+
+        expected = {".cpp": ["a.cpp", "b.cc", "c.cxx"], ".c": ["d.c"]}
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.files, [mozpath.join(reader.config.topsrcdir, f) for f in files]
+            )
+            for f in files:
+                self.assertIn(
+                    mozpath.join(
+                        reader.config.topobjdir,
+                        "%s.%s"
+                        % (
+                            mozpath.splitext(f)[0],
+                            reader.config.substs["WASM_OBJ_SUFFIX"],
+                        ),
+                    ),
+                    linkable.objs,
+                )
+
+    def test_unified_sources(self):
+        """Test that UNIFIED_SOURCES works properly."""
+        reader = self.reader("unified-sources")
+        objs = self.read_topsrcdir(reader)
+
+        # The last object is a ComputedFlags, the second to last a Linkable,
+        # followed by ldflags, ignore them.
+        linkable = objs[-2]
+        objs = objs[:-3]
+        self.assertEqual(len(objs), 3)
+        for o in objs:
+            self.assertIsInstance(o, UnifiedSources)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in objs}
+        self.assertEqual(len(suffix_map), 3)
+
+        expected = {
+            ".cpp": ["bar.cxx", "foo.cpp", "quux.cc"],
+            ".mm": ["objc1.mm", "objc2.mm"],
+            ".c": ["c1.c", "c2.c"],
+        }
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.files, [mozpath.join(reader.config.topsrcdir, f) for f in files]
+            )
+            self.assertTrue(sources.have_unified_mapping)
+
+            for f in dict(sources.unified_source_mapping).keys():
+                self.assertIn(
+                    mozpath.join(
+                        reader.config.topobjdir,
+                        "%s.%s"
+                        % (mozpath.splitext(f)[0], reader.config.substs["OBJ_SUFFIX"]),
+                    ),
+                    linkable.objs,
+                )
+
+    def test_unified_sources_non_unified(self):
+        """Test that UNIFIED_SOURCES with FILES_PER_UNIFIED_FILE=1 works properly."""
+        reader = self.reader("unified-sources-non-unified")
+        objs = self.read_topsrcdir(reader)
+
+        # The last object is a Linkable, the second to last ComputedFlags,
+        # followed by ldflags, ignore them.
+        objs = objs[:-3]
+        self.assertEqual(len(objs), 3)
+        for o in objs:
+            self.assertIsInstance(o, UnifiedSources)
+
+        suffix_map = {obj.canonical_suffix: obj for obj in objs}
+        self.assertEqual(len(suffix_map), 3)
+
+        expected = {
+            ".cpp": ["bar.cxx", "foo.cpp", "quux.cc"],
+            ".mm": ["objc1.mm", "objc2.mm"],
+            ".c": ["c1.c", "c2.c"],
+        }
+        for suffix, files in expected.items():
+            sources = suffix_map[suffix]
+            self.assertEqual(
+                sources.files, [mozpath.join(reader.config.topsrcdir, f) for f in files]
+            )
+            self.assertFalse(sources.have_unified_mapping)
+
+    def test_object_conflicts(self):
+        """Test that object name conflicts are detected."""
+        reader = self.reader("object-conflicts/1")
+        with self.assertRaisesRegex(
+            SandboxValidationError,
+            "Test.cpp from SOURCES would have the same object name as"
+            " Test.c from SOURCES\.",
+        ):
+            self.read_topsrcdir(reader)
+
+        reader = self.reader("object-conflicts/2")
+        with self.assertRaisesRegex(
+            SandboxValidationError,
+            "Test.cpp from SOURCES would have the same object name as"
+            " subdir/Test.cpp from SOURCES\.",
+        ):
+            self.read_topsrcdir(reader)
+
+        reader = self.reader("object-conflicts/3")
+        with self.assertRaisesRegex(
+            SandboxValidationError,
+            "Test.cpp from UNIFIED_SOURCES would have the same object name as"
+            " Test.c from SOURCES in non-unified builds\.",
+        ):
+            self.read_topsrcdir(reader)
+
+        reader = self.reader("object-conflicts/4")
+        with self.assertRaisesRegex(
+            SandboxValidationError,
+            "Test.cpp from UNIFIED_SOURCES would have the same object name as"
+            " Test.c from UNIFIED_SOURCES in non-unified builds\.",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_final_target_pp_files(self):
+        """Test that FINAL_TARGET_PP_FILES works properly."""
+        reader = self.reader("dist-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], FinalTargetPreprocessedFiles)
+
+        # Ideally we'd test hierarchies, but that would just be testing
+        # the HierarchicalStringList class, which we test separately.
+        for path, files in objs[0].files.walk():
+            self.assertEqual(path, "")
+            self.assertEqual(len(files), 2)
+
+            expected = {"install.rdf", "main.js"}
+            for f in files:
+                self.assertTrue(six.text_type(f) in expected)
+
+    def test_missing_final_target_pp_files(self):
+        """Test that FINAL_TARGET_PP_FILES with missing files throws errors."""
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "File listed in " "FINAL_TARGET_PP_FILES does not exist",
+        ):
+            reader = self.reader("dist-files-missing")
+            self.read_topsrcdir(reader)
+
+    def test_final_target_pp_files_non_srcdir(self):
+        """Test that non-srcdir paths in FINAL_TARGET_PP_FILES throws errors."""
+        reader = self.reader("final-target-pp-files-non-srcdir")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Only source directory paths allowed in FINAL_TARGET_PP_FILES:",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_localized_files(self):
+        """Test that LOCALIZED_FILES works properly."""
+        reader = self.reader("localized-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], LocalizedFiles)
+
+        for path, files in objs[0].files.walk():
+            self.assertEqual(path, "foo")
+            self.assertEqual(len(files), 3)
+
+            expected = {"en-US/bar.ini", "en-US/code/*.js", "en-US/foo.js"}
+            for f in files:
+                self.assertTrue(six.text_type(f) in expected)
+
+    def test_localized_files_no_en_us(self):
+        """Test that LOCALIZED_FILES errors if a path does not start with
+        `en-US/` or contain `locales/en-US/`."""
+        reader = self.reader("localized-files-no-en-us")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "LOCALIZED_FILES paths must start with `en-US/` or contain `locales/en-US/`: "
+            "foo.js",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_localized_pp_files(self):
+        """Test that LOCALIZED_PP_FILES works properly."""
+        reader = self.reader("localized-pp-files")
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 1)
+        self.assertIsInstance(objs[0], LocalizedPreprocessedFiles)
+
+        for path, files in objs[0].files.walk():
+            self.assertEqual(path, "foo")
+            self.assertEqual(len(files), 2)
+
+            expected = {"en-US/bar.ini", "en-US/foo.js"}
+            for f in files:
+                self.assertTrue(six.text_type(f) in expected)
+
+    def test_rust_library_no_cargo_toml(self):
+        """Test that defining a RustLibrary without a Cargo.toml fails."""
+        reader = self.reader("rust-library-no-cargo-toml")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "No Cargo.toml file found"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_library_name_mismatch(self):
+        """Test that defining a RustLibrary that doesn't match Cargo.toml fails."""
+        reader = self.reader("rust-library-name-mismatch")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "library.*does not match Cargo.toml-defined package",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_library_no_lib_section(self):
+        """Test that a RustLibrary Cargo.toml with no [lib] section fails."""
+        reader = self.reader("rust-library-no-lib-section")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Cargo.toml for.* has no \\[lib\\] section"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_library_invalid_crate_type(self):
+        """Test that a RustLibrary Cargo.toml has a permitted crate-type."""
+        reader = self.reader("rust-library-invalid-crate-type")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "crate-type.* is not permitted"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_library_dash_folding(self):
+        """Test that on-disk names of RustLibrary objects convert dashes to underscores."""
+        reader = self.reader(
+            "rust-library-dash-folding",
+            extra_substs=dict(RUST_TARGET="i686-pc-windows-msvc"),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        ldflags, lib, cflags = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(lib, RustLibrary)
+        self.assertRegex(lib.lib_name, "random_crate")
+        self.assertRegex(lib.import_name, "random_crate")
+        self.assertRegex(lib.basename, "random-crate")
+
+    def test_multiple_rust_libraries(self):
+        """Test that linking multiple Rust libraries throws an error"""
+        reader = self.reader(
+            "multiple-rust-libraries",
+            extra_substs=dict(RUST_TARGET="i686-pc-windows-msvc"),
+        )
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Cannot link the following Rust libraries"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_library_features(self):
+        """Test that RustLibrary features are correctly emitted."""
+        reader = self.reader(
+            "rust-library-features",
+            extra_substs=dict(RUST_TARGET="i686-pc-windows-msvc"),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        ldflags, lib, cflags = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(lib, RustLibrary)
+        self.assertEqual(lib.features, ["musthave", "cantlivewithout"])
+
+    def test_rust_library_duplicate_features(self):
+        """Test that duplicate RustLibrary features are rejected."""
+        reader = self.reader("rust-library-duplicate-features")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "features for .* should not contain duplicates",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_program_no_cargo_toml(self):
+        """Test that specifying RUST_PROGRAMS without a Cargo.toml fails."""
+        reader = self.reader("rust-program-no-cargo-toml")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "No Cargo.toml file found"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_host_rust_program_no_cargo_toml(self):
+        """Test that specifying HOST_RUST_PROGRAMS without a Cargo.toml fails."""
+        reader = self.reader("host-rust-program-no-cargo-toml")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "No Cargo.toml file found"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_program_nonexistent_name(self):
+        """Test that specifying RUST_PROGRAMS that don't exist in Cargo.toml
+        correctly throws an error."""
+        reader = self.reader("rust-program-nonexistent-name")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Cannot find Cargo.toml definition for"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_host_rust_program_nonexistent_name(self):
+        """Test that specifying HOST_RUST_PROGRAMS that don't exist in
+        Cargo.toml correctly throws an error."""
+        reader = self.reader("host-rust-program-nonexistent-name")
+        with six.assertRaisesRegex(
+            self, SandboxValidationError, "Cannot find Cargo.toml definition for"
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_rust_programs(self):
+        """Test RUST_PROGRAMS emission."""
+        reader = self.reader(
+            "rust-programs",
+            extra_substs=dict(RUST_TARGET="i686-pc-windows-msvc", BIN_SUFFIX=".exe"),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        ldflags, cflags, prog = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(prog, RustProgram)
+        self.assertEqual(prog.name, "some")
+
+    def test_host_rust_programs(self):
+        """Test HOST_RUST_PROGRAMS emission."""
+        reader = self.reader(
+            "host-rust-programs",
+            extra_substs=dict(
+                RUST_HOST_TARGET="i686-pc-windows-msvc", HOST_BIN_SUFFIX=".exe"
+            ),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 4)
+        print(objs)
+        ldflags, cflags, hostflags, prog = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(hostflags, ComputedFlags)
+        self.assertIsInstance(prog, HostRustProgram)
+        self.assertEqual(prog.name, "some")
+
+    def test_host_rust_libraries(self):
+        """Test HOST_RUST_LIBRARIES emission."""
+        reader = self.reader(
+            "host-rust-libraries",
+            extra_substs=dict(
+                RUST_HOST_TARGET="i686-pc-windows-msvc", HOST_BIN_SUFFIX=".exe"
+            ),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        ldflags, lib, cflags = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(lib, HostRustLibrary)
+        self.assertRegex(lib.lib_name, "host_lib")
+        self.assertRegex(lib.import_name, "host_lib")
+
+    def test_crate_dependency_path_resolution(self):
+        """Test recursive dependencies resolve with the correct paths."""
+        reader = self.reader(
+            "crate-dependency-path-resolution",
+            extra_substs=dict(RUST_TARGET="i686-pc-windows-msvc"),
+        )
+        objs = self.read_topsrcdir(reader)
+
+        self.assertEqual(len(objs), 3)
+        ldflags, lib, cflags = objs
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(cflags, ComputedFlags)
+        self.assertIsInstance(lib, RustLibrary)
+
+    def test_install_shared_lib(self):
+        """Test that we can install a shared library with TEST_HARNESS_FILES"""
+        reader = self.reader("test-install-shared-lib")
+        objs = self.read_topsrcdir(reader)
+        self.assertIsInstance(objs[0], TestHarnessFiles)
+        self.assertIsInstance(objs[1], VariablePassthru)
+        self.assertIsInstance(objs[2], ComputedFlags)
+        self.assertIsInstance(objs[3], SharedLibrary)
+        self.assertIsInstance(objs[4], ComputedFlags)
+        for path, files in objs[0].files.walk():
+            for f in files:
+                self.assertEqual(str(f), "!libfoo.so")
+                self.assertEqual(path, "foo/bar")
+
+    def test_symbols_file(self):
+        """Test that SYMBOLS_FILE works"""
+        reader = self.reader("test-symbols-file")
+        genfile, ldflags, shlib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(genfile, GeneratedFile)
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(shlib, SharedLibrary)
+        # This looks weird but MockConfig sets DLL_{PREFIX,SUFFIX} and
+        # the reader method in this class sets OS_TARGET=WINNT.
+        self.assertEqual(shlib.symbols_file, "libfoo.so.def")
+
+    def test_symbols_file_objdir(self):
+        """Test that a SYMBOLS_FILE in the objdir works"""
+        reader = self.reader("test-symbols-file-objdir")
+        genfile, ldflags, shlib, flags = self.read_topsrcdir(reader)
+        self.assertIsInstance(genfile, GeneratedFile)
+        self.assertEqual(
+            genfile.script, mozpath.join(reader.config.topsrcdir, "foo.py")
+        )
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertIsInstance(ldflags, ComputedFlags)
+        self.assertIsInstance(shlib, SharedLibrary)
+        self.assertEqual(shlib.symbols_file, "foo.symbols")
+
+    def test_symbols_file_objdir_missing_generated(self):
+        """Test that a SYMBOLS_FILE in the objdir that's missing
+        from GENERATED_FILES is an error.
+        """
+        reader = self.reader("test-symbols-file-objdir-missing-generated")
+        with six.assertRaisesRegex(
+            self,
+            SandboxValidationError,
+            "Objdir file specified in SYMBOLS_FILE not in GENERATED_FILES:",
+        ):
+            self.read_topsrcdir(reader)
+
+    def test_wasm_compile_flags(self):
+        reader = self.reader(
+            "wasm-compile-flags",
+            extra_substs={"WASM_CC": "clang", "WASM_CXX": "clang++"},
+        )
+        flags = list(self.read_topsrcdir(reader))[2]
+        self.assertIsInstance(flags, ComputedFlags)
+        self.assertEqual(
+            flags.flags["WASM_CFLAGS"], reader.config.substs["WASM_CFLAGS"]
+        )
+        self.assertEqual(
+            flags.flags["MOZBUILD_WASM_CFLAGS"], ["-funroll-loops", "-wasm-arg"]
+        )
+        self.assertEqual(
+            set(flags.flags["WASM_DEFINES"]),
+            set(["-DFOO", '-DBAZ="abcd"', "-UQUX", "-DBAR=7", "-DVALUE=xyz"]),
+        )
+
+
+if __name__ == "__main__":
+    main()
Index: mozjs/create-102.15.0-icu-sources-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-icu-sources-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-icu-sources-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-icu-sources.patch
+
+mv firefox-$VERSION-icu-sources.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-icu-sources-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-icu-sources-patch/file.list
===================================================================
--- mozjs/create-102.15.0-icu-sources-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-icu-sources-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/intl/icu_sources_data.py
Index: mozjs/create-102.15.0-icu-sources-patch/firefox-102.15.0-new/intl/icu_sources_data.py
===================================================================
--- mozjs/create-102.15.0-icu-sources-patch/firefox-102.15.0-new/intl/icu_sources_data.py	(nonexistent)
+++ mozjs/create-102.15.0-icu-sources-patch/firefox-102.15.0-new/intl/icu_sources_data.py	(revision 385)
@@ -0,0 +1,293 @@
+#!/usr/bin/env python
+#
+# Any copyright is dedicated to the Public Domain.
+# http://creativecommons.org/publicdomain/zero/1.0/
+#
+# Generate SOURCES in sources.mozbuild files from ICU's Makefile.in
+# files, and also build a standalone copy of ICU using its build
+# system to generate a new copy of the in-tree ICU data file.
+#
+# This script expects to be run from `update-icu.sh` after the in-tree
+# copy of ICU has been updated.
+
+from __future__ import absolute_import
+from __future__ import print_function
+
+import glob
+import multiprocessing
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+
+# Close enough
+import os.path as mozpath
+mozpath.normsep = lambda p: p
+
+# The following files have been determined to be dead/unused by a
+# semi-automated analysis. You can just remove any of the files below
+# if you need them. However, files marked with a "Cluster" comment
+# can only be removed together, as they have (directional) dependencies.
+# If you want to rerun this analysis, contact :decoder.
+UNUSED_SOURCES = set(
+    [
+        "intl/icu/source/common/bytestrieiterator.cpp",
+        "intl/icu/source/common/cstr.cpp",
+        "intl/icu/source/common/cwchar.cpp",
+        "intl/icu/source/common/icudataver.cpp",
+        "intl/icu/source/common/icuplug.cpp",
+        "intl/icu/source/common/pluralmap.cpp",
+        "intl/icu/source/common/ucat.cpp",
+        "intl/icu/source/common/ucnv2022.cpp",
+        "intl/icu/source/common/ucnv_ct.cpp",
+        "intl/icu/source/common/ucnvdisp.cpp",
+        "intl/icu/source/common/ucnv_ext.cpp",
+        "intl/icu/source/common/ucnvhz.cpp",
+        "intl/icu/source/common/ucnvisci.cpp",
+        "intl/icu/source/common/ucnv_lmb.cpp",
+        "intl/icu/source/common/ucnvmbcs.cpp",
+        "intl/icu/source/common/uidna.cpp",
+        "intl/icu/source/common/unorm.cpp",
+        "intl/icu/source/common/usc_impl.cpp",
+        "intl/icu/source/common/ustr_wcs.cpp",
+        "intl/icu/source/common/util_props.cpp",
+        "intl/icu/source/i18n/anytrans.cpp",
+        "intl/icu/source/i18n/brktrans.cpp",
+        "intl/icu/source/i18n/casetrn.cpp",
+        "intl/icu/source/i18n/cpdtrans.cpp",
+        "intl/icu/source/i18n/esctrn.cpp",
+        "intl/icu/source/i18n/fmtable_cnv.cpp",
+        "intl/icu/source/i18n/funcrepl.cpp",
+        "intl/icu/source/i18n/gender.cpp",
+        "intl/icu/source/i18n/name2uni.cpp",
+        "intl/icu/source/i18n/nortrans.cpp",
+        "intl/icu/source/i18n/nultrans.cpp",
+        "intl/icu/source/i18n/quant.cpp",
+        "intl/icu/source/i18n/rbt.cpp",
+        "intl/icu/source/i18n/rbt_data.cpp",
+        "intl/icu/source/i18n/rbt_pars.cpp",
+        "intl/icu/source/i18n/rbt_rule.cpp",
+        "intl/icu/source/i18n/rbt_set.cpp",
+        "intl/icu/source/i18n/regexcmp.cpp",
+        "intl/icu/source/i18n/regeximp.cpp",
+        "intl/icu/source/i18n/regexst.cpp",
+        "intl/icu/source/i18n/regextxt.cpp",
+        "intl/icu/source/i18n/rematch.cpp",
+        "intl/icu/source/i18n/remtrans.cpp",
+        "intl/icu/source/i18n/repattrn.cpp",
+        "intl/icu/source/i18n/scientificnumberformatter.cpp",
+        "intl/icu/source/i18n/strmatch.cpp",
+        "intl/icu/source/i18n/strrepl.cpp",
+        "intl/icu/source/i18n/titletrn.cpp",
+        "intl/icu/source/i18n/tolowtrn.cpp",
+        "intl/icu/source/i18n/toupptrn.cpp",
+        "intl/icu/source/i18n/translit.cpp",
+        "intl/icu/source/i18n/transreg.cpp",
+        "intl/icu/source/i18n/tridpars.cpp",
+        "intl/icu/source/i18n/unesctrn.cpp",
+        "intl/icu/source/i18n/uni2name.cpp",
+        "intl/icu/source/i18n/uregexc.cpp",
+        "intl/icu/source/i18n/uregex.cpp",
+        "intl/icu/source/i18n/uregion.cpp",
+        "intl/icu/source/i18n/uspoof_build.cpp",
+        "intl/icu/source/i18n/uspoof_conf.cpp",
+        "intl/icu/source/i18n/utrans.cpp",
+        "intl/icu/source/i18n/vzone.cpp",
+        "intl/icu/source/i18n/zrule.cpp",
+        "intl/icu/source/i18n/ztrans.cpp",
+        # Cluster
+        "intl/icu/source/common/resbund_cnv.cpp",
+        "intl/icu/source/common/ures_cnv.cpp",
+        # Cluster
+        "intl/icu/source/common/propsvec.cpp",
+        "intl/icu/source/common/ucnvsel.cpp",
+        "intl/icu/source/common/ucnv_set.cpp",
+        # Cluster
+        "intl/icu/source/common/ubiditransform.cpp",
+        "intl/icu/source/common/ushape.cpp",
+        # Cluster
+        "intl/icu/source/i18n/csdetect.cpp",
+        "intl/icu/source/i18n/csmatch.cpp",
+        "intl/icu/source/i18n/csr2022.cpp",
+        "intl/icu/source/i18n/csrecog.cpp",
+        "intl/icu/source/i18n/csrmbcs.cpp",
+        "intl/icu/source/i18n/csrsbcs.cpp",
+        "intl/icu/source/i18n/csrucode.cpp",
+        "intl/icu/source/i18n/csrutf8.cpp",
+        "intl/icu/source/i18n/inputext.cpp",
+        "intl/icu/source/i18n/ucsdet.cpp",
+        # Cluster
+        "intl/icu/source/i18n/alphaindex.cpp",
+        "intl/icu/source/i18n/ulocdata.cpp",
+    ]
+)
+
+
+def ensure_source_file_exists(dir, filename):
+    f = mozpath.join(dir, filename)
+    if os.path.isfile(f):
+        return f
+    raise Exception("Couldn't find source file for: %s" % filename)
+
+
+def get_sources(sources_file):
+    srcdir = os.path.dirname(sources_file)
+    with open(sources_file) as f:
+        return sorted(
+            (ensure_source_file_exists(srcdir, name.strip()) for name in f),
+            key=lambda x: x.lower(),
+        )
+
+
+def list_headers(path):
+    result = []
+    for name in os.listdir(path):
+        f = mozpath.join(path, name)
+        if os.path.isfile(f):
+            result.append(f)
+    return sorted(result, key=lambda x: x.lower())
+
+
+def write_sources(mozbuild, sources, headers):
+    with open(mozbuild, "w", newline="\n", encoding="utf-8") as f:
+        f.write(
+            "# THIS FILE IS GENERATED BY /intl/icu_sources_data.py " + "DO NOT EDIT\n"
+        )
+
+        def write_list(name, content):
+            if content:
+                f.write("%s %s [\n" % (name, "=" if name.islower() else "+="))
+                f.write("".join("   '/%s',\n" % s for s in content))
+                f.write("]\n")
+
+        write_list("sources", [s for s in sources if s not in UNUSED_SOURCES])
+        write_list("other_sources", [s for s in sources if s in UNUSED_SOURCES])
+        write_list("EXPORTS.unicode", headers)
+
+
+def update_sources(topsrcdir):
+    print("Updating ICU sources lists...")
+    for d in ["common", "i18n", "tools/toolutil", "tools/icupkg"]:
+        base_path = mozpath.join(topsrcdir, "intl/icu/source/%s" % d)
+        sources_file = mozpath.join(base_path, "sources.txt")
+        mozbuild = mozpath.join(
+            topsrcdir, "config/external/icu/%s/sources.mozbuild" % mozpath.basename(d)
+        )
+        sources = [mozpath.relpath(s, topsrcdir) for s in get_sources(sources_file)]
+        unicode_dir = mozpath.join(base_path, "unicode")
+        if os.path.exists(unicode_dir):
+            headers = [
+                mozpath.normsep(os.path.relpath(s, topsrcdir))
+                for s in list_headers(unicode_dir)
+            ]
+        else:
+            headers = None
+        write_sources(mozbuild, sources, headers)
+
+
+def try_run(name, command, cwd=None, **kwargs):
+    try:
+        subprocess.check_call(
+            command, cwd=cwd, stdout=sys.stderr, stderr=subprocess.STDOUT, **kwargs
+        )
+    except subprocess.CalledProcessError:
+        print('''Error running "{}" in directory {}'''.format(' '.join(command), cwd), file=sys.stderr)
+        return False
+    else:
+        return True
+
+
+def get_data_file(data_dir):
+    files = glob.glob(mozpath.join(data_dir, "icudt*.dat"))
+    return files[0] if files else None
+
+
+def update_data_file(topsrcdir):
+    objdir = tempfile.mkdtemp(prefix="icu-obj-")
+    configure = mozpath.join(topsrcdir, "intl/icu/source/configure")
+    env = dict(os.environ)
+    # bug 1262101 - these should be shared with the moz.build files
+    env.update(
+        {
+            "CPPFLAGS": (
+                "-DU_NO_DEFAULT_INCLUDE_UTF_HEADERS=1 "
+                + "-DU_HIDE_OBSOLETE_UTF_OLD_H=1"
+                + "-DUCONFIG_NO_LEGACY_CONVERSION "
+                + "-DUCONFIG_NO_TRANSLITERATION "
+                + "-DUCONFIG_NO_REGULAR_EXPRESSIONS "
+                + "-DUCONFIG_NO_BREAK_ITERATION "
+                + "-DU_CHARSET_IS_UTF8"
+            )
+        }
+    )
+
+    # Exclude data that we currently don't need.
+    #
+    # The file format for ICU's data build tool is described at
+    # <https://github.com/unicode-org/icu/blob/master/docs/userguide/icu_data/buildtool.md>.
+    env["ICU_DATA_FILTER_FILE"] = mozpath.join(topsrcdir, "intl/icu/data_filter.json")
+
+    print("Running ICU configure...")
+    if not try_run(
+        "icu-configure",
+        [
+            "sh",
+            configure,
+            "--with-data-packaging=archive",
+            "--enable-static",
+            "--disable-shared",
+            "--disable-extras",
+            "--disable-icuio",
+            "--disable-layout",
+            "--disable-layoutex",
+            "--disable-tests",
+            "--disable-samples",
+            "--disable-strict",
+        ],
+        cwd=objdir,
+        env=env,
+    ):
+        return False
+    print("Running ICU make...")
+    if not try_run(
+        "icu-make",
+        ["make", "--jobs=%d" % multiprocessing.cpu_count(), "--output-sync"],
+        cwd=objdir,
+    ):
+        return False
+    print("Copying ICU data file...")
+    tree_data_path = mozpath.join(topsrcdir, "config/external/icu/data/")
+    old_data_file = get_data_file(tree_data_path)
+    if not old_data_file:
+        print("Error: no ICU data file in %s" % tree_data_path, file=sys.stderr)
+        return False
+    new_data_file = get_data_file(mozpath.join(objdir, "data/out"))
+    if not new_data_file:
+        print("Error: no ICU data in ICU objdir", file=sys.stderr)
+        return False
+    if os.path.basename(old_data_file) != os.path.basename(new_data_file):
+        # Data file name has the major version number embedded.
+        os.unlink(old_data_file)
+    shutil.copy(new_data_file, tree_data_path)
+    try:
+        shutil.rmtree(objdir)
+    except Exception:
+        print("Warning: failed to remove %s" % objdir, file=sys.stderr)
+    return True
+
+
+def main():
+    if len(sys.argv) != 2:
+        print("Usage: icu_sources_data.py <mozilla topsrcdir>", file=sys.stderr)
+        sys.exit(1)
+
+    topsrcdir = mozpath.abspath(sys.argv[1])
+    update_sources(topsrcdir)
+    if not update_data_file(topsrcdir):
+        print("Error updating ICU data file", file=sys.stderr)
+        sys.exit(1)
+
+
+if __name__ == "__main__":
+    main()
Index: mozjs/create-102.15.0-init-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-init-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-init-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-init.patch
+
+mv firefox-$VERSION-init.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-init-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-init-patch/file.list
===================================================================
--- mozjs/create-102.15.0-init-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-init-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/python/mozbuild/mozbuild/configure/__init__.py
Index: mozjs/create-102.15.0-init-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/configure/__init__.py
===================================================================
--- mozjs/create-102.15.0-init-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/configure/__init__.py	(nonexistent)
+++ mozjs/create-102.15.0-init-patch/firefox-102.15.0-new/python/mozbuild/mozbuild/configure/__init__.py	(revision 385)
@@ -0,0 +1,1310 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import, print_function, unicode_literals
+
+import codecs
+import inspect
+import logging
+import os
+import re
+import six
+from six.moves import builtins as __builtin__
+import sys
+import types
+from collections import OrderedDict
+from contextlib import contextmanager
+from functools import wraps
+from mozbuild.configure.options import (
+    CommandLineHelper,
+    ConflictingOptionError,
+    HELP_OPTIONS_CATEGORY,
+    InvalidOptionError,
+    Option,
+    OptionValue,
+)
+from mozbuild.configure.help import HelpFormatter
+from mozbuild.configure.util import ConfigureOutputHandler, getpreferredencoding, LineIO
+from mozbuild.util import (
+    exec_,
+    memoize,
+    memoized_property,
+    ReadOnlyDict,
+    ReadOnlyNamespace,
+    system_encoding,
+)
+
+import mozpack.path as mozpath
+
+
+# TRACE logging level, below (thus more verbose than) DEBUG
+TRACE = 5
+
+
+class ConfigureError(Exception):
+    pass
+
+
+class SandboxDependsFunction(object):
+    """Sandbox-visible representation of @depends functions."""
+
+    def __init__(self, unsandboxed):
+        self._or = unsandboxed.__or__
+        self._and = unsandboxed.__and__
+        self._getattr = unsandboxed.__getattr__
+
+    def __call__(self, *arg, **kwargs):
+        raise ConfigureError("The `%s` function may not be called" % self.__name__)
+
+    def __or__(self, other):
+        if not isinstance(other, SandboxDependsFunction):
+            raise ConfigureError(
+                "Can only do binary arithmetic operations "
+                "with another @depends function."
+            )
+        return self._or(other).sandboxed
+
+    def __and__(self, other):
+        if not isinstance(other, SandboxDependsFunction):
+            raise ConfigureError(
+                "Can only do binary arithmetic operations "
+                "with another @depends function."
+            )
+        return self._and(other).sandboxed
+
+    def __cmp__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __eq__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __hash__(self):
+        return object.__hash__(self)
+
+    def __ne__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __lt__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __le__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __gt__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __ge__(self, other):
+        raise ConfigureError("Cannot compare @depends functions.")
+
+    def __getattr__(self, key):
+        return self._getattr(key).sandboxed
+
+    def __nonzero__(self):
+        raise ConfigureError("Cannot do boolean operations on @depends functions.")
+
+
+class DependsFunction(object):
+    __slots__ = (
+        "_func",
+        "_name",
+        "dependencies",
+        "when",
+        "sandboxed",
+        "sandbox",
+        "_result",
+    )
+
+    def __init__(self, sandbox, func, dependencies, when=None):
+        assert isinstance(sandbox, ConfigureSandbox)
+        assert not inspect.isgeneratorfunction(func)
+        # Allow non-functions when there are no dependencies. This is equivalent
+        # to passing a lambda that returns the given value.
+        if not (inspect.isroutine(func) or not dependencies):
+            print(func)
+        assert inspect.isroutine(func) or not dependencies
+        self._func = func
+        self._name = getattr(func, "__name__", None)
+        self.dependencies = dependencies
+        self.sandboxed = wraps(func)(SandboxDependsFunction(self))
+        self.sandbox = sandbox
+        self.when = when
+        sandbox._depends[self.sandboxed] = self
+
+        # Only @depends functions with a dependency on '--help' are executed
+        # immediately. Everything else is queued for later execution.
+        if sandbox._help_option in dependencies:
+            sandbox._value_for(self)
+        elif not sandbox._help:
+            sandbox._execution_queue.append((sandbox._value_for, (self,)))
+
+    @property
+    def name(self):
+        return self._name
+
+    @name.setter
+    def name(self, value):
+        self._name = value
+
+    @property
+    def sandboxed_dependencies(self):
+        return [
+            d.sandboxed if isinstance(d, DependsFunction) else d
+            for d in self.dependencies
+        ]
+
+    @memoize
+    def result(self):
+        if self.when and not self.sandbox._value_for(self.when):
+            return None
+
+        if inspect.isroutine(self._func):
+            resolved_args = [self.sandbox._value_for(d) for d in self.dependencies]
+            return self._func(*resolved_args)
+        return self._func
+
+    def __repr__(self):
+        return "<%s %s(%s)>" % (
+            self.__class__.__name__,
+            self.name,
+            ", ".join(repr(d) for d in self.dependencies),
+        )
+
+    def __or__(self, other):
+        if isinstance(other, SandboxDependsFunction):
+            other = self.sandbox._depends.get(other)
+        assert isinstance(other, DependsFunction)
+        assert self.sandbox is other.sandbox
+        return CombinedDependsFunction(self.sandbox, self.or_impl, (self, other))
+
+    @staticmethod
+    def or_impl(iterable):
+        # Applies "or" to all the items of iterable.
+        # e.g. if iterable contains a, b and c, returns `a or b or c`.
+        for i in iterable:
+            if i:
+                return i
+        return i
+
+    def __and__(self, other):
+        if isinstance(other, SandboxDependsFunction):
+            other = self.sandbox._depends.get(other)
+        assert isinstance(other, DependsFunction)
+        assert self.sandbox is other.sandbox
+        return CombinedDependsFunction(self.sandbox, self.and_impl, (self, other))
+
+    @staticmethod
+    def and_impl(iterable):
+        # Applies "and" to all the items of iterable.
+        # e.g. if iterable contains a, b and c, returns `a and b and c`.
+        for i in iterable:
+            if not i:
+                return i
+        return i
+
+    def __getattr__(self, key):
+        if key.startswith("_"):
+            return super(DependsFunction, self).__getattr__(key)
+        # Our function may return None or an object that simply doesn't have
+        # the wanted key. In that case, just return None.
+        return TrivialDependsFunction(
+            self.sandbox, lambda x: getattr(x, key, None), [self], self.when
+        )
+
+
+class TrivialDependsFunction(DependsFunction):
+    """Like a DependsFunction, but the linter won't expect it to have a
+    dependency on --help ever."""
+
+
+class CombinedDependsFunction(DependsFunction):
+    def __init__(self, sandbox, func, dependencies):
+        flatten_deps = []
+        for d in dependencies:
+            if isinstance(d, CombinedDependsFunction) and d._func is func:
+                for d2 in d.dependencies:
+                    if d2 not in flatten_deps:
+                        flatten_deps.append(d2)
+            elif d not in flatten_deps:
+                flatten_deps.append(d)
+
+        super(CombinedDependsFunction, self).__init__(sandbox, func, flatten_deps)
+
+    @memoize
+    def result(self):
+        resolved_args = (self.sandbox._value_for(d) for d in self.dependencies)
+        return self._func(resolved_args)
+
+    def __eq__(self, other):
+        return (
+            isinstance(other, self.__class__)
+            and self._func is other._func
+            and set(self.dependencies) == set(other.dependencies)
+        )
+
+    def __hash__(self):
+        return object.__hash__(self)
+
+    def __ne__(self, other):
+        return not self == other
+
+
+class SandboxedGlobal(dict):
+    """Identifiable dict type for use as function global"""
+
+
+def forbidden_import(*args, **kwargs):
+    raise ImportError("Importing modules is forbidden")
+
+
+class ConfigureSandbox(dict):
+    """Represents a sandbox for executing Python code for build configuration.
+    This is a different kind of sandboxing than the one used for moz.build
+    processing.
+
+    The sandbox has 9 primitives:
+    - option
+    - depends
+    - template
+    - imports
+    - include
+    - set_config
+    - set_define
+    - imply_option
+    - only_when
+
+    `option`, `include`, `set_config`, `set_define` and `imply_option` are
+    functions. `depends`, `template`, and `imports` are decorators. `only_when`
+    is a context_manager.
+
+    These primitives are declared as name_impl methods to this class and
+    the mapping name -> name_impl is done automatically in __getitem__.
+
+    Additional primitives should be frowned upon to keep the sandbox itself as
+    simple as possible. Instead, helpers should be created within the sandbox
+    with the existing primitives.
+
+    The sandbox is given, at creation, a dict where the yielded configuration
+    will be stored.
+
+        config = {}
+        sandbox = ConfigureSandbox(config)
+        sandbox.run(path)
+        do_stuff(config)
+    """
+
+    # The default set of builtins. We expose unicode as str to make sandboxed
+    # files more python3-ready.
+    BUILTINS = ReadOnlyDict(
+        {
+            b: getattr(__builtin__, b, None)
+            for b in (
+                "AssertionError",
+                "False",
+                "None",
+                "True",
+                "__build_class__",  # will be None on py2
+                "all",
+                "any",
+                "bool",
+                "dict",
+                "enumerate",
+                "getattr",
+                "hasattr",
+                "int",
+                "isinstance",
+                "len",
+                "list",
+                "max",
+                "min",
+                "range",
+                "set",
+                "sorted",
+                "tuple",
+                "zip",
+            )
+        },
+        __import__=forbidden_import,
+        str=six.text_type,
+    )
+
+    # Expose a limited set of functions from os.path
+    OS = ReadOnlyNamespace(
+        path=ReadOnlyNamespace(
+            **{
+                k: getattr(mozpath, k, getattr(os.path, k))
+                for k in (
+                    "abspath",
+                    "basename",
+                    "dirname",
+                    "isabs",
+                    "join",
+                    "normcase",
+                    "normpath",
+                    "realpath",
+                    "relpath",
+                )
+            }
+        )
+    )
+
+    def __init__(
+        self,
+        config,
+        environ=os.environ,
+        argv=sys.argv,
+        stdout=sys.stdout,
+        stderr=sys.stderr,
+        logger=None,
+    ):
+        dict.__setitem__(self, "__builtins__", self.BUILTINS)
+
+        self._environ = dict(environ)
+
+        self._paths = []
+        self._all_paths = set()
+        self._templates = set()
+        # Associate SandboxDependsFunctions to DependsFunctions.
+        self._depends = OrderedDict()
+        self._seen = set()
+        # Store the @imports added to a given function.
+        self._imports = {}
+
+        self._options = OrderedDict()
+        # Store raw option (as per command line or environment) for each Option
+        self._raw_options = OrderedDict()
+
+        # Store options added with `imply_option`, and the reason they were
+        # added (which can either have been given to `imply_option`, or
+        # inferred. Their order matters, so use a list.
+        self._implied_options = []
+
+        # Store all results from _prepare_function
+        self._prepared_functions = set()
+
+        # Queue of functions to execute, with their arguments
+        self._execution_queue = []
+
+        # Store the `when`s associated to some options.
+        self._conditions = {}
+
+        # A list of conditions to apply as a default `when` for every *_impl()
+        self._default_conditions = []
+
+        self._helper = CommandLineHelper(environ, argv)
+
+        assert isinstance(config, dict)
+        self._config = config
+
+        # Tracks how many templates "deep" we are in the stack.
+        self._template_depth = 0
+
+        logging.addLevelName(TRACE, "TRACE")
+        if logger is None:
+            logger = moz_logger = logging.getLogger("moz.configure")
+            logger.setLevel(logging.DEBUG)
+            formatter = logging.Formatter("%(levelname)s: %(message)s")
+            handler = ConfigureOutputHandler(stdout, stderr)
+            handler.setFormatter(formatter)
+            queue_debug = handler.queue_debug
+            logger.addHandler(handler)
+
+        else:
+            assert isinstance(logger, logging.Logger)
+            moz_logger = None
+
+            @contextmanager
+            def queue_debug():
+                yield
+
+        self._logger = logger
+
+        # Some callers will manage to log a bytestring with characters in it
+        # that can't be converted to ascii. Make our log methods robust to this
+        # by detecting the encoding that a producer is likely to have used.
+        encoding = getpreferredencoding()
+
+        def wrapped_log_method(logger, key):
+            method = getattr(logger, key)
+
+            def wrapped(*args, **kwargs):
+                out_args = [
+                    six.ensure_text(arg, encoding=encoding or "utf-8")
+                    if isinstance(arg, six.binary_type)
+                    else arg
+                    for arg in args
+                ]
+                return method(*out_args, **kwargs)
+
+            return wrapped
+
+        log_namespace = {
+            k: wrapped_log_method(logger, k)
+            for k in ("debug", "info", "warning", "error")
+        }
+        log_namespace["queue_debug"] = queue_debug
+        self.log_impl = ReadOnlyNamespace(**log_namespace)
+
+        self._help = None
+        self._help_option = self.option_impl(
+            "--help", help="print this message", category=HELP_OPTIONS_CATEGORY
+        )
+        self._seen.add(self._help_option)
+
+        self._always = DependsFunction(self, lambda: True, [])
+        self._never = DependsFunction(self, lambda: False, [])
+
+        if self._value_for(self._help_option):
+            self._help = HelpFormatter(argv[0])
+            self._help.add(self._help_option)
+        elif moz_logger:
+            handler = logging.FileHandler(
+                "config.log", mode="w", delay=True, encoding="utf-8"
+            )
+            handler.setFormatter(formatter)
+            logger.addHandler(handler)
+
+    def include_file(self, path):
+        """Include one file in the sandbox. Users of this class probably want
+        to use `run` instead.
+
+        Note: this will execute all template invocations, as well as @depends
+        functions that depend on '--help', but nothing else.
+        """
+
+        if self._paths:
+            path = mozpath.join(mozpath.dirname(self._paths[-1]), path)
+            path = mozpath.normpath(path)
+            if not mozpath.basedir(path, (mozpath.dirname(self._paths[0]),)):
+                raise ConfigureError(
+                    "Cannot include `%s` because it is not in a subdirectory "
+                    "of `%s`" % (path, mozpath.dirname(self._paths[0]))
+                )
+        else:
+            path = mozpath.realpath(mozpath.abspath(path))
+        if path in self._all_paths:
+            raise ConfigureError(
+                "Cannot include `%s` because it was included already." % path
+            )
+        self._paths.append(path)
+        self._all_paths.add(path)
+
+        with open(path, "rb") as fh:
+            source = fh.read()
+
+        code = compile(source, path, "exec")
+
+        exec_(code, self)
+
+        self._paths.pop(-1)
+
+    def run(self, path=None):
+        """Executes the given file within the sandbox, as well as everything
+        pending from any other included file, and ensure the overall
+        consistency of the executed script(s)."""
+        if path:
+            self.include_file(path)
+
+        for option in six.itervalues(self._options):
+            # All options must be referenced by some @depends function
+            if option not in self._seen:
+                raise ConfigureError(
+                    "Option `%s` is not handled ; reference it with a @depends"
+                    % option.option
+                )
+
+            self._value_for(option)
+
+        # All implied options should exist.
+        for implied_option in self._implied_options:
+            value = self._resolve(implied_option.value)
+            if value is not None:
+                # There are two ways to end up here: either the implied option
+                # is unknown, or it's known but there was a dependency loop
+                # that prevented the implication from being applied.
+                option = self._options.get(implied_option.name)
+                if not option:
+                    raise ConfigureError(
+                        "`%s`, emitted from `%s` line %d, is unknown."
+                        % (
+                            implied_option.option,
+                            implied_option.caller[1],
+                            implied_option.caller[2],
+                        )
+                    )
+                # If the option is known, check that the implied value doesn't
+                # conflict with what value was attributed to the option.
+                if implied_option.when and not self._value_for(implied_option.when):
+                    continue
+                option_value = self._value_for_option(option)
+                if value != option_value:
+                    reason = implied_option.reason
+                    if isinstance(reason, Option):
+                        reason = self._raw_options.get(reason) or reason.option
+                        reason = reason.split("=", 1)[0]
+                    value = OptionValue.from_(value)
+                    raise InvalidOptionError(
+                        "'%s' implied by '%s' conflicts with '%s' from the %s"
+                        % (
+                            value.format(option.option),
+                            reason,
+                            option_value.format(option.option),
+                            option_value.origin,
+                        )
+                    )
+
+        # All options should have been removed (handled) by now.
+        for arg in self._helper:
+            without_value = arg.split("=", 1)[0]
+            msg = "Unknown option: %s" % without_value
+            self._logger.warning(msg)
+
+        # Run the execution queue
+        for func, args in self._execution_queue:
+            func(*args)
+
+        if self._help:
+            with LineIO(self.log_impl.info) as out:
+                self._help.usage(out)
+
+    def __getitem__(self, key):
+        impl = "%s_impl" % key
+        func = getattr(self, impl, None)
+        if func:
+            return func
+
+        return super(ConfigureSandbox, self).__getitem__(key)
+
+    def __setitem__(self, key, value):
+        if (
+            key in self.BUILTINS
+            or key == "__builtins__"
+            or hasattr(self, "%s_impl" % key)
+        ):
+            raise KeyError("Cannot reassign builtins")
+
+        if inspect.isfunction(value) and value not in self._templates:
+            value = self._prepare_function(value)
+
+        elif (
+            not isinstance(value, SandboxDependsFunction)
+            and value not in self._templates
+            and not (inspect.isclass(value) and issubclass(value, Exception))
+        ):
+            raise KeyError(
+                "Cannot assign `%s` because it is neither a "
+                "@depends nor a @template" % key
+            )
+
+        if isinstance(value, SandboxDependsFunction):
+            self._depends[value].name = key
+
+        return super(ConfigureSandbox, self).__setitem__(key, value)
+
+    def _resolve(self, arg):
+        if isinstance(arg, SandboxDependsFunction):
+            return self._value_for_depends(self._depends[arg])
+        return arg
+
+    def _value_for(self, obj):
+        if isinstance(obj, SandboxDependsFunction):
+            assert obj in self._depends
+            return self._value_for_depends(self._depends[obj])
+
+        elif isinstance(obj, DependsFunction):
+            return self._value_for_depends(obj)
+
+        elif isinstance(obj, Option):
+            return self._value_for_option(obj)
+
+        assert False
+
+    @memoize
+    def _value_for_depends(self, obj):
+        value = obj.result()
+        self._logger.log(TRACE, "%r = %r", obj, value)
+        return value
+
+    @memoize
+    def _value_for_option(self, option):
+        implied = {}
+        matching_implied_options = [
+            o for o in self._implied_options if o.name in (option.name, option.env)
+        ]
+        # Update self._implied_options before going into the loop with the non-matching
+        # options.
+        self._implied_options = [
+            o for o in self._implied_options if o.name not in (option.name, option.env)
+        ]
+
+        for implied_option in matching_implied_options:
+            if implied_option.when and not self._value_for(implied_option.when):
+                continue
+
+            value = self._resolve(implied_option.value)
+
+            if value is not None:
+                value = OptionValue.from_(value)
+                opt = value.format(implied_option.option)
+                self._helper.add(opt, "implied")
+                implied[opt] = implied_option
+
+        try:
+            value, option_string = self._helper.handle(option)
+        except ConflictingOptionError as e:
+            reason = implied[e.arg].reason
+            if isinstance(reason, Option):
+                reason = self._raw_options.get(reason) or reason.option
+                reason = reason.split("=", 1)[0]
+            raise InvalidOptionError(
+                "'%s' implied by '%s' conflicts with '%s' from the %s"
+                % (e.arg, reason, e.old_arg, e.old_origin)
+            )
+
+        if value.origin == "implied":
+            recursed_value = getattr(self, "__value_for_option").get((option,))
+            if recursed_value is not None:
+                _, filename, line, _, _, _ = implied[value.format(option.option)].caller
+                raise ConfigureError(
+                    "'%s' appears somewhere in the direct or indirect dependencies when "
+                    "resolving imply_option at %s:%d" % (option.option, filename, line)
+                )
+
+        if option_string:
+            self._raw_options[option] = option_string
+
+        when = self._conditions.get(option)
+        # If `when` resolves to a false-ish value, we always return None.
+        # This makes option(..., when='--foo') equivalent to
+        # option(..., when=depends('--foo')(lambda x: x)).
+        if when and not self._value_for(when) and value is not None:
+            # If the option was passed explicitly, we throw an error that
+            # the option is not available. Except when the option was passed
+            # from the environment, because that would be too cumbersome.
+            if value.origin not in ("default", "environment"):
+                raise InvalidOptionError(
+                    "%s is not available in this configuration"
+                    % option_string.split("=", 1)[0]
+                )
+            self._logger.log(TRACE, "%r = None", option)
+            return None
+
+        self._logger.log(TRACE, "%r = %r", option, value)
+        return value
+
+    def _dependency(self, arg, callee_name, arg_name=None):
+        if isinstance(arg, six.string_types):
+            prefix, name, values = Option.split_option(arg)
+            if values != ():
+                raise ConfigureError("Option must not contain an '='")
+            if name not in self._options:
+                raise ConfigureError(
+                    "'%s' is not a known option. " "Maybe it's declared too late?" % arg
+                )
+            arg = self._options[name]
+            self._seen.add(arg)
+        elif isinstance(arg, SandboxDependsFunction):
+            assert arg in self._depends
+            arg = self._depends[arg]
+        else:
+            raise TypeError(
+                "Cannot use object of type '%s' as %sargument to %s"
+                % (
+                    type(arg).__name__,
+                    "`%s` " % arg_name if arg_name else "",
+                    callee_name,
+                )
+            )
+        return arg
+
+    def _normalize_when(self, when, callee_name):
+        if when is True:
+            when = self._always
+        elif when is False:
+            when = self._never
+        elif when is not None:
+            when = self._dependency(when, callee_name, "when")
+
+        if self._default_conditions:
+            # Create a pseudo @depends function for the combination of all
+            # default conditions and `when`.
+            dependencies = [when] if when else []
+            dependencies.extend(self._default_conditions)
+            if len(dependencies) == 1:
+                return dependencies[0]
+            return CombinedDependsFunction(self, all, dependencies)
+        return when
+
+    @contextmanager
+    def only_when_impl(self, when):
+        """Implementation of only_when()
+
+        `only_when` is a context manager that essentially makes calls to
+        other sandbox functions within the context block ignored.
+        """
+        when = self._normalize_when(when, "only_when")
+        if when and self._default_conditions[-1:] != [when]:
+            self._default_conditions.append(when)
+            yield
+            self._default_conditions.pop()
+        else:
+            yield
+
+    def option_impl(self, *args, **kwargs):
+        """Implementation of option()
+        This function creates and returns an Option() object, passing it the
+        resolved arguments (uses the result of functions when functions are
+        passed). In most cases, the result of this function is not expected to
+        be used.
+        Command line argument/environment variable parsing for this Option is
+        handled here.
+        """
+        when = self._normalize_when(kwargs.get("when"), "option")
+        args = [self._resolve(arg) for arg in args]
+        kwargs = {k: self._resolve(v) for k, v in six.iteritems(kwargs) if k != "when"}
+        # The Option constructor needs to look up the stack to infer a category
+        # for the Option, since the category is based on the filename where the
+        # Option is defined. However, if the Option is defined in a template, we
+        # want the category to reference the caller of the template rather than
+        # the caller of the option() function.
+        kwargs["define_depth"] = self._template_depth * 3
+        option = Option(*args, **kwargs)
+        if when:
+            self._conditions[option] = when
+        if option.name in self._options:
+            raise ConfigureError("Option `%s` already defined" % option.option)
+        if option.env in self._options:
+            raise ConfigureError("Option `%s` already defined" % option.env)
+        if option.name:
+            self._options[option.name] = option
+        if option.env:
+            self._options[option.env] = option
+
+        if self._help and (when is None or self._value_for(when)):
+            self._help.add(option)
+
+        return option
+
+    def depends_impl(self, *args, **kwargs):
+        """Implementation of @depends()
+        This function is a decorator. It returns a function that subsequently
+        takes a function and returns a dummy function. The dummy function
+        identifies the actual function for the sandbox, while preventing
+        further function calls from within the sandbox.
+
+        @depends() takes a variable number of option strings or dummy function
+        references. The decorated function is called as soon as the decorator
+        is called, and the arguments it receives are the OptionValue or
+        function results corresponding to each of the arguments to @depends.
+        As an exception, when a HelpFormatter is attached, only functions that
+        have '--help' in their @depends argument list are called.
+
+        The decorated function is altered to use a different global namespace
+        for its execution. This different global namespace exposes a limited
+        set of functions from os.path.
+        """
+        for k in kwargs:
+            if k != "when":
+                raise TypeError(
+                    "depends_impl() got an unexpected keyword argument '%s'" % k
+                )
+
+        when = self._normalize_when(kwargs.get("when"), "@depends")
+
+        if not when and not args:
+            raise ConfigureError("@depends needs at least one argument")
+
+        dependencies = tuple(self._dependency(arg, "@depends") for arg in args)
+
+        conditions = [
+            self._conditions[d]
+            for d in dependencies
+            if d in self._conditions and isinstance(d, Option)
+        ]
+        for c in conditions:
+            if c != when:
+                raise ConfigureError(
+                    "@depends function needs the same `when` "
+                    "as options it depends on"
+                )
+
+        def decorator(func):
+            if inspect.isgeneratorfunction(func):
+                raise ConfigureError(
+                    "Cannot decorate generator functions with @depends"
+                )
+            if inspect.isroutine(func):
+                if func in self._templates:
+                    raise TypeError("Cannot use a @template function here")
+                func = self._prepare_function(func)
+            elif isinstance(func, SandboxDependsFunction):
+                raise TypeError("Cannot nest @depends functions")
+            elif dependencies:
+                raise TypeError(
+                    "Cannot wrap literal values in @depends with dependencies"
+                )
+            depends = DependsFunction(self, func, dependencies, when=when)
+            return depends.sandboxed
+
+        return decorator
+
+    def include_impl(self, what, when=None):
+        """Implementation of include().
+        Allows to include external files for execution in the sandbox.
+        It is possible to use a @depends function as argument, in which case
+        the result of the function is the file name to include. This latter
+        feature is only really meant for --enable-application/--enable-project.
+        """
+        with self.only_when_impl(when):
+            what = self._resolve(what)
+            if what:
+                if not isinstance(what, six.string_types):
+                    raise TypeError("Unexpected type: '%s'" % type(what).__name__)
+                self.include_file(what)
+
+    def template_impl(self, func):
+        """Implementation of @template.
+        This function is a decorator. Template functions are called
+        immediately. They are altered so that their global namespace exposes
+        a limited set of functions from os.path, as well as `depends` and
+        `option`.
+        Templates allow to simplify repetitive constructs, or to implement
+        helper decorators and somesuch.
+        """
+
+        def update_globals(glob):
+            glob.update(
+                (k[: -len("_impl")], getattr(self, k))
+                for k in dir(self)
+                if k.endswith("_impl") and k != "template_impl"
+            )
+            glob.update((k, v) for k, v in six.iteritems(self) if k not in glob)
+
+        template = self._prepare_function(func, update_globals)
+
+        # Any function argument to the template must be prepared to be sandboxed.
+        # If the template itself returns a function (in which case, it's very
+        # likely a decorator), that function must be prepared to be sandboxed as
+        # well.
+        def wrap_template(template):
+            isfunction = inspect.isfunction
+
+            def maybe_prepare_function(obj):
+                if isfunction(obj):
+                    return self._prepare_function(obj)
+                return obj
+
+            # The following function may end up being prepared to be sandboxed,
+            # so it mustn't depend on anything from the global scope in this
+            # file. It can however depend on variables from the closure, thus
+            # maybe_prepare_function and isfunction are declared above to be
+            # available there.
+            @self.wraps(template)
+            def wrapper(*args, **kwargs):
+                args = [maybe_prepare_function(arg) for arg in args]
+                kwargs = {k: maybe_prepare_function(v) for k, v in kwargs.items()}
+                self._template_depth += 1
+                ret = template(*args, **kwargs)
+                self._template_depth -= 1
+                if isfunction(ret):
+                    # We can't expect the sandboxed code to think about all the
+                    # details of implementing decorators, so do some of the
+                    # work for them. If the function takes exactly one function
+                    # as argument and returns a function, it must be a
+                    # decorator, so mark the returned function as wrapping the
+                    # function passed in.
+                    if len(args) == 1 and not kwargs and isfunction(args[0]):
+                        ret = self.wraps(args[0])(ret)
+                    return wrap_template(ret)
+                return ret
+
+            return wrapper
+
+        wrapper = wrap_template(template)
+        self._templates.add(wrapper)
+        return wrapper
+
+    def wraps(self, func):
+        return wraps(func)
+
+    RE_MODULE = re.compile("^[a-zA-Z0-9_\.]+$")
+
+    def imports_impl(self, _import, _from=None, _as=None):
+        """Implementation of @imports.
+        This decorator imports the given _import from the given _from module
+        optionally under a different _as name.
+        The options correspond to the various forms for the import builtin.
+
+            @imports('sys')
+            @imports(_from='mozpack', _import='path', _as='mozpath')
+        """
+        for value, required in ((_import, True), (_from, False), (_as, False)):
+
+            if not isinstance(value, six.string_types) and (
+                required or value is not None
+            ):
+                raise TypeError("Unexpected type: '%s'" % type(value).__name__)
+            if value is not None and not self.RE_MODULE.match(value):
+                raise ValueError("Invalid argument to @imports: '%s'" % value)
+        if _as and "." in _as:
+            raise ValueError("Invalid argument to @imports: '%s'" % _as)
+
+        def decorator(func):
+            if func in self._templates:
+                raise ConfigureError("@imports must appear after @template")
+            if func in self._depends:
+                raise ConfigureError("@imports must appear after @depends")
+            # For the imports to apply in the order they appear in the
+            # .configure file, we accumulate them in reverse order and apply
+            # them later.
+            imports = self._imports.setdefault(func, [])
+            imports.insert(0, (_from, _import, _as))
+            return func
+
+        return decorator
+
+    def _apply_imports(self, func, glob):
+        for _from, _import, _as in self._imports.pop(func, ()):
+            self._get_one_import(_from, _import, _as, glob)
+
+    def _handle_wrapped_import(self, _from, _import, _as, glob):
+        """Given the name of a module, "import" a mocked package into the glob
+        iff the module is one that we wrap (either for the sandbox or for the
+        purpose of testing). Applies if the wrapped module is exposed by an
+        attribute of `self`.
+
+        For example, if the import statement is `from os import environ`, then
+        this function will set
+        glob['environ'] = self._wrapped_os.environ.
+
+        Iff this function handles the given import, return True.
+        """
+        module = (_from or _import).split(".")[0]
+        attr = "_wrapped_" + module
+        wrapped = getattr(self, attr, None)
+        if wrapped:
+            if _as or _from:
+                obj = self._recursively_get_property(
+                    module, (_from + "." if _from else "") + _import, wrapped
+                )
+                glob[_as or _import] = obj
+            else:
+                glob[module] = wrapped
+            return True
+        else:
+            return False
+
+    def _recursively_get_property(self, module, what, wrapped):
+        """Traverse the wrapper object `wrapped` (which represents the module
+        `module`) and return the property represented by `what`, which may be a
+        series of nested attributes.
+
+        For example, if `module` is 'os' and `what` is 'os.path.join',
+        return `wrapped.path.join`.
+        """
+        if what == module:
+            return wrapped
+        assert what.startswith(module + ".")
+        attrs = what[len(module + ".") :].split(".")
+        for attr in attrs:
+            wrapped = getattr(wrapped, attr)
+        return wrapped
+
+    @memoized_property
+    def _wrapped_os(self):
+        wrapped_os = {}
+        exec_("from os import *", {}, wrapped_os)
+        # Special case os and os.environ so that os.environ is our copy of
+        # the environment.
+        wrapped_os["environ"] = self._environ
+        # Also override some os.path functions with ours.
+        wrapped_path = {}
+        exec_("from os.path import *", {}, wrapped_path)
+        wrapped_path.update(self.OS.path.__dict__)
+        wrapped_os["path"] = ReadOnlyNamespace(**wrapped_path)
+        return ReadOnlyNamespace(**wrapped_os)
+
+    @memoized_property
+    def _wrapped_subprocess(self):
+        wrapped_subprocess = {}
+        exec_("from subprocess import *", {}, wrapped_subprocess)
+
+        def wrap(function):
+            def wrapper(*args, **kwargs):
+                if kwargs.get("env") is None and self._environ:
+                    kwargs["env"] = dict(self._environ)
+
+                return function(*args, **kwargs)
+
+            return wrapper
+
+        for f in ("call", "check_call", "check_output", "Popen", "run"):
+            # `run` is new to python 3.5. In case this still runs from python2
+            # code, avoid failing here.
+            if f in wrapped_subprocess:
+                wrapped_subprocess[f] = wrap(wrapped_subprocess[f])
+
+        return ReadOnlyNamespace(**wrapped_subprocess)
+
+    @memoized_property
+    def _wrapped_six(self):
+        if six.PY3:
+            return six
+        wrapped_six = {}
+        exec_("from six import *", {}, wrapped_six)
+        wrapped_six_moves = {}
+        exec_("from six.moves import *", {}, wrapped_six_moves)
+        wrapped_six_moves_builtins = {}
+        exec_("from six.moves.builtins import *", {}, wrapped_six_moves_builtins)
+
+        # Special case for the open() builtin, because otherwise, using it
+        # fails with "IOError: file() constructor not accessible in
+        # restricted mode". We also make open() look more like python 3's,
+        # decoding to unicode strings unless the mode says otherwise.
+        def wrapped_open(name, mode=None, buffering=None):
+            args = (name,)
+            kwargs = {}
+            if buffering is not None:
+                kwargs["buffering"] = buffering
+            if mode is not None:
+                args += (mode,)
+                if "b" in mode:
+                    return open(*args, **kwargs)
+            kwargs["encoding"] = system_encoding
+            return codecs.open(*args, **kwargs)
+
+        wrapped_six_moves_builtins["open"] = wrapped_open
+        wrapped_six_moves["builtins"] = ReadOnlyNamespace(**wrapped_six_moves_builtins)
+        wrapped_six["moves"] = ReadOnlyNamespace(**wrapped_six_moves)
+
+        return ReadOnlyNamespace(**wrapped_six)
+
+    def _get_one_import(self, _from, _import, _as, glob):
+        """Perform the given import, placing the result into the dict glob."""
+        if not _from and _import == "__builtin__":
+            glob[_as or "__builtin__"] = __builtin__
+            return
+        if _from == "__builtin__":
+            _from = "six.moves.builtins"
+        # The special `__sandbox__` module gives access to the sandbox
+        # instance.
+        if not _from and _import == "__sandbox__":
+            glob[_as or _import] = self
+            return
+        if self._handle_wrapped_import(_from, _import, _as, glob):
+            return
+        # If we've gotten this far, we should just do a normal import.
+        # Until this proves to be a performance problem, just construct an
+        # import statement and execute it.
+        import_line = "%simport %s%s" % (
+            ("from %s " % _from) if _from else "",
+            _import,
+            (" as %s" % _as) if _as else "",
+        )
+        exec_(import_line, {}, glob)
+
+    def _resolve_and_set(self, data, name, value, when=None):
+        # Don't set anything when --help was on the command line
+        if self._help:
+            return
+        if when and not self._value_for(when):
+            return
+        name = self._resolve(name)
+        if name is None:
+            return
+        if not isinstance(name, six.string_types):
+            raise TypeError("Unexpected type: '%s'" % type(name).__name__)
+        if name in data:
+            raise ConfigureError(
+                "Cannot add '%s' to configuration: Key already " "exists" % name
+            )
+        value = self._resolve(value)
+        if value is not None:
+            if self._logger.isEnabledFor(TRACE):
+                if data is self._config:
+                    self._logger.log(TRACE, "set_config(%s, %r)", name, value)
+                elif data is self._config.get("DEFINES"):
+                    self._logger.log(TRACE, "set_define(%s, %r)", name, value)
+            data[name] = value
+
+    def set_config_impl(self, name, value, when=None):
+        """Implementation of set_config().
+        Set the configuration items with the given name to the given value.
+        Both `name` and `value` can be references to @depends functions,
+        in which case the result from these functions is used. If the result
+        of either function is None, the configuration item is not set.
+        """
+        when = self._normalize_when(when, "set_config")
+
+        self._execution_queue.append(
+            (self._resolve_and_set, (self._config, name, value, when))
+        )
+
+    def set_define_impl(self, name, value, when=None):
+        """Implementation of set_define().
+        Set the define with the given name to the given value. Both `name` and
+        `value` can be references to @depends functions, in which case the
+        result from these functions is used. If the result of either function
+        is None, the define is not set. If the result is False, the define is
+        explicitly undefined (-U).
+        """
+        when = self._normalize_when(when, "set_define")
+
+        defines = self._config.setdefault("DEFINES", {})
+        self._execution_queue.append(
+            (self._resolve_and_set, (defines, name, value, when))
+        )
+
+    def imply_option_impl(self, option, value, reason=None, when=None):
+        """Implementation of imply_option().
+        Injects additional options as if they had been passed on the command
+        line. The `option` argument is a string as in option()'s `name` or
+        `env`. The option must be declared after `imply_option` references it.
+        The `value` argument indicates the value to pass to the option.
+        It can be:
+        - True. In this case `imply_option` injects the positive option
+
+          (--enable-foo/--with-foo).
+              imply_option('--enable-foo', True)
+              imply_option('--disable-foo', True)
+
+          are both equivalent to `--enable-foo` on the command line.
+
+        - False. In this case `imply_option` injects the negative option
+
+          (--disable-foo/--without-foo).
+              imply_option('--enable-foo', False)
+              imply_option('--disable-foo', False)
+
+          are both equivalent to `--disable-foo` on the command line.
+
+        - None. In this case `imply_option` does nothing.
+              imply_option('--enable-foo', None)
+              imply_option('--disable-foo', None)
+
+        are both equivalent to not passing any flag on the command line.
+
+        - a string or a tuple. In this case `imply_option` injects the positive
+          option with the given value(s).
+
+              imply_option('--enable-foo', 'a')
+              imply_option('--disable-foo', 'a')
+
+          are both equivalent to `--enable-foo=a` on the command line.
+              imply_option('--enable-foo', ('a', 'b'))
+              imply_option('--disable-foo', ('a', 'b'))
+
+          are both equivalent to `--enable-foo=a,b` on the command line.
+
+        Because imply_option('--disable-foo', ...) can be misleading, it is
+        recommended to use the positive form ('--enable' or '--with') for
+        `option`.
+
+        The `value` argument can also be (and usually is) a reference to a
+        @depends function, in which case the result of that function will be
+        used as per the descripted mapping above.
+
+        The `reason` argument indicates what caused the option to be implied.
+        It is necessary when it cannot be inferred from the `value`.
+        """
+
+        when = self._normalize_when(when, "imply_option")
+
+        # Don't do anything when --help was on the command line
+        if self._help:
+            return
+        if not reason and isinstance(value, SandboxDependsFunction):
+            deps = self._depends[value].dependencies
+            possible_reasons = [d for d in deps if d != self._help_option]
+            if len(possible_reasons) == 1:
+                if isinstance(possible_reasons[0], Option):
+                    reason = possible_reasons[0]
+        if not reason and (
+            isinstance(value, (bool, tuple)) or isinstance(value, six.string_types)
+        ):
+            # A reason can be provided automatically when imply_option
+            # is called with an immediate value.
+            _, filename, line, _, _, _ = inspect.stack()[1]
+            reason = "imply_option at %s:%s" % (filename, line)
+
+        if not reason:
+            raise ConfigureError(
+                "Cannot infer what implies '%s'. Please add a `reason` to "
+                "the `imply_option` call." % option
+            )
+
+        prefix, name, values = Option.split_option(option)
+        if values != ():
+            raise ConfigureError("Implied option must not contain an '='")
+
+        self._implied_options.append(
+            ReadOnlyNamespace(
+                option=option,
+                prefix=prefix,
+                name=name,
+                value=value,
+                caller=inspect.stack()[1],
+                reason=reason,
+                when=when,
+            )
+        )
+
+    def _prepare_function(self, func, update_globals=None):
+        """Alter the given function global namespace with the common ground
+        for @depends, and @template.
+        """
+        if not inspect.isfunction(func):
+            raise TypeError("Unexpected type: '%s'" % type(func).__name__)
+        if func in self._prepared_functions:
+            return func
+
+        glob = SandboxedGlobal(
+            (k, v)
+            for k, v in six.iteritems(func.__globals__)
+            if (inspect.isfunction(v) and v not in self._templates)
+            or (inspect.isclass(v) and issubclass(v, Exception))
+        )
+        glob.update(
+            __builtins__=self.BUILTINS,
+            __file__=self._paths[-1] if self._paths else "",
+            __name__=self._paths[-1] if self._paths else "",
+            os=self.OS,
+            log=self.log_impl,
+            namespace=ReadOnlyNamespace,
+        )
+        if update_globals:
+            update_globals(glob)
+
+        # The execution model in the sandbox doesn't guarantee the execution
+        # order will always be the same for a given function, and if it uses
+        # variables from a closure that are changed after the function is
+        # declared, depending when the function is executed, the value of the
+        # variable can differ. For consistency, we force the function to use
+        # the value from the earliest it can be run, which is at declaration.
+        # Note this is not entirely bullet proof (if the value is e.g. a list,
+        # the list contents could have changed), but covers the bases.
+        closure = None
+        if func.__closure__:
+
+            def makecell(content):
+                def f():
+                    content
+
+                return f.__closure__[0]
+
+            closure = tuple(makecell(cell.cell_contents) for cell in func.__closure__)
+
+        new_func = self.wraps(func)(
+            types.FunctionType(
+                func.__code__, glob, func.__name__, func.__defaults__, closure
+            )
+        )
+
+        @self.wraps(new_func)
+        def wrapped(*args, **kwargs):
+            if func in self._imports:
+                self._apply_imports(func, glob)
+            return new_func(*args, **kwargs)
+
+        self._prepared_functions.add(wrapped)
+        return wrapped
Index: mozjs/create-102.15.0-remove-sloppy-m4-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-remove-sloppy-m4-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-remove-sloppy-m4-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-remove-sloppy-m4.patch
+
+mv firefox-$VERSION-remove-sloppy-m4.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-remove-sloppy-m4-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-remove-sloppy-m4-patch/file.list
===================================================================
--- mozjs/create-102.15.0-remove-sloppy-m4-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-remove-sloppy-m4-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/build/autoconf/autoconf.sh
Index: mozjs/create-102.15.0-remove-sloppy-m4-patch/firefox-102.15.0-new/build/autoconf/autoconf.sh
===================================================================
--- mozjs/create-102.15.0-remove-sloppy-m4-patch/firefox-102.15.0-new/build/autoconf/autoconf.sh	(nonexistent)
+++ mozjs/create-102.15.0-remove-sloppy-m4-patch/firefox-102.15.0-new/build/autoconf/autoconf.sh	(revision 385)
@@ -0,0 +1,152 @@
+#! @SHELL@
+# autoconf -- create `configure' using m4 macros
+# Copyright (C) 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# If given no args, create `configure' from template file `configure.in'.
+# With one arg, create a configure script on standard output from
+# the given template file.
+
+usage="\
+Usage: autoconf [-h] [--help] [-m dir] [--macrodir=dir]
+       [-l dir] [--localdir=dir] [--version] [template-file]"
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+: ${AC_MACRODIR=@datadir@}
+: ${M4=@M4@}
+: ${AWK=@AWK@}
+case "${M4}" in
+/*) # Handle the case that m4 has moved since we were configured.
+    # It may have been found originally in a build directory.
+    test -f "${M4}" || M4=m4 ;;
+esac
+
+: ${TMPDIR=/tmp}
+tmpout=${TMPDIR}/acout.$$
+localdir=
+show_version=no
+
+while test $# -gt 0 ; do
+   case "${1}" in
+      -h | --help | --h* )
+         echo "${usage}" 1>&2; exit 0 ;;
+      --localdir=* | --l*=* )
+         localdir="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+         shift ;;
+      -l | --localdir | --l*)
+         shift
+         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+         localdir="${1}"
+         shift ;;
+      --macrodir=* | --m*=* )
+         AC_MACRODIR="`echo \"${1}\" | sed -e 's/^[^=]*=//'`"
+         shift ;;
+      -m | --macrodir | --m* )
+         shift
+         test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; }
+         AC_MACRODIR="${1}"
+         shift ;;
+      --version | --v* )
+         show_version=yes; shift ;;
+      -- )     # Stop option processing
+        shift; break ;;
+      - )	# Use stdin as input.
+        break ;;
+      -* )
+        echo "${usage}" 1>&2; exit 1 ;;
+      * )
+        break ;;
+   esac
+done
+
+if test $show_version = yes; then
+  version=`sed -n 's/define.AC_ACVERSION.[ 	]*\([0-9.]*\).*/\1/p' \
+    $AC_MACRODIR/acgeneral.m4`
+  echo "Autoconf version $version"
+  exit 0
+fi
+
+case $# in
+  0) infile=configure.in ;;
+  1) infile="$1" ;;
+  *) echo "$usage" >&2; exit 1 ;;
+esac
+
+trap 'rm -f $tmpin $tmpout; exit 1' 1 2 15
+
+tmpin=${TMPDIR}/acin.$$ # Always set this, to avoid bogus errors from some rm's.
+if test z$infile = z-; then
+  infile=$tmpin
+  cat > $infile
+elif test ! -r "$infile"; then
+  echo "autoconf: ${infile}: No such file or directory" >&2
+  exit 1
+fi
+
+if test -n "$localdir"; then
+  use_localdir="-I$localdir -DAC_LOCALDIR=$localdir"
+else
+  use_localdir=
+fi
+
+# Use the frozen version of Autoconf if available.
+r= f=
+
+$M4 -I$AC_MACRODIR $use_localdir $r autoconf.m4$f $infile > $tmpout ||
+  { rm -f $tmpin $tmpout; exit 2; }
+
+# You could add your own prefixes to pattern if you wanted to check for
+# them too, e.g. pattern='\(AC_\|ILT_\)', except that UNIX sed doesn't do
+# alternation.
+pattern="AC_"
+
+status=0
+if grep "^[^#]*${pattern}" $tmpout > /dev/null 2>&1; then
+  echo "autoconf: Undefined macros:" >&2
+  sed -n "s/^[^#]*\\(${pattern}[_A-Za-z0-9]*\\).*/\\1/p" $tmpout |
+    while read macro; do
+      grep -n "^[^#]*$macro" $infile /dev/null
+      test $? -eq 1 && echo >&2 "***BUG in Autoconf--please report*** $macro"
+    done | sort -u >&2
+  status=1
+fi
+
+if test $# -eq 0; then
+  echo "This case should not be reached."
+  exit 1
+fi
+
+# Put the real line numbers into the output to make config.log more helpful.
+$AWK '
+/__oline__/ { printf "%d:", NR + 1 }
+           { print }
+' $tmpout | sed '
+/__oline__/s/^\([0-9][0-9]*\):\(.*\)__oline__/\2\1/
+'
+
+rm -f $tmpout
+
+exit $status
Index: mozjs/create-102.15.0-riscv64gc-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-riscv64gc-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-riscv64gc-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-riscv64gc.patch
+
+mv firefox-$VERSION-riscv64gc.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-riscv64gc-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-riscv64gc-patch/file.list
===================================================================
--- mozjs/create-102.15.0-riscv64gc-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-riscv64gc-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+firefox-102.15.0/build/autoconf/config.guess
+firefox-102.15.0/build/autoconf/config.sub
Index: mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.guess
===================================================================
--- mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.guess	(nonexistent)
+++ mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.guess	(revision 385)
@@ -0,0 +1,1757 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-09'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+#
+# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
+#
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+#
+# Please send patches to <config-patches@gnu.org>.
+
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+# Just in case it came from the environment.
+GUESS=
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+tmp=
+# shellcheck disable=SC2172
+trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
+
+set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
+    : "${TMPDIR=/tmp}"
+    # shellcheck disable=SC2039,SC3028
+    { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+	{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir "$tmp" 2>/dev/null) ; } ||
+	{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir "$tmp" 2>/dev/null) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+	{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; }
+    dummy=$tmp/dummy
+    case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in
+	,,)    echo "int x;" > "$dummy.c"
+	       for driver in cc gcc c89 c99 ; do
+		   if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
+		       CC_FOR_BUILD=$driver
+		       break
+		   fi
+	       done
+	       if test x"$CC_FOR_BUILD" = x ; then
+		   CC_FOR_BUILD=no_compiler_found
+	       fi
+	       ;;
+	,,*)   CC_FOR_BUILD=$CC ;;
+	,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+    esac
+}
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if test -f /.attbin/uname ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+case $UNAME_SYSTEM in
+Linux|GNU|GNU/*)
+	LIBC=unknown
+
+	set_cc_for_build
+	cat <<-EOF > "$dummy.c"
+	#include <features.h>
+	#if defined(__UCLIBC__)
+	LIBC=uclibc
+	#elif defined(__dietlibc__)
+	LIBC=dietlibc
+	#elif defined(__GLIBC__)
+	LIBC=gnu
+	#else
+	#include <stdarg.h>
+	/* First heuristic to detect musl libc.  */
+	#ifdef __DEFINED_va_list
+	LIBC=musl
+	#endif
+	#endif
+	EOF
+	cc_set_libc=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`
+	eval "$cc_set_libc"
+
+	# Second heuristic to detect musl libc.
+	if [ "$LIBC" = unknown ] &&
+	   command -v ldd >/dev/null &&
+	   ldd --version 2>&1 | grep -q ^musl; then
+		LIBC=musl
+	fi
+
+	# If the system lacks a compiler, then just pick glibc.
+	# We could probably try harder.
+	if [ "$LIBC" = unknown ]; then
+		LIBC=gnu
+	fi
+	;;
+esac
+
+# Note: order is significant - the case branches are not exclusive.
+
+case $UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
+	    /sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    /usr/sbin/sysctl -n hw.machine_arch 2>/dev/null || \
+	    echo unknown)`
+	case $UNAME_MACHINE_ARCH in
+	    aarch64eb) machine=aarch64_be-unknown ;;
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    sh5el) machine=sh5le-unknown ;;
+	    earmv*)
+		arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
+		endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
+		machine=${arch}${endian}-unknown
+		;;
+	    *) machine=$UNAME_MACHINE_ARCH-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently (or will in the future) and ABI.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		os=netbsdelf
+		;;
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep -q __ELF__
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+		os=netbsd
+		;;
+	esac
+	# Determine ABI tags.
+	case $UNAME_MACHINE_ARCH in
+	    earm*)
+		expr='s/^earmv[0-9]/-eabi/;s/eb$//'
+		abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case $UNAME_VERSION in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	GUESS=$machine-${os}${release}${abi-}
+	;;
+    *:Bitrig:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE
+	;;
+    *:OpenBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE
+	;;
+    *:SecBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE
+	;;
+    *:LibertyBSD:*:*)
+	UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
+	GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE
+	;;
+    *:MidnightBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE
+	;;
+    *:ekkoBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE
+	;;
+    *:SolidBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE
+	;;
+    *:OS108:*:*)
+	GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE
+	;;
+    macppc:MirBSD:*:*)
+	GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:MirBSD:*:*)
+	GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE
+	;;
+    *:Sortix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-sortix
+	;;
+    *:Twizzler:*:*)
+	GUESS=$UNAME_MACHINE-unknown-twizzler
+	;;
+    *:Redox:*:*)
+	GUESS=$UNAME_MACHINE-unknown-redox
+	;;
+    mips:OSF1:*.*)
+	GUESS=mips-dec-osf1
+	;;
+    alpha:OSF1:*:*)
+	# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
+	trap '' 0
+	case $UNAME_RELEASE in
+	*4.0)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+		;;
+	*5.*)
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+		;;
+	esac
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case $ALPHA_CPU_TYPE in
+	    "EV4 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE=alpha ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE=alpha ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE=alphaev5 ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE=alphaev56 ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE=alphapca56 ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE=alphapca57 ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE=alphaev6 ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE=alphaev67 ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE=alphaev68 ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE=alphaev69 ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE=alphaev7 ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE=alphaev79 ;;
+	esac
+	# A Pn.n version is a patched version.
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	OSF_REL=`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	GUESS=$UNAME_MACHINE-dec-osf$OSF_REL
+	;;
+    Amiga*:UNIX_System_V:4.0:*)
+	GUESS=m68k-unknown-sysv4
+	;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-amigaos
+	;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	GUESS=$UNAME_MACHINE-unknown-morphos
+	;;
+    *:OS/390:*:*)
+	GUESS=i370-ibm-openedition
+	;;
+    *:z/VM:*:*)
+	GUESS=s390-ibm-zvmoe
+	;;
+    *:OS400:*:*)
+	GUESS=powerpc-ibm-os400
+	;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	GUESS=arm-acorn-riscix$UNAME_RELEASE
+	;;
+    arm*:riscos:*:*|arm*:RISCOS:*:*)
+	GUESS=arm-unknown-riscos
+	;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	GUESS=hppa1.1-hitachi-hiuxmpp
+	;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	case `(/bin/universe) 2>/dev/null` in
+	    att) GUESS=pyramid-pyramid-sysv3 ;;
+	    *)   GUESS=pyramid-pyramid-bsd   ;;
+	esac
+	;;
+    NILE*:*:*:dcosx)
+	GUESS=pyramid-pyramid-svr4
+	;;
+    DRS?6000:unix:4.0:6*)
+	GUESS=sparc-icl-nx6
+	;;
+    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) GUESS=sparc-icl-nx7 ;;
+	esac
+	;;
+    s390x:SunOS:*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL
+	;;
+    sun4H:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-hal-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris2$SUN_REL
+	;;
+    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+	GUESS=i386-pc-auroraux$UNAME_RELEASE
+	;;
+    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+	set_cc_for_build
+	SUN_ARCH=i386
+	# If there is a compiler, see if it is configured for 64-bit objects.
+	# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+	# This test works for both compilers.
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -m64 -E - 2>/dev/null) | \
+		grep IS_64BIT_ARCH >/dev/null
+	    then
+		SUN_ARCH=x86_64
+	    fi
+	fi
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=$SUN_ARCH-pc-solaris2$SUN_REL
+	;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=sparc-sun-solaris3$SUN_REL
+	;;
+    sun4*:SunOS:*:*)
+	case `/usr/bin/arch -k` in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/'`
+	GUESS=sparc-sun-sunos$SUN_REL
+	;;
+    sun3*:SunOS:*:*)
+	GUESS=m68k-sun-sunos$UNAME_RELEASE
+	;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
+	case `/bin/arch` in
+	    sun3)
+		GUESS=m68k-sun-sunos$UNAME_RELEASE
+		;;
+	    sun4)
+		GUESS=sparc-sun-sunos$UNAME_RELEASE
+		;;
+	esac
+	;;
+    aushp:SunOS:*:*)
+	GUESS=sparc-auspex-sunos$UNAME_RELEASE
+	;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+	GUESS=m68k-atari-mint$UNAME_RELEASE
+	;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+	GUESS=m68k-milan-mint$UNAME_RELEASE
+	;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+	GUESS=m68k-hades-mint$UNAME_RELEASE
+	;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+	GUESS=m68k-unknown-mint$UNAME_RELEASE
+	;;
+    m68k:machten:*:*)
+	GUESS=m68k-apple-machten$UNAME_RELEASE
+	;;
+    powerpc:machten:*:*)
+	GUESS=powerpc-apple-machten$UNAME_RELEASE
+	;;
+    RISC*:Mach:*:*)
+	GUESS=mips-dec-mach_bsd4.3
+	;;
+    RISC*:ULTRIX:*:*)
+	GUESS=mips-dec-ultrix$UNAME_RELEASE
+	;;
+    VAX*:ULTRIX*:*:*)
+	GUESS=vax-dec-ultrix$UNAME_RELEASE
+	;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	GUESS=clipper-intergraph-clix$UNAME_RELEASE
+	;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
+	  dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+	  SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
+	    { echo "$SYSTEM_NAME"; exit; }
+	GUESS=mips-mips-riscos$UNAME_RELEASE
+	;;
+    Motorola:PowerMAX_OS:*:*)
+	GUESS=powerpc-motorola-powermax
+	;;
+    Motorola:*:4.3:PL8-*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	GUESS=powerpc-harris-powermax
+	;;
+    Night_Hawk:Power_UNIX:*:*)
+	GUESS=powerpc-harris-powerunix
+	;;
+    m88k:CX/UX:7*:*)
+	GUESS=m88k-harris-cxux7
+	;;
+    m88k:*:4*:R4*)
+	GUESS=m88k-motorola-sysv4
+	;;
+    m88k:*:3*:R3*)
+	GUESS=m88k-motorola-sysv3
+	;;
+    AViiON:dgux:*:*)
+	# DG/UX returns AViiON for all architectures
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if test "$UNAME_PROCESSOR" = mc88100 || test "$UNAME_PROCESSOR" = mc88110
+	then
+	    if test "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx || \
+	       test "$TARGET_BINARY_INTERFACE"x = x
+	    then
+		GUESS=m88k-dg-dgux$UNAME_RELEASE
+	    else
+		GUESS=m88k-dg-dguxbcs$UNAME_RELEASE
+	    fi
+	else
+	    GUESS=i586-dg-dgux$UNAME_RELEASE
+	fi
+	;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	GUESS=m88k-dolphin-sysv3
+	;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	GUESS=m88k-motorola-sysv3
+	;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	GUESS=m88k-tektronix-sysv3
+	;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	GUESS=m68k-tektronix-bsd
+	;;
+    *:IRIX*:*:*)
+	IRIX_REL=`echo "$UNAME_RELEASE" | sed -e 's/-/_/g'`
+	GUESS=mips-sgi-irix$IRIX_REL
+	;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	GUESS=romp-ibm-aix    # uname -m gives an 8 hex-code CPU id
+	;;                    # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	GUESS=i386-ibm-aix
+	;;
+    ia64:AIX:*:*)
+	if test -x /usr/bin/oslevel ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV
+	;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		set_cc_for_build
+		sed 's/^		//' << EOF > "$dummy.c"
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
+		then
+			GUESS=$SYSTEM_NAME
+		else
+			GUESS=rs6000-ibm-aix3.2.5
+		fi
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		GUESS=rs6000-ibm-aix3.2.4
+	else
+		GUESS=rs6000-ibm-aix3.2
+	fi
+	;;
+    *:AIX:*:[4567])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if test -x /usr/bin/lslpp ; then
+		IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | \
+			   awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
+	else
+		IBM_REV=$UNAME_VERSION.$UNAME_RELEASE
+	fi
+	GUESS=$IBM_ARCH-ibm-aix$IBM_REV
+	;;
+    *:AIX:*:*)
+	GUESS=rs6000-ibm-aix
+	;;
+    ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
+	GUESS=romp-ibm-bsd4.4
+	;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	GUESS=romp-ibm-bsd$UNAME_RELEASE    # 4.3 with uname added to
+	;;                                  # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	GUESS=rs6000-bull-bosx
+	;;
+    DPX/2?00:B.O.S.:*:*)
+	GUESS=m68k-bull-sysv3
+	;;
+    9000/[34]??:4.3bsd:1.*:*)
+	GUESS=m68k-hp-bsd
+	;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	GUESS=m68k-hp-bsd4.4
+	;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	case $UNAME_MACHINE in
+	    9000/31?)            HP_ARCH=m68000 ;;
+	    9000/[34]??)         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if test -x /usr/bin/getconf; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+		    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+		    case $sc_cpu_version in
+		      523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
+		      528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
+		      532)                      # CPU_PA_RISC2_0
+			case $sc_kernel_bits in
+			  32) HP_ARCH=hppa2.0n ;;
+			  64) HP_ARCH=hppa2.0w ;;
+			  '') HP_ARCH=hppa2.0 ;;   # HP-UX 10.20
+			esac ;;
+		    esac
+		fi
+		if test "$HP_ARCH" = ""; then
+		    set_cc_for_build
+		    sed 's/^		//' << EOF > "$dummy.c"
+
+		#define _HPUX_SOURCE
+		#include <stdlib.h>
+		#include <unistd.h>
+
+		int main ()
+		{
+		#if defined(_SC_KERNEL_BITS)
+		    long bits = sysconf(_SC_KERNEL_BITS);
+		#endif
+		    long cpu  = sysconf (_SC_CPU_VERSION);
+
+		    switch (cpu)
+			{
+			case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+			case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+			case CPU_PA_RISC2_0:
+		#if defined(_SC_KERNEL_BITS)
+			    switch (bits)
+				{
+				case 64: puts ("hppa2.0w"); break;
+				case 32: puts ("hppa2.0n"); break;
+				default: puts ("hppa2.0"); break;
+				} break;
+		#else  /* !defined(_SC_KERNEL_BITS) */
+			    puts ("hppa2.0"); break;
+		#endif
+			default: puts ("hppa1.0"); break;
+			}
+		    exit (0);
+		}
+EOF
+		    (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if test "$HP_ARCH" = hppa2.0w
+	then
+	    set_cc_for_build
+
+	    # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+	    # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
+	    # generating 64-bit code.  GNU and HP use different nomenclature:
+	    #
+	    # $ CC_FOR_BUILD=cc ./config.guess
+	    # => hppa2.0w-hp-hpux11.23
+	    # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+	    # => hppa64-hp-hpux11.23
+
+	    if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
+		grep -q __LP64__
+	    then
+		HP_ARCH=hppa2.0w
+	    else
+		HP_ARCH=hppa64
+	    fi
+	fi
+	GUESS=$HP_ARCH-hp-hpux$HPUX_REV
+	;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*.[0B]*//'`
+	GUESS=ia64-hp-hpux$HPUX_REV
+	;;
+    3050*:HI-UX:*:*)
+	set_cc_for_build
+	sed 's/^	//' << EOF > "$dummy.c"
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
+		{ echo "$SYSTEM_NAME"; exit; }
+	GUESS=unknown-hitachi-hiuxwe2
+	;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
+	GUESS=hppa1.1-hp-bsd
+	;;
+    9000/8??:4.3bsd:*:*)
+	GUESS=hppa1.0-hp-bsd
+	;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	GUESS=hppa1.0-hp-mpeix
+	;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
+	GUESS=hppa1.1-hp-osf
+	;;
+    hp8??:OSF1:*:*)
+	GUESS=hppa1.0-hp-osf
+	;;
+    i*86:OSF1:*:*)
+	if test -x /usr/sbin/sysversion ; then
+	    GUESS=$UNAME_MACHINE-unknown-osf1mk
+	else
+	    GUESS=$UNAME_MACHINE-unknown-osf1
+	fi
+	;;
+    parisc*:Lites*:*:*)
+	GUESS=hppa1.1-hp-lites
+	;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	GUESS=c1-convex-bsd
+	;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	GUESS=c34-convex-bsd
+	;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	GUESS=c38-convex-bsd
+	;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	GUESS=c4-convex-bsd
+	;;
+    CRAY*Y-MP:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=ymp-cray-unicos$CRAY_REL
+	;;
+    CRAY*[A-Z]90:*:*:*)
+	echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit ;;
+    CRAY*TS:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=t90-cray-unicos$CRAY_REL
+	;;
+    CRAY*T3E:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=alphaev5-cray-unicosmk$CRAY_REL
+	;;
+    CRAY*SV1:*:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=sv1-cray-unicos$CRAY_REL
+	;;
+    *:UNICOS/mp:*:*)
+	CRAY_REL=`echo "$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'`
+	GUESS=craynv-cray-unicosmp$CRAY_REL
+	;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
+	GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    5000:UNIX_System_V:4.*:*)
+	FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
+	FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
+	GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}
+	;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE
+	;;
+    sparc*:BSD/OS:*:*)
+	GUESS=sparc-unknown-bsdi$UNAME_RELEASE
+	;;
+    *:BSD/OS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE
+	;;
+    arm:FreeBSD:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	set_cc_for_build
+	if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_PCS_VFP
+	then
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi
+	else
+	    FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	    GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf
+	fi
+	;;
+    *:FreeBSD:*:*)
+	UNAME_PROCESSOR=`/usr/bin/uname -p`
+	case $UNAME_PROCESSOR in
+	    amd64)
+		UNAME_PROCESSOR=x86_64 ;;
+	    i386)
+		UNAME_PROCESSOR=i586 ;;
+	esac
+	FREEBSD_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL
+	;;
+    i*:CYGWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-cygwin
+	;;
+    *:MINGW64*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw64
+	;;
+    *:MINGW*:*)
+	GUESS=$UNAME_MACHINE-pc-mingw32
+	;;
+    *:MSYS*:*)
+	GUESS=$UNAME_MACHINE-pc-msys
+	;;
+    i*:PW*:*)
+	GUESS=$UNAME_MACHINE-pc-pw32
+	;;
+    *:SerenityOS:*:*)
+        GUESS=$UNAME_MACHINE-pc-serenity
+        ;;
+    *:Interix*:*)
+	case $UNAME_MACHINE in
+	    x86)
+		GUESS=i586-pc-interix$UNAME_RELEASE
+		;;
+	    authenticamd | genuineintel | EM64T)
+		GUESS=x86_64-unknown-interix$UNAME_RELEASE
+		;;
+	    IA64)
+		GUESS=ia64-unknown-interix$UNAME_RELEASE
+		;;
+	esac ;;
+    i*:UWIN*:*)
+	GUESS=$UNAME_MACHINE-pc-uwin
+	;;
+    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+	GUESS=x86_64-pc-cygwin
+	;;
+    prep*:SunOS:5.*:*)
+	SUN_REL=`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`
+	GUESS=powerpcle-unknown-solaris2$SUN_REL
+	;;
+    *:GNU:*:*)
+	# the GNU system
+	GNU_ARCH=`echo "$UNAME_MACHINE" | sed -e 's,[-/].*$,,'`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's,/.*$,,'`
+	GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL
+	;;
+    *:GNU/*:*:*)
+	# other systems with GNU libc and userland
+	GNU_SYS=`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"`
+	GNU_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC
+	;;
+    *:Minix:*:*)
+	GUESS=$UNAME_MACHINE-unknown-minix
+	;;
+    aarch64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    aarch64_be:Linux:*:*)
+	UNAME_MACHINE=aarch64_be
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+	esac
+	objdump --private-headers /bin/sh | grep -q ld.so.1
+	if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arc:Linux:*:* | arceb:Linux:*:* | arc32:Linux:*:* | arc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    arm*:Linux:*:*)
+	set_cc_for_build
+	if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+	    | grep -q __ARM_EABI__
+	then
+	    GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	else
+	    if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+		| grep -q __ARM_PCS_VFP
+	    then
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi
+	    else
+		GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf
+	    fi
+	fi
+	;;
+    avr32*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    cris:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    crisv32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-axis-linux-$LIBC
+	;;
+    e2k:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    frv:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    hexagon:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:Linux:*:*)
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBC
+	;;
+    ia64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    k1om:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    loongarch32:Linux:*:* | loongarch64:Linux:*:* | loongarchx32:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m32r*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    m68*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    mips:Linux:*:* | mips64:Linux:*:*)
+	set_cc_for_build
+	IS_GLIBC=0
+	test x"${LIBC}" = xgnu && IS_GLIBC=1
+	sed 's/^	//' << EOF > "$dummy.c"
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#undef mips64
+	#undef mips64el
+	#if ${IS_GLIBC} && defined(_ABI64)
+	LIBCABI=gnuabi64
+	#else
+	#if ${IS_GLIBC} && defined(_ABIN32)
+	LIBCABI=gnuabin32
+	#else
+	LIBCABI=${LIBC}
+	#endif
+	#endif
+
+	#if ${IS_GLIBC} && defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa64r6
+	#else
+	#if ${IS_GLIBC} && !defined(__mips64) && defined(__mips_isa_rev) && __mips_isa_rev>=6
+	CPU=mipsisa32r6
+	#else
+	#if defined(__mips64)
+	CPU=mips64
+	#else
+	CPU=mips
+	#endif
+	#endif
+	#endif
+
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	MIPS_ENDIAN=el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	MIPS_ENDIAN=
+	#else
+	MIPS_ENDIAN=
+	#endif
+	#endif
+EOF
+	cc_set_vars=`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU\|^MIPS_ENDIAN\|^LIBCABI'`
+	eval "$cc_set_vars"
+	test "x$CPU" != x && { echo "$CPU${MIPS_ENDIAN}-unknown-linux-$LIBCABI"; exit; }
+	;;
+    mips64el:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    openrisc*:Linux:*:*)
+	GUESS=or1k-unknown-linux-$LIBC
+	;;
+    or32:Linux:*:* | or1k*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    padre:Linux:*:*)
+	GUESS=sparc-unknown-linux-$LIBC
+	;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	GUESS=hppa64-unknown-linux-$LIBC
+	;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) GUESS=hppa1.1-unknown-linux-$LIBC ;;
+	  PA8*) GUESS=hppa2.0-unknown-linux-$LIBC ;;
+	  *)    GUESS=hppa-unknown-linux-$LIBC ;;
+	esac
+	;;
+    ppc64:Linux:*:*)
+	GUESS=powerpc64-unknown-linux-$LIBC
+	;;
+    ppc:Linux:*:*)
+	GUESS=powerpc-unknown-linux-$LIBC
+	;;
+    ppc64le:Linux:*:*)
+	GUESS=powerpc64le-unknown-linux-$LIBC
+	;;
+    ppcle:Linux:*:*)
+	GUESS=powerpcle-unknown-linux-$LIBC
+	;;
+    riscv64gc:Linux:*:*)
+	GUESS=riscv64-unknown-linux-$LIBC
+	;;
+    riscv32:Linux:*:* | riscv32be:Linux:*:* | riscv64:Linux:*:* | riscv64be:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	GUESS=$UNAME_MACHINE-ibm-linux-$LIBC
+	;;
+    sh64*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sh*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    tile*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    vax:Linux:*:*)
+	GUESS=$UNAME_MACHINE-dec-linux-$LIBC
+	;;
+    x86_64:Linux:*:*)
+	set_cc_for_build
+	LIBCABI=$LIBC
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __ILP32__'; echo IS_X32; echo '#endif') | \
+		(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		grep IS_X32 >/dev/null
+	    then
+		LIBCABI=${LIBC}x32
+	    fi
+	fi
+	GUESS=$UNAME_MACHINE-pc-linux-$LIBCABI
+	;;
+    xtensa*:Linux:*:*)
+	GUESS=$UNAME_MACHINE-unknown-linux-$LIBC
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	GUESS=i386-sequent-sysv4
+	;;
+    i*86:UNIX_SV:4.2MP:2.*)
+	# Unixware is an offshoot of SVR4, but it has its own version
+	# number series starting with 2...
+	# I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+	# Use sysv4.2uw... so that sysv4* matches it.
+	GUESS=$UNAME_MACHINE-pc-sysv4.2uw$UNAME_VERSION
+	;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	GUESS=$UNAME_MACHINE-pc-os2-emx
+	;;
+    i*86:XTS-300:*:STOP)
+	GUESS=$UNAME_MACHINE-unknown-stop
+	;;
+    i*86:atheos:*:*)
+	GUESS=$UNAME_MACHINE-unknown-atheos
+	;;
+    i*86:syllable:*:*)
+	GUESS=$UNAME_MACHINE-pc-syllable
+	;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
+	GUESS=i386-unknown-lynxos$UNAME_RELEASE
+	;;
+    i*86:*DOS:*:*)
+	GUESS=$UNAME_MACHINE-pc-msdosdjgpp
+	;;
+    i*86:*:4.*:*)
+	UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		GUESS=$UNAME_MACHINE-univel-sysv$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv$UNAME_REL
+	fi
+	;;
+    i*86:*:5:[678]*)
+	# UnixWare 7.x, OpenUNIX and OpenServer 6.
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	GUESS=$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		GUESS=$UNAME_MACHINE-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		GUESS=$UNAME_MACHINE-pc-sco$UNAME_REL
+	else
+		GUESS=$UNAME_MACHINE-pc-sysv32
+	fi
+	;;
+    pc:*:*:*)
+	# Left here for compatibility:
+	# uname -m prints for DJGPP always 'pc', but it prints nothing about
+	# the processor, so we play safe by assuming i586.
+	# Note: whatever this is, it MUST be the same as what config.sub
+	# prints for the "djgpp" host, or else GDB configure will decide that
+	# this is a cross-build.
+	GUESS=i586-pc-msdosdjgpp
+	;;
+    Intel:Mach:3*:*)
+	GUESS=i386-pc-mach3
+	;;
+    paragon:*:*:*)
+	GUESS=i860-intel-osf1
+	;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  GUESS=i860-stardent-sysv$UNAME_RELEASE    # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  GUESS=i860-unknown-sysv$UNAME_RELEASE     # Unknown i860-SVR4
+	fi
+	;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	GUESS=m68010-convergent-sysv
+	;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	GUESS=m68k-convergent-sysv
+	;;
+    M680?0:D-NIX:5.3:*)
+	GUESS=m68k-diab-dnix
+	;;
+    M68*:*:R3V[5678]*:*)
+	test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+	OS_REL='.3'
+	test -r /etc/.relid \
+	    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	    && { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
+	/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+	    && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	GUESS=m68k-unknown-lynxos$UNAME_RELEASE
+	;;
+    mc68030:UNIX_System_V:4.*:*)
+	GUESS=m68k-atari-sysv4
+	;;
+    TSUNAMI:LynxOS:2.*:*)
+	GUESS=sparc-unknown-lynxos$UNAME_RELEASE
+	;;
+    rs6000:LynxOS:2.*:*)
+	GUESS=rs6000-unknown-lynxos$UNAME_RELEASE
+	;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
+	GUESS=powerpc-unknown-lynxos$UNAME_RELEASE
+	;;
+    SM[BE]S:UNIX_SV:*:*)
+	GUESS=mips-dde-sysv$UNAME_RELEASE
+	;;
+    RM*:ReliantUNIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    RM*:SINIX-*:*:*)
+	GUESS=mips-sni-sysv4
+	;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		GUESS=$UNAME_MACHINE-sni-sysv4
+	else
+		GUESS=ns32k-sni-sysv
+	fi
+	;;
+    PENTIUM:*:4.0*:*)	# Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+			# says <Richard.M.Bartel@ccMail.Census.GOV>
+	GUESS=i586-unisys-sysv4
+	;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes@openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	GUESS=hppa1.1-stratus-sysv4
+	;;
+    *:*:*:FTX*)
+	# From seanf@swdc.stratus.com.
+	GUESS=i860-stratus-sysv4
+	;;
+    i*86:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=$UNAME_MACHINE-stratus-vos
+	;;
+    *:VOS:*:*)
+	# From Paul.Green@stratus.com.
+	GUESS=hppa1.1-stratus-vos
+	;;
+    mc68*:A/UX:*:*)
+	GUESS=m68k-apple-aux$UNAME_RELEASE
+	;;
+    news*:NEWS-OS:6*:*)
+	GUESS=mips-sony-newsos6
+	;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if test -d /usr/nec; then
+		GUESS=mips-nec-sysv$UNAME_RELEASE
+	else
+		GUESS=mips-unknown-sysv$UNAME_RELEASE
+	fi
+	;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	GUESS=powerpc-be-beos
+	;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	GUESS=powerpc-apple-beos
+	;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	GUESS=i586-pc-beos
+	;;
+    BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
+	GUESS=i586-pc-haiku
+	;;
+    x86_64:Haiku:*:*)
+	GUESS=x86_64-unknown-haiku
+	;;
+    SX-4:SUPER-UX:*:*)
+	GUESS=sx4-nec-superux$UNAME_RELEASE
+	;;
+    SX-5:SUPER-UX:*:*)
+	GUESS=sx5-nec-superux$UNAME_RELEASE
+	;;
+    SX-6:SUPER-UX:*:*)
+	GUESS=sx6-nec-superux$UNAME_RELEASE
+	;;
+    SX-7:SUPER-UX:*:*)
+	GUESS=sx7-nec-superux$UNAME_RELEASE
+	;;
+    SX-8:SUPER-UX:*:*)
+	GUESS=sx8-nec-superux$UNAME_RELEASE
+	;;
+    SX-8R:SUPER-UX:*:*)
+	GUESS=sx8r-nec-superux$UNAME_RELEASE
+	;;
+    SX-ACE:SUPER-UX:*:*)
+	GUESS=sxace-nec-superux$UNAME_RELEASE
+	;;
+    Power*:Rhapsody:*:*)
+	GUESS=powerpc-apple-rhapsody$UNAME_RELEASE
+	;;
+    *:Rhapsody:*:*)
+	GUESS=$UNAME_MACHINE-apple-rhapsody$UNAME_RELEASE
+	;;
+    arm64:Darwin:*:*)
+	GUESS=aarch64-apple-darwin$UNAME_RELEASE
+	;;
+    *:Darwin:*:*)
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
+	fi
+	if test "$CC_FOR_BUILD" != no_compiler_found; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
+	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
+	elif test "$UNAME_PROCESSOR" = i386 ; then
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
+	fi
+	GUESS=$UNAME_PROCESSOR-apple-darwin$UNAME_RELEASE
+	;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = x86; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	GUESS=$UNAME_PROCESSOR-$UNAME_MACHINE-nto-qnx$UNAME_RELEASE
+	;;
+    *:QNX:*:4*)
+	GUESS=i386-pc-qnx
+	;;
+    NEO-*:NONSTOP_KERNEL:*:*)
+	GUESS=neo-tandem-nsk$UNAME_RELEASE
+	;;
+    NSE-*:NONSTOP_KERNEL:*:*)
+	GUESS=nse-tandem-nsk$UNAME_RELEASE
+	;;
+    NSR-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsr-tandem-nsk$UNAME_RELEASE
+	;;
+    NSV-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsv-tandem-nsk$UNAME_RELEASE
+	;;
+    NSX-*:NONSTOP_KERNEL:*:*)
+	GUESS=nsx-tandem-nsk$UNAME_RELEASE
+	;;
+    *:NonStop-UX:*:*)
+	GUESS=mips-compaq-nonstopux
+	;;
+    BS2000:POSIX*:*:*)
+	GUESS=bs2000-siemens-sysv
+	;;
+    DS/*:UNIX_System_V:*:*)
+	GUESS=$UNAME_MACHINE-$UNAME_SYSTEM-$UNAME_RELEASE
+	;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "${cputype-}" = 386; then
+	    UNAME_MACHINE=i386
+	elif test "x${cputype-}" != x; then
+	    UNAME_MACHINE=$cputype
+	fi
+	GUESS=$UNAME_MACHINE-unknown-plan9
+	;;
+    *:TOPS-10:*:*)
+	GUESS=pdp10-unknown-tops10
+	;;
+    *:TENEX:*:*)
+	GUESS=pdp10-unknown-tenex
+	;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	GUESS=pdp10-dec-tops20
+	;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	GUESS=pdp10-xkl-tops20
+	;;
+    *:TOPS-20:*:*)
+	GUESS=pdp10-unknown-tops20
+	;;
+    *:ITS:*:*)
+	GUESS=pdp10-unknown-its
+	;;
+    SEI:*:*:SEIUX)
+	GUESS=mips-sei-seiux$UNAME_RELEASE
+	;;
+    *:DragonFly:*:*)
+	DRAGONFLY_REL=`echo "$UNAME_RELEASE" | sed -e 's/[-(].*//'`
+	GUESS=$UNAME_MACHINE-unknown-dragonfly$DRAGONFLY_REL
+	;;
+    *:*VMS:*:*)
+	UNAME_MACHINE=`(uname -p) 2>/dev/null`
+	case $UNAME_MACHINE in
+	    A*) GUESS=alpha-dec-vms ;;
+	    I*) GUESS=ia64-dec-vms ;;
+	    V*) GUESS=vax-dec-vms ;;
+	esac ;;
+    *:XENIX:*:SysV)
+	GUESS=i386-pc-xenix
+	;;
+    i*86:skyos:*:*)
+	SKYOS_REL=`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`
+	GUESS=$UNAME_MACHINE-pc-skyos$SKYOS_REL
+	;;
+    i*86:rdos:*:*)
+	GUESS=$UNAME_MACHINE-pc-rdos
+	;;
+    i*86:Fiwix:*:*)
+	GUESS=$UNAME_MACHINE-pc-fiwix
+	;;
+    *:AROS:*:*)
+	GUESS=$UNAME_MACHINE-unknown-aros
+	;;
+    x86_64:VMkernel:*:*)
+	GUESS=$UNAME_MACHINE-unknown-esx
+	;;
+    amd64:Isilon\ OneFS:*:*)
+	GUESS=x86_64-unknown-onefs
+	;;
+    *:Unleashed:*:*)
+	GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE
+	;;
+esac
+
+# Do we have a guess based on uname results?
+if test "x$GUESS" != x; then
+    echo "$GUESS"
+    exit
+fi
+
+# No uname command or uname output not recognized.
+set_cc_for_build
+cat > "$dummy.c" <<EOF
+#ifdef _SEQUENT_
+#include <sys/types.h>
+#include <sys/utsname.h>
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+  "4"
+#else
+  ""
+#endif
+  ); exit (0);
+#endif
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+  struct utsname un;
+
+  uname(&un);
+  if (strncmp(un.version, "V2", 2) == 0) {
+    printf ("i386-sequent-ptx2\n"); exit (0);
+  }
+  if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+    printf ("i386-sequent-ptx1\n"); exit (0);
+  }
+  printf ("i386-sequent-ptx\n"); exit (0);
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+#include <sys/param.h>
+#if defined (BSD)
+#if BSD == 43
+  printf ("vax-dec-bsd4.3\n"); exit (0);
+#else
+#if BSD == 199006
+  printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#endif
+#else
+  printf ("vax-dec-bsd\n"); exit (0);
+#endif
+#else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
+#else
+  printf ("mips-dec-ultrix\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null && SYSTEM_NAME=`"$dummy"` &&
+	{ echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+test -d /usr/apollo && { echo "$ISP-apollo-$SYSTYPE"; exit; }
+
+echo "$0: unable to guess system type" >&2
+
+case $UNAME_MACHINE:$UNAME_SYSTEM in
+    mips:Linux | mips64:Linux)
+	# If we got here on MIPS GNU/Linux, output extra information.
+	cat >&2 <<EOF
+
+NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
+the system type. Please install a C compiler and try again.
+EOF
+	;;
+esac
+
+cat >&2 <<EOF
+
+This script (version $timestamp), has failed to recognize the
+operating system you are using. If your script is old, overwrite *all*
+copies of config.guess and config.sub with the latest versions from:
+
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.guess
+and
+  https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+EOF
+
+our_year=`echo $timestamp | sed 's,-.*,,'`
+thisyear=`date +%Y`
+# shellcheck disable=SC2003
+script_age=`expr "$thisyear" - "$our_year"`
+if test "$script_age" -lt 3 ; then
+   cat >&2 <<EOF
+
+If $0 has already been updated, send the following data and any
+information you think might be pertinent to config-patches@gnu.org to
+provide the necessary information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = "$UNAME_MACHINE"
+UNAME_RELEASE = "$UNAME_RELEASE"
+UNAME_SYSTEM  = "$UNAME_SYSTEM"
+UNAME_VERSION = "$UNAME_VERSION"
+EOF
+fi
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.guess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.sub
===================================================================
--- mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.sub	(nonexistent)
+++ mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.sub	(revision 385)
@@ -0,0 +1,1893 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright 1992-2022 Free Software Foundation, Inc.
+
+# shellcheck disable=SC2006,SC2268 # see below for rationale
+
+timestamp='2022-01-03'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, see <https://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that
+# program.  This Exception is an additional permission under section 7
+# of the GNU General Public License, version 3 ("GPLv3").
+
+
+# Please send patches to <config-patches@gnu.org>.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# You can get the latest version of this script from:
+# https://git.savannah.gnu.org/cgit/config.git/plain/config.sub
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+# The "shellcheck disable" line above the timestamp inhibits complaints
+# about features and limitations of the classic Bourne shell that were
+# superseded or lifted in POSIX.  However, this script identifies a wide
+# variety of pre-POSIX systems that do not have POSIX shells at all, and
+# even some reasonably current systems (Solaris 10 as case-in-point) still
+# have a pre-POSIX /bin/sh.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
+
+Canonicalize a configuration name.
+
+Options:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright 1992-2022 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions.  There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit ;;
+    --version | -v )
+       echo "$version" ; exit ;;
+    --help | --h* | -h )
+       echo "$usage"; exit ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo "$1"
+       exit ;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Split fields of configuration type
+# shellcheck disable=SC2162
+saved_IFS=$IFS
+IFS="-" read field1 field2 field3 field4 <<EOF
+$1
+EOF
+IFS=$saved_IFS
+
+# Separate into logical components for further validation
+case $1 in
+	*-*-*-*-*)
+		echo Invalid configuration \`"$1"\': more than four components >&2
+		exit 1
+		;;
+	*-*-*-*)
+		basic_machine=$field1-$field2
+		basic_os=$field3-$field4
+		;;
+	*-*-*)
+		# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
+		# parts
+		maybe_os=$field2-$field3
+		case $maybe_os in
+			nto-qnx* | linux-* | uclinux-uclibc* \
+			| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
+			| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
+			| storm-chaos* | os2-emx* | rtmk-nova*)
+				basic_machine=$field1
+				basic_os=$maybe_os
+				;;
+			android-linux)
+				basic_machine=$field1-unknown
+				basic_os=linux-android
+				;;
+			*)
+				basic_machine=$field1-$field2
+				basic_os=$field3
+				;;
+		esac
+		;;
+	*-*)
+		# A lone config we happen to match not fitting any pattern
+		case $field1-$field2 in
+			decstation-3100)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			*-*)
+				# Second component is usually, but not always the OS
+				case $field2 in
+					# Prevent following clause from handling this valid os
+					sun*os*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+					zephyr*)
+						basic_machine=$field1-unknown
+						basic_os=$field2
+						;;
+					# Manufacturers
+					dec* | mips* | sequent* | encore* | pc533* | sgi* | sony* \
+					| att* | 7300* | 3300* | delta* | motorola* | sun[234]* \
+					| unicom* | ibm* | next | hp | isi* | apollo | altos* \
+					| convergent* | ncr* | news | 32* | 3600* | 3100* \
+					| hitachi* | c[123]* | convex* | sun | crds | omron* | dg \
+					| ultra | tti* | harris | dolphin | highlevel | gould \
+					| cbm | ns | masscomp | apple | axis | knuth | cray \
+					| microblaze* | sim | cisco \
+					| oki | wec | wrs | winbond)
+						basic_machine=$field1-$field2
+						basic_os=
+						;;
+					*)
+						basic_machine=$field1
+						basic_os=$field2
+						;;
+				esac
+			;;
+		esac
+		;;
+	*)
+		# Convert single-component short-hands not valid as part of
+		# multi-component configurations.
+		case $field1 in
+			386bsd)
+				basic_machine=i386-pc
+				basic_os=bsd
+				;;
+			a29khif)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			adobe68k)
+				basic_machine=m68010-adobe
+				basic_os=scout
+				;;
+			alliant)
+				basic_machine=fx80-alliant
+				basic_os=
+				;;
+			altos | altos3068)
+				basic_machine=m68k-altos
+				basic_os=
+				;;
+			am29k)
+				basic_machine=a29k-none
+				basic_os=bsd
+				;;
+			amdahl)
+				basic_machine=580-amdahl
+				basic_os=sysv
+				;;
+			amiga)
+				basic_machine=m68k-unknown
+				basic_os=
+				;;
+			amigaos | amigados)
+				basic_machine=m68k-unknown
+				basic_os=amigaos
+				;;
+			amigaunix | amix)
+				basic_machine=m68k-unknown
+				basic_os=sysv4
+				;;
+			apollo68)
+				basic_machine=m68k-apollo
+				basic_os=sysv
+				;;
+			apollo68bsd)
+				basic_machine=m68k-apollo
+				basic_os=bsd
+				;;
+			aros)
+				basic_machine=i386-pc
+				basic_os=aros
+				;;
+			aux)
+				basic_machine=m68k-apple
+				basic_os=aux
+				;;
+			balance)
+				basic_machine=ns32k-sequent
+				basic_os=dynix
+				;;
+			blackfin)
+				basic_machine=bfin-unknown
+				basic_os=linux
+				;;
+			cegcc)
+				basic_machine=arm-unknown
+				basic_os=cegcc
+				;;
+			convex-c1)
+				basic_machine=c1-convex
+				basic_os=bsd
+				;;
+			convex-c2)
+				basic_machine=c2-convex
+				basic_os=bsd
+				;;
+			convex-c32)
+				basic_machine=c32-convex
+				basic_os=bsd
+				;;
+			convex-c34)
+				basic_machine=c34-convex
+				basic_os=bsd
+				;;
+			convex-c38)
+				basic_machine=c38-convex
+				basic_os=bsd
+				;;
+			cray)
+				basic_machine=j90-cray
+				basic_os=unicos
+				;;
+			crds | unos)
+				basic_machine=m68k-crds
+				basic_os=
+				;;
+			da30)
+				basic_machine=m68k-da30
+				basic_os=
+				;;
+			decstation | pmax | pmin | dec3100 | decstatn)
+				basic_machine=mips-dec
+				basic_os=
+				;;
+			delta88)
+				basic_machine=m88k-motorola
+				basic_os=sysv3
+				;;
+			dicos)
+				basic_machine=i686-pc
+				basic_os=dicos
+				;;
+			djgpp)
+				basic_machine=i586-pc
+				basic_os=msdosdjgpp
+				;;
+			ebmon29k)
+				basic_machine=a29k-amd
+				basic_os=ebmon
+				;;
+			es1800 | OSE68k | ose68k | ose | OSE)
+				basic_machine=m68k-ericsson
+				basic_os=ose
+				;;
+			gmicro)
+				basic_machine=tron-gmicro
+				basic_os=sysv
+				;;
+			go32)
+				basic_machine=i386-pc
+				basic_os=go32
+				;;
+			h8300hms)
+				basic_machine=h8300-hitachi
+				basic_os=hms
+				;;
+			h8300xray)
+				basic_machine=h8300-hitachi
+				basic_os=xray
+				;;
+			h8500hms)
+				basic_machine=h8500-hitachi
+				basic_os=hms
+				;;
+			harris)
+				basic_machine=m88k-harris
+				basic_os=sysv3
+				;;
+			hp300 | hp300hpux)
+				basic_machine=m68k-hp
+				basic_os=hpux
+				;;
+			hp300bsd)
+				basic_machine=m68k-hp
+				basic_os=bsd
+				;;
+			hppaosf)
+				basic_machine=hppa1.1-hp
+				basic_os=osf
+				;;
+			hppro)
+				basic_machine=hppa1.1-hp
+				basic_os=proelf
+				;;
+			i386mach)
+				basic_machine=i386-mach
+				basic_os=mach
+				;;
+			isi68 | isi)
+				basic_machine=m68k-isi
+				basic_os=sysv
+				;;
+			m68knommu)
+				basic_machine=m68k-unknown
+				basic_os=linux
+				;;
+			magnum | m3230)
+				basic_machine=mips-mips
+				basic_os=sysv
+				;;
+			merlin)
+				basic_machine=ns32k-utek
+				basic_os=sysv
+				;;
+			mingw64)
+				basic_machine=x86_64-pc
+				basic_os=mingw64
+				;;
+			mingw32)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			mingw32ce)
+				basic_machine=arm-unknown
+				basic_os=mingw32ce
+				;;
+			monitor)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			morphos)
+				basic_machine=powerpc-unknown
+				basic_os=morphos
+				;;
+			moxiebox)
+				basic_machine=moxie-unknown
+				basic_os=moxiebox
+				;;
+			msdos)
+				basic_machine=i386-pc
+				basic_os=msdos
+				;;
+			msys)
+				basic_machine=i686-pc
+				basic_os=msys
+				;;
+			mvs)
+				basic_machine=i370-ibm
+				basic_os=mvs
+				;;
+			nacl)
+				basic_machine=le32-unknown
+				basic_os=nacl
+				;;
+			ncr3000)
+				basic_machine=i486-ncr
+				basic_os=sysv4
+				;;
+			netbsd386)
+				basic_machine=i386-pc
+				basic_os=netbsd
+				;;
+			netwinder)
+				basic_machine=armv4l-rebel
+				basic_os=linux
+				;;
+			news | news700 | news800 | news900)
+				basic_machine=m68k-sony
+				basic_os=newsos
+				;;
+			news1000)
+				basic_machine=m68030-sony
+				basic_os=newsos
+				;;
+			necv70)
+				basic_machine=v70-nec
+				basic_os=sysv
+				;;
+			nh3000)
+				basic_machine=m68k-harris
+				basic_os=cxux
+				;;
+			nh[45]000)
+				basic_machine=m88k-harris
+				basic_os=cxux
+				;;
+			nindy960)
+				basic_machine=i960-intel
+				basic_os=nindy
+				;;
+			mon960)
+				basic_machine=i960-intel
+				basic_os=mon960
+				;;
+			nonstopux)
+				basic_machine=mips-compaq
+				basic_os=nonstopux
+				;;
+			os400)
+				basic_machine=powerpc-ibm
+				basic_os=os400
+				;;
+			OSE68000 | ose68000)
+				basic_machine=m68000-ericsson
+				basic_os=ose
+				;;
+			os68k)
+				basic_machine=m68k-none
+				basic_os=os68k
+				;;
+			paragon)
+				basic_machine=i860-intel
+				basic_os=osf
+				;;
+			parisc)
+				basic_machine=hppa-unknown
+				basic_os=linux
+				;;
+			psp)
+				basic_machine=mipsallegrexel-sony
+				basic_os=psp
+				;;
+			pw32)
+				basic_machine=i586-unknown
+				basic_os=pw32
+				;;
+			rdos | rdos64)
+				basic_machine=x86_64-pc
+				basic_os=rdos
+				;;
+			rdos32)
+				basic_machine=i386-pc
+				basic_os=rdos
+				;;
+			rom68k)
+				basic_machine=m68k-rom68k
+				basic_os=coff
+				;;
+			sa29200)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			sei)
+				basic_machine=mips-sei
+				basic_os=seiux
+				;;
+			sequent)
+				basic_machine=i386-sequent
+				basic_os=
+				;;
+			sps7)
+				basic_machine=m68k-bull
+				basic_os=sysv2
+				;;
+			st2000)
+				basic_machine=m68k-tandem
+				basic_os=
+				;;
+			stratus)
+				basic_machine=i860-stratus
+				basic_os=sysv4
+				;;
+			sun2)
+				basic_machine=m68000-sun
+				basic_os=
+				;;
+			sun2os3)
+				basic_machine=m68000-sun
+				basic_os=sunos3
+				;;
+			sun2os4)
+				basic_machine=m68000-sun
+				basic_os=sunos4
+				;;
+			sun3)
+				basic_machine=m68k-sun
+				basic_os=
+				;;
+			sun3os3)
+				basic_machine=m68k-sun
+				basic_os=sunos3
+				;;
+			sun3os4)
+				basic_machine=m68k-sun
+				basic_os=sunos4
+				;;
+			sun4)
+				basic_machine=sparc-sun
+				basic_os=
+				;;
+			sun4os3)
+				basic_machine=sparc-sun
+				basic_os=sunos3
+				;;
+			sun4os4)
+				basic_machine=sparc-sun
+				basic_os=sunos4
+				;;
+			sun4sol2)
+				basic_machine=sparc-sun
+				basic_os=solaris2
+				;;
+			sun386 | sun386i | roadrunner)
+				basic_machine=i386-sun
+				basic_os=
+				;;
+			sv1)
+				basic_machine=sv1-cray
+				basic_os=unicos
+				;;
+			symmetry)
+				basic_machine=i386-sequent
+				basic_os=dynix
+				;;
+			t3e)
+				basic_machine=alphaev5-cray
+				basic_os=unicos
+				;;
+			t90)
+				basic_machine=t90-cray
+				basic_os=unicos
+				;;
+			toad1)
+				basic_machine=pdp10-xkl
+				basic_os=tops20
+				;;
+			tpf)
+				basic_machine=s390x-ibm
+				basic_os=tpf
+				;;
+			udi29k)
+				basic_machine=a29k-amd
+				basic_os=udi
+				;;
+			ultra3)
+				basic_machine=a29k-nyu
+				basic_os=sym1
+				;;
+			v810 | necv810)
+				basic_machine=v810-nec
+				basic_os=none
+				;;
+			vaxv)
+				basic_machine=vax-dec
+				basic_os=sysv
+				;;
+			vms)
+				basic_machine=vax-dec
+				basic_os=vms
+				;;
+			vsta)
+				basic_machine=i386-pc
+				basic_os=vsta
+				;;
+			vxworks960)
+				basic_machine=i960-wrs
+				basic_os=vxworks
+				;;
+			vxworks68)
+				basic_machine=m68k-wrs
+				basic_os=vxworks
+				;;
+			vxworks29k)
+				basic_machine=a29k-wrs
+				basic_os=vxworks
+				;;
+			xbox)
+				basic_machine=i686-pc
+				basic_os=mingw32
+				;;
+			ymp)
+				basic_machine=ymp-cray
+				basic_os=unicos
+				;;
+			*)
+				basic_machine=$1
+				basic_os=
+				;;
+		esac
+		;;
+esac
+
+# Decode 1-component or ad-hoc basic machines
+case $basic_machine in
+	# Here we handle the default manufacturer of certain CPU types.  It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		cpu=hppa1.1
+		vendor=winbond
+		;;
+	op50n)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	op60c)
+		cpu=hppa1.1
+		vendor=oki
+		;;
+	ibm*)
+		cpu=i370
+		vendor=ibm
+		;;
+	orion105)
+		cpu=clipper
+		vendor=highlevel
+		;;
+	mac | mpw | mac-mpw)
+		cpu=m68k
+		vendor=apple
+		;;
+	pmac | pmac-mpw)
+		cpu=powerpc
+		vendor=apple
+		;;
+
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		cpu=m68000
+		vendor=att
+		;;
+	3b*)
+		cpu=we32k
+		vendor=att
+		;;
+	bluegene*)
+		cpu=powerpc
+		vendor=ibm
+		basic_os=cnk
+		;;
+	decsystem10* | dec10*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops10
+		;;
+	decsystem20* | dec20*)
+		cpu=pdp10
+		vendor=dec
+		basic_os=tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		cpu=m68k
+		vendor=motorola
+		;;
+	dpx2*)
+		cpu=m68k
+		vendor=bull
+		basic_os=sysv3
+		;;
+	encore | umax | mmax)
+		cpu=ns32k
+		vendor=encore
+		;;
+	elxsi)
+		cpu=elxsi
+		vendor=elxsi
+		basic_os=${basic_os:-bsd}
+		;;
+	fx2800)
+		cpu=i860
+		vendor=alliant
+		;;
+	genix)
+		cpu=ns32k
+		vendor=ns
+		;;
+	h3050r* | hiux*)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		cpu=m68000
+		vendor=hp
+		;;
+	hp9k3[2-9][0-9])
+		cpu=m68k
+		vendor=hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		cpu=hppa1.1
+		vendor=hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		cpu=hppa1.0
+		vendor=hp
+		;;
+	i*86v32)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv32
+		;;
+	i*86v4*)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv4
+		;;
+	i*86v)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=sysv
+		;;
+	i*86sol2)
+		cpu=`echo "$1" | sed -e 's/86.*/86/'`
+		vendor=pc
+		basic_os=solaris2
+		;;
+	j90 | j90-cray)
+		cpu=j90
+		vendor=cray
+		basic_os=${basic_os:-unicos}
+		;;
+	iris | iris4d)
+		cpu=mips
+		vendor=sgi
+		case $basic_os in
+		    irix*)
+			;;
+		    *)
+			basic_os=irix4
+			;;
+		esac
+		;;
+	miniframe)
+		cpu=m68000
+		vendor=convergent
+		;;
+	*mint | mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		cpu=m68k
+		vendor=atari
+		basic_os=mint
+		;;
+	news-3600 | risc-news)
+		cpu=mips
+		vendor=sony
+		basic_os=newsos
+		;;
+	next | m*-next)
+		cpu=m68k
+		vendor=next
+		case $basic_os in
+		    openstep*)
+		        ;;
+		    nextstep*)
+			;;
+		    ns2*)
+		      basic_os=nextstep2
+			;;
+		    *)
+		      basic_os=nextstep3
+			;;
+		esac
+		;;
+	np1)
+		cpu=np1
+		vendor=gould
+		;;
+	op50n-* | op60c-*)
+		cpu=hppa1.1
+		vendor=oki
+		basic_os=proelf
+		;;
+	pa-hitachi)
+		cpu=hppa1.1
+		vendor=hitachi
+		basic_os=hiuxwe2
+		;;
+	pbd)
+		cpu=sparc
+		vendor=tti
+		;;
+	pbb)
+		cpu=m68k
+		vendor=tti
+		;;
+	pc532)
+		cpu=ns32k
+		vendor=pc532
+		;;
+	pn)
+		cpu=pn
+		vendor=gould
+		;;
+	power)
+		cpu=power
+		vendor=ibm
+		;;
+	ps2)
+		cpu=i386
+		vendor=ibm
+		;;
+	rm[46]00)
+		cpu=mips
+		vendor=siemens
+		;;
+	rtpc | rtpc-*)
+		cpu=romp
+		vendor=ibm
+		;;
+	sde)
+		cpu=mipsisa32
+		vendor=sde
+		basic_os=${basic_os:-elf}
+		;;
+	simso-wrs)
+		cpu=sparclite
+		vendor=wrs
+		basic_os=vxworks
+		;;
+	tower | tower-32)
+		cpu=m68k
+		vendor=ncr
+		;;
+	vpp*|vx|vx-*)
+		cpu=f301
+		vendor=fujitsu
+		;;
+	w65)
+		cpu=w65
+		vendor=wdc
+		;;
+	w89k-*)
+		cpu=hppa1.1
+		vendor=winbond
+		basic_os=proelf
+		;;
+	none)
+		cpu=none
+		vendor=none
+		;;
+	leon|leon[3-9])
+		cpu=sparc
+		vendor=$basic_machine
+		;;
+	leon-*|leon[3-9]-*)
+		cpu=sparc
+		vendor=`echo "$basic_machine" | sed 's/-.*//'`
+		;;
+
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read cpu vendor <<EOF
+$basic_machine
+EOF
+		IFS=$saved_IFS
+		;;
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+		cpu=$basic_machine
+		vendor=pc
+		;;
+	# These rules are duplicated from below for sake of the special case above;
+	# i.e. things that normalized to x86 arches should also default to "pc"
+	pc98)
+		cpu=i386
+		vendor=pc
+		;;
+	x64 | amd64)
+		cpu=x86_64
+		vendor=pc
+		;;
+	# Recognize the basic CPU types without company name.
+	*)
+		cpu=$basic_machine
+		vendor=unknown
+		;;
+esac
+
+unset -v basic_machine
+
+# Decode basic machines in the full and proper CPU-Company form.
+case $cpu-$vendor in
+	# Here we handle the default manufacturer of certain CPU types in canonical form. It is in
+	# some cases the only manufacturer, in others, it is the most popular.
+	craynv-unknown)
+		vendor=cray
+		basic_os=${basic_os:-unicosmp}
+		;;
+	c90-unknown | c90-cray)
+		vendor=cray
+		basic_os=${Basic_os:-unicos}
+		;;
+	fx80-unknown)
+		vendor=alliant
+		;;
+	romp-unknown)
+		vendor=ibm
+		;;
+	mmix-unknown)
+		vendor=knuth
+		;;
+	microblaze-unknown | microblazeel-unknown)
+		vendor=xilinx
+		;;
+	rs6000-unknown)
+		vendor=ibm
+		;;
+	vax-unknown)
+		vendor=dec
+		;;
+	pdp11-unknown)
+		vendor=dec
+		;;
+	we32k-unknown)
+		vendor=att
+		;;
+	cydra-unknown)
+		vendor=cydrome
+		;;
+	i370-ibm*)
+		vendor=ibm
+		;;
+	orion-unknown)
+		vendor=highlevel
+		;;
+	xps-unknown | xps100-unknown)
+		cpu=xps100
+		vendor=honeywell
+		;;
+
+	# Here we normalize CPU types with a missing or matching vendor
+	armh-unknown | armh-alt)
+		cpu=armv7l
+		vendor=alt
+		basic_os=${basic_os:-linux-gnueabihf}
+		;;
+	dpx20-unknown | dpx20-bull)
+		cpu=rs6000
+		vendor=bull
+		basic_os=${basic_os:-bosx}
+		;;
+
+	# Here we normalize CPU types irrespective of the vendor
+	amd64-*)
+		cpu=x86_64
+		;;
+	blackfin-*)
+		cpu=bfin
+		basic_os=linux
+		;;
+	c54x-*)
+		cpu=tic54x
+		;;
+	c55x-*)
+		cpu=tic55x
+		;;
+	c6x-*)
+		cpu=tic6x
+		;;
+	e500v[12]-*)
+		cpu=powerpc
+		basic_os=${basic_os}"spe"
+		;;
+	mips3*-*)
+		cpu=mips64
+		;;
+	ms1-*)
+		cpu=mt
+		;;
+	m68knommu-*)
+		cpu=m68k
+		basic_os=linux
+		;;
+	m9s12z-* | m68hcs12z-* | hcs12z-* | s12z-*)
+		cpu=s12z
+		;;
+	openrisc-*)
+		cpu=or32
+		;;
+	parisc-*)
+		cpu=hppa
+		basic_os=linux
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		cpu=i586
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+		cpu=i686
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		cpu=i686
+		;;
+	pentium4-*)
+		cpu=i786
+		;;
+	pc98-*)
+		cpu=i386
+		;;
+	ppc-* | ppcbe-*)
+		cpu=powerpc
+		;;
+	ppcle-* | powerpclittle-*)
+		cpu=powerpcle
+		;;
+	ppc64-*)
+		cpu=powerpc64
+		;;
+	ppc64le-* | powerpc64little-*)
+		cpu=powerpc64le
+		;;
+	riscv64gc-*)
+		cpu=riscv64
+		;;
+	sb1-*)
+		cpu=mipsisa64sb1
+		;;
+	sb1el-*)
+		cpu=mipsisa64sb1el
+		;;
+	sh5e[lb]-*)
+		cpu=`echo "$cpu" | sed 's/^\(sh.\)e\(.\)$/\1\2e/'`
+		;;
+	spur-*)
+		cpu=spur
+		;;
+	strongarm-* | thumb-*)
+		cpu=arm
+		;;
+	tx39-*)
+		cpu=mipstx39
+		;;
+	tx39el-*)
+		cpu=mipstx39el
+		;;
+	x64-*)
+		cpu=x86_64
+		;;
+	xscale-* | xscalee[bl]-*)
+		cpu=`echo "$cpu" | sed 's/^xscale/arm/'`
+		;;
+	arm64-* | aarch64le-*)
+		cpu=aarch64
+		;;
+
+	# Recognize the canonical CPU Types that limit and/or modify the
+	# company names they are paired with.
+	cr16-*)
+		basic_os=${basic_os:-elf}
+		;;
+	crisv32-* | etraxfs*-*)
+		cpu=crisv32
+		vendor=axis
+		;;
+	cris-* | etrax*-*)
+		cpu=cris
+		vendor=axis
+		;;
+	crx-*)
+		basic_os=${basic_os:-elf}
+		;;
+	neo-tandem)
+		cpu=neo
+		vendor=tandem
+		;;
+	nse-tandem)
+		cpu=nse
+		vendor=tandem
+		;;
+	nsr-tandem)
+		cpu=nsr
+		vendor=tandem
+		;;
+	nsv-tandem)
+		cpu=nsv
+		vendor=tandem
+		;;
+	nsx-tandem)
+		cpu=nsx
+		vendor=tandem
+		;;
+	mipsallegrexel-sony)
+		cpu=mipsallegrexel
+		vendor=sony
+		;;
+	tile*-*)
+		basic_os=${basic_os:-linux-gnu}
+		;;
+
+	*)
+		# Recognize the canonical CPU types that are allowed with any
+		# company name.
+		case $cpu in
+			1750a | 580 \
+			| a29k \
+			| aarch64 | aarch64_be \
+			| abacus \
+			| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] \
+			| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] \
+			| alphapca5[67] | alpha64pca5[67] \
+			| am33_2.0 \
+			| amdgcn \
+			| arc | arceb | arc32 | arc64 \
+			| arm | arm[lb]e | arme[lb] | armv* \
+			| avr | avr32 \
+			| asmjs \
+			| ba \
+			| be32 | be64 \
+			| bfin | bpf | bs2000 \
+			| c[123]* | c30 | [cjt]90 | c4x \
+			| c8051 | clipper | craynv | csky | cydra \
+			| d10v | d30v | dlx | dsp16xx \
+			| e2k | elxsi | epiphany \
+			| f30[01] | f700 | fido | fr30 | frv | ft32 | fx80 \
+			| h8300 | h8500 \
+			| hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+			| hexagon \
+			| i370 | i*86 | i860 | i960 | ia16 | ia64 \
+			| ip2k | iq2000 \
+			| k1om \
+			| le32 | le64 \
+			| lm32 \
+			| loongarch32 | loongarch64 | loongarchx32 \
+			| m32c | m32r | m32rle \
+			| m5200 | m68000 | m680[012346]0 | m68360 | m683?2 | m68k \
+			| m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x \
+			| m88110 | m88k | maxq | mb | mcore | mep | metag \
+			| microblaze | microblazeel \
+			| mips | mipsbe | mipseb | mipsel | mipsle \
+			| mips16 \
+			| mips64 | mips64eb | mips64el \
+			| mips64octeon | mips64octeonel \
+			| mips64orion | mips64orionel \
+			| mips64r5900 | mips64r5900el \
+			| mips64vr | mips64vrel \
+			| mips64vr4100 | mips64vr4100el \
+			| mips64vr4300 | mips64vr4300el \
+			| mips64vr5000 | mips64vr5000el \
+			| mips64vr5900 | mips64vr5900el \
+			| mipsisa32 | mipsisa32el \
+			| mipsisa32r2 | mipsisa32r2el \
+			| mipsisa32r3 | mipsisa32r3el \
+			| mipsisa32r5 | mipsisa32r5el \
+			| mipsisa32r6 | mipsisa32r6el \
+			| mipsisa64 | mipsisa64el \
+			| mipsisa64r2 | mipsisa64r2el \
+			| mipsisa64r3 | mipsisa64r3el \
+			| mipsisa64r5 | mipsisa64r5el \
+			| mipsisa64r6 | mipsisa64r6el \
+			| mipsisa64sb1 | mipsisa64sb1el \
+			| mipsisa64sr71k | mipsisa64sr71kel \
+			| mipsr5900 | mipsr5900el \
+			| mipstx39 | mipstx39el \
+			| mmix \
+			| mn10200 | mn10300 \
+			| moxie \
+			| mt \
+			| msp430 \
+			| nds32 | nds32le | nds32be \
+			| nfp \
+			| nios | nios2 | nios2eb | nios2el \
+			| none | np1 | ns16k | ns32k | nvptx \
+			| open8 \
+			| or1k* \
+			| or32 \
+			| orion \
+			| picochip \
+			| pdp10 | pdp11 | pj | pjl | pn | power \
+			| powerpc | powerpc64 | powerpc64le | powerpcle | powerpcspe \
+			| pru \
+			| pyramid \
+			| riscv | riscv32 | riscv32be | riscv64 | riscv64be \
+			| rl78 | romp | rs6000 | rx \
+			| s390 | s390x \
+			| score \
+			| sh | shl \
+			| sh[1234] | sh[24]a | sh[24]ae[lb] | sh[23]e | she[lb] | sh[lb]e \
+			| sh[1234]e[lb] |  sh[12345][lb]e | sh[23]ele | sh64 | sh64le \
+			| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet \
+			| sparclite \
+			| sparcv8 | sparcv9 | sparcv9b | sparcv9v | sv1 | sx* \
+			| spu \
+			| tahoe \
+			| thumbv7* \
+			| tic30 | tic4x | tic54x | tic55x | tic6x | tic80 \
+			| tron \
+			| ubicom32 \
+			| v70 | v850 | v850e | v850e1 | v850es | v850e2 | v850e2v3 \
+			| vax \
+			| visium \
+			| w65 \
+			| wasm32 | wasm64 \
+			| we32k \
+			| x86 | x86_64 | xc16x | xgate | xps100 \
+			| xstormy16 | xtensa* \
+			| ymp \
+			| z8k | z80)
+				;;
+
+			*)
+				echo Invalid configuration \`"$1"\': machine \`"$cpu-$vendor"\' not recognized 1>&2
+				exit 1
+				;;
+		esac
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $vendor in
+	digital*)
+		vendor=dec
+		;;
+	commodore*)
+		vendor=cbm
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if test x$basic_os != x
+then
+
+# First recognize some ad-hoc cases, or perhaps split kernel-os, or else just
+# set os.
+case $basic_os in
+	gnu/linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|gnu/linux|gnu|'`
+		;;
+	os2-emx)
+		kernel=os2
+		os=`echo "$basic_os" | sed -e 's|os2-emx|emx|'`
+		;;
+	nto-qnx*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto-qnx|qnx|'`
+		;;
+	*-*)
+		# shellcheck disable=SC2162
+		saved_IFS=$IFS
+		IFS="-" read kernel os <<EOF
+$basic_os
+EOF
+		IFS=$saved_IFS
+		;;
+	# Default OS when just kernel was specified
+	nto*)
+		kernel=nto
+		os=`echo "$basic_os" | sed -e 's|nto|qnx|'`
+		;;
+	linux*)
+		kernel=linux
+		os=`echo "$basic_os" | sed -e 's|linux|gnu|'`
+		;;
+	*)
+		kernel=
+		os=$basic_os
+		;;
+esac
+
+# Now, normalize the OS (knowing we just have one component, it's not a kernel,
+# etc.)
+case $os in
+	# First match some system type aliases that might get confused
+	# with valid system types.
+	# solaris* is a basic system type, with this one exception.
+	auroraux)
+		os=auroraux
+		;;
+	bluegene*)
+		os=cnk
+		;;
+	solaris1 | solaris1.*)
+		os=`echo "$os" | sed -e 's|solaris1|sunos4|'`
+		;;
+	solaris)
+		os=solaris2
+		;;
+	unixware*)
+		os=sysv4.2uw
+		;;
+	# es1800 is here to avoid being matched by es* (a different OS)
+	es1800*)
+		os=ose
+		;;
+	# Some version numbers need modification
+	chorusos*)
+		os=chorusos
+		;;
+	isc)
+		os=isc2.2
+		;;
+	sco6)
+		os=sco5v6
+		;;
+	sco5)
+		os=sco3.2v5
+		;;
+	sco4)
+		os=sco3.2v4
+		;;
+	sco3.2.[4-9]*)
+		os=`echo "$os" | sed -e 's/sco3.2./sco3.2v/'`
+		;;
+	sco*v* | scout)
+		# Don't match below
+		;;
+	sco*)
+		os=sco3.2v2
+		;;
+	psos*)
+		os=psos
+		;;
+	qnx*)
+		os=qnx
+		;;
+	hiux*)
+		os=hiuxwe2
+		;;
+	lynx*178)
+		os=lynxos178
+		;;
+	lynx*5)
+		os=lynxos5
+		;;
+	lynxos*)
+		# don't get caught up in next wildcard
+		;;
+	lynx*)
+		os=lynxos
+		;;
+	mac[0-9]*)
+		os=`echo "$os" | sed -e 's|mac|macos|'`
+		;;
+	opened*)
+		os=openedition
+		;;
+	os400*)
+		os=os400
+		;;
+	sunos5*)
+		os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
+		;;
+	sunos6*)
+		os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
+		;;
+	wince*)
+		os=wince
+		;;
+	utek*)
+		os=bsd
+		;;
+	dynix*)
+		os=bsd
+		;;
+	acis*)
+		os=aos
+		;;
+	atheos*)
+		os=atheos
+		;;
+	syllable*)
+		os=syllable
+		;;
+	386bsd)
+		os=bsd
+		;;
+	ctix* | uts*)
+		os=sysv
+		;;
+	nova*)
+		os=rtmk-nova
+		;;
+	ns2)
+		os=nextstep2
+		;;
+	# Preserve the version number of sinix5.
+	sinix5.*)
+		os=`echo "$os" | sed -e 's|sinix|sysv|'`
+		;;
+	sinix*)
+		os=sysv4
+		;;
+	tpf*)
+		os=tpf
+		;;
+	triton*)
+		os=sysv3
+		;;
+	oss*)
+		os=sysv3
+		;;
+	svr4*)
+		os=sysv4
+		;;
+	svr3)
+		os=sysv3
+		;;
+	sysvr4)
+		os=sysv4
+		;;
+	ose*)
+		os=ose
+		;;
+	*mint | mint[0-9]* | *MiNT | MiNT[0-9]*)
+		os=mint
+		;;
+	dicos*)
+		os=dicos
+		;;
+	pikeos*)
+		# Until real need of OS specific support for
+		# particular features comes up, bare metal
+		# configurations are quite functional.
+		case $cpu in
+		    arm*)
+			os=eabi
+			;;
+		    *)
+			os=elf
+			;;
+		esac
+		;;
+	*)
+		# No normalization, but not necessarily accepted, that comes below.
+		;;
+esac
+
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+kernel=
+case $cpu-$vendor in
+	score-*)
+		os=elf
+		;;
+	spu-*)
+		os=elf
+		;;
+	*-acorn)
+		os=riscix1.2
+		;;
+	arm*-rebel)
+		kernel=linux
+		os=gnu
+		;;
+	arm*-semi)
+		os=aout
+		;;
+	c4x-* | tic4x-*)
+		os=coff
+		;;
+	c8051-*)
+		os=elf
+		;;
+	clipper-intergraph)
+		os=clix
+		;;
+	hexagon-*)
+		os=elf
+		;;
+	tic54x-*)
+		os=coff
+		;;
+	tic55x-*)
+		os=coff
+		;;
+	tic6x-*)
+		os=coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=tops20
+		;;
+	pdp11-*)
+		os=none
+		;;
+	*-dec | vax-*)
+		os=ultrix4.2
+		;;
+	m68*-apollo)
+		os=domain
+		;;
+	i386-sun)
+		os=sunos4.0.2
+		;;
+	m68000-sun)
+		os=sunos3
+		;;
+	m68*-cisco)
+		os=aout
+		;;
+	mep-*)
+		os=elf
+		;;
+	mips*-cisco)
+		os=elf
+		;;
+	mips*-*)
+		os=elf
+		;;
+	or32-*)
+		os=coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=sysv3
+		;;
+	sparc-* | *-sun)
+		os=sunos4.1.1
+		;;
+	pru-*)
+		os=elf
+		;;
+	*-be)
+		os=beos
+		;;
+	*-ibm)
+		os=aix
+		;;
+	*-knuth)
+		os=mmixware
+		;;
+	*-wec)
+		os=proelf
+		;;
+	*-winbond)
+		os=proelf
+		;;
+	*-oki)
+		os=proelf
+		;;
+	*-hp)
+		os=hpux
+		;;
+	*-hitachi)
+		os=hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=sysv
+		;;
+	*-cbm)
+		os=amigaos
+		;;
+	*-dg)
+		os=dgux
+		;;
+	*-dolphin)
+		os=sysv3
+		;;
+	m68k-ccur)
+		os=rtu
+		;;
+	m88k-omron*)
+		os=luna
+		;;
+	*-next)
+		os=nextstep
+		;;
+	*-sequent)
+		os=ptx
+		;;
+	*-crds)
+		os=unos
+		;;
+	*-ns)
+		os=genix
+		;;
+	i370-*)
+		os=mvs
+		;;
+	*-gould)
+		os=sysv
+		;;
+	*-highlevel)
+		os=bsd
+		;;
+	*-encore)
+		os=bsd
+		;;
+	*-sgi)
+		os=irix
+		;;
+	*-siemens)
+		os=sysv4
+		;;
+	*-masscomp)
+		os=rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=uxpv
+		;;
+	*-rom68k)
+		os=coff
+		;;
+	*-*bug)
+		os=coff
+		;;
+	*-apple)
+		os=macos
+		;;
+	*-atari*)
+		os=mint
+		;;
+	*-wrs)
+		os=vxworks
+		;;
+	*)
+		os=none
+		;;
+esac
+
+fi
+
+# Now, validate our (potentially fixed-up) OS.
+case $os in
+	# Sometimes we do "kernel-libc", so those need to count as OSes.
+	musl* | newlib* | relibc* | uclibc*)
+		;;
+	# Likewise for "kernel-abi"
+	eabi* | gnueabi*)
+		;;
+	# VxWorks passes extra cpu info in the 4th filed.
+	simlinux | simwindows | spe)
+		;;
+	# Now accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST end in a * to match a version number.
+	gnu* | android* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+	     | *vms* | esix* | aix* | cnk* | sunos | sunos[34]* \
+	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
+	     | sym* |  plan9* | psp* | sim* | xray* | os68k* | v88r* \
+	     | hiux* | abug | nacl* | netware* | windows* \
+	     | os9* | macos* | osx* | ios* \
+	     | mpw* | magic* | mmixware* | mon960* | lnews* \
+	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
+	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
+	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
+	     | mirbsd* | netbsd* | dicos* | openedition* | ose* \
+	     | bitrig* | openbsd* | secbsd* | solidbsd* | libertybsd* | os108* \
+	     | ekkobsd* | freebsd* | riscix* | lynxos* | os400* \
+	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
+	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
+	     | udi* | lites* | ieee* | go32* | aux* | hcos* \
+	     | chorusrdb* | cegcc* | glidix* | serenity* \
+	     | cygwin* | msys* | pe* | moss* | proelf* | rtems* \
+	     | midipix* | mingw32* | mingw64* | mint* \
+	     | uxpv* | beos* | mpeix* | udk* | moxiebox* \
+	     | interix* | uwin* | mks* | rhapsody* | darwin* \
+	     | openstep* | oskit* | conix* | pw32* | nonstopux* \
+	     | storm-chaos* | tops10* | tenex* | tops20* | its* \
+	     | os2* | vos* | palmos* | uclinux* | nucleus* | morphos* \
+	     | scout* | superux* | sysv* | rtmk* | tpf* | windiss* \
+	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
+	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
+	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \
+	     | fiwix* )
+		;;
+	# This one is extra strict with allowed versions
+	sco3.2v2 | sco3.2v[4-9]* | sco5v6*)
+		# Don't forget version if it is 3.2v4 or newer.
+		;;
+	none)
+		;;
+	*)
+		echo Invalid configuration \`"$1"\': OS \`"$os"\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# As a final step for OS-related things, validate the OS-kernel combination
+# (given a valid OS), if there is a kernel.
+case $kernel-$os in
+	linux-gnu* | linux-dietlibc* | linux-android* | linux-newlib* \
+		   | linux-musl* | linux-relibc* | linux-uclibc* )
+		;;
+	uclinux-uclibc* )
+		;;
+	-dietlibc* | -newlib* | -musl* | -relibc* | -uclibc* )
+		# These are just libc implementations, not actual OSes, and thus
+		# require a kernel.
+		echo "Invalid configuration \`$1': libc \`$os' needs explicit kernel." 1>&2
+		exit 1
+		;;
+	kfreebsd*-gnu* | kopensolaris*-gnu*)
+		;;
+	vxworks-simlinux | vxworks-simwindows | vxworks-spe)
+		;;
+	nto-qnx*)
+		;;
+	os2-emx)
+		;;
+	*-eabi* | *-gnueabi*)
+		;;
+	-*)
+		# Blank kernel with real OS is always fine.
+		;;
+	*-*)
+		echo "Invalid configuration \`$1': Kernel \`$kernel' not known to work with OS \`$os'." 1>&2
+		exit 1
+		;;
+esac
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+case $vendor in
+	unknown)
+		case $cpu-$os in
+			*-riscix*)
+				vendor=acorn
+				;;
+			*-sunos*)
+				vendor=sun
+				;;
+			*-cnk* | *-aix*)
+				vendor=ibm
+				;;
+			*-beos*)
+				vendor=be
+				;;
+			*-hpux*)
+				vendor=hp
+				;;
+			*-mpeix*)
+				vendor=hp
+				;;
+			*-hiux*)
+				vendor=hitachi
+				;;
+			*-unos*)
+				vendor=crds
+				;;
+			*-dgux*)
+				vendor=dg
+				;;
+			*-luna*)
+				vendor=omron
+				;;
+			*-genix*)
+				vendor=ns
+				;;
+			*-clix*)
+				vendor=intergraph
+				;;
+			*-mvs* | *-opened*)
+				vendor=ibm
+				;;
+			*-os400*)
+				vendor=ibm
+				;;
+			s390-* | s390x-*)
+				vendor=ibm
+				;;
+			*-ptx*)
+				vendor=sequent
+				;;
+			*-tpf*)
+				vendor=ibm
+				;;
+			*-vxsim* | *-vxworks* | *-windiss*)
+				vendor=wrs
+				;;
+			*-aux*)
+				vendor=apple
+				;;
+			*-hms*)
+				vendor=hitachi
+				;;
+			*-mpw* | *-macos*)
+				vendor=apple
+				;;
+			*-*mint | *-mint[0-9]* | *-*MiNT | *-MiNT[0-9]*)
+				vendor=atari
+				;;
+			*-vos*)
+				vendor=stratus
+				;;
+		esac
+		;;
+esac
+
+echo "$cpu-$vendor-${kernel:+$kernel-}$os"
+exit
+
+# Local variables:
+# eval: (add-hook 'before-save-hook 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:

Property changes on: mozjs/create-102.15.0-riscv64gc-patch/firefox-102.15.0-new/build/autoconf/config.sub
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-skip-failing-tests-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-skip-failing-tests-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-skip-failing-tests-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-skip-failing-tests.patch
+
+mv firefox-$VERSION-skip-failing-tests.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-skip-failing-tests-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-skip-failing-tests-patch/file.list
===================================================================
--- mozjs/create-102.15.0-skip-failing-tests-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-skip-failing-tests-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/js/src/tests/jstests.list
Index: mozjs/create-102.15.0-skip-failing-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.list
===================================================================
--- mozjs/create-102.15.0-skip-failing-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.list	(nonexistent)
+++ mozjs/create-102.15.0-skip-failing-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.list	(revision 385)
@@ -0,0 +1,1050 @@
+# Manifest entries for imported test suites whose individual test cases
+# we don't want to change.
+
+# Skip the folder with tests for the scripts
+skip include test/jstests.list
+
+skip script non262/String/normalize-generateddata-input.js # input data for other test
+
+# Timeouts on arm and cgc builds.
+slow script test262/built-ins/decodeURI/S15.1.3.1_A2.5_T1.js
+slow script test262/built-ins/decodeURIComponent/S15.1.3.2_A2.5_T1.js
+
+# Windows10-aarch64 fails certain tests.
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1526003
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1526012
+skip-if((xulRuntime.XPCOMABI.match(/aarch64/))&&(xulRuntime.OS=="WINNT")) script non262/Math/fround.js
+skip-if((xulRuntime.XPCOMABI.match(/aarch64/))&&(xulRuntime.OS=="WINNT")) script non262/Math/log2-approx.js
+
+
+###########################################################################
+# Generated jstests.list for test262 when inline |reftest| isn't possible #
+###########################################################################
+
+include test262/jstests.list
+
+
+#################################################################
+# Tests disabled due to intentional alternative implementations #
+#################################################################
+
+# Legacy "caller" and "arguments" implemented as accessor properties on Function.prototype.
+skip script test262/built-ins/Function/prototype/restricted-property-arguments.js
+skip script test262/built-ins/Function/prototype/restricted-property-caller.js
+skip script test262/built-ins/ThrowTypeError/unique-per-realm-function-proto.js
+
+
+#########################################################################
+# Test262 tests disabled when features are only conditionally available #
+#########################################################################
+
+skip-if(!String.prototype.normalize) include test262/built-ins/String/prototype/normalize/jstests.list
+
+# Requires ICU to detect Final_Sigma case mapping context
+skip-if(!this.hasOwnProperty("Intl")) script test262/built-ins/String/prototype/toLowerCase/Final_Sigma_U180E.js
+skip-if(!this.hasOwnProperty("Intl")) script test262/built-ins/String/prototype/toLowerCase/special_casing_conditional.js
+skip-if(!this.hasOwnProperty("Intl")) script test262/built-ins/String/prototype/toLocaleLowerCase/Final_Sigma_U180E.js
+skip-if(!this.hasOwnProperty("Intl")) script test262/built-ins/String/prototype/toLocaleLowerCase/special_casing_conditional.js
+
+# Skip intl402 tests when Intl isn't available.
+skip-if(!this.hasOwnProperty("Intl")) include test262/intl402/jstests.list
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1415303
+skip-if(!this.hasOwnProperty("Atomics")) include test262/built-ins/Atomics/jstests.list
+skip-if(!this.hasOwnProperty("SharedArrayBuffer")) include test262/built-ins/SharedArrayBuffer/jstests.list
+
+# Crashes on s390x and ppc64, avoid it
+skip-if(xulRuntime.XPCOMABI.match(/s390x|ppc64-/)) script non262/extensions/clone-errors.js
+
+# Crashes on s390x, ppc64, aarch64
+skip-if(xulRuntime.XPCOMABI.match(/s390x|aarch64|ppc64-/)) script test262/built-ins/Date/UTC/fp-evaluation-order.js
+
+# Crashes on s390x, avoid it
+skip-if(xulRuntime.XPCOMABI.match(/s390x/)) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-other-type.js
+
+#####################################
+# Test262 tests disabled on browser #
+#####################################
+
+# Defines a non-configurable property on the WindowProxy object.
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-block-decl-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-decl-a-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-decl-b-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-else-stmt-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-decl-no-else-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-if-stmt-else-decl-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-switch-case-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/direct/global-switch-dflt-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-block-decl-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-decl-a-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-decl-b-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-else-stmt-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-decl-no-else-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-if-stmt-else-decl-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-switch-case-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/eval-code/indirect/global-switch-dflt-eval-global-existing-global-update.js
+skip-if(!xulRuntime.shell) script test262/language/eval-code/direct/var-env-func-init-global-update-non-configurable.js
+skip-if(!xulRuntime.shell) script test262/language/eval-code/indirect/var-env-func-init-global-update-non-configurable.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-lex-restricted-global.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-var.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-func-err-non-configurable.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-func.js
+skip-if(!xulRuntime.shell) script test262/built-ins/Array/prototype/methods-called-as-functions.js
+
+# Calls preventExtensions() on the WindowProxy object.
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-func-err-non-extensible.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-lex.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/script-decl-var-err.js
+
+# Global var-bindings are configurable in a browser environment.
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/block-decl-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/block-decl-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-decl-a-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-decl-a-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-decl-b-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-decl-b-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-stmt-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-else-stmt-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-no-else-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-decl-no-else-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-stmt-else-decl-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/if-stmt-else-decl-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/switch-case-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/switch-case-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/switch-dflt-global-existing-global-init.js
+skip-if(!xulRuntime.shell) script test262/annexB/language/global-code/switch-dflt-global-init.js
+skip-if(!xulRuntime.shell) script test262/language/eval-code/direct/var-env-var-init-global-exstng.js
+skip-if(!xulRuntime.shell) script test262/language/eval-code/indirect/var-env-var-init-global-exstng.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/decl-func.js
+skip-if(!xulRuntime.shell) script test262/language/global-code/decl-var.js
+
+# Atomics tests (Atomics/notify, Atomics/wait) are disabled because our $.agent implementation needs getSharedArrayBuffer, setSharedArrayBuffer and evalInWorker: https://bugzilla.mozilla.org/show_bug.cgi?id=1598612
+# And also: https://bugzil.la/1349863
+skip-if(!xulRuntime.shell) include test262/built-ins/Atomics/notify/jstests.list
+skip-if(!xulRuntime.shell) include test262/built-ins/Atomics/wait/jstests.list
+
+
+##################################################
+# Test262 tests skipped due to SpiderMonkey bugs #
+##################################################
+
+# Lazily resolved "name" and "length" properties on functions violate property key order.
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1629803
+skip script test262/built-ins/Object/keys/order-after-define-property.js
+skip script test262/built-ins/Object/entries/order-after-define-property.js
+skip script test262/language/computed-property-names/class/static/method-number-order.js
+skip script test262/language/computed-property-names/class/static/method-string-order.js
+skip script test262/language/computed-property-names/class/static/method-symbol-order.js
+skip script test262/language/statements/class/definition/fn-length-static-precedence-order.js
+skip script test262/language/statements/class/definition/fn-name-static-precedence-order.js
+skip script test262/built-ins/Object/keys/order-after-define-property-with-function.js
+skip script test262/built-ins/Object/entries/order-after-define-property-with-function.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1286997
+# Bug 1286997 probably doesn't cover all spec violations.
+skip script test262/language/expressions/assignment/S11.13.1_A5_T5.js
+skip script test262/language/expressions/assignment/S11.13.1_A7_T3.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.10_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.11_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.1_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.2_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.3_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.4_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.5_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.6_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.7_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.8_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A5.9_T5.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.10_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.10_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.11_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.11_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.1_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.1_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.2_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.2_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.3_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.3_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.4_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.4_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.5_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.5_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.6_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.6_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.7_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.7_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.8_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.8_T2.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.9_T1.js
+skip script test262/language/expressions/compound-assignment/S11.13.2_A7.9_T2.js
+skip script test262/language/expressions/postfix-decrement/S11.3.2_A5_T5.js
+skip script test262/language/expressions/postfix-decrement/S11.3.2_A6_T1.js
+skip script test262/language/expressions/postfix-decrement/S11.3.2_A6_T2.js
+skip script test262/language/expressions/postfix-increment/S11.3.1_A5_T5.js
+skip script test262/language/expressions/postfix-increment/S11.3.1_A6_T1.js
+skip script test262/language/expressions/postfix-increment/S11.3.1_A6_T2.js
+skip script test262/language/expressions/prefix-decrement/S11.4.5_A5_T5.js
+skip script test262/language/expressions/prefix-decrement/S11.4.5_A6_T1.js
+skip script test262/language/expressions/prefix-decrement/S11.4.5_A6_T2.js
+skip script test262/language/expressions/prefix-increment/S11.4.4_A5_T5.js
+skip script test262/language/expressions/prefix-increment/S11.4.4_A6_T1.js
+skip script test262/language/expressions/prefix-increment/S11.4.4_A6_T2.js
+skip script test262/language/expressions/logical-assignment/lgcl-nullish-assignment-operator-lhs-before-rhs.js
+skip script test262/language/expressions/logical-assignment/lgcl-and-assignment-operator-lhs-before-rhs.js
+skip script test262/language/expressions/logical-assignment/lgcl-or-assignment-operator-lhs-before-rhs.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=605515
+skip script test262/language/identifier-resolution/assign-to-global-undefined-strict.js
+skip script test262/language/expressions/postfix-decrement/operator-x-postfix-decrement-calls-putvalue-lhs-newvalue-.js
+skip script test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval-.js
+skip script test262/language/expressions/prefix-increment/operator-prefix-increment-x-calls-putvalue-lhs-newvalue-.js
+skip script test262/language/expressions/prefix-decrement/operator-prefix-decrement-x-calls-putvalue-lhs-newvalue-.js
+skip script test262/language/expressions/postfix-increment/operator-x-postfix-increment-calls-putvalue-lhs-newvalue-.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--16.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--8.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--12.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--18.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--14.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--2.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--10.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--6.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--4.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v-.js
+skip script test262/language/expressions/compound-assignment/compound-assignment-operator-calls-putvalue-lref--v--20.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1670502
+skip script test262/built-ins/Function/prototype/toString/built-in-function-object.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1225839
+ignore-flag(--more-compartments) script test262/built-ins/Function/internals/Call/class-ctor-realm.js
+
+# These two tests assume that assignment to function calls is a SyntaxError.  We
+# historically implemented otherwise, as web reality.  Perhaps that can be
+# reevaluated at some point.
+skip script test262/language/expressions/assignmenttargettype/parenthesized-callexpression-arguments.js
+skip script test262/language/expressions/assignmenttargettype/direct-callexpression-arguments.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1297179
+# All of these tests pass except with --more-compartments.
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/apply/arguments-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/apply/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/arguments-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/desc-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/null-handler-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/targetdesc-configurable-desc-not-configurable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/targetdesc-not-compatible-descriptor-not-configurable-target-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/targetdesc-not-compatible-descriptor-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/targetdesc-undefined-not-configurable-descriptor-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/targetdesc-undefined-target-is-not-extensible-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/defineProperty/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/deleteProperty/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/get/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/getOwnPropertyDescriptor/result-type-is-not-object-nor-undefined-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/getOwnPropertyDescriptor/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/getPrototypeOf/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/has/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/isExtensible/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/ownKeys/return-not-list-object-throws-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/ownKeys/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/preventExtensions/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/set/trap-is-not-callable-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/setPrototypeOf/trap-is-not-callable-realm.js
+
+# Errors thrown from wrong realm, similar to 1225839, 1288457, and 1297179.
+ignore-flag(--more-compartments) script test262/built-ins/Array/length/define-own-prop-length-overflow-realm.js
+skip script test262/built-ins/Function/internals/Construct/derived-return-val-realm.js
+skip script test262/built-ins/Function/internals/Construct/derived-this-uninitialized-realm.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1317378
+skip script test262/language/statements/do-while/cptn-abrupt-empty.js
+skip script test262/language/statements/do-while/cptn-normal.js
+skip script test262/language/statements/for-in/cptn-decl-abrupt-empty.js
+skip script test262/language/statements/for-in/cptn-decl-itr.js
+skip script test262/language/statements/for-in/cptn-decl-skip-itr.js
+skip script test262/language/statements/for-in/cptn-decl-zero-itr.js
+skip script test262/language/statements/for-in/cptn-expr-abrupt-empty.js
+skip script test262/language/statements/for-in/cptn-expr-itr.js
+skip script test262/language/statements/for-in/cptn-expr-skip-itr.js
+skip script test262/language/statements/for-in/cptn-expr-zero-itr.js
+skip script test262/language/statements/for/cptn-decl-expr-iter.js
+skip script test262/language/statements/for/cptn-decl-expr-no-iter.js
+skip script test262/language/statements/for/cptn-expr-expr-iter.js
+skip script test262/language/statements/for/cptn-expr-expr-no-iter.js
+skip script test262/language/statements/for/head-init-expr-check-empty-inc-empty-completion.js
+skip script test262/language/statements/for/head-init-var-check-empty-inc-empty-completion.js
+skip script test262/language/statements/for-of/cptn-decl-abrupt-empty.js
+skip script test262/language/statements/for-of/cptn-decl-itr.js
+skip script test262/language/statements/for-of/cptn-decl-no-itr.js
+skip script test262/language/statements/for-of/cptn-expr-abrupt-empty.js
+skip script test262/language/statements/for-of/cptn-expr-itr.js
+skip script test262/language/statements/for-of/cptn-expr-no-itr.js
+skip script test262/language/statements/if/cptn-else-false-nrml.js
+skip script test262/language/statements/if/cptn-else-false-abrupt-empty.js
+skip script test262/language/statements/if/cptn-else-true-abrupt-empty.js
+skip script test262/language/statements/if/cptn-else-true-nrml.js
+skip script test262/language/statements/if/cptn-no-else-false.js
+skip script test262/language/statements/if/cptn-no-else-true-abrupt-empty.js
+skip script test262/language/statements/if/cptn-no-else-true-nrml.js
+skip script test262/language/statements/switch/cptn-a-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-b-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-b-final.js
+skip script test262/language/statements/switch/cptn-dflt-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-dflt-b-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-dflt-b-final.js
+skip script test262/language/statements/switch/cptn-dflt-final.js
+skip script test262/language/statements/switch/cptn-no-dflt-match-abrupt-empty.js
+skip script test262/language/statements/switch/cptn-no-dflt-match-final.js
+skip script test262/language/statements/switch/cptn-no-dflt-no-match.js
+skip script test262/language/statements/try/cptn-finally-skip-catch.js
+skip script test262/language/statements/try/cptn-finally-wo-catch.js
+skip script test262/language/statements/try/cptn-try.js
+skip script test262/language/statements/while/cptn-abrupt-empty.js
+skip script test262/language/statements/while/cptn-iter.js
+skip script test262/language/statements/while/cptn-no-iter.js
+skip script test262/language/statements/with/cptn-abrupt-empty.js
+skip script test262/language/statements/with/cptn-nrml.js
+
+# Hoisted block-level function named "arguments" not initialized with undefined per B.3.3.1
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1339123
+skip script test262/annexB/language/function-code/block-decl-func-skip-arguments.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1407587
+skip script test262/language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js
+skip script test262/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1321616
+skip script test262/annexB/built-ins/Function/createdynfn-no-line-terminator-html-close-comment-body.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1462745
+skip script test262/annexB/language/function-code/block-decl-nested-blocks-with-fun-decl.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1545038
+# All of these tests pass except with --more-compartments.
+ignore-flag(--more-compartments) script test262/built-ins/String/prototype/valueOf/non-generic-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/String/prototype/valueOf/non-generic-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/String/prototype/toString/non-generic-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/String/prototype/toString/non-generic-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/apply/null-handler-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/apply/null-handler-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-number-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-number-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/null-handler-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/null-handler-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-undefined-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-undefined-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-symbol-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-symbol-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-string-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-string-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-null-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-null-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-boolean-realm.js
+ignore-flag(--more-compartments) script test262/built-ins/Proxy/construct/return-not-object-throws-boolean-realm.js
+
+# Depends upon the SharedArrayBuffer constructor being defined as a global
+# property -- and right now, it's only defined for cross-site-isolated pages
+# that request it using COOP/COEP.
+fails-if(!xulRuntime.shell) script test262/built-ins/ArrayBuffer/prototype/byteLength/this-is-sharedarraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/ArrayBuffer/prototype/slice/this-is-sharedarraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/validate-arraytype-before-expectedValue-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/validate-arraytype-before-replacementValue-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/expected-return-value-negative-zero.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/bigint/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/bigint/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/validate-arraytype-before-index-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/validate-arraytype-before-value-coercion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/bad-range.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/expected-return-value.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/good-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/non-views.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/buffer-does-not-have-arraybuffer-data-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/buffer-reference-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/byteoffset-is-negative-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/custom-proto-access-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/custom-proto-if-not-object-fallbacks-to-default-prototype-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/custom-proto-if-object-is-used-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/defined-bytelength-and-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/defined-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/defined-byteoffset-undefined-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/excessive-bytelength-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/excessive-byteoffset-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/instance-extensibility-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/negative-bytelength-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/negative-byteoffset-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/newtarget-undefined-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/buffer/return-buffer-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/buffer/this-has-no-dataview-internal-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/byteLength/return-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/byteLength/this-has-no-dataview-internal-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/byteOffset/return-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/byteOffset/this-has-no-dataview-internal-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/index-is-out-of-range-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/negative-byteoffset-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/return-abrupt-from-tonumber-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/return-abrupt-from-tonumber-byteoffset-symbol-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/return-value-clean-arraybuffer-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/return-values-custom-offset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/return-values-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/this-has-no-dataview-internal-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/to-boolean-littleendian-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/prototype/getInt32/toindex-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/proto-from-ctor-realm-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/return-abrupt-tonumber-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/return-abrupt-tonumber-bytelength-symbol-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/return-abrupt-tonumber-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/return-abrupt-tonumber-byteoffset-symbol-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/return-instance-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/toindex-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/DataView/toindex-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/invoked-as-accessor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/invoked-as-func.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/name.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/prop-desc.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/return-bytelength.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/this-has-no-typedarrayname-internal.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/this-is-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/byteLength/this-is-not-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/context-is-not-arraybuffer-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/context-is-not-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/descriptor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/end-default-if-absent.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/end-default-if-undefined.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/end-exceeds-length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/extensible.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/name.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/negative-end.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/negative-start.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/nonconstructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/number-conversion.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-constructor-is-not-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-constructor-is-undefined.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-is-not-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-is-not-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-is-null.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-is-undefined.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-returns-larger-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-returns-not-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-returns-same-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species-returns-smaller-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/species.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/start-default-if-absent.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/start-default-if-undefined.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/start-exceeds-end.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/start-exceeds-length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/this-is-arraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/tointeger-conversion-end.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/tointeger-conversion-start.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/Symbol.toStringTag.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/allocation-limit.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/data-allocation-after-object-creation.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/init-zero.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/length-is-absent.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/length-is-too-large-throws.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/negative-length-throws.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/newtarget-prototype-is-not-object.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/proto-from-ctor-realm.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype-from-newtarget.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/return-abrupt-from-length-symbol.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/return-abrupt-from-length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/toindex-length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/undefined-newtarget-throws.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/zero-length.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-length-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/excessive-offset-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/invoked-with-undefined-newtarget-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/is-referenced-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-access-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/length-is-symbol-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/new-instance-extensibility-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/proto-from-ctor-realm-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/returns-new-instance-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/toindex-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/typedarray-backed-by-sharedarraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-custom-proto-if-object-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-negative-zero-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-is-symbol-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/byteoffset-to-number-throws-sab.j
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/custom-proto-access-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-and-offset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-length-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-negative-length-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/defined-offset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-length-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/excessive-offset-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/invoked-with-undefined-newtarget-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/is-referenced-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-access-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/length-is-symbol-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/new-instance-extensibility-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/proto-from-ctor-realm-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/returns-new-instance-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-bytelength-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/toindex-byteoffset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/typedarray-backed-by-sharedarraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-custom-proto-if-object-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors-bigint/buffer-arg/use-default-proto-if-custom-proto-is-not-object-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/bufferbyteoffset-throws-from-modulo-element-size-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-negative-zero-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-is-symbol-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-throws-from-modulo-element-size-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/byteoffset-to-number-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/custom-proto-access-throws-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-and-offset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-length-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-negative-length-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/ctors/buffer-arg/defined-offset-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Get/BigInt/indexed-value-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Get/indexed-value-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-other-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-diff-buffer-same-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/BigInt/typedarray-arg-set-values-same-buffer-same-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-conversions-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-other-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-diff-buffer-same-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArray/prototype/set/typedarray-arg-set-values-same-buffer-same-type-sab.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/add/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/and/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/compareExchange/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/exchange/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/isLockFree/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/load/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/or/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/store/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/sub/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Atomics/xor/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/Object/seal/seal-sharedarraybuffer.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/slice/not-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/is-a-constructor.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-non-strict.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Delete/BigInt/indexed-value-sab-strict-strict.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-non-strict.js
+fails-if(!xulRuntime.shell) script test262/built-ins/TypedArrayConstructors/internals/Delete/indexed-value-sab-strict-strict.js
+fails-if(!xulRuntime.shell) script test262/language/expressions/class/subclass-builtins/subclass-SharedArrayBuffer.js
+fails-if(!xulRuntime.shell) script test262/language/statements/class/subclass-builtins/subclass-SharedArrayBuffer.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1648202
+skip script test262/built-ins/RegExp/named-groups/non-unicode-property-names-valid.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1761989
+skip script test262/built-ins/TypedArrayConstructors/ctors/no-species.js
+
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1763606
+skip script test262/built-ins/TypedArray/prototype/sort/sort-tonumber.js
+
+
+###########################################################
+# Tests disabled due to issues in test262 importer script #
+###########################################################
+
+# test262 importer merges all includes in a per directory shell.js file, breaking this harness test case.
+skip script test262/harness/detachArrayBuffer.js
+
+# Likewise here -- shell.js defines an |AsyncFunction| global property for
+# various tests in this directory that have an include that defines it, but this
+# particular test *doesn't* have that include and *shouldn't* define
+# |AsyncFunction| yet *checks* that no such global property exists, so it fails.
+# https://bugzilla.mozilla.org/show_bug.cgi?id=1672850
+skip script test262/built-ins/AsyncFunction/is-not-a-global.js
+
+skip script test262/language/module-code/top-level-await/await-dynamic-import-rejection.js  # Bug 1727925, 1726243
+
+####################################################
+# Tests disabled due to invalid test expectations  #
+####################################################
+
+# The test exposes a potential spec issue in InitializeDateTimeFormat:
+# Let's assume the locale is "en", adding likely subtags results in "en-Latn-US".
+# Consulting CLDR's supplementalData.xml shows for the "US" region:
+#   <hours preferred="h" allowed="h hb H hB" regions="[...] US [...]"/>
+# So preferred is "h" (= hour-cycle "h12") and additionally allowed is "H" (=hc "h23").
+# But InitializeDateTimeFormat defaults for hour12=false and hcDefault="h12" the
+# hour-cycle to "h24", which isn't allowed per the above CLDR data.
+# https://github.com/tc39/ecma402/issues/402
+skip script test262/intl402/DateTimeFormat/prototype/resolvedOptions/hourCycle-default.js
+
+# Not yet updated for https://github.com/tc39/proposal-intl-numberformat-v3/pull/85
+skip script test262/intl402/NumberFormat/constructor-roundingIncrement.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-2.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-5.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-10.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-20.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-50.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-25.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-100.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-200.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-250.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-500.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-1000.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-2000.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-2500.js
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-increment-5000.js
+
+# Not yet updated for https://github.com/tc39/proposal-intl-numberformat-v3/pull/92
+skip script test262/intl402/NumberFormat/test-option-useGrouping.js
+skip script test262/intl402/NumberFormat/test-option-useGrouping-extended.js
+
+# Missing "SharedArrayBuffer" features tag
+fails-if(!xulRuntime.shell) script test262/built-ins/SharedArrayBuffer/prototype/prop-desc.js
+
+# "morePrecision" has the same expected results as "lessPrecision", which can't be correct.
+skip script test262/intl402/NumberFormat/prototype/format/format-rounding-priority-more-precision.js
+
+
+# Update required for https://github.com/tc39/ecma262/pull/2550
+# See bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1769088
+skip script test262/built-ins/Date/year-zero.js
+skip script test262/built-ins/Date/parse/year-zero.js
+
+
+##############################################
+# Enable Iterator Helpers tests in the shell #
+##############################################
+
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/asynciterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/proto.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/constructor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/constructor-subclassable.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/constructor-throw-when-called-directly.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/constructor-throw-without-new.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/return-true-if-all-match.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/short-circuit-on-false.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/every/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/return-undefined-if-none-match.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/short-circuit-on-match.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/find/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/forEach.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/forEach/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/accumulator-set-to-initial-value.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/empty-iterator-without-initial-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/iterator-empty-return-initial-value.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/iterator-next-return-non-object-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/left-associative.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/no-initial-value-set-accumulator-to-first-value.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/reduce.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/reducer-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/reducer-throws-iterator-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/reduce/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/return-false-if-none-match.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/short-circuit-on-true.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/some/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/async-writes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/create-in-current-realm.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/interleaving-calls.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/iterator-empty.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/next-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/proxy.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/toArray.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/toArray/value-throws-iterator-not-closed.js
+
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/async-iterator-helpers-from-other-global.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/clobber-symbol.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/generator-methods-throw-on-iterator-helpers.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/iterator-helper-methods-throw-on-generators.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-from-other-global.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-handle-empty-iterators.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-interleaved.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-closed-on-call-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-closed-on-yield-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-next-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-next-returns-reject.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-next-promise-executor-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-next-then-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-next-get-then-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-not-closed-on-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-iterator-returns-done-generator-finishes.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-multiple-return-close-iterator-once.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-multiple-throw-close-iterator-once.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-mutate-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-mutate-iterator-after-done.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-not-close-iterator-next-reject.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-pass-through-lastValue.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-pass-value-through-chain.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-proxy-accesses.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-return-closes-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-return-new-iterator-result.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-reentry-not-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-closes-iterator-before-next.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-eagerly-on-next-non-callable.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-eagerly-on-non-callable.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-eagerly-on-non-iterator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-next-done-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-next-not-object.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/lazy-methods-throw-on-reentry.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take-drop-throw-eagerly-on-negative.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take-drop-throw-eagerly-on-non-integer.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/asIndexedPairs/asIndexedPairs.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/asIndexedPairs/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/asIndexedPairs/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/drop/drop.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/drop/drop-more-than-available.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/drop/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/drop/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/filter/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/filter/filter.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/filter/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/filter/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/close-iterator-when-inner-complete-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/close-iterator-when-inner-next-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/close-iterator-when-inner-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/flatMap.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/inner-empty-iterable.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/inner-generator.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/flatMap/throw-when-inner-not-iterable.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/map/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/map/map.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/map/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take/close-iterator-when-none-remaining.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take/length.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take/name.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take/take.js
+shell-option(--enable-iterator-helpers) script non262/AsyncIterator/prototype/take/take-more-than-available.js
+
+shell-option(--enable-iterator-helpers) script non262/Iterator/iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/proto.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/constructor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-subclassable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-throw-when-called-directly.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/constructor-throw-without-new.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/call-from-with-different-this.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/Iterator.from-descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/Iterator.from-length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/Iterator.from-name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/iterator-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/modify-next.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/modify-return.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/modify-throw.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/o-not-object-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/proxy-not-wrapped.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/proxy-wrap-next.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/proxy-wrap-return.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/proxy-wrap-throw.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/return-iterator-if-iterable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/return-wrapper-if-not-iterable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/return-wrapper-if-not-iterator-instance.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-functions-on-other-global.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-method-with-non-wrap-this-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-next-forwards-value.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-next-not-object-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-new-global.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-return-closes-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/from/wrap-throw.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/return-true-if-all-match.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/short-circuit-on-false.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/every/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/return-undefined-if-none-match.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/short-circuit-on-match.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/find/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/forEach.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/forEach/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/accumulator-set-to-initial-value.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/empty-iterator-without-initial-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/iterator-empty-return-initial-value.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/iterator-next-return-non-object-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/left-associative.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/no-initial-value-set-accumulator-to-first-value.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/reduce.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/reducer-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/reducer-throws-iterator-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/reduce/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/check-fn-after-getting-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/error-from-correct-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/fn-not-callable-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/fn-throws-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/next-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/return-false-if-none-match.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/short-circuit-on-true.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/some/value-throws-iterator-not-closed.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/create-in-current-realm.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/descriptor.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/iterator-empty.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/next-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/proxy.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/this-not-iterator-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/toArray.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/toArray/value-throws-iterator-not-closed.js
+
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/generator-methods-throw-on-iterator-helpers.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/iterator-helpers-from-other-global.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/iterator-helper-methods-throw-on-generators.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-from-other-global.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-handle-empty-iterators.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-interleaved.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-iterator-closed-on-call-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-iterator-closed-on-yield-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-iterator-not-closed-on-next-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-iterator-not-closed-on-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-iterator-returns-done-generator-finishes.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-multiple-return-close-iterator-once.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-multiple-throw-close-iterator-once.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-pass-through-lastValue.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-pass-value-through-chain.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-proxy-accesses.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-return-closes-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-return-new-iterator-result.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-reentry-not-close-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-closes-iterator-before-next.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-eagerly-on-next-non-callable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-eagerly-on-non-callable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-eagerly-on-non-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-next-done-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-next-not-object.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/lazy-methods-throw-on-reentry.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take-drop-throw-eagerly-on-negative.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take-drop-throw-eagerly-on-non-integer.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/asIndexedPairs/asIndexedPairs.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/asIndexedPairs/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/asIndexedPairs/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/drop/drop.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/drop/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/drop/drop-more-than-available.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/drop/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/filter/coerce-result-to-boolean.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/filter/filter.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/filter/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/filter/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/close-iterator-when-inner-complete-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/close-iterator-when-inner-next-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/close-iterator-when-inner-value-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/flatMap.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/inner-empty-iterable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/inner-generator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/flatMap/throw-when-inner-not-iterable.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/call-next-on-iterator-while-iterating.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/clobber-symbol.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/interleaved-map-calls.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/map.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/mapper-not-callable-throw.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/mutate-iterator-after-done.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/mutate-iterator.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/output-at-generator-end.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/pass-lastValue-to-next.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/prototype.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/proxy-abrupt-completion-in-iteratorValue.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/proxy-abrupt-completion-in-yield.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/proxy-abrupt-completion.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/proxy-accesses.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/reenter-map-generator-from-mapper.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/this-not-iterator-throw.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/this-value-array-throws.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/throw-when-iterator-returns-non-object.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/map/values-pass-through-chained-maps-to-next.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take/close-iterator-when-none-remaining.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take/length.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take/name.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take/take.js
+shell-option(--enable-iterator-helpers) script non262/Iterator/prototype/take/take-more-than-available.js
+
Index: mozjs/create-102.15.0-soname-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-soname-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-soname-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-soname.patch
+
+mv firefox-$VERSION-soname.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-soname-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-soname-patch/file.list
===================================================================
--- mozjs/create-102.15.0-soname-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-soname-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/config/rules.mk
Index: mozjs/create-102.15.0-soname-patch/firefox-102.15.0-new/config/rules.mk
===================================================================
--- mozjs/create-102.15.0-soname-patch/firefox-102.15.0-new/config/rules.mk	(nonexistent)
+++ mozjs/create-102.15.0-soname-patch/firefox-102.15.0-new/config/rules.mk	(revision 385)
@@ -0,0 +1,1144 @@
+# -*- makefile -*-
+# vim:set ts=8 sw=8 sts=8 noet:
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this file,
+# You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+ifndef topsrcdir
+$(error topsrcdir was not set))
+endif
+
+# Define an include-at-most-once flag
+ifdef INCLUDED_RULES_MK
+$(error Do not include rules.mk twice!)
+endif
+INCLUDED_RULES_MK = 1
+
+ifndef INCLUDED_CONFIG_MK
+include $(topsrcdir)/config/config.mk
+endif
+
+USE_AUTOTARGETS_MK = 1
+include $(MOZILLA_DIR)/config/makefiles/makeutils.mk
+
+ifdef REBUILD_CHECK
+REPORT_BUILD = $(info $(shell $(PYTHON3) $(MOZILLA_DIR)/config/rebuild_check.py $@ $^))
+REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
+else
+REPORT_BUILD = $(info $(relativesrcdir)/$(notdir $@))
+
+ifdef BUILD_VERBOSE_LOG
+REPORT_BUILD_VERBOSE = $(REPORT_BUILD)
+else
+REPORT_BUILD_VERBOSE = $(call BUILDSTATUS,BUILD_VERBOSE $(relativesrcdir))
+endif
+
+endif
+
+EXEC			= exec
+
+################################################################################
+# Testing frameworks support
+################################################################################
+
+testxpcobjdir = $(DEPTH)/_tests/xpcshell
+
+ifdef ENABLE_TESTS
+ifdef CPP_UNIT_TESTS
+ifdef COMPILE_ENVIRONMENT
+
+# Compile the tests to $(DIST)/bin.  Make lots of niceties available by default
+# through TestHarness.h, by modifying the list of includes and the libs against
+# which stuff links.
+SIMPLE_PROGRAMS += $(CPP_UNIT_TESTS)
+
+ifndef MOZ_PROFILE_GENERATE
+CPP_UNIT_TESTS_FILES = $(CPP_UNIT_TESTS)
+CPP_UNIT_TESTS_DEST = $(DIST)/cppunittests
+CPP_UNIT_TESTS_TARGET = target
+INSTALL_TARGETS += CPP_UNIT_TESTS
+endif
+
+run-cppunittests::
+	@$(PYTHON3) $(MOZILLA_DIR)/testing/runcppunittests.py --xre-path=$(DIST)/bin --symbols-path=$(DIST)/crashreporter-symbols $(CPP_UNIT_TESTS)
+
+cppunittests-remote:
+	$(PYTHON3) -u $(MOZILLA_DIR)/testing/remotecppunittests.py \
+		--xre-path=$(DEPTH)/dist/bin \
+		--localLib=$(DEPTH)/dist/$(MOZ_APP_NAME) \
+		--deviceIP=${TEST_DEVICE} \
+		$(CPP_UNIT_TESTS) $(EXTRA_TEST_ARGS); \
+
+endif # COMPILE_ENVIRONMENT
+endif # CPP_UNIT_TESTS
+endif # ENABLE_TESTS
+
+
+#
+# Library rules
+#
+# If FORCE_STATIC_LIB is set, build a static library.
+# Otherwise, build a shared library.
+#
+
+ifndef LIBRARY
+ifdef REAL_LIBRARY
+ifdef NO_EXPAND_LIBS
+# Only build actual library if it is requested.
+LIBRARY			:= $(REAL_LIBRARY)
+endif
+endif
+endif
+
+ifdef FORCE_SHARED_LIB
+ifdef MKSHLIB
+
+ifdef LIB_IS_C_ONLY
+MKSHLIB			= $(MKCSHLIB)
+endif
+
+endif # MKSHLIB
+endif # FORCE_SHARED_LIB
+
+ifeq ($(OS_ARCH),WINNT)
+
+#
+# This next line captures both the default (non-MOZ_COPY_PDBS)
+# case as well as the MOZ_COPY_PDBS-for-mingwclang case.
+#
+# For the default case, placing the pdb in the build
+# directory is needed.
+#
+# For the MOZ_COPY_PDBS, non-mingwclang case - we need to
+# build the pdb next to the executable (handled in the if
+# statement immediately below.)
+#
+# For the MOZ_COPY_PDBS, mingwclang case - we also need to
+# build the pdb next to the executable, but this macro doesn't
+# work for jsapi-tests which is a little special, so we specify
+# the output directory below with MOZ_PROGRAM_LDFLAGS.
+#
+LINK_PDBFILE ?= $(basename $(@F)).pdb
+
+ifdef MOZ_COPY_PDBS
+ifneq ($(CC_TYPE),clang)
+LINK_PDBFILE = $(basename $@).pdb
+endif
+endif
+
+ifndef GNU_CC
+
+ifdef SIMPLE_PROGRAMS
+COMPILE_PDB_FLAG ?= -Fd$(basename $(@F)).pdb
+COMPILE_CFLAGS += $(COMPILE_PDB_FLAG)
+COMPILE_CXXFLAGS += $(COMPILE_PDB_FLAG)
+endif
+
+ifdef MOZ_DEBUG
+CODFILE=$(basename $(@F)).cod
+endif
+
+endif # !GNU_CC
+endif # WINNT
+
+ifeq (arm-Darwin,$(CPU_ARCH)-$(OS_TARGET))
+ifdef PROGRAM
+MOZ_PROGRAM_LDFLAGS += -Wl,-rpath -Wl,@executable_path/Frameworks
+endif
+endif
+
+# For Mac executables, set the @rpath to be @executable_path by default so that
+# shared libraries built with an @rpath install name in the same directory
+# as the executable can be resolved. Executables not in the same directory
+# should override the @rpath with a relative path such as @executable_path/../
+# depending on their install location.
+ifeq ($(OS_ARCH),Darwin)
+MOZ_PROGRAM_LDFLAGS += -Wl,-rpath,@executable_path
+endif
+
+ifeq ($(OS_ARCH),WINNT)
+ifeq ($(CC_TYPE),clang)
+MOZ_PROGRAM_LDFLAGS += -Wl,-pdb,$(dir $@)/$(LINK_PDBFILE)
+endif
+endif
+
+ifeq ($(HOST_OS_ARCH),WINNT)
+HOST_PDBFILE=$(basename $(@F)).pdb
+HOST_PDB_FLAG ?= -PDB:$(HOST_PDBFILE)
+HOST_C_LDFLAGS += -DEBUG $(HOST_PDB_FLAG)
+HOST_CXX_LDFLAGS += -DEBUG $(HOST_PDB_FLAG)
+endif
+
+# Don't build SIMPLE_PROGRAMS during the MOZ_PROFILE_GENERATE pass, and do not
+# attempt to install them
+ifdef MOZ_PROFILE_GENERATE
+$(foreach category,$(INSTALL_TARGETS),\
+  $(eval $(category)_FILES := $(foreach file,$($(category)_FILES),$(if $(filter $(SIMPLE_PROGRAMS),$(notdir $(file))),,$(file)))))
+SIMPLE_PROGRAMS :=
+endif
+
+ifdef COMPILE_ENVIRONMENT
+ifndef TARGETS
+TARGETS			= $(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(HOST_SHARED_LIBRARY)
+endif
+
+COBJS = $(notdir $(CSRCS:.c=.$(OBJ_SUFFIX)))
+CWASMOBJS = $(notdir $(WASM_CSRCS:.c=.$(WASM_OBJ_SUFFIX)))
+SOBJS = $(notdir $(SSRCS:.S=.$(OBJ_SUFFIX)))
+# CPPSRCS can have different extensions (eg: .cpp, .cc)
+CPPOBJS = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(CPPSRCS))))
+CPPWASMOBJS = $(notdir $(addsuffix .$(WASM_OBJ_SUFFIX),$(basename $(WASM_CPPSRCS))))
+CMOBJS = $(notdir $(CMSRCS:.m=.$(OBJ_SUFFIX)))
+CMMOBJS = $(notdir $(CMMSRCS:.mm=.$(OBJ_SUFFIX)))
+# ASFILES can have different extensions (.s, .asm)
+ASOBJS = $(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(ASFILES))))
+RS_STATICLIB_CRATE_OBJ = $(addprefix lib,$(notdir $(RS_STATICLIB_CRATE_SRC:.rs=.$(LIB_SUFFIX))))
+ifndef OBJS
+_OBJS = $(COBJS) $(SOBJS) $(CPPOBJS) $(CMOBJS) $(CMMOBJS) $(ASOBJS) $(CWASMOBJS) $(CPPWASMOBJS)
+OBJS = $(strip $(_OBJS))
+endif
+
+HOST_COBJS = $(addprefix host_,$(notdir $(HOST_CSRCS:.c=.$(OBJ_SUFFIX))))
+# HOST_CPPOBJS can have different extensions (eg: .cpp, .cc)
+HOST_CPPOBJS = $(addprefix host_,$(notdir $(addsuffix .$(OBJ_SUFFIX),$(basename $(HOST_CPPSRCS)))))
+HOST_CMOBJS = $(addprefix host_,$(notdir $(HOST_CMSRCS:.m=.$(OBJ_SUFFIX))))
+HOST_CMMOBJS = $(addprefix host_,$(notdir $(HOST_CMMSRCS:.mm=.$(OBJ_SUFFIX))))
+ifndef HOST_OBJS
+_HOST_OBJS = $(HOST_COBJS) $(HOST_CPPOBJS) $(HOST_CMOBJS) $(HOST_CMMOBJS)
+HOST_OBJS = $(strip $(_HOST_OBJS))
+endif
+else
+LIBRARY :=
+SHARED_LIBRARY :=
+IMPORT_LIBRARY :=
+REAL_LIBRARY :=
+PROGRAM :=
+SIMPLE_PROGRAMS :=
+HOST_SHARED_LIBRARY :=
+HOST_PROGRAM :=
+HOST_SIMPLE_PROGRAMS :=
+endif
+
+ifdef MACH
+ifndef NO_BUILDSTATUS_MESSAGES
+define BUILDSTATUS
+@echo 'BUILDSTATUS $1'
+
+endef
+endif
+endif
+
+define SUBMAKE # $(call SUBMAKE,target,directory,static)
++@$(MAKE) $(if $(2),-C $(2)) $(1)
+
+endef # The extra line is important here! don't delete it
+
+define TIER_DIR_SUBMAKE
+$(call SUBMAKE,$(4),$(3),$(5))
+
+endef # Ths empty line is important.
+
+ifneq (,$(strip $(DIRS)))
+LOOP_OVER_DIRS = \
+  $(foreach dir,$(DIRS),$(call SUBMAKE,$@,$(dir)))
+endif
+
+#
+# Now we can differentiate between objects used to build a library, and
+# objects used to build an executable in the same directory.
+#
+ifndef PROGOBJS
+PROGOBJS		= $(OBJS)
+endif
+
+ifndef HOST_PROGOBJS
+HOST_PROGOBJS		= $(HOST_OBJS)
+endif
+
+#
+# Tags: emacs (etags), vi (ctags)
+# TAG_PROGRAM := ctags -L -
+#
+TAG_PROGRAM		= xargs etags -a
+
+#
+# Turn on C++ linking if we have any .cpp or .mm files
+# (moved this from config.mk so that config.mk can be included
+#  before the CPPSRCS are defined)
+#
+ifneq ($(HOST_CPPSRCS)$(HOST_CMMSRCS),)
+HOST_CPP_PROG_LINK	= 1
+endif
+
+#
+# MacOS X specific stuff
+#
+
+ifeq ($(OS_ARCH),Darwin)
+ifneq (,$(SHARED_LIBRARY))
+_LOADER_PATH := @rpath
+EXTRA_DSO_LDOPTS	+= -dynamiclib -install_name $(_LOADER_PATH)/$@ -compatibility_version 1 -current_version 1
+endif
+endif
+
+#
+# GNU doesn't have path length limitation
+#
+
+ifeq ($(OS_ARCH),GNU)
+OS_CPPFLAGS += -DPATH_MAX=1024 -DMAXPATHLEN=1024
+endif
+
+EXTRA_DSO_LDOPTS += -Wl,-soname,lib$(JS_LIBRARY_NAME).so.0
+
+#
+# MINGW32
+#
+ifeq ($(OS_ARCH),WINNT)
+ifdef GNU_CC
+DSO_LDOPTS += -Wl,--out-implib -Wl,$(IMPORT_LIBRARY)
+endif
+endif
+
+ifeq ($(USE_TVFS),1)
+IFLAGS1 = -rb
+IFLAGS2 = -rb
+else
+IFLAGS1 = -m 644
+IFLAGS2 = -m 755
+endif
+
+ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
+OUTOPTION = -Fo# eol
+else
+OUTOPTION = -o # eol
+endif # WINNT && !GNU_CC
+
+ifeq (,$(CROSS_COMPILE))
+HOST_OUTOPTION = $(OUTOPTION)
+else
+# Windows-to-Windows cross compiles should always use MSVC-style options for
+# host compiles.
+ifeq (WINNT_WINNT,$(HOST_OS_ARCH)_$(OS_ARCH))
+ifneq (,$(filter-out clang-cl,$(HOST_CC_TYPE)))
+$(error MSVC-style compilers should be used for host compilations!)
+endif
+HOST_OUTOPTION = -Fo# eol
+else
+HOST_OUTOPTION = -o # eol
+endif
+endif
+################################################################################
+
+# Ensure the build config is up to date. This is done automatically when builds
+# are performed through |mach build|. The check here is to catch people not
+# using mach. If we ever enforce builds through mach, this code can be removed.
+ifndef MOZBUILD_BACKEND_CHECKED
+ifndef MACH
+ifndef TOPLEVEL_BUILD
+BUILD_BACKEND_FILES := $(addprefix $(DEPTH)/backend.,$(addsuffix Backend,$(BUILD_BACKENDS)))
+$(DEPTH)/backend.%Backend:
+	$(error Build configuration changed. Build with |mach build| or run |mach build-backend| to regenerate build config)
+
+define build_backend_rule
+$(1): $$(shell cat $(1).in)
+
+endef
+$(foreach file,$(BUILD_BACKEND_FILES),$(eval $(call build_backend_rule,$(file))))
+
+default:: $(BUILD_BACKEND_FILES)
+
+export MOZBUILD_BACKEND_CHECKED=1
+endif
+endif
+endif
+
+# The root makefile doesn't want to do a plain export/libs, because
+# of the tiers and because of libxul. Suppress the default rules in favor
+# of something else. Makefiles which use this var *must* provide a sensible
+# default rule before including rules.mk
+default all::
+	$(foreach tier,$(TIERS),$(call SUBMAKE,$(tier)))
+
+ifdef BUILD_VERBOSE_LOG
+ECHO := echo
+QUIET :=
+else
+ECHO := true
+QUIET := -q
+endif
+
+# Dependencies which, if modified, should cause everything to rebuild
+GLOBAL_DEPS += Makefile $(addprefix $(DEPTH)/config/,$(INCLUDED_AUTOCONF_MK)) $(MOZILLA_DIR)/config/config.mk
+
+ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+# We always build .res files for programs and shared libraries
+resfile = $(notdir $1).res
+# We also build .res files for simple programs if a corresponding manifest
+# exists. We'll generate a .rc file that includes the manifest.
+ifdef GNU_CC
+# Skip on mingw builds because of bug 1657863
+resfile_for_manifest =
+else
+resfile_for_manifest = $(if $(wildcard $(srcdir)/$(notdir $1).manifest),$(call resfile,$1))
+endif
+else
+resfile =
+resfile_for_manifest =
+endif
+
+##############################################
+ifdef COMPILE_ENVIRONMENT
+compile:: host target
+
+host:: $(HOST_OBJS) $(HOST_PROGRAM) $(HOST_SIMPLE_PROGRAMS) $(HOST_RUST_PROGRAMS) $(HOST_RUST_LIBRARY_FILE) $(HOST_SHARED_LIBRARY)
+
+target:: $(filter-out $(MOZBUILD_NON_DEFAULT_TARGETS),$(LIBRARY) $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS) $(RUST_LIBRARY_FILE) $(RUST_PROGRAMS))
+
+ifndef LIBRARY
+ifdef OBJS
+target:: $(OBJS)
+endif
+endif
+
+target-objects: $(OBJS) $(PROGOBJS)
+host-objects: $(HOST_OBJS) $(HOST_PROGOBJS)
+
+syms::
+
+include $(MOZILLA_DIR)/config/makefiles/target_binaries.mk
+endif
+
+alltags:
+	$(RM) TAGS
+	find $(topsrcdir) -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' -o -name '*.idl' \) -print | $(TAG_PROGRAM)
+
+define EXPAND_CC_OR_CXX
+$(if $(PROG_IS_C_ONLY_$(1)),$(CC),$(CCC))
+endef
+
+#
+# PROGRAM = Foo
+# creates OBJS, links with LIBS to create Foo
+#
+$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(call resfile,$(PROGRAM)) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
+	$(REPORT_BUILD)
+ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
+	$(LINKER) -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+else # !WINNT || GNU_CC
+	$(call EXPAND_CC_OR_CXX,$@) -o $@ $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) $($(notdir $@)_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+	$(call py_action,check_binary,--target $@)
+endif # WINNT && !GNU_CC
+
+ifdef ENABLE_STRIP
+	$(STRIP) $(STRIP_FLAGS) $@
+endif
+ifdef MOZ_POST_PROGRAM_COMMAND
+	$(MOZ_POST_PROGRAM_COMMAND) $@
+endif
+
+$(HOST_PROGRAM): $(HOST_PROGOBJS) $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS) $(call mkdir_deps,$(DEPTH)/dist/host/bin)
+	$(REPORT_BUILD)
+ifeq (_WINNT,$(GNU_CC)_$(HOST_OS_ARCH))
+	$(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+else
+ifeq ($(HOST_CPP_PROG_LINK),1)
+	$(HOST_CXX) -o $@ $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+else
+	$(HOST_CC) -o $@ $(HOST_C_LDFLAGS) $(HOST_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+endif # HOST_CPP_PROG_LINK
+endif
+ifndef CROSS_COMPILE
+	$(call py_action,check_binary,--host $@)
+endif
+
+#
+# This is an attempt to support generation of multiple binaries
+# in one directory, it assumes everything to compile Foo is in
+# Foo.o (from either Foo.c or Foo.cpp).
+#
+# SIMPLE_PROGRAMS = Foo Bar
+# creates Foo.o Bar.o, links with LIBS to create Foo, Bar.
+#
+define simple_program_deps
+$1: $(1:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) $(STATIC_LIBS) $(EXTRA_DEPS) $(call resfile_for_manifest,$1) $(GLOBAL_DEPS)
+endef
+$(foreach p,$(SIMPLE_PROGRAMS),$(eval $(call simple_program_deps,$(p))))
+
+$(SIMPLE_PROGRAMS):
+	$(REPORT_BUILD)
+ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
+	$(LINKER) -out:$@ -pdb:$(LINK_PDBFILE) $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
+else
+	$(call EXPAND_CC_OR_CXX,$@) $(COMPUTED_CXX_LDFLAGS) $(PGO_CFLAGS) -o $@ $($@_OBJS) $(filter %.res,$^) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(STATIC_LIBS) $(MOZ_PROGRAM_LDFLAGS) $(SHARED_LIBS) $(OS_LIBS)
+	$(call py_action,check_binary,--target $@)
+endif # WINNT && !GNU_CC
+
+ifdef ENABLE_STRIP
+	$(STRIP) $(STRIP_FLAGS) $@
+endif
+ifdef MOZ_POST_PROGRAM_COMMAND
+	$(MOZ_POST_PROGRAM_COMMAND) $@
+endif
+
+$(HOST_SIMPLE_PROGRAMS): host_%$(HOST_BIN_SUFFIX): $(HOST_LIBS) $(HOST_EXTRA_DEPS) $(GLOBAL_DEPS)
+	$(REPORT_BUILD)
+ifeq (WINNT_,$(HOST_OS_ARCH)_$(GNU_CC))
+	$(HOST_LINKER) -OUT:$@ -PDB:$(HOST_PDBFILE) $($(notdir $@)_OBJS) $(WIN32_EXE_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+else
+ifneq (,$(HOST_CPPSRCS)$(USE_HOST_CXX))
+	$(HOST_CXX) $(HOST_OUTOPTION)$@ $(HOST_CXX_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+else
+	$(HOST_CC) $(HOST_OUTOPTION)$@ $(HOST_C_LDFLAGS) $($(notdir $@)_OBJS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+endif
+endif
+ifndef CROSS_COMPILE
+	$(call py_action,check_binary,--host $@)
+endif
+
+$(LIBRARY): $(OBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+	$(REPORT_BUILD)
+	$(RM) $(REAL_LIBRARY)
+	$(AR) $(AR_FLAGS) $($@_OBJS)
+
+$(WASM_ARCHIVE): $(CWASMOBJS) $(CPPWASMOBJS) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+	$(REPORT_BUILD_VERBOSE)
+	$(RM) $(WASM_ARCHIVE)
+	$(WASM_CXX) -o $@ -Wl,--export-all -Wl,--stack-first -Wl,-z,stack-size=$(if $(MOZ_OPTIMIZE),262144,1048576) -Wl,--no-entry -Wl,--growable-table $(CWASMOBJS) $(CPPWASMOBJS) -lwasi-emulated-process-clocks
+
+$(addsuffix .c,$(WASM_ARCHIVE)): $(WASM_ARCHIVE) $(DIST)/host/bin/wasm2c$(HOST_BIN_SUFFIX)
+	$(DIST)/host/bin/wasm2c$(HOST_BIN_SUFFIX) -o $@ $<
+
+ifeq ($(OS_ARCH),WINNT)
+# Import libraries are created by the rules creating shared libraries.
+# The rules to copy them to $(DIST)/lib depend on $(IMPORT_LIBRARY),
+# but make will happily consider the import library before it is refreshed
+# when rebuilding the corresponding shared library. Defining an empty recipe
+# for import libraries forces make to wait for the shared library recipe to
+# have run before considering other targets that depend on the import library.
+# See bug 795204.
+$(IMPORT_LIBRARY): $(SHARED_LIBRARY) ;
+endif
+
+$(HOST_SHARED_LIBRARY): Makefile
+	$(REPORT_BUILD)
+	$(RM) $@
+ifneq (,$(filter clang-cl,$(HOST_CC_TYPE)))
+	$(HOST_LINKER) -DLL -OUT:$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LINKER_LIBPATHS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+else
+	$(HOST_CXX) $(HOST_OUTOPTION)$@ $($(notdir $@)_OBJS) $(HOST_CXX_LDFLAGS) $(HOST_LDFLAGS) $(HOST_LIBS) $(HOST_EXTRA_LIBS)
+endif
+
+# On Darwin (Mac OS X), dwarf2 debugging uses debug info left in .o files,
+# so instead of deleting .o files after repacking them into a dylib, we make
+# symlinks back to the originals. The symlinks are a no-op for stabs debugging,
+# so no need to conditionalize on OS version or debugging format.
+
+$(SHARED_LIBRARY): $(OBJS) $(call resfile,$(SHARED_LIBRARY)) $(STATIC_LIBS) $(EXTRA_DEPS) $(GLOBAL_DEPS)
+	$(REPORT_BUILD)
+	$(RM) $@
+	$(MKSHLIB) $($@_OBJS) $(filter %.res,$^) $(LDFLAGS) $(STATIC_LIBS) $(SHARED_LIBS) $(EXTRA_DSO_LDOPTS) $(MOZ_GLUE_LDFLAGS) $(OS_LIBS)
+	$(call py_action,check_binary,--target $@)
+
+ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
+endif	# WINNT && !GCC
+	chmod +x $@
+ifdef ENABLE_STRIP
+	$(STRIP) $(STRIP_FLAGS) $@
+endif
+
+# The object file is in the current directory, and the source file can be any
+# relative path. This macro adds the dependency obj: src for each source file.
+# This dependency must be first for the $< flag to work correctly, and the
+# rules that have commands for these targets must not list any other
+# prerequisites, or they will override the $< variable.
+define src_objdep
+$(basename $3$(notdir $1)).$2: $1 $$(call mkdir_deps,$$(MDDEPDIR))
+endef
+$(foreach f,$(CSRCS) $(SSRCS) $(CPPSRCS) $(CMSRCS) $(CMMSRCS) $(ASFILES),$(eval $(call src_objdep,$(f),$(OBJ_SUFFIX))))
+$(foreach f,$(HOST_CSRCS) $(HOST_CPPSRCS) $(HOST_CMSRCS) $(HOST_CMMSRCS),$(eval $(call src_objdep,$(f),$(OBJ_SUFFIX),host_)))
+$(foreach f,$(WASM_CSRCS) $(WASM_CPPSRCS),$(eval $(call src_objdep,$(f),wasm)))
+
+# The Rust compiler only outputs library objects, and so we need different
+# mangling to generate dependency rules for it.
+mk_global_crate_libname = $(basename lib$(notdir $1)).$(LIB_SUFFIX)
+crate_src_libdep = $(call mk_global_crate_libname,$1): $1 $$(call mkdir_deps,$$(MDDEPDIR))
+$(foreach f,$(RS_STATICLIB_CRATE_SRC),$(eval $(call crate_src_libdep,$(f))))
+
+$(OBJS) $(HOST_OBJS) $(PROGOBJS) $(HOST_PROGOBJS): $(GLOBAL_DEPS)
+
+# Rules for building native targets must come first because of the host_ prefix
+$(HOST_COBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(NSPR_CFLAGS) $<
+
+$(HOST_CPPOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(call BUILDSTATUS,OBJECT_FILE $@)
+	$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(NSPR_CFLAGS) $<
+
+$(HOST_CMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(HOST_CC) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CFLAGS) $(HOST_CMFLAGS) $(NSPR_CFLAGS) $<
+
+$(HOST_CMMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(HOST_CXX) $(HOST_OUTOPTION)$@ -c $(HOST_CPPFLAGS) $(HOST_CXXFLAGS) $(HOST_CMMFLAGS) $(NSPR_CFLAGS) $<
+
+$(COBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(CC) $(OUTOPTION)$@ -c $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(CWASMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(WASM_CC) -o $@ -c $(WASM_CFLAGS) $($(notdir $<)_FLAGS) $<
+
+WINEWRAP = $(if $(and $(filter %.exe,$1),$(WINE)),$(WINE) $1,$1)
+
+# Windows program run via Wine don't like Unix absolute paths (they look
+# like command line arguments). So when needed, create relative paths
+# from absolute paths. We start with $(DEPTH), which gets us to topobjdir,
+# then add "/.." for each component of topobjdir, which gets us to /.
+# then we can add the absolute path after that and we have a relative path,
+# albeit longer than it could be.
+ifdef WINE
+relativize = $(if $(filter /%,$1),$(DEPTH)$(subst $(space),,$(foreach d,$(subst /, ,$(topobjdir)),/..))$1,$1)
+else
+relativize = $1
+endif
+
+ifdef ASFILES
+# The AS_DASH_C_FLAG is needed cause not all assemblers (Solaris) accept
+# a '-c' flag.
+$(ASOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(call WINEWRAP,$(AS)) $(ASOUTOPTION)$@ $(ASFLAGS) $($(notdir $<)_FLAGS) $(AS_DASH_C_FLAG) $(call relativize,$<)
+endif
+
+define syms_template
+syms:: $(2)
+$(2): $(1)
+ifdef MOZ_CRASHREPORTER
+	$$(call py_action,dumpsymbols,$$(abspath $$<) $$(abspath $$@) $$(DUMP_SYMBOLS_FLAGS))
+ifeq ($(OS_ARCH),WINNT)
+ifdef WINCHECKSEC
+	$$(PYTHON3) $$(topsrcdir)/build/win32/autowinchecksec.py $$<
+endif # WINCHECKSEC
+endif # WINNT
+endif
+endef
+
+ifneq (,$(filter $(DIST)/bin%,$(FINAL_TARGET)))
+DUMP_SYMS_TARGETS := $(SHARED_LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
+endif
+
+ifdef MOZ_AUTOMATION
+ifeq (,$(filter 1,$(MOZ_AUTOMATION_BUILD_SYMBOLS)))
+DUMP_SYMS_TARGETS :=
+endif
+endif
+
+ifdef MOZ_COPY_PDBS
+MAIN_PDB_FILES = $(addsuffix .pdb,$(basename $(DUMP_SYMS_TARGETS)))
+MAIN_PDB_DEST ?= $(FINAL_TARGET)
+MAIN_PDB_TARGET = syms
+INSTALL_TARGETS += MAIN_PDB
+
+ifdef CPP_UNIT_TESTS
+CPP_UNIT_TESTS_PDB_FILES = $(addsuffix .pdb,$(basename $(CPP_UNIT_TESTS)))
+CPP_UNIT_TESTS_PDB_DEST = $(DIST)/cppunittests
+CPP_UNIT_TESTS_PDB_TARGET = syms
+INSTALL_TARGETS += CPP_UNIT_TESTS_PDB
+endif
+
+else ifdef MOZ_CRASHREPORTER
+$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(notdir $(file))_syms.track)))
+endif
+
+ifneq (,$(RUST_TESTS)$(RUST_LIBRARY_FILE)$(HOST_RUST_LIBRARY_FILE)$(RUST_PROGRAMS)$(HOST_RUST_PROGRAMS))
+include $(MOZILLA_DIR)/config/makefiles/rust.mk
+endif
+
+$(SOBJS):
+	$(REPORT_BUILD)
+	$(call WINEWRAP,$(AS)) $(ASOUTOPTION)$@ $(SFLAGS) $($(notdir $<)_FLAGS) -c $(call relativize,$<)
+
+$(CPPOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(call BUILDSTATUS,OBJECT_FILE $@)
+	$(CCC) $(OUTOPTION)$@ -c $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(CPPWASMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(call BUILDSTATUS,OBJECT_FILE $@)
+	$(WASM_CXX) -o $@ -c $(WASM_CXXFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(CMMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(CCC) -o $@ -c $(COMPILE_CXXFLAGS) $(COMPILE_CMMFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(CMOBJS):
+	$(REPORT_BUILD_VERBOSE)
+	$(CC) -o $@ -c $(COMPILE_CFLAGS) $(COMPILE_CMFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(filter %.s,$(CPPSRCS:%.cpp=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
+	$(REPORT_BUILD_VERBOSE)
+	$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(filter %.s,$(CPPSRCS:%.cc=%.s)): %.s: %.cc $(call mkdir_deps,$(MDDEPDIR))
+	$(REPORT_BUILD_VERBOSE)
+	$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(filter %.s,$(CPPSRCS:%.cxx=%.s)): %.s: %.cpp $(call mkdir_deps,$(MDDEPDIR))
+	$(REPORT_BUILD_VERBOSE)
+	$(CCC) -S $(COMPILE_CXXFLAGS) $($(notdir $<)_FLAGS) $<
+
+$(filter %.s,$(CSRCS:%.c=%.s)): %.s: %.c $(call mkdir_deps,$(MDDEPDIR))
+	$(REPORT_BUILD_VERBOSE)
+	$(CC) -S $(COMPILE_CFLAGS) $($(notdir $<)_FLAGS) $<
+
+ifneq (,$(filter %.i,$(MAKECMDGOALS)))
+# Call as $(call _group_srcs,extension,$(SRCS)) - this will create a list
+# of the full sources, as well as the $(notdir) version. So:
+#   foo.cpp sub/bar.cpp
+# becomes:
+#   foo.cpp sub/bar.cpp bar.cpp
+#
+# This way we can match both 'make sub/bar.i' and 'make bar.i'
+_group_srcs = $(sort $(patsubst %.$1,%.i,$(filter %.$1,$2 $(notdir $2))))
+
+define PREPROCESS_RULES
+_PREPROCESSED_$1_FILES := $$(call _group_srcs,$1,$$($2))
+# Make preprocessed files PHONY so they are always executed, since they are
+# manual targets and we don't necessarily write to $@.
+.PHONY: $$(_PREPROCESSED_$1_FILES)
+
+# Hack up VPATH so we can reach the sources. Eg: 'make Parser.i' may need to
+# reach $(srcdir)/frontend/Parser.i
+vpath %.$1 $$(addprefix $$(srcdir)/,$$(sort $$(dir $$($2))))
+vpath %.$1 $$(addprefix $$(CURDIR)/,$$(sort $$(dir $$($2))))
+
+$$(_PREPROCESSED_$1_FILES): _DEPEND_CFLAGS=
+$$(_PREPROCESSED_$1_FILES): %.i: %.$1
+	$$(REPORT_BUILD_VERBOSE)
+	$$(addprefix $$(MKDIR) -p ,$$(filter-out .,$$(@D)))
+	$$($3) -C $$(PREPROCESS_OPTION)$$@ $(foreach var,$4,$$($(var))) $$($$(notdir $$<)_FLAGS) $$<
+
+endef
+
+$(eval $(call PREPROCESS_RULES,cpp,CPPSRCS,CCC,COMPILE_CXXFLAGS))
+$(eval $(call PREPROCESS_RULES,cc,CPPSRCS,CCC,COMPILE_CXXFLAGS))
+$(eval $(call PREPROCESS_RULES,cxx,CPPSRCS,CCC,COMPILE_CXXFLAGS))
+$(eval $(call PREPROCESS_RULES,c,CSRCS,CC,COMPILE_CFLAGS))
+$(eval $(call PREPROCESS_RULES,mm,CMMSRCS,CCC,COMPILE_CXXFLAGS COMPILE_CMMFLAGS))
+
+# Default to pre-processing the actual unified file. This can be overridden
+# at the command-line to pre-process only the individual source file.
+PP_UNIFIED ?= 1
+
+# PP_REINVOKE gets set on the sub-make to prevent us from going in an
+# infinite loop if the filename doesn't exist in the unified source files.
+ifndef PP_REINVOKE
+
+MATCH_cpp = \(cpp\|cc|cxx\)
+UPPER_c = C
+UPPER_cpp = CPP
+UPPER_mm = CMM
+
+# When building with PP_UNIFIED=0, we also have to look in the Unified files to
+# find a matching pathname.
+_get_all_sources = $1 $(if $(filter Unified%,$1),$(shell sed -n 's/\#include "\(.*\)"$$/\1/p' $(filter Unified%,$1)))
+all_cpp_sources := $(call _get_all_sources,$(CPPSRCS))
+all_mm_sources := $(call _get_all_sources,$(CMMSRCS))
+all_c_sources := $(call _get_all_sources,$(CSRCS))
+all_sources := $(all_cpp_sources) $(all_cmm_sources) $(all_c_sources)
+
+# The catch-all %.i rule runs when we pass in a .i filename that doesn't match
+# one of the *SRCS variables. The two code paths depend on whether or not
+# we are requesting a unified file (PP_UNIFIED=1, the default) or not:
+#
+# PP_UNIFIED=1:
+#  - Look for it in any of the Unified files, and re-exec make with
+#    Unified_foo0.i as the target. This gets us the full unified preprocessed
+#    file.
+#
+# PP_UNIFIED=0:
+#  - If the .i filename is in *SRCS, or in a Unified filename, then we re-exec
+#    make with that filename as the target. The *SRCS variables are modified
+#    to have the Unified sources appended to them so that the static pattern
+#    rules will match.
+%.i: FORCE
+ifeq ($(PP_UNIFIED),1)
+	@$(MAKE) PP_REINVOKE=1 \
+	    $(or $(addsuffix .i, \
+              $(foreach type,c cpp mm, \
+	        $(if $(filter Unified%,$($(UPPER_$(type))SRCS)), \
+	          $(shell grep -l '#include "\(.*/\)\?$(basename $@).$(or $(MATCH_$(type)),$(type))"' Unified*.$(type) | sed 's/\.$(type)$$//') \
+            ))),$(error "File not found for preprocessing: $@"))
+else
+	@$(MAKE) PP_REINVOKE=1 $@ \
+	    $(foreach type,c cpp mm,$(UPPER_$(type))SRCS="$(all_$(type)_sources)")
+endif
+
+endif
+
+endif
+
+# EXTRA_DEPS contains manifests (manually added in Makefile.in ; bug 1498414)
+%.res: $(or $(RCFILE),%.rc) $(MOZILLA_DIR)/config/create_res.py $(EXTRA_DEPS)
+	$(REPORT_BUILD)
+	$(PYTHON3) $(MOZILLA_DIR)/config/create_res.py $(DEFINES) $(INCLUDES) -o $@ $<
+
+$(notdir $(addsuffix .rc,$(PROGRAM) $(SHARED_LIBRARY) $(SIMPLE_PROGRAMS) module)): %.rc: $(RCINCLUDE) $(MOZILLA_DIR)/config/create_rc.py
+	$(PYTHON3) $(MOZILLA_DIR)/config/create_rc.py '$(if $(filter module,$*),,$*)' '$(RCINCLUDE)'
+
+# Cancel GNU make built-in implicit rules
+MAKEFLAGS += -r
+
+ifneq (,$(filter WINNT,$(OS_ARCH)))
+SEP := ;
+else
+SEP := :
+endif
+
+EMPTY :=
+SPACE := $(EMPTY) $(EMPTY)
+
+###############################################################################
+# Bunch of things that extend the 'export' rule (in order):
+###############################################################################
+
+ifneq ($(XPI_NAME),)
+$(FINAL_TARGET):
+	$(NSINSTALL) -D $@
+
+export:: $(FINAL_TARGET)
+endif
+
+################################################################################
+# The default location for prefs is the gre prefs directory.
+# PREF_DIR is used for L10N_PREF_JS_EXPORTS in various locales/ directories.
+PREF_DIR = defaults/pref
+
+# If DIST_SUBDIR is defined it indicates that app and gre dirs are
+# different and that we are building app related resources. Hence,
+# PREF_DIR should point to the app prefs location.
+ifneq (,$(DIST_SUBDIR)$(XPI_NAME))
+PREF_DIR = defaults/preferences
+endif
+
+################################################################################
+# CHROME PACKAGING
+
+chrome::
+	$(MAKE) realchrome
+	$(LOOP_OVER_DIRS)
+
+$(FINAL_TARGET)/chrome: $(call mkdir_deps,$(FINAL_TARGET)/chrome)
+
+ifneq (,$(JAR_MANIFEST))
+ifndef NO_DIST_INSTALL
+
+ifdef XPI_NAME
+ifdef XPI_ROOT_APPID
+# For add-on packaging we may specify that an application
+# sub-dir should be added to the root chrome manifest with
+# a specific application id.
+MAKE_JARS_FLAGS += --root-manifest-entry-appid='$(XPI_ROOT_APPID)'
+endif
+
+# if DIST_SUBDIR is defined but XPI_ROOT_APPID is not there's
+# no way langpacks will get packaged right, so error out.
+ifneq (,$(DIST_SUBDIR))
+ifndef XPI_ROOT_APPID
+$(error XPI_ROOT_APPID is not defined - langpacks will break.)
+endif
+endif
+endif
+
+misc realchrome:: $(FINAL_TARGET)/chrome
+	$(call py_action,jar_maker,\
+	  $(QUIET) -d $(FINAL_TARGET) \
+	  $(MAKE_JARS_FLAGS) $(DEFINES) $(ACDEFINES) \
+	  $(JAR_MANIFEST))
+
+ifdef AB_CD
+.PHONY: l10n
+l10n: misc ;
+endif
+endif
+
+endif
+
+# When you move this out of the tools tier, please remove the corresponding
+# hacks in recursivemake.py that check if Makefile.in sets the variable.
+ifneq ($(XPI_PKGNAME),)
+tools realchrome::
+	@echo 'Packaging $(XPI_PKGNAME).xpi...'
+	$(call py_action,zip,-C $(FINAL_TARGET) ../$(XPI_PKGNAME).xpi '*')
+endif
+
+#############################################################################
+# MDDEPDIR is the subdirectory where all the dependency files are placed.
+#   This uses a make rule (instead of a macro) to support parallel
+#   builds (-jN). If this were done in the LOOP_OVER_DIRS macro, two
+#   processes could simultaneously try to create the same directory.
+#
+#   We use $(CURDIR) in the rule's target to ensure that we don't find
+#   a dependency directory in the source tree via VPATH (perhaps from
+#   a previous build in the source tree) and thus neglect to create a
+#   dependency directory in the object directory, where we really need
+#   it.
+
+_MDDEPEND_FILES :=
+
+ifneq (,$(filter target-objects target all default,$(MAKECMDGOALS)))
+_MDDEPEND_FILES += $(addsuffix .pp,$(notdir $(sort $(OBJS) $(PROGOBJS))))
+endif
+
+ifneq (,$(filter host-objects host all default,$(MAKECMDGOALS)))
+_MDDEPEND_FILES += $(addsuffix .pp,$(notdir $(sort $(HOST_OBJS) $(HOST_PROGOBJS))))
+endif
+
+MDDEPEND_FILES := $(strip $(wildcard $(addprefix $(MDDEPDIR)/,$(_MDDEPEND_FILES))))
+MDDEPEND_FILES += $(EXTRA_MDDEPEND_FILES)
+
+ifneq (,$(MDDEPEND_FILES))
+-include $(MDDEPEND_FILES)
+endif
+
+################################################################################
+# Install/copy rules
+#
+# The INSTALL_TARGETS variable contains a list of all install target
+# categories. Each category defines a list of files and executables, and an
+# install destination,
+#
+# FOO_FILES := foo bar
+# FOO_EXECUTABLES := baz
+# FOO_DEST := target_path
+# INSTALL_TARGETS += FOO
+#
+# Additionally, a FOO_TARGET variable may be added to indicate the target for
+# which the files and executables are installed. Default is "libs".
+#
+# Finally, a FOO_KEEP_PATH variable may be set to 1 to indicate the paths given
+# in FOO_FILES/FOO_EXECUTABLES are to be kept at the destination. That is,
+# if FOO_FILES is bar/baz/qux.h, and FOO_DEST is $(DIST)/include, the installed
+# file would be $(DIST)/include/bar/baz/qux.h instead of $(DIST)/include/qux.h
+
+# If we're using binary nsinstall and it's not built yet, fallback to python nsinstall.
+ifneq (,$(filter $(DEPTH)/config/nsinstall$(HOST_BIN_SUFFIX),$(install_cmd)))
+ifeq (,$(wildcard $(DEPTH)/config/nsinstall$(HOST_BIN_SUFFIX)))
+nsinstall_is_usable = $(if $(wildcard $(DEPTH)/config/nsinstall$(HOST_BIN_SUFFIX)),yes)
+
+define install_cmd_override
+$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY) -t) $$(1)
+endef
+endif
+endif
+
+install_target_tier = $(or $($(1)_TARGET),libs)
+INSTALL_TARGETS_TIERS := $(sort $(foreach category,$(INSTALL_TARGETS),$(call install_target_tier,$(category))))
+
+install_target_result = $($(1)_DEST:%/=%)/$(if $($(1)_KEEP_PATH),$(2),$(notdir $(2)))
+install_target_files = $(foreach file,$($(1)_FILES),$(call install_target_result,$(category),$(file)))
+install_target_executables = $(foreach file,$($(1)_EXECUTABLES),$(call install_target_result,$(category),$(file)))
+
+# Work around a GNU make 3.81 bug where it gives $< the wrong value.
+# See details in bug 934864.
+define create_dependency
+$(1): $(2)
+$(1): $(2)
+endef
+
+define install_target_template
+$(call install_cmd_override,$(2))
+$(call create_dependency,$(2),$(1))
+endef
+
+$(foreach category,$(INSTALL_TARGETS),\
+  $(if $($(category)_DEST),,$(error Missing $(category)_DEST)) \
+  $(foreach tier,$(call install_target_tier,$(category)),\
+    $(eval INSTALL_TARGETS_FILES_$(tier) += $(call install_target_files,$(category))) \
+    $(eval INSTALL_TARGETS_EXECUTABLES_$(tier) += $(call install_target_executables,$(category))) \
+  ) \
+  $(foreach file,$($(category)_FILES) $($(category)_EXECUTABLES), \
+    $(eval $(call install_target_template,$(file),$(call install_target_result,$(category),$(file)))) \
+  ) \
+)
+
+$(foreach tier,$(INSTALL_TARGETS_TIERS), \
+  $(eval $(tier):: $(INSTALL_TARGETS_FILES_$(tier)) $(INSTALL_TARGETS_EXECUTABLES_$(tier))) \
+)
+
+install_targets_sanity = $(if $(filter-out $(notdir $@),$(notdir $(<))),$(error Looks like $@ has an unexpected dependency on $< which breaks INSTALL_TARGETS))
+
+$(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_FILES_$(tier)))):
+	$(install_targets_sanity)
+	$(call install_cmd,$(IFLAGS1) '$<' '$(@D)')
+
+$(sort $(foreach tier,$(INSTALL_TARGETS_TIERS),$(INSTALL_TARGETS_EXECUTABLES_$(tier)))):
+	$(install_targets_sanity)
+	$(call install_cmd,$(IFLAGS2) '$<' '$(@D)')
+
+################################################################################
+# Preprocessing rules
+#
+# The PP_TARGETS variable contains a list of all preprocessing target
+# categories. Each category has associated variables listing input files, the
+# output directory, extra preprocessor flags, and so on. For example:
+#
+#   FOO := input-file
+#   FOO_PATH := target-directory
+#   FOO_FLAGS := -Dsome_flag
+#   PP_TARGETS += FOO
+#
+# If PP_TARGETS lists a category name <C> (like FOO, above), then we consult the
+# following make variables to see what to do:
+#
+# - <C> lists input files to be preprocessed with mozbuild.action.preprocessor.
+#   We search VPATH for the names given here. If an input file name ends in
+#   '.in', that suffix is omitted from the output file name.
+#
+# - <C>_PATH names the directory in which to place the preprocessed output
+#   files. We create this directory if it does not already exist. Setting
+#   this variable is optional; if unset, we install the files in $(CURDIR).
+#
+# - <C>_FLAGS lists flags to pass to mozbuild.action.preprocessor, in addition
+#   to the usual bunch. Setting this variable is optional.
+#
+# - <C>_TARGET names the 'make' target that should depend on creating the output
+#   files. Setting this variable is optional; if unset, we preprocess the
+#   files for the 'libs' target.
+#
+# - <C>_KEEP_PATH may be set to 1 to indicate the paths given in <C> are to be
+#   kept under <C>_PATH. That is, if <C> is bar/baz/qux.h.in and <C>_PATH is
+#   $(DIST)/include, the preprocessed file would be $(DIST)/include/bar/baz/qux.h
+#   instead of $(DIST)/include/qux.h.
+
+pp_target_tier = $(or $($(1)_TARGET),libs)
+PP_TARGETS_TIERS := $(sort $(foreach category,$(PP_TARGETS),$(call pp_target_tier,$(category))))
+
+pp_target_result = $(or $($(1)_PATH:%/=%),$(CURDIR))/$(if $($(1)_KEEP_PATH),$(2:.in=),$(notdir $(2:.in=)))
+pp_target_results = $(foreach file,$($(1)),$(call pp_target_result,$(category),$(file)))
+
+$(foreach category,$(PP_TARGETS), \
+  $(foreach tier,$(call pp_target_tier,$(category)), \
+    $(eval PP_TARGETS_RESULTS_$(tier) += $(call pp_target_results,$(category))) \
+  ) \
+  $(foreach file,$($(category)), \
+    $(eval $(call create_dependency,$(call pp_target_result,$(category),$(file)), \
+                                    $(file) $(GLOBAL_DEPS))) \
+  ) \
+  $(eval $(call pp_target_results,$(category)): PP_TARGET_FLAGS=$($(category)_FLAGS)) \
+)
+
+$(foreach tier,$(PP_TARGETS_TIERS), \
+  $(eval $(tier):: $(PP_TARGETS_RESULTS_$(tier))) \
+)
+
+PP_TARGETS_ALL_RESULTS := $(sort $(foreach tier,$(PP_TARGETS_TIERS),$(PP_TARGETS_RESULTS_$(tier))))
+$(PP_TARGETS_ALL_RESULTS):
+	$(if $(filter-out $(notdir $@),$(notdir $(<:.in=))),$(error Looks like $@ has an unexpected dependency on $< which breaks PP_TARGETS))
+	$(RM) '$@'
+	$(call py_action,preprocessor,--depend $(MDDEPDIR)/$(@F).pp $(PP_TARGET_FLAGS) $(DEFINES) $(ACDEFINES) '$<' -o '$@')
+
+$(filter %.css,$(PP_TARGETS_ALL_RESULTS)): PP_TARGET_FLAGS+=--marker %
+
+# The depfile is based on the filename, and we don't want conflicts. So check
+# there's only one occurrence of any given filename in PP_TARGETS_ALL_RESULTS.
+PP_TARGETS_ALL_RESULT_NAMES := $(notdir $(PP_TARGETS_ALL_RESULTS))
+$(foreach file,$(sort $(PP_TARGETS_ALL_RESULT_NAMES)), \
+  $(if $(filter-out 1,$(words $(filter $(file),$(PP_TARGETS_ALL_RESULT_NAMES)))), \
+    $(error Multiple preprocessing rules are creating a $(file) file) \
+  ) \
+)
+
+ifneq (,$(filter $(PP_TARGETS_TIERS) $(PP_TARGETS_ALL_RESULTS),$(MAKECMDGOALS)))
+# If the depfile for a preprocessed file doesn't exist, add a dep to force
+# re-preprocessing.
+$(foreach file,$(PP_TARGETS_ALL_RESULTS), \
+  $(if $(wildcard $(MDDEPDIR)/$(notdir $(file)).pp), \
+    , \
+    $(eval $(file): FORCE) \
+  ) \
+)
+
+MDDEPEND_FILES := $(strip $(wildcard $(addprefix $(MDDEPDIR)/,$(addsuffix .pp,$(notdir $(PP_TARGETS_ALL_RESULTS))))))
+
+ifneq (,$(MDDEPEND_FILES))
+-include $(MDDEPEND_FILES)
+endif
+
+endif
+
+# Pull in non-recursive targets if this is a partial tree build.
+ifndef TOPLEVEL_BUILD
+include $(MOZILLA_DIR)/config/makefiles/nonrecursive.mk
+endif
+
+################################################################################
+# Special gmake rules.
+################################################################################
+
+
+#
+# Re-define the list of default suffixes, so gmake won't have to churn through
+# hundreds of built-in suffix rules for stuff we don't need.
+#
+.SUFFIXES:
+
+#
+# Fake targets.  Always run these rules, even if a file/directory with that
+# name already exists.
+#
+.PHONY: all alltags boot chrome realchrome export install libs makefiles run_apprunner tools $(DIRS) FORCE
+
+# Used as a dependency to force targets to rebuild
+FORCE:
+
+# Delete target if error occurs when building target
+.DELETE_ON_ERROR:
+
+tags: TAGS
+
+TAGS: $(CSRCS) $(CPPSRCS) $(wildcard *.h)
+	-etags $(CSRCS) $(CPPSRCS) $(wildcard *.h)
+	$(LOOP_OVER_DIRS)
+
+ifndef INCLUDED_DEBUGMAKE_MK #{
+  ## Only parse when an echo* or show* target is requested
+  ifneq (,$(call isTargetStem,echo,show))
+    include $(MOZILLA_DIR)/config/makefiles/debugmake.mk
+  endif #}
+endif #}
+
+FREEZE_VARIABLES = \
+  CSRCS \
+  CPPSRCS \
+  EXPORTS \
+  DIRS \
+  LIBRARY \
+  MODULE \
+  $(NULL)
+
+$(foreach var,$(FREEZE_VARIABLES),$(eval $(var)_FROZEN := '$($(var))'))
+
+CHECK_FROZEN_VARIABLES = $(foreach var,$(FREEZE_VARIABLES), \
+  $(if $(subst $($(var)_FROZEN),,'$($(var))'),$(error Makefile variable '$(var)' changed value after including rules.mk. Was $($(var)_FROZEN), now $($(var)).)))
+
+libs export::
+	$(CHECK_FROZEN_VARIABLES)
+
+.DEFAULT_GOAL := $(or $(OVERRIDE_DEFAULT_GOAL),default)
+
+#############################################################################
+# Derived targets and dependencies
+
+include $(MOZILLA_DIR)/config/makefiles/autotargets.mk
+ifneq ($(NULL),$(AUTO_DEPS))
+  default all libs tools export:: $(AUTO_DEPS)
+endif
Index: mozjs/create-102.15.0-spidermonkey-checks-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-spidermonkey-checks-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-spidermonkey-checks-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-spidermonkey-checks.patch
+
+mv firefox-$VERSION-spidermonkey-checks.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-spidermonkey-checks-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-spidermonkey-checks-patch/file.list
===================================================================
--- mozjs/create-102.15.0-spidermonkey-checks-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-spidermonkey-checks-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/config/run_spidermonkey_checks.py
Index: mozjs/create-102.15.0-spidermonkey-checks-patch/firefox-102.15.0-new/config/run_spidermonkey_checks.py
===================================================================
--- mozjs/create-102.15.0-spidermonkey-checks-patch/firefox-102.15.0-new/config/run_spidermonkey_checks.py	(nonexistent)
+++ mozjs/create-102.15.0-spidermonkey-checks-patch/firefox-102.15.0-new/config/run_spidermonkey_checks.py	(revision 385)
@@ -0,0 +1,13 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import absolute_import
+import buildconfig
+import subprocess
+import sys
+
+
+def main(output, lib_file, *scripts):
+    for script in scripts:
+        retcode = subprocess.call([sys.executable, script], cwd=buildconfig.topsrcdir)
Index: mozjs/create-102.15.0-tests-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-tests-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-tests.patch
+
+mv firefox-$VERSION-tests.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-tests-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-tests-patch/file.list
===================================================================
--- mozjs/create-102.15.0-tests-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/file.list	(revision 385)
@@ -0,0 +1,4 @@
+firefox-102.15.0/js/src/Makefile.in
+firefox-102.15.0/js/src/jit-test/jit_test.py
+firefox-102.15.0/js/src/tests/jstests.py
+firefox-102.15.0/js/src/tests/lib/tempfile.py
Index: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/Makefile.in
===================================================================
--- mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/Makefile.in	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/Makefile.in	(revision 385)
@@ -0,0 +1,150 @@
+# -*- Mode: makefile -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ifeq (,$(MAKE_VERSION))
+$(error GNU Make is required)
+endif
+make_min_ver := 3.81
+ifneq ($(make_min_ver),$(firstword $(sort $(make_min_ver) $(MAKE_VERSION))))
+$(error GNU Make $(make_min_ver) or higher is required)
+endif
+
+DASH_R		= -r
+
+# Define keyword generator before rules.mk, see bug 323979 comment 50
+
+USE_HOST_CXX = 1
+
+include $(topsrcdir)/config/rules.mk
+
+ifdef MOZ_VALGRIND
+ifndef MOZ_ASAN
+JITTEST_VALGRIND_FLAG = --valgrind
+endif
+endif
+
+ifneq ($(LLVM_SYMBOLIZER),)
+# Use the LLVM symbolizer when running jit-tests under ASan and TSan, if available
+ifdef MOZ_ASAN
+JITTEST_SANITIZER_ENV=ASAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
+endif
+ifdef MOZ_TSAN
+JITTEST_SANITIZER_ENV=TSAN_OPTIONS="external_symbolizer_path=$(LLVM_SYMBOLIZER) handle_segv=0 $$TSAN_OPTIONS"
+endif
+ifdef MOZ_MSAN
+JITTEST_SANITIZER_ENV=MSAN_SYMBOLIZER_PATH='$(LLVM_SYMBOLIZER)'
+endif
+endif
+
+check-js-msg::
+	(cd $(topsrcdir) && $(PYTHON3) $(topsrcdir)/config/check_js_msg_encoding.py);
+
+check-jit-test::
+	$(JITTEST_SANITIZER_ENV) $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON3) -u $(srcdir)/jit-test/jit_test.py \
+	        --no-slow --no-progress --format=automation --jitflags=all \
+			$(JITTEST_VALGRIND_FLAG) \
+			$(JITTEST_EXTRA_ARGS) \
+	        $(DIST)/bin/js$(BIN_SUFFIX) $(JITTEST_TEST_ARGS)
+
+check:: check-js-msg
+
+check-jstests:
+	$(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON3) -u $(srcdir)/tests/jstests.py \
+		--no-progress --format=automation --timeout 600 \
+		$(JSTESTS_EXTRA_ARGS) \
+		$(DIST)/bin/js$(BIN_SUFFIX)
+
+# FIXME:
+# We want to run check-jstests as part of |make check| on all platforms, on
+# tinderbox. However, some configurations don't work quite right just yet.
+# Rather than risking regressions in major configurations while fixing these
+# secondary configuration, we work around them and fix the bugs later.
+#
+#   Bug 652154: On Windows, SM(!m !t) don't work because of path problems with
+#				their unusual directory layout
+#
+#   Bug 652155: On Mac, SM(d) doesn't work for unknown reasons
+
+ifneq ($(OS_ARCH),WINNT)
+ifndef HAVE_DTRACE
+#check:: check-jstests
+endif
+endif
+
+CFLAGS += $(MOZ_ZLIB_CFLAGS)
+
+# Silence warnings on AIX/HP-UX from non-GNU compilers
+ifndef GNU_CC
+ifeq ($(OS_ARCH),AIX)
+# Suppress warnings from xlC
+# 1540-1281: offsetof() on null non-POD types
+# 1540-1608: anonymous unions using static data members
+CFLAGS		+= -qsuppress=1540-1281 -qsuppress=1540-1608
+CXXFLAGS	+= -qsuppress=1540-1281 -qsuppress=1540-1608
+endif
+ifeq ($(OS_ARCH),HP-UX)
+# Suppress warnings from aCC
+# 3055: anonymous unions declaring types
+# 4189: offsetof() on non-POD types
+CFLAGS		+= +W3055,4189
+CXXFLAGS	+= +W3055,4189
+endif
+endif
+ifeq ($(OS_ARCH),SunOS)
+ifeq ($(TARGET_CPU),sparc)
+
+ifdef GNU_CC
+CFLAGS   += -mcpu=v9
+CXXFLAGS += -mcpu=v9
+endif # GNU_CC
+
+endif
+endif
+
+install::
+	$(MAKE) -C build install
+	$(MAKE) -C shell install
+
+ifdef HAVE_DTRACE
+javascript-trace.h: $(srcdir)/devtools/javascript-trace.d
+	dtrace -x nolibs -h -s $(srcdir)/devtools/javascript-trace.d -o javascript-trace.h.in
+	sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \
+	    -e '/const/!s/char \*/const char */g' \
+	    javascript-trace.h.in > javascript-trace.h
+
+# We can't automatically generate dependencies on auto-generated headers;
+# we have to list them explicitly.
+$(addsuffix .$(OBJ_SUFFIX),Probes jsinterp jsobj): $(CURDIR)/javascript-trace.h
+
+ifneq ($(OS_ARCH),Darwin)
+DTRACE_PROBE_OBJ = js-dtrace.$(OBJ_SUFFIX)
+$(LIBRARY): $(DTRACE_PROBE_OBJ)
+$(DTRACE_PROBE_OBJ): $(srcdir)/devtools/javascript-trace.d $(OBJS)
+	dtrace -x nolibs -G -C -s $< -o $@ $(filter-out $<, $^)
+
+OBJS += $(DTRACE_PROBE_OBJ)
+endif # OS_ARCH != Darwin
+endif # HAVE_DTRACE
+
+###############################################
+# Generating source package tarballs
+# (only possible when tar is found)
+ifneq (,$(TAR))
+
+source-package:
+	SRCDIR=$(srcdir) \
+	DIST=$(DIST) \
+	MKDIR=$(MKDIR) \
+	TAR=$(TAR) \
+	M4=$(M4) \
+	AWK=$(AWK) \
+	MOZJS_MAJOR_VERSION=$(MOZJS_MAJOR_VERSION) \
+	MOZJS_MINOR_VERSION=$(MOZJS_MINOR_VERSION) \
+	MOZJS_PATCH_VERSION=$(MOZJS_PATCH_VERSION) \
+	MOZJS_ALPHA=$(MOZJS_ALPHA) \
+	$(srcdir)/make-source-package.sh
+
+endif
Index: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/jit-test/jit_test.py
===================================================================
--- mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/jit-test/jit_test.py	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/jit-test/jit_test.py	(revision 385)
@@ -0,0 +1,595 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+from __future__ import print_function, unicode_literals
+
+import math
+import os
+import platform
+import posixpath
+import shlex
+import subprocess
+import sys
+import traceback
+
+
+read_input = input
+if sys.version_info.major == 2:
+    read_input = raw_input
+
+
+def add_tests_dir_to_path():
+    from os.path import dirname, exists, join, realpath
+
+    js_src_dir = dirname(dirname(realpath(sys.argv[0])))
+    assert exists(join(js_src_dir, "jsapi.h"))
+    sys.path.insert(0, join(js_src_dir, "tests"))
+
+
+add_tests_dir_to_path()
+
+from lib import jittests
+from lib.tests import (
+    get_jitflags,
+    valid_jitflags,
+    get_cpu_count,
+    get_environment_overlay,
+    change_env,
+)
+from tempfile import TemporaryDirectory
+
+
+def which(name):
+    if name.find(os.path.sep) != -1:
+        return os.path.abspath(name)
+
+    for path in os.environ["PATH"].split(os.pathsep):
+        full = os.path.join(path, name)
+        if os.path.exists(full):
+            return os.path.abspath(full)
+
+    return name
+
+
+def choose_item(jobs, max_items, display):
+    job_count = len(jobs)
+
+    # Don't present a choice if there are too many tests
+    if job_count > max_items:
+        raise Exception("Too many jobs.")
+
+    for i, job in enumerate(jobs, 1):
+        print("{}) {}".format(i, display(job)))
+
+    item = read_input("Which one:\n")
+    try:
+        item = int(item)
+        if item > job_count or item < 1:
+            raise Exception("Input isn't between 1 and {}".format(job_count))
+    except ValueError:
+        raise Exception("Unrecognized input")
+
+    return jobs[item - 1]
+
+
+def main(argv):
+    # The [TESTS] optional arguments are paths of test files relative
+    # to the jit-test/tests directory.
+    import argparse
+
+    op = argparse.ArgumentParser(description="Run jit-test JS shell tests")
+    op.add_argument(
+        "-s",
+        "--show-cmd",
+        dest="show_cmd",
+        action="store_true",
+        help="show js shell command run",
+    )
+    op.add_argument(
+        "-f",
+        "--show-failed-cmd",
+        dest="show_failed",
+        action="store_true",
+        help="show command lines of failed tests",
+    )
+    op.add_argument(
+        "-o",
+        "--show-output",
+        dest="show_output",
+        action="store_true",
+        help="show output from js shell",
+    )
+    op.add_argument(
+        "-F",
+        "--failed-only",
+        dest="failed_only",
+        action="store_true",
+        help="if --show-output is given, only print output for" " failed tests",
+    )
+    op.add_argument(
+        "--no-show-failed",
+        dest="no_show_failed",
+        action="store_true",
+        help="don't print output for failed tests" " (no-op with --show-output)",
+    )
+    op.add_argument(
+        "-x",
+        "--exclude",
+        dest="exclude",
+        default=[],
+        action="append",
+        help="exclude given test dir or path",
+    )
+    op.add_argument(
+        "--exclude-from",
+        dest="exclude_from",
+        type=str,
+        help="exclude each test dir or path in FILE",
+    )
+    op.add_argument(
+        "--slow",
+        dest="run_slow",
+        action="store_true",
+        help="also run tests marked as slow",
+    )
+    op.add_argument(
+        "--no-slow",
+        dest="run_slow",
+        action="store_false",
+        help="do not run tests marked as slow (the default)",
+    )
+    op.add_argument(
+        "-t",
+        "--timeout",
+        dest="timeout",
+        type=float,
+        default=150.0,
+        help="set test timeout in seconds",
+    )
+    op.add_argument(
+        "--no-progress",
+        dest="hide_progress",
+        action="store_true",
+        help="hide progress bar",
+    )
+    op.add_argument(
+        "--tinderbox",
+        dest="format",
+        action="store_const",
+        const="automation",
+        help="Use automation-parseable output format",
+    )
+    op.add_argument(
+        "--format",
+        dest="format",
+        default="none",
+        choices=("automation", "none"),
+        help="Output format (default %(default)s).",
+    )
+    op.add_argument(
+        "--args",
+        dest="shell_args",
+        metavar="ARGS",
+        default="",
+        help="extra args to pass to the JS shell",
+    )
+    op.add_argument(
+        "--feature-args",
+        dest="feature_args",
+        metavar="ARGS",
+        default="",
+        help="even more args to pass to the JS shell "
+        "(for compatibility with jstests.py)",
+    )
+    op.add_argument(
+        "-w",
+        "--write-failures",
+        dest="write_failures",
+        metavar="FILE",
+        help="Write a list of failed tests to [FILE]",
+    )
+    op.add_argument(
+        "-C",
+        "--check-output",
+        action="store_true",
+        dest="check_output",
+        help="Run tests to check output for different jit-flags",
+    )
+    op.add_argument(
+        "-r",
+        "--read-tests",
+        dest="read_tests",
+        metavar="FILE",
+        help="Run test files listed in [FILE]",
+    )
+    op.add_argument(
+        "-R",
+        "--retest",
+        dest="retest",
+        metavar="FILE",
+        help="Retest using test list file [FILE]",
+    )
+    op.add_argument(
+        "-g",
+        "--debug",
+        action="store_const",
+        const="gdb",
+        dest="debugger",
+        help="Run a single test under the gdb debugger",
+    )
+    op.add_argument(
+        "-G",
+        "--debug-rr",
+        action="store_const",
+        const="rr",
+        dest="debugger",
+        help="Run a single test under the rr debugger",
+    )
+    op.add_argument(
+        "--debugger", type=str, help="Run a single test under the specified debugger"
+    )
+    op.add_argument(
+        "--valgrind",
+        dest="valgrind",
+        action="store_true",
+        help="Enable the |valgrind| flag, if valgrind is in $PATH.",
+    )
+    op.add_argument(
+        "--unusable-error-status",
+        action="store_true",
+        help="Ignore incorrect exit status on tests that should return nonzero.",
+    )
+    op.add_argument(
+        "--valgrind-all",
+        dest="valgrind_all",
+        action="store_true",
+        help="Run all tests with valgrind, if valgrind is in $PATH.",
+    )
+    op.add_argument(
+        "--avoid-stdio",
+        dest="avoid_stdio",
+        action="store_true",
+        help="Use js-shell file indirection instead of piping stdio.",
+    )
+    op.add_argument(
+        "--write-failure-output",
+        dest="write_failure_output",
+        action="store_true",
+        help="With --write-failures=FILE, additionally write the"
+        " output of failed tests to [FILE]",
+    )
+    op.add_argument(
+        "--jitflags",
+        dest="jitflags",
+        default="none",
+        choices=valid_jitflags(),
+        help="IonMonkey option combinations (default %(default)s).",
+    )
+    op.add_argument(
+        "--ion",
+        dest="jitflags",
+        action="store_const",
+        const="ion",
+        help="Run tests once with --ion-eager and once with"
+        " --baseline-eager (equivalent to --jitflags=ion)",
+    )
+    op.add_argument(
+        "--no-xdr",
+        dest="use_xdr",
+        action="store_false",
+        help="Whether to disable caching of self-hosted parsed content in XDR format.",
+    )
+    op.add_argument(
+        "--tbpl",
+        dest="jitflags",
+        action="store_const",
+        const="all",
+        help="Run tests with all IonMonkey option combinations"
+        " (equivalent to --jitflags=all)",
+    )
+    op.add_argument(
+        "-j",
+        "--worker-count",
+        dest="max_jobs",
+        type=int,
+        default=max(1, get_cpu_count()),
+        help="Number of tests to run in parallel (default %(default)s).",
+    )
+    op.add_argument(
+        "--remote", action="store_true", help="Run tests on a remote device"
+    )
+    op.add_argument(
+        "--deviceIP",
+        action="store",
+        type=str,
+        dest="device_ip",
+        help="IP address of remote device to test",
+    )
+    op.add_argument(
+        "--devicePort",
+        action="store",
+        type=int,
+        dest="device_port",
+        default=20701,
+        help="port of remote device to test",
+    )
+    op.add_argument(
+        "--deviceSerial",
+        action="store",
+        type=str,
+        dest="device_serial",
+        default=None,
+        help="ADB device serial number of remote device to test",
+    )
+    op.add_argument(
+        "--remoteTestRoot",
+        dest="remote_test_root",
+        action="store",
+        type=str,
+        default="/data/local/tmp/test_root",
+        help="The remote directory to use as test root" " (e.g.  %(default)s)",
+    )
+    op.add_argument(
+        "--localLib",
+        dest="local_lib",
+        action="store",
+        type=str,
+        help="The location of libraries to push -- preferably" " stripped",
+    )
+    op.add_argument(
+        "--repeat", type=int, default=1, help="Repeat tests the given number of times."
+    )
+    op.add_argument("--this-chunk", type=int, default=1, help="The test chunk to run.")
+    op.add_argument(
+        "--total-chunks", type=int, default=1, help="The total number of test chunks."
+    )
+    op.add_argument(
+        "--ignore-timeouts",
+        dest="ignore_timeouts",
+        metavar="FILE",
+        help="Ignore timeouts of tests listed in [FILE]",
+    )
+    op.add_argument(
+        "--retry-remote-timeouts",
+        dest="timeout_retry",
+        type=int,
+        default=1,
+        help="Number of time to retry timeout on remote devices",
+    )
+    op.add_argument(
+        "--test-reflect-stringify",
+        dest="test_reflect_stringify",
+        help="instead of running tests, use them to test the "
+        "Reflect.stringify code in specified file",
+    )
+    # --enable-webrender is ignored as it is not relevant for JIT
+    # tests, but is required for harness compatibility.
+    op.add_argument(
+        "--enable-webrender",
+        action="store_true",
+        dest="enable_webrender",
+        default=False,
+        help=argparse.SUPPRESS,
+    )
+    op.add_argument("js_shell", metavar="JS_SHELL", help="JS shell to run tests with")
+    op.add_argument(
+        "-z", "--gc-zeal", help="GC zeal mode to use when running the shell"
+    )
+
+    options, test_args = op.parse_known_args(argv)
+    js_shell = which(options.js_shell)
+    test_environment = get_environment_overlay(js_shell, options.gc_zeal)
+
+    if not (os.path.isfile(js_shell) and os.access(js_shell, os.X_OK)):
+        if (
+            platform.system() != "Windows"
+            or os.path.isfile(js_shell)
+            or not os.path.isfile(js_shell + ".exe")
+            or not os.access(js_shell + ".exe", os.X_OK)
+        ):
+            op.error("shell is not executable: " + js_shell)
+
+    if jittests.stdio_might_be_broken():
+        # Prefer erring on the side of caution and not using stdio if
+        # it might be broken on this platform.  The file-redirect
+        # fallback should work on any platform, so at worst by
+        # guessing wrong we might have slowed down the tests a bit.
+        #
+        # XXX technically we could check for broken stdio, but it
+        # really seems like overkill.
+        options.avoid_stdio = True
+
+    if options.retest:
+        options.read_tests = options.retest
+        options.write_failures = options.retest
+
+    test_list = []
+    read_all = True
+
+    if test_args:
+        read_all = False
+        for arg in test_args:
+            test_list += jittests.find_tests(arg)
+
+    if options.read_tests:
+        read_all = False
+        try:
+            f = open(options.read_tests)
+            for line in f:
+                test_list.append(os.path.join(jittests.TEST_DIR, line.strip("\n")))
+            f.close()
+        except IOError:
+            if options.retest:
+                read_all = True
+            else:
+                sys.stderr.write(
+                    "Exception thrown trying to read test file"
+                    " '{}'\n".format(options.read_tests)
+                )
+                traceback.print_exc()
+                sys.stderr.write("---\n")
+
+    if read_all:
+        test_list = jittests.find_tests()
+
+    if options.exclude_from:
+        with open(options.exclude_from) as fh:
+            for line in fh:
+                line_exclude = line.strip()
+                if not line_exclude.startswith("#") and len(line_exclude):
+                    options.exclude.append(line_exclude)
+
+    if options.exclude:
+        exclude_list = []
+        for exclude in options.exclude:
+            exclude_list += jittests.find_tests(exclude)
+        test_list = [test for test in test_list if test not in set(exclude_list)]
+
+    if not test_list:
+        print("No tests found matching command line arguments.", file=sys.stderr)
+        sys.exit(0)
+
+    test_list = [jittests.JitTest.from_file(_, options) for _ in test_list]
+
+    if not options.run_slow:
+        test_list = [_ for _ in test_list if not _.slow]
+
+    if options.test_reflect_stringify is not None:
+        for test in test_list:
+            test.test_reflect_stringify = options.test_reflect_stringify
+
+    # If chunking is enabled, determine which tests are part of this chunk.
+    # This code was adapted from testing/mochitest/runtestsremote.py.
+    if options.total_chunks > 1:
+        total_tests = len(test_list)
+        tests_per_chunk = math.ceil(total_tests / float(options.total_chunks))
+        start = int(round((options.this_chunk - 1) * tests_per_chunk))
+        end = int(round(options.this_chunk * tests_per_chunk))
+        test_list = test_list[start:end]
+
+    if not test_list:
+        print(
+            "No tests found matching command line arguments after filtering.",
+            file=sys.stderr,
+        )
+        sys.exit(0)
+
+    # The full test list is ready. Now create copies for each JIT configuration.
+    test_flags = get_jitflags(options.jitflags)
+
+    test_list = [_ for test in test_list for _ in test.copy_variants(test_flags)]
+
+    job_list = (test for test in test_list)
+    job_count = len(test_list)
+
+    if options.repeat:
+
+        def repeat_copy(job_list_generator, repeat):
+            job_list = list(job_list_generator)
+            for i in range(repeat):
+                for test in job_list:
+                    if i == 0:
+                        yield test
+                    else:
+                        yield test.copy()
+
+        job_list = repeat_copy(job_list, options.repeat)
+        job_count *= options.repeat
+
+    if options.ignore_timeouts:
+        read_all = False
+        try:
+            with open(options.ignore_timeouts) as f:
+                ignore = set()
+                for line in f.readlines():
+                    path = line.strip("\n")
+                    ignore.add(path)
+                options.ignore_timeouts = ignore
+        except IOError:
+            sys.exit("Error reading file: " + options.ignore_timeouts)
+    else:
+        options.ignore_timeouts = set()
+
+    prefix = (
+        [js_shell] + shlex.split(options.shell_args) + shlex.split(options.feature_args)
+    )
+    prologue = os.path.join(jittests.LIB_DIR, "prologue.js")
+    if options.remote:
+        prologue = posixpath.join(options.remote_test_root, "lib", "prologue.js")
+
+    prefix += ["-f", prologue]
+
+    if options.debugger:
+        if job_count > 1:
+            print(
+                "Multiple tests match command line"
+                " arguments, debugger can only run one"
+            )
+            jobs = list(job_list)
+
+            def display_job(job):
+                flags = ""
+                if len(job.jitflags) != 0:
+                    flags = "({})".format(" ".join(job.jitflags))
+                return "{} {}".format(job.path, flags)
+
+            try:
+                tc = choose_item(jobs, max_items=50, display=display_job)
+            except Exception as e:
+                sys.exit(str(e))
+        else:
+            tc = next(job_list)
+
+        if options.debugger == "gdb":
+            debug_cmd = ["gdb", "--args"]
+        elif options.debugger == "lldb":
+            debug_cmd = ["lldb", "--"]
+        elif options.debugger == "rr":
+            debug_cmd = ["rr", "record"]
+        else:
+            debug_cmd = options.debugger.split()
+
+        with change_env(test_environment):
+            with TemporaryDirectory() as tempdir:
+                if options.debugger == "rr":
+                    subprocess.call(
+                        debug_cmd
+                        + tc.command(
+                            prefix, jittests.LIB_DIR, jittests.MODULE_DIR, tempdir
+                        )
+                    )
+                    os.execvp("rr", ["rr", "replay"])
+                else:
+                    os.execvp(
+                        debug_cmd[0],
+                        debug_cmd
+                        + tc.command(
+                            prefix, jittests.LIB_DIR, jittests.MODULE_DIR, tempdir
+                        ),
+                    )
+        sys.exit()
+
+    try:
+        ok = None
+        if options.remote:
+            ok = jittests.run_tests(job_list, job_count, prefix, options, remote=True)
+        else:
+            with change_env(test_environment):
+                ok = jittests.run_tests(job_list, job_count, prefix, options)
+        if not ok:
+            sys.exit(2)
+    except OSError:
+        if not os.path.exists(prefix[0]):
+            print(
+                "JS shell argument: file does not exist:" " '{}'".format(prefix[0]),
+                file=sys.stderr,
+            )
+            sys.exit(1)
+        else:
+            raise
+
+
+if __name__ == "__main__":
+    main(sys.argv[1:])

Property changes on: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/jit-test/jit_test.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.py
===================================================================
--- mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.py	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.py	(revision 385)
@@ -0,0 +1,877 @@
+#!/usr/bin/env python
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+"""
+The JS Shell Test Harness.
+
+See the adjacent README.txt for more details.
+"""
+
+from __future__ import print_function
+
+import math
+import os
+import posixpath
+import re
+import shlex
+import sys
+import tempfile
+import platform
+
+from os.path import abspath, dirname, isfile, realpath
+from contextlib import contextmanager
+from copy import copy
+from datetime import datetime
+from itertools import chain
+from subprocess import list2cmdline, call
+
+from lib.tests import (
+    RefTestCase,
+    get_jitflags,
+    get_cpu_count,
+    get_environment_overlay,
+    change_env,
+)
+from lib.results import ResultsSink, TestOutput
+from lib.progressbar import ProgressBar
+from lib.adaptor import xdr_annotate
+from tempfile import TemporaryDirectory
+
+if sys.platform.startswith("linux") or sys.platform.startswith("darwin"):
+    from lib.tasks_unix import run_all_tests
+else:
+    from lib.tasks_win import run_all_tests
+
+here = dirname(abspath(__file__))
+
+
+@contextmanager
+def changedir(dirname):
+    pwd = os.getcwd()
+    os.chdir(dirname)
+    try:
+        yield
+    finally:
+        os.chdir(pwd)
+
+
+class PathOptions(object):
+    def __init__(self, location, requested_paths, excluded_paths):
+        self.requested_paths = requested_paths
+        self.excluded_files, self.excluded_dirs = PathOptions._split_files_and_dirs(
+            location, excluded_paths
+        )
+
+    @staticmethod
+    def _split_files_and_dirs(location, paths):
+        """Split up a set of paths into files and directories"""
+        files, dirs = set(), set()
+        for path in paths:
+            fullpath = os.path.join(location, path)
+            if path.endswith("/"):
+                dirs.add(path[:-1])
+            elif os.path.isdir(fullpath):
+                dirs.add(path)
+            elif os.path.exists(fullpath):
+                files.add(path)
+
+        return files, dirs
+
+    def should_run(self, filename):
+        # If any tests are requested by name, skip tests that do not match.
+        if self.requested_paths and not any(
+            req in filename for req in self.requested_paths
+        ):
+            return False
+
+        # Skip excluded tests.
+        if filename in self.excluded_files:
+            return False
+
+        for dir in self.excluded_dirs:
+            if filename.startswith(dir + "/"):
+                return False
+
+        return True
+
+
+def parse_args():
+    """
+    Parse command line arguments.
+    Returns a tuple of: (options, js_shell, requested_paths, excluded_paths)
+        options :object: The raw OptionParser output.
+        js_shell :str: The absolute location of the shell to test with.
+        requested_paths :set<str>: Test paths specially requested on the CLI.
+        excluded_paths :set<str>: Test paths specifically excluded by the CLI.
+    """
+    from argparse import ArgumentParser
+
+    op = ArgumentParser(
+        description="Run jstests JS shell tests",
+        epilog="Shell output format: [ pass | fail | timeout | skip ] progress | time",
+    )
+    op.add_argument(
+        "--xul-info",
+        dest="xul_info_src",
+        help="config data for xulRuntime" " (avoids search for config/autoconf.mk)",
+    )
+
+    harness_og = op.add_argument_group("Harness Controls", "Control how tests are run.")
+    harness_og.add_argument(
+        "-j",
+        "--worker-count",
+        type=int,
+        default=max(1, get_cpu_count()),
+        help="Number of tests to run in parallel" " (default %(default)s)",
+    )
+    harness_og.add_argument(
+        "-t",
+        "--timeout",
+        type=float,
+        default=150.0,
+        help="Set maximum time a test is allows to run" " (in seconds).",
+    )
+    harness_og.add_argument(
+        "--show-slow",
+        action="store_true",
+        help="Show tests taking longer than a minimum time" " (in seconds).",
+    )
+    harness_og.add_argument(
+        "--slow-test-threshold",
+        type=float,
+        default=5.0,
+        help="Time in seconds a test can take until it is"
+        "considered slow (default %(default)s).",
+    )
+    harness_og.add_argument(
+        "-a",
+        "--args",
+        dest="shell_args",
+        default="",
+        help="Extra args to pass to the JS shell.",
+    )
+    harness_og.add_argument(
+        "--feature-args",
+        dest="feature_args",
+        default="",
+        help="Extra args to pass to the JS shell even when feature-testing.",
+    )
+    harness_og.add_argument(
+        "--jitflags",
+        dest="jitflags",
+        default="none",
+        type=str,
+        help="IonMonkey option combinations. One of all,"
+        " debug, ion, and none (default %(default)s).",
+    )
+    harness_og.add_argument(
+        "--tbpl",
+        action="store_true",
+        help="Runs each test in all configurations tbpl" " tests.",
+    )
+    harness_og.add_argument(
+        "--tbpl-debug",
+        action="store_true",
+        help="Runs each test in some faster configurations" " tbpl tests.",
+    )
+    harness_og.add_argument(
+        "-g", "--debug", action="store_true", help="Run a test in debugger."
+    )
+    harness_og.add_argument(
+        "--debugger", default="gdb -q --args", help="Debugger command."
+    )
+    harness_og.add_argument(
+        "-J", "--jorendb", action="store_true", help="Run under JS debugger."
+    )
+    harness_og.add_argument(
+        "--passthrough",
+        action="store_true",
+        help="Run tests with stdin/stdout attached to" " caller.",
+    )
+    harness_og.add_argument(
+        "--test-reflect-stringify",
+        dest="test_reflect_stringify",
+        help="instead of running tests, use them to test the "
+        "Reflect.stringify code in specified file",
+    )
+    harness_og.add_argument(
+        "--valgrind", action="store_true", help="Run tests in valgrind."
+    )
+    harness_og.add_argument(
+        "--valgrind-args", default="", help="Extra args to pass to valgrind."
+    )
+    harness_og.add_argument(
+        "--rr",
+        action="store_true",
+        help="Run tests under RR record-and-replay debugger.",
+    )
+    harness_og.add_argument(
+        "-C",
+        "--check-output",
+        action="store_true",
+        help="Run tests to check output for different jit-flags",
+    )
+    harness_og.add_argument(
+        "--remote", action="store_true", help="Run tests on a remote device"
+    )
+    harness_og.add_argument(
+        "--deviceIP",
+        action="store",
+        type=str,
+        dest="device_ip",
+        help="IP address of remote device to test",
+    )
+    harness_og.add_argument(
+        "--devicePort",
+        action="store",
+        type=int,
+        dest="device_port",
+        default=20701,
+        help="port of remote device to test",
+    )
+    harness_og.add_argument(
+        "--deviceSerial",
+        action="store",
+        type=str,
+        dest="device_serial",
+        default=None,
+        help="ADB device serial number of remote device to test",
+    )
+    harness_og.add_argument(
+        "--remoteTestRoot",
+        dest="remote_test_root",
+        action="store",
+        type=str,
+        default="/data/local/tmp/test_root",
+        help="The remote directory to use as test root" " (e.g. %(default)s)",
+    )
+    harness_og.add_argument(
+        "--localLib",
+        dest="local_lib",
+        action="store",
+        type=str,
+        help="The location of libraries to push -- preferably" " stripped",
+    )
+    harness_og.add_argument(
+        "--no-xdr",
+        dest="use_xdr",
+        action="store_false",
+        help="Whether to disable caching of self-hosted parsed content in XDR format.",
+    )
+
+    input_og = op.add_argument_group("Inputs", "Change what tests are run.")
+    input_og.add_argument(
+        "-f",
+        "--file",
+        dest="test_file",
+        action="append",
+        help="Get tests from the given file.",
+    )
+    input_og.add_argument(
+        "-x",
+        "--exclude-file",
+        action="append",
+        help="Exclude tests from the given file.",
+    )
+    input_og.add_argument(
+        "--wpt",
+        dest="wpt",
+        choices=["enabled", "disabled", "if-running-everything"],
+        default="if-running-everything",
+        help="Enable or disable shell web-platform-tests "
+        "(default: enable if no test paths are specified).",
+    )
+    input_og.add_argument(
+        "--include",
+        action="append",
+        dest="requested_paths",
+        default=[],
+        help="Include the given test file or directory.",
+    )
+    input_og.add_argument(
+        "--exclude",
+        action="append",
+        dest="excluded_paths",
+        default=[],
+        help="Exclude the given test file or directory.",
+    )
+    input_og.add_argument(
+        "-d",
+        "--exclude-random",
+        dest="random",
+        action="store_false",
+        help='Exclude tests marked as "random."',
+    )
+    input_og.add_argument(
+        "--run-skipped", action="store_true", help='Run tests marked as "skip."'
+    )
+    input_og.add_argument(
+        "--run-only-skipped",
+        action="store_true",
+        help='Run only tests marked as "skip."',
+    )
+    input_og.add_argument(
+        "--run-slow-tests",
+        action="store_true",
+        help='Do not skip tests marked as "slow."',
+    )
+    input_og.add_argument(
+        "--no-extensions",
+        action="store_true",
+        help="Run only tests conforming to the ECMAScript 5" " standard.",
+    )
+    input_og.add_argument(
+        "--repeat", type=int, default=1, help="Repeat tests the given number of times."
+    )
+
+    output_og = op.add_argument_group("Output", "Modify the harness and tests output.")
+    output_og.add_argument(
+        "-s",
+        "--show-cmd",
+        action="store_true",
+        help="Show exact commandline used to run each test.",
+    )
+    output_og.add_argument(
+        "-o",
+        "--show-output",
+        action="store_true",
+        help="Print each test's output to the file given by" " --output-file.",
+    )
+    output_og.add_argument(
+        "-F",
+        "--failed-only",
+        action="store_true",
+        help="If a --show-* option is given, only print" " output for failed tests.",
+    )
+    output_og.add_argument(
+        "--no-show-failed",
+        action="store_true",
+        help="Don't print output for failed tests" " (no-op with --show-output).",
+    )
+    output_og.add_argument(
+        "-O",
+        "--output-file",
+        help="Write all output to the given file" " (default: stdout).",
+    )
+    output_og.add_argument(
+        "--failure-file", help="Write all not-passed tests to the given file."
+    )
+    output_og.add_argument(
+        "--no-progress",
+        dest="hide_progress",
+        action="store_true",
+        help="Do not show the progress bar.",
+    )
+    output_og.add_argument(
+        "--tinderbox",
+        dest="format",
+        action="store_const",
+        const="automation",
+        help="Use automation-parseable output format.",
+    )
+    output_og.add_argument(
+        "--format",
+        dest="format",
+        default="none",
+        choices=["automation", "none"],
+        help="Output format. Either automation or none" " (default %(default)s).",
+    )
+    output_og.add_argument(
+        "--log-wptreport",
+        dest="wptreport",
+        action="store",
+        help="Path to write a Web Platform Tests report (wptreport)",
+    )
+    output_og.add_argument(
+        "--this-chunk", type=int, default=1, help="The test chunk to run."
+    )
+    output_og.add_argument(
+        "--total-chunks", type=int, default=1, help="The total number of test chunks."
+    )
+
+    special_og = op.add_argument_group(
+        "Special", "Special modes that do not run tests."
+    )
+    special_og.add_argument(
+        "--make-manifests",
+        metavar="BASE_TEST_PATH",
+        help="Generate reftest manifest files.",
+    )
+
+    op.add_argument("--js-shell", metavar="JS_SHELL", help="JS shell to run tests with")
+    op.add_argument(
+        "-z", "--gc-zeal", help="GC zeal mode to use when running the shell"
+    )
+
+    options, args = op.parse_known_args()
+
+    # Need a shell unless in a special mode.
+    if not options.make_manifests:
+        if not args:
+            op.error("missing JS_SHELL argument")
+        options.js_shell = os.path.abspath(args.pop(0))
+
+    requested_paths = set(args)
+
+    # Valgrind, gdb, and rr are mutually exclusive.
+    if sum(map(bool, (options.valgrind, options.debug, options.rr))) > 1:
+        op.error("--valgrind, --debug, and --rr are mutually exclusive.")
+
+    # Fill the debugger field, as needed.
+    if options.debug:
+        if options.debugger == "lldb":
+            debugger_prefix = ["lldb", "--"]
+        else:
+            debugger_prefix = options.debugger.split()
+    else:
+        debugger_prefix = []
+
+    if options.valgrind:
+        debugger_prefix = ["valgrind"] + options.valgrind_args.split()
+        if os.uname()[0] == "Darwin":
+            debugger_prefix.append("--dsymutil=yes")
+        options.show_output = True
+    if options.rr:
+        debugger_prefix = ["rr", "record"]
+
+    js_cmd_args = shlex.split(options.shell_args) + shlex.split(options.feature_args)
+    if options.jorendb:
+        options.passthrough = True
+        options.hide_progress = True
+        options.worker_count = 1
+        debugger_path = realpath(
+            os.path.join(
+                abspath(dirname(abspath(__file__))),
+                "..",
+                "..",
+                "examples",
+                "jorendb.js",
+            )
+        )
+        js_cmd_args.extend(["-d", "-f", debugger_path, "--"])
+    prefix = RefTestCase.build_js_cmd_prefix(
+        options.js_shell, js_cmd_args, debugger_prefix
+    )
+
+    # If files with lists of tests to run were specified, add them to the
+    # requested tests set.
+    if options.test_file:
+        for test_file in options.test_file:
+            requested_paths |= set(
+                [line.strip() for line in open(test_file).readlines()]
+            )
+
+    excluded_paths = set(options.excluded_paths)
+
+    # If files with lists of tests to exclude were specified, add them to the
+    # excluded tests set.
+    if options.exclude_file:
+        for filename in options.exclude_file:
+            with open(filename, "r") as fp:
+                for line in fp:
+                    if line.startswith("#"):
+                        continue
+                    line = line.strip()
+                    if not line:
+                        continue
+                    excluded_paths.add(line)
+
+    # Handle output redirection, if requested and relevant.
+    options.output_fp = sys.stdout
+    if options.output_file:
+        if not options.show_cmd:
+            options.show_output = True
+        try:
+            options.output_fp = open(options.output_file, "w")
+        except IOError as ex:
+            raise SystemExit("Failed to open output file: " + str(ex))
+
+    # Hide the progress bar if it will get in the way of other output.
+    options.hide_progress = (
+        options.format == "automation"
+        or not ProgressBar.conservative_isatty()
+        or options.hide_progress
+    )
+
+    return (options, prefix, requested_paths, excluded_paths)
+
+
+def load_wpt_tests(xul_tester, requested_paths, excluded_paths, update_manifest=True):
+    """Return a list of `RefTestCase` objects for the jsshell testharness.js
+    tests filtered by the given paths and debug-ness."""
+    repo_root = abspath(os.path.join(here, "..", "..", ".."))
+    wp = os.path.join(repo_root, "testing", "web-platform")
+    wpt = os.path.join(wp, "tests")
+
+    sys_paths = [
+        "python/mozterm",
+        "python/mozboot",
+        "testing/mozbase/mozcrash",
+        "testing/mozbase/mozdevice",
+        "testing/mozbase/mozfile",
+        "testing/mozbase/mozinfo",
+        "testing/mozbase/mozleak",
+        "testing/mozbase/mozlog",
+        "testing/mozbase/mozprocess",
+        "testing/mozbase/mozprofile",
+        "testing/mozbase/mozrunner",
+        "testing/mozbase/mozversion",
+        "testing/web-platform/",
+        "testing/web-platform/tests/tools",
+        "testing/web-platform/tests/tools/third_party/html5lib",
+        "testing/web-platform/tests/tools/third_party/webencodings",
+        "testing/web-platform/tests/tools/wptrunner",
+        "testing/web-platform/tests/tools/wptserve",
+        "third_party/python/requests",
+    ]
+    abs_sys_paths = [os.path.join(repo_root, path) for path in sys_paths]
+
+    failed = False
+    for path in abs_sys_paths:
+        if not os.path.isdir(path):
+            failed = True
+            print("Could not add '%s' to the path")
+    if failed:
+        return []
+
+    sys.path[0:0] = abs_sys_paths
+
+    import manifestupdate
+    from wptrunner import products, testloader, wptcommandline, wpttest, wptlogging
+
+    manifest_root = tempfile.gettempdir()
+    (maybe_dist, maybe_bin) = os.path.split(os.path.dirname(xul_tester.js_bin))
+    if maybe_bin == "bin":
+        (maybe_root, maybe_dist) = os.path.split(maybe_dist)
+        if maybe_dist == "dist":
+            if os.path.exists(os.path.join(maybe_root, "_tests")):
+                # Assume this is a gecko objdir.
+                manifest_root = maybe_root
+
+    logger = wptlogging.setup({}, {})
+
+    test_manifests = manifestupdate.run(
+        repo_root, manifest_root, logger, update=update_manifest
+    )
+
+    kwargs = vars(wptcommandline.create_parser().parse_args([]))
+    kwargs.update(
+        {
+            "config": os.path.join(
+                manifest_root, "_tests", "web-platform", "wptrunner.local.ini"
+            ),
+            "gecko_e10s": False,
+            "verify": False,
+            "wasm": xul_tester.test("wasmIsSupported()"),
+        }
+    )
+    wptcommandline.set_from_config(kwargs)
+
+    def filter_jsshell_tests(it):
+        for item_type, path, tests in it:
+            tests = set(item for item in tests if item.jsshell)
+            if tests:
+                yield item_type, path, tests
+
+    run_info_extras = products.Product(kwargs["config"], "firefox").run_info_extras(
+        **kwargs
+    )
+    run_info = wpttest.get_run_info(
+        kwargs["run_info"],
+        "firefox",
+        debug=xul_tester.test("isDebugBuild"),
+        extras=run_info_extras,
+    )
+    release_or_beta = xul_tester.test("getBuildConfiguration().release_or_beta")
+    run_info["release_or_beta"] = release_or_beta
+    run_info["nightly_build"] = not release_or_beta
+    early_beta_or_earlier = xul_tester.test(
+        "getBuildConfiguration().early_beta_or_earlier"
+    )
+    run_info["early_beta_or_earlier"] = early_beta_or_earlier
+
+    path_filter = testloader.TestFilter(
+        test_manifests, include=requested_paths, exclude=excluded_paths
+    )
+    loader = testloader.TestLoader(
+        test_manifests,
+        ["testharness"],
+        run_info,
+        manifest_filters=[path_filter, filter_jsshell_tests],
+    )
+
+    extra_helper_paths = [
+        os.path.join(here, "web-platform-test-shims.js"),
+        os.path.join(wpt, "resources", "testharness.js"),
+        os.path.join(here, "testharnessreport.js"),
+    ]
+
+    def resolve(test_path, script):
+        if script.startswith("/"):
+            return os.path.join(wpt, script[1:])
+
+        return os.path.join(wpt, os.path.dirname(test_path), script)
+
+    tests = []
+    for test in loader.tests["testharness"]:
+        test_path = os.path.relpath(test.path, wpt)
+        scripts = [resolve(test_path, s) for s in test.scripts]
+        extra_helper_paths_for_test = extra_helper_paths + scripts
+
+        # We must create at least one test with the default options, along with
+        # one test for each option given in a test-also annotation.
+        options = [None]
+        for m in test.itermeta():
+            if m.has_key("test-also"):  # NOQA: W601
+                options += m.get("test-also").split()
+        for option in options:
+            test_case = RefTestCase(
+                wpt,
+                test_path,
+                extra_helper_paths=extra_helper_paths_for_test[:],
+                wpt=test,
+            )
+            if option:
+                test_case.options.append(option)
+            tests.append(test_case)
+    return tests
+
+
+def load_tests(options, requested_paths, excluded_paths):
+    """
+    Returns a tuple: (test_count, test_gen)
+        test_count: [int] Number of tests that will be in test_gen
+        test_gen: [iterable<Test>] Tests found that should be run.
+    """
+    import lib.manifest as manifest
+
+    if options.js_shell is None:
+        xul_tester = manifest.NullXULInfoTester()
+    else:
+        if options.xul_info_src is None:
+            xul_info = manifest.XULInfo.create(options.js_shell)
+        else:
+            xul_abi, xul_os, xul_debug = options.xul_info_src.split(r":")
+            xul_debug = xul_debug.lower() == "true"
+            xul_info = manifest.XULInfo(xul_abi, xul_os, xul_debug)
+        feature_args = shlex.split(options.feature_args)
+        xul_tester = manifest.XULInfoTester(xul_info, options, feature_args)
+
+    test_dir = dirname(abspath(__file__))
+    path_options = PathOptions(test_dir, requested_paths, excluded_paths)
+    test_count = manifest.count_tests(test_dir, path_options)
+    test_gen = manifest.load_reftests(test_dir, path_options, xul_tester)
+
+    # WPT tests are already run in the browser in their own harness.
+    wpt_enabled = options.wpt == "enabled" or (
+        options.wpt == "if-running-everything"
+        and len(requested_paths) == 0
+        and not options.make_manifests
+    )
+    if wpt_enabled:
+        wpt_tests = load_wpt_tests(xul_tester, requested_paths, excluded_paths)
+        test_count += len(wpt_tests)
+        test_gen = chain(test_gen, wpt_tests)
+
+    if options.test_reflect_stringify is not None:
+
+        def trs_gen(tests):
+            for test in tests:
+                test.test_reflect_stringify = options.test_reflect_stringify
+                # Even if the test is not normally expected to pass, we still
+                # expect reflect-stringify to be able to handle it.
+                test.expect = True
+                test.random = False
+                test.slow = False
+                yield test
+
+        test_gen = trs_gen(test_gen)
+
+    if options.make_manifests:
+        manifest.make_manifests(options.make_manifests, test_gen)
+        sys.exit()
+
+    # Create a new test list. Apply each TBPL configuration to every test.
+    flags_list = None
+    if options.tbpl:
+        flags_list = get_jitflags("all")
+    elif options.tbpl_debug:
+        flags_list = get_jitflags("debug")
+    else:
+        flags_list = get_jitflags(options.jitflags, none=None)
+
+    if flags_list:
+
+        def flag_gen(tests):
+            for test in tests:
+                for jitflags in flags_list:
+                    tmp_test = copy(test)
+                    tmp_test.jitflags = copy(test.jitflags)
+                    tmp_test.jitflags.extend(jitflags)
+                    yield tmp_test
+
+        test_count = test_count * len(flags_list)
+        test_gen = flag_gen(test_gen)
+
+    if options.test_file:
+        paths = set()
+        for test_file in options.test_file:
+            paths |= set([line.strip() for line in open(test_file).readlines()])
+        test_gen = (_ for _ in test_gen if _.path in paths)
+
+    if options.no_extensions:
+        pattern = os.sep + "extensions" + os.sep
+        test_gen = (_ for _ in test_gen if pattern not in _.path)
+
+    if not options.random:
+        test_gen = (_ for _ in test_gen if not _.random)
+
+    if options.run_only_skipped:
+        options.run_skipped = True
+        test_gen = (_ for _ in test_gen if not _.enable)
+
+    if not options.run_slow_tests:
+        test_gen = (_ for _ in test_gen if not _.slow)
+
+    if options.repeat:
+        test_gen = (test for test in test_gen for i in range(options.repeat))
+        test_count *= options.repeat
+
+    return test_count, test_gen
+
+
+def main():
+    options, prefix, requested_paths, excluded_paths = parse_args()
+    if options.js_shell is not None and not (
+        isfile(options.js_shell) and os.access(options.js_shell, os.X_OK)
+    ):
+        if (
+            platform.system() != "Windows"
+            or isfile(options.js_shell)
+            or not isfile(options.js_shell + ".exe")
+            or not os.access(options.js_shell + ".exe", os.X_OK)
+        ):
+            print("Could not find executable shell: " + options.js_shell)
+            return 1
+
+    test_count, test_gen = load_tests(options, requested_paths, excluded_paths)
+    test_environment = get_environment_overlay(options.js_shell, options.gc_zeal)
+
+    if test_count == 0:
+        print("no tests selected")
+        return 1
+
+    test_dir = dirname(abspath(__file__))
+
+    if options.debug:
+        if test_count > 1:
+            print(
+                "Multiple tests match command line arguments,"
+                " debugger can only run one"
+            )
+            for tc in test_gen:
+                print("    {}".format(tc.path))
+            return 2
+
+        with changedir(test_dir), change_env(
+            test_environment
+        ), TemporaryDirectory() as tempdir:
+            cmd = next(test_gen).get_command(prefix, tempdir)
+            if options.show_cmd:
+                print(list2cmdline(cmd))
+            call(cmd)
+        return 0
+
+    # The test_gen generator is converted into a list in
+    # run_all_tests. Go ahead and do it here so we can apply
+    # chunking.
+    #
+    # If chunking is enabled, determine which tests are part of this chunk.
+    # This code was adapted from testing/mochitest/runtestsremote.py.
+    if options.total_chunks > 1:
+        tests_per_chunk = math.ceil(test_count / float(options.total_chunks))
+        start = int(round((options.this_chunk - 1) * tests_per_chunk))
+        end = int(round(options.this_chunk * tests_per_chunk))
+        test_gen = list(test_gen)[start:end]
+
+    if options.remote:
+        results = ResultsSink("jstests", options, test_count)
+        try:
+            from lib.remote import init_remote_dir, init_device
+
+            device = init_device(options)
+            tempdir = posixpath.join(options.remote_test_root, "tmp")
+            jtd_tests = posixpath.join(options.remote_test_root, "tests", "tests")
+            init_remote_dir(device, jtd_tests)
+            device.push(test_dir, jtd_tests, timeout=600)
+            device.chmod(jtd_tests, recursive=True)
+            prefix[0] = options.js_shell
+            if options.use_xdr:
+                test_gen = xdr_annotate(test_gen, options)
+            for test in test_gen:
+                out = run_test_remote(test, device, prefix, tempdir, options)
+                results.push(out)
+            results.finish(True)
+        except KeyboardInterrupt:
+            results.finish(False)
+
+        return 0 if results.all_passed() else 1
+
+    with changedir(test_dir), change_env(
+        test_environment
+    ), TemporaryDirectory() as tempdir:
+        results = ResultsSink("jstests", options, test_count)
+        try:
+            for out in run_all_tests(test_gen, prefix, tempdir, results.pb, options):
+                results.push(out)
+            results.finish(True)
+        except KeyboardInterrupt:
+            results.finish(False)
+
+        return 0 if results.all_passed() else 1
+
+    return 0
+
+
+def run_test_remote(test, device, prefix, tempdir, options):
+    from mozdevice import ADBDevice, ADBProcessError
+
+    cmd = test.get_command(prefix, tempdir)
+    test_root_parent = os.path.dirname(test.root)
+    jtd_tests = posixpath.join(options.remote_test_root, "tests")
+    cmd = [_.replace(test_root_parent, jtd_tests) for _ in cmd]
+
+    env = {"TZ": "PST8PDT", "LD_LIBRARY_PATH": os.path.dirname(prefix[0])}
+
+    adb_cmd = ADBDevice._escape_command_line(cmd)
+    start = datetime.now()
+    try:
+        # Allow ADBError or ADBTimeoutError to terminate the test run,
+        # but handle ADBProcessError in order to support the use of
+        # non-zero exit codes in the JavaScript shell tests.
+        out = device.shell_output(
+            adb_cmd, env=env, cwd=options.remote_test_root, timeout=int(options.timeout)
+        )
+        returncode = 0
+    except ADBProcessError as e:
+        # Treat ignorable intermittent adb communication errors as
+        # skipped tests.
+        out = str(e.adb_process.stdout)
+        returncode = e.adb_process.exitcode
+        re_ignore = re.compile(r"error: (closed|device .* not found)")
+        if returncode == 1 and re_ignore.search(out):
+            print("Skipping {} due to ignorable adb error {}".format(test.path, out))
+            test.skip_if_cond = "true"
+            returncode = test.SKIPPED_EXIT_STATUS
+
+    elapsed = (datetime.now() - start).total_seconds()
+
+    # We can't distinguish between stdout and stderr so we pass
+    # the same buffer to both.
+    return TestOutput(test, cmd, out, out, returncode, elapsed, False)
+
+
+if __name__ == "__main__":
+    sys.exit(main())

Property changes on: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/jstests.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/lib/tempfile.py
===================================================================
--- mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/lib/tempfile.py	(nonexistent)
+++ mozjs/create-102.15.0-tests-patch/firefox-102.15.0-new/js/src/tests/lib/tempfile.py	(revision 385)
@@ -0,0 +1,5 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+from __future__ import absolute_import
+from tempfile import TemporaryDirectory
Index: mozjs/create-102.15.0-x86-patch/create.patch.sh
===================================================================
--- mozjs/create-102.15.0-x86-patch/create.patch.sh	(nonexistent)
+++ mozjs/create-102.15.0-x86-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=102.15.0
+
+tar --files-from=file.list -xJvf ../firefox-${VERSION}esr.source.tar.xz
+mv firefox-$VERSION firefox-$VERSION-orig
+
+cp -rf ./firefox-$VERSION-new ./firefox-$VERSION
+
+diff --unified -Nr  firefox-$VERSION-orig  firefox-$VERSION > firefox-$VERSION-x86.patch
+
+mv firefox-$VERSION-x86.patch ../patches
+
+rm -rf ./firefox-$VERSION
+rm -rf ./firefox-$VERSION-orig

Property changes on: mozjs/create-102.15.0-x86-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: mozjs/create-102.15.0-x86-patch/file.list
===================================================================
--- mozjs/create-102.15.0-x86-patch/file.list	(nonexistent)
+++ mozjs/create-102.15.0-x86-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+firefox-102.15.0/modules/fdlibm/src/math_private.h
Index: mozjs/create-102.15.0-x86-patch/firefox-102.15.0-new/modules/fdlibm/src/math_private.h
===================================================================
--- mozjs/create-102.15.0-x86-patch/firefox-102.15.0-new/modules/fdlibm/src/math_private.h	(nonexistent)
+++ mozjs/create-102.15.0-x86-patch/firefox-102.15.0-new/modules/fdlibm/src/math_private.h	(revision 385)
@@ -0,0 +1,919 @@
+/*
+ * ====================================================
+ * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
+ *
+ * Developed at SunPro, a Sun Microsystems, Inc. business.
+ * Permission to use, copy, modify, and distribute this
+ * software is freely granted, provided that this notice
+ * is preserved.
+ * ====================================================
+ */
+
+/*
+ * from: @(#)fdlibm.h 5.1 93/09/24
+ * $FreeBSD$
+ */
+
+#ifndef _MATH_PRIVATE_H_
+#define	_MATH_PRIVATE_H_
+
+#include <cfloat>
+#include <stdint.h>
+#include <sys/types.h>
+
+#include "fdlibm.h"
+
+#include "mozilla/EndianUtils.h"
+
+/*
+ * Emulate FreeBSD internal double types.
+ * Adapted from https://github.com/freebsd/freebsd-src/search?q=__double_t
+ */
+
+typedef long double __double_t;
+typedef __double_t  double_t;
+
+/*
+ * The original fdlibm code used statements like:
+ *	n0 = ((*(int*)&one)>>29)^1;		* index of high word *
+ *	ix0 = *(n0+(int*)&x);			* high word of x *
+ *	ix1 = *((1-n0)+(int*)&x);		* low word of x *
+ * to dig two 32 bit words out of the 64 bit IEEE floating point
+ * value.  That is non-ANSI, and, moreover, the gcc instruction
+ * scheduler gets it wrong.  We instead use the following macros.
+ * Unlike the original code, we determine the endianness at compile
+ * time, not at run time; I don't see much benefit to selecting
+ * endianness at run time.
+ */
+
+#ifndef u_int32_t
+#define u_int32_t uint32_t
+#endif
+#ifndef u_int64_t
+#define u_int64_t uint64_t
+#endif
+
+/* A union which permits us to convert between a long double and
+   four 32 bit ints.  */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t mswhi;
+    u_int32_t mswlo;
+    u_int32_t lswhi;
+    u_int32_t lswlo;
+  } parts32;
+  struct {
+    u_int64_t msw;
+    u_int64_t lsw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  long double value;
+  struct {
+    u_int32_t lswlo;
+    u_int32_t lswhi;
+    u_int32_t mswlo;
+    u_int32_t mswhi;
+  } parts32;
+  struct {
+    u_int64_t lsw;
+    u_int64_t msw;
+  } parts64;
+} ieee_quad_shape_type;
+
+#endif
+
+/*
+ * A union which permits us to convert between a double and two 32 bit
+ * ints.
+ */
+
+#if MOZ_BIG_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t msw;
+    u_int32_t lsw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+#if MOZ_LITTLE_ENDIAN()
+
+typedef union
+{
+  double value;
+  struct
+  {
+    u_int32_t lsw;
+    u_int32_t msw;
+  } parts;
+  struct
+  {
+    u_int64_t w;
+  } xparts;
+} ieee_double_shape_type;
+
+#endif
+
+/* Get two 32 bit ints from a double.  */
+
+#define EXTRACT_WORDS(ix0,ix1,d)				\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix0) = ew_u.parts.msw;					\
+  (ix1) = ew_u.parts.lsw;					\
+} while (0)
+
+/* Get a 64-bit int from a double. */
+#define EXTRACT_WORD64(ix,d)					\
+do {								\
+  ieee_double_shape_type ew_u;					\
+  ew_u.value = (d);						\
+  (ix) = ew_u.xparts.w;						\
+} while (0)
+
+/* Get the more significant 32 bit int from a double.  */
+
+#define GET_HIGH_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gh_u;					\
+  gh_u.value = (d);						\
+  (i) = gh_u.parts.msw;						\
+} while (0)
+
+/* Get the less significant 32 bit int from a double.  */
+
+#define GET_LOW_WORD(i,d)					\
+do {								\
+  ieee_double_shape_type gl_u;					\
+  gl_u.value = (d);						\
+  (i) = gl_u.parts.lsw;						\
+} while (0)
+
+/* Set a double from two 32 bit ints.  */
+
+#define INSERT_WORDS(d,ix0,ix1)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.parts.msw = (ix0);					\
+  iw_u.parts.lsw = (ix1);					\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set a double from a 64-bit int. */
+#define INSERT_WORD64(d,ix)					\
+do {								\
+  ieee_double_shape_type iw_u;					\
+  iw_u.xparts.w = (ix);						\
+  (d) = iw_u.value;						\
+} while (0)
+
+/* Set the more significant 32 bits of a double from an int.  */
+
+#define SET_HIGH_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sh_u;					\
+  sh_u.value = (d);						\
+  sh_u.parts.msw = (v);						\
+  (d) = sh_u.value;						\
+} while (0)
+
+/* Set the less significant 32 bits of a double from an int.  */
+
+#define SET_LOW_WORD(d,v)					\
+do {								\
+  ieee_double_shape_type sl_u;					\
+  sl_u.value = (d);						\
+  sl_u.parts.lsw = (v);						\
+  (d) = sl_u.value;						\
+} while (0)
+
+/*
+ * A union which permits us to convert between a float and a 32 bit
+ * int.
+ */
+
+typedef union
+{
+  float value;
+  /* FIXME: Assumes 32 bit int.  */
+  unsigned int word;
+} ieee_float_shape_type;
+
+/* Get a 32 bit int from a float.  */
+
+#define GET_FLOAT_WORD(i,d)					\
+do {								\
+  ieee_float_shape_type gf_u;					\
+  gf_u.value = (d);						\
+  (i) = gf_u.word;						\
+} while (0)
+
+/* Set a float from a 32 bit int.  */
+
+#define SET_FLOAT_WORD(d,i)					\
+do {								\
+  ieee_float_shape_type sf_u;					\
+  sf_u.word = (i);						\
+  (d) = sf_u.value;						\
+} while (0)
+
+/*
+ * Get expsign and mantissa as 16 bit and 64 bit ints from an 80 bit long
+ * double.
+ */
+
+#define	EXTRACT_LDBL80_WORDS(ix0,ix1,d)				\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.man;					\
+} while (0)
+
+/*
+ * Get expsign and mantissa as one 16 bit and two 64 bit ints from a 128 bit
+ * long double.
+ */
+
+#define	EXTRACT_LDBL128_WORDS(ix0,ix1,ix2,d)			\
+do {								\
+  union IEEEl2bits ew_u;					\
+  ew_u.e = (d);							\
+  (ix0) = ew_u.xbits.expsign;					\
+  (ix1) = ew_u.xbits.manh;					\
+  (ix2) = ew_u.xbits.manl;					\
+} while (0)
+
+/* Get expsign as a 16 bit int from a long double.  */
+
+#define	GET_LDBL_EXPSIGN(i,d)					\
+do {								\
+  union IEEEl2bits ge_u;					\
+  ge_u.e = (d);							\
+  (i) = ge_u.xbits.expsign;					\
+} while (0)
+
+/*
+ * Set an 80 bit long double from a 16 bit int expsign and a 64 bit int
+ * mantissa.
+ */
+
+#define	INSERT_LDBL80_WORDS(d,ix0,ix1)				\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.man = (ix1);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/*
+ * Set a 128 bit long double from a 16 bit int expsign and two 64 bit ints
+ * comprising the mantissa.
+ */
+
+#define	INSERT_LDBL128_WORDS(d,ix0,ix1,ix2)			\
+do {								\
+  union IEEEl2bits iw_u;					\
+  iw_u.xbits.expsign = (ix0);					\
+  iw_u.xbits.manh = (ix1);					\
+  iw_u.xbits.manl = (ix2);					\
+  (d) = iw_u.e;							\
+} while (0)
+
+/* Set expsign of a long double from a 16 bit int.  */
+
+#define	SET_LDBL_EXPSIGN(d,v)					\
+do {								\
+  union IEEEl2bits se_u;					\
+  se_u.e = (d);							\
+  se_u.xbits.expsign = (v);					\
+  (d) = se_u.e;							\
+} while (0)
+
+#ifdef __i386__
+/* Long double constants are broken on i386. */
+#define	LD80C(m, ex, v) {						\
+	.xbits.man = __CONCAT(m, ULL),					\
+	.xbits.expsign = (0x3fff + (ex)) | ((v) < 0 ? 0x8000 : 0),	\
+}
+#else
+/* The above works on non-i386 too, but we use this to check v. */
+#define	LD80C(m, ex, v)	{ .e = (v), }
+#endif
+
+#ifdef FLT_EVAL_METHOD
+/*
+ * Attempt to get strict C99 semantics for assignment with non-C99 compilers.
+ */
+#if !defined(_MSC_VER) && (FLT_EVAL_METHOD == 0 || __GNUC__ == 0)
+#define	STRICT_ASSIGN(type, lval, rval)	((lval) = (rval))
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif
+#else
+#define	STRICT_ASSIGN(type, lval, rval) do {	\
+	volatile type __lval;			\
+						\
+	if (sizeof(type) >= sizeof(long double))	\
+		(lval) = (rval);		\
+	else {					\
+		__lval = (rval);		\
+		(lval) = __lval;		\
+	}					\
+} while (0)
+#endif /* FLT_EVAL_METHOD */
+
+/* Support switching the mode to FP_PE if necessary. */
+#if defined(__i386__) && !defined(NO_FPSETPREC)
+#define	ENTERI() ENTERIT(long double)
+#define	ENTERIT(returntype)			\
+	returntype __retval;			\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNI(x) do {				\
+	__retval = (x);				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	RETURNF(__retval);			\
+} while (0)
+#define	ENTERV()				\
+	fp_prec_t __oprec;			\
+						\
+	if ((__oprec = fpgetprec()) != FP_PE)	\
+		fpsetprec(FP_PE)
+#define	RETURNV() do {				\
+	if (__oprec != FP_PE)			\
+		fpsetprec(__oprec);		\
+	return;			\
+} while (0)
+#else
+#define	ENTERI()
+#define	ENTERIT(x)
+#define	RETURNI(x)	RETURNF(x)
+#define	ENTERV()
+#define	RETURNV()	return
+#endif
+
+/* Default return statement if hack*_t() is not used. */
+#define      RETURNF(v)      return (v)
+
+/*
+ * 2sum gives the same result as 2sumF without requiring |a| >= |b| or
+ * a == 0, but is slower.
+ */
+#define	_2sum(a, b) do {	\
+	__typeof(a) __s, __w;	\
+				\
+	__w = (a) + (b);	\
+	__s = __w - (a);	\
+	(b) = ((a) - (__w - __s)) + ((b) - __s); \
+	(a) = __w;		\
+} while (0)
+
+/*
+ * 2sumF algorithm.
+ *
+ * "Normalize" the terms in the infinite-precision expression a + b for
+ * the sum of 2 floating point values so that b is as small as possible
+ * relative to 'a'.  (The resulting 'a' is the value of the expression in
+ * the same precision as 'a' and the resulting b is the rounding error.)
+ * |a| must be >= |b| or 0, b's type must be no larger than 'a's type, and
+ * exponent overflow or underflow must not occur.  This uses a Theorem of
+ * Dekker (1971).  See Knuth (1981) 4.2.2 Theorem C.  The name "TwoSum"
+ * is apparently due to Skewchuk (1997).
+ *
+ * For this to always work, assignment of a + b to 'a' must not retain any
+ * extra precision in a + b.  This is required by C standards but broken
+ * in many compilers.  The brokenness cannot be worked around using
+ * STRICT_ASSIGN() like we do elsewhere, since the efficiency of this
+ * algorithm would be destroyed by non-null strict assignments.  (The
+ * compilers are correct to be broken -- the efficiency of all floating
+ * point code calculations would be destroyed similarly if they forced the
+ * conversions.)
+ *
+ * Fortunately, a case that works well can usually be arranged by building
+ * any extra precision into the type of 'a' -- 'a' should have type float_t,
+ * double_t or long double.  b's type should be no larger than 'a's type.
+ * Callers should use these types with scopes as large as possible, to
+ * reduce their own extra-precision and efficiciency problems.  In
+ * particular, they shouldn't convert back and forth just to call here.
+ */
+#ifdef DEBUG
+#define	_2sumF(a, b) do {				\
+	__typeof(a) __w;				\
+	volatile __typeof(a) __ia, __ib, __r, __vw;	\
+							\
+	__ia = (a);					\
+	__ib = (b);					\
+	assert(__ia == 0 || fabsl(__ia) >= fabsl(__ib));	\
+							\
+	__w = (a) + (b);				\
+	(b) = ((a) - __w) + (b);			\
+	(a) = __w;					\
+							\
+	/* The next 2 assertions are weak if (a) is already long double. */ \
+	assert((long double)__ia + __ib == (long double)(a) + (b));	\
+	__vw = __ia + __ib;				\
+	__r = __ia - __vw;				\
+	__r += __ib;					\
+	assert(__vw == (a) && __r == (b));		\
+} while (0)
+#else /* !DEBUG */
+#define	_2sumF(a, b) do {	\
+	__typeof(a) __w;	\
+				\
+	__w = (a) + (b);	\
+	(b) = ((a) - __w) + (b); \
+	(a) = __w;		\
+} while (0)
+#endif /* DEBUG */
+
+/*
+ * Set x += c, where x is represented in extra precision as a + b.
+ * x must be sufficiently normalized and sufficiently larger than c,
+ * and the result is then sufficiently normalized.
+ *
+ * The details of ordering are that |a| must be >= |c| (so that (a, c)
+ * can be normalized without extra work to swap 'a' with c).  The details of
+ * the normalization are that b must be small relative to the normalized 'a'.
+ * Normalization of (a, c) makes the normalized c tiny relative to the
+ * normalized a, so b remains small relative to 'a' in the result.  However,
+ * b need not ever be tiny relative to 'a'.  For example, b might be about
+ * 2**20 times smaller than 'a' to give about 20 extra bits of precision.
+ * That is usually enough, and adding c (which by normalization is about
+ * 2**53 times smaller than a) cannot change b significantly.  However,
+ * cancellation of 'a' with c in normalization of (a, c) may reduce 'a'
+ * significantly relative to b.  The caller must ensure that significant
+ * cancellation doesn't occur, either by having c of the same sign as 'a',
+ * or by having |c| a few percent smaller than |a|.  Pre-normalization of
+ * (a, b) may help.
+ *
+ * This is is a variant of an algorithm of Kahan (see Knuth (1981) 4.2.2
+ * exercise 19).  We gain considerable efficiency by requiring the terms to
+ * be sufficiently normalized and sufficiently increasing.
+ */
+#define	_3sumF(a, b, c) do {	\
+	__typeof(a) __tmp;	\
+				\
+	__tmp = (c);		\
+	_2sumF(__tmp, (a));	\
+	(b) += (a);		\
+	(a) = __tmp;		\
+} while (0)
+
+/*
+ * Common routine to process the arguments to nan(), nanf(), and nanl().
+ */
+void _scan_nan(uint32_t *__words, int __num_words, const char *__s);
+
+/*
+ * Mix 0, 1 or 2 NaNs.  First add 0 to each arg.  This normally just turns
+ * signaling NaNs into quiet NaNs by setting a quiet bit.  We do this
+ * because we want to never return a signaling NaN, and also because we
+ * don't want the quiet bit to affect the result.  Then mix the converted
+ * args using the specified operation.
+ *
+ * When one arg is NaN, the result is typically that arg quieted.  When both
+ * args are NaNs, the result is typically the quietening of the arg whose
+ * mantissa is largest after quietening.  When neither arg is NaN, the
+ * result may be NaN because it is indeterminate, or finite for subsequent
+ * construction of a NaN as the indeterminate 0.0L/0.0L.
+ *
+ * Technical complications: the result in bits after rounding to the final
+ * precision might depend on the runtime precision and/or on compiler
+ * optimizations, especially when different register sets are used for
+ * different precisions.  Try to make the result not depend on at least the
+ * runtime precision by always doing the main mixing step in long double
+ * precision.  Try to reduce dependencies on optimizations by adding the
+ * the 0's in different precisions (unless everything is in long double
+ * precision).
+ */
+#define	nan_mix(x, y)		(nan_mix_op((x), (y), +))
+#define	nan_mix_op(x, y, op)	(((x) + 0.0L) op ((y) + 0))
+
+#ifdef _COMPLEX_H
+
+/*
+ * C99 specifies that complex numbers have the same representation as
+ * an array of two elements, where the first element is the real part
+ * and the second element is the imaginary part.
+ */
+typedef union {
+	float complex f;
+	float a[2];
+} float_complex;
+typedef union {
+	double complex f;
+	double a[2];
+} double_complex;
+typedef union {
+	long double complex f;
+	long double a[2];
+} long_double_complex;
+#define	REALPART(z)	((z).a[0])
+#define	IMAGPART(z)	((z).a[1])
+
+/*
+ * Inline functions that can be used to construct complex values.
+ *
+ * The C99 standard intends x+I*y to be used for this, but x+I*y is
+ * currently unusable in general since gcc introduces many overflow,
+ * underflow, sign and efficiency bugs by rewriting I*y as
+ * (0.0+I)*(y+0.0*I) and laboriously computing the full complex product.
+ * In particular, I*Inf is corrupted to NaN+I*Inf, and I*-0 is corrupted
+ * to -0.0+I*0.0.
+ *
+ * The C11 standard introduced the macros CMPLX(), CMPLXF() and CMPLXL()
+ * to construct complex values.  Compilers that conform to the C99
+ * standard require the following functions to avoid the above issues.
+ */
+
+#ifndef CMPLXF
+static __inline float complex
+CMPLXF(float x, float y)
+{
+	float_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLX
+static __inline double complex
+CMPLX(double x, double y)
+{
+	double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#ifndef CMPLXL
+static __inline long double complex
+CMPLXL(long double x, long double y)
+{
+	long_double_complex z;
+
+	REALPART(z) = x;
+	IMAGPART(z) = y;
+	return (z.f);
+}
+#endif
+
+#endif /* _COMPLEX_H */
+ 
+/*
+ * The rnint() family rounds to the nearest integer for a restricted range
+ * range of args (up to about 2**MANT_DIG).  We assume that the current
+ * rounding mode is FE_TONEAREST so that this can be done efficiently.
+ * Extra precision causes more problems in practice, and we only centralize
+ * this here to reduce those problems, and have not solved the efficiency
+ * problems.  The exp2() family uses a more delicate version of this that
+ * requires extracting bits from the intermediate value, so it is not
+ * centralized here and should copy any solution of the efficiency problems.
+ */
+
+static inline double
+rnint(__double_t x)
+{
+	/*
+	 * This casts to double to kill any extra precision.  This depends
+	 * on the cast being applied to a double_t to avoid compiler bugs
+	 * (this is a cleaner version of STRICT_ASSIGN()).  This is
+	 * inefficient if there actually is extra precision, but is hard
+	 * to improve on.  We use double_t in the API to minimise conversions
+	 * for just calling here.  Note that we cannot easily change the
+	 * magic number to the one that works directly with double_t, since
+	 * the rounding precision is variable at runtime on x86 so the
+	 * magic number would need to be variable.  Assuming that the
+	 * rounding precision is always the default is too fragile.  This
+	 * and many other complications will move when the default is
+	 * changed to FP_PE.
+	 */
+	return ((double)(x + 0x1.8p52) - 0x1.8p52);
+}
+
+/*
+ * irint() and i64rint() give the same result as casting to their integer
+ * return type provided their arg is a floating point integer.  They can
+ * sometimes be more efficient because no rounding is required.
+ */
+#if (defined(amd64) || defined(__i386__)) && defined(__GNUCLIKE_ASM)
+#define	irint(x)						\
+    (sizeof(x) == sizeof(float) &&				\
+    sizeof(__float_t) == sizeof(long double) ? irintf(x) :	\
+    sizeof(x) == sizeof(double) &&				\
+    sizeof(__double_t) == sizeof(long double) ? irintd(x) :	\
+    sizeof(x) == sizeof(long double) ? irintl(x) : (int)(x))
+#else
+#define	irint(x)	((int)(x))
+#endif
+
+#ifdef DEBUG
+#if defined(__amd64__) || defined(__i386__)
+#define	breakpoint()	asm("int $3")
+#else
+#include <signal.h>
+
+#define	breakpoint()	raise(SIGTRAP)
+#endif
+#endif
+
+/* Write a pari script to test things externally. */
+#ifdef DOPRINT
+#include <stdio.h>
+
+#ifndef DOPRINT_SWIZZLE
+#define	DOPRINT_SWIZZLE		0
+#endif
+
+#ifdef DOPRINT_LD80
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx;							\
+	uint16_t __hx;							\
+									\
+	/* Hack to give more-problematic args. */			\
+	EXTRACT_LDBL80_WORDS(__hx, __lx, *xp);				\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_LDBL80_WORDS(*xp, __hx, __lx);				\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_D64)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx, __lx;						\
+									\
+	EXTRACT_WORDS(__hx, __lx, *xp);					\
+	__lx ^= DOPRINT_SWIZZLE;					\
+	INSERT_WORDS(*xp, __hx, __lx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#elif defined(DOPRINT_F32)
+
+#define	DOPRINT_START(xp) do {						\
+	uint32_t __hx;							\
+									\
+	GET_FLOAT_WORD(__hx, *xp);					\
+	__hx ^= DOPRINT_SWIZZLE;					\
+	SET_FLOAT_WORD(*xp, __hx);					\
+	printf("x = %.21Lg; ", (long double)*xp);			\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.21Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.21Lg; z = %.21Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#else /* !DOPRINT_LD80 && !DOPRINT_D64 (LD128 only) */
+
+#ifndef DOPRINT_SWIZZLE_HIGH
+#define	DOPRINT_SWIZZLE_HIGH	0
+#endif
+
+#define	DOPRINT_START(xp) do {						\
+	uint64_t __lx, __llx;						\
+	uint16_t __hx;							\
+									\
+	EXTRACT_LDBL128_WORDS(__hx, __lx, __llx, *xp);			\
+	__llx ^= DOPRINT_SWIZZLE;					\
+	__lx ^= DOPRINT_SWIZZLE_HIGH;					\
+	INSERT_LDBL128_WORDS(*xp, __hx, __lx, __llx);			\
+	printf("x = %.36Lg; ", (long double)*xp);					\
+} while (0)
+#define	DOPRINT_END1(v)							\
+	printf("y = %.36Lg; z = 0; show(x, y, z);\n", (long double)(v))
+#define	DOPRINT_END2(hi, lo)						\
+	printf("y = %.36Lg; z = %.36Lg; show(x, y, z);\n",		\
+	    (long double)(hi), (long double)(lo))
+
+#endif /* DOPRINT_LD80 */
+
+#else /* !DOPRINT */
+#define	DOPRINT_START(xp)
+#define	DOPRINT_END1(v)
+#define	DOPRINT_END2(hi, lo)
+#endif /* DOPRINT */
+
+#define	RETURNP(x) do {			\
+	DOPRINT_END1(x);		\
+	RETURNF(x);			\
+} while (0)
+#define	RETURNPI(x) do {		\
+	DOPRINT_END1(x);		\
+	RETURNI(x);			\
+} while (0)
+#define	RETURN2P(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNF((x) + (y));		\
+} while (0)
+#define	RETURN2PI(x, y) do {		\
+	DOPRINT_END2((x), (y));		\
+	RETURNI((x) + (y));		\
+} while (0)
+#ifdef STRUCT_RETURN
+#define	RETURNSP(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNP((rp)->hi);	\
+	RETURN2P((rp)->hi, (rp)->lo);	\
+} while (0)
+#define	RETURNSPI(rp) do {		\
+	if (!(rp)->lo_set)		\
+		RETURNPI((rp)->hi);	\
+	RETURN2PI((rp)->hi, (rp)->lo);	\
+} while (0)
+#endif
+#define	SUM2P(x, y) ({			\
+	const __typeof (x) __x = (x);	\
+	const __typeof (y) __y = (y);	\
+					\
+	DOPRINT_END2(__x, __y);		\
+	__x + __y;			\
+})
+
+/*
+ * ieee style elementary functions
+ *
+ * We rename functions here to improve other sources' diffability
+ * against fdlibm.
+ */
+#define	__ieee754_sqrt	sqrt
+#define	__ieee754_acos	acos
+#define	__ieee754_acosh	acosh
+#define	__ieee754_log	log
+#define	__ieee754_log2	log2
+#define	__ieee754_atanh	atanh
+#define	__ieee754_asin	asin
+#define	__ieee754_atan2	atan2
+#define	__ieee754_exp	exp
+#define	__ieee754_cosh	cosh
+#define	__ieee754_fmod	fmod
+#define	__ieee754_pow	pow
+#define	__ieee754_lgamma lgamma
+#define	__ieee754_gamma	gamma
+#define	__ieee754_lgamma_r lgamma_r
+#define	__ieee754_gamma_r gamma_r
+#define	__ieee754_log10	log10
+#define	__ieee754_sinh	sinh
+#define	__ieee754_hypot	hypot
+#define	__ieee754_j0	j0
+#define	__ieee754_j1	j1
+#define	__ieee754_y0	y0
+#define	__ieee754_y1	y1
+#define	__ieee754_jn	jn
+#define	__ieee754_yn	yn
+#define	__ieee754_remainder remainder
+#define	__ieee754_scalb	scalb
+#define	__ieee754_sqrtf	sqrtf
+#define	__ieee754_acosf	acosf
+#define	__ieee754_acoshf acoshf
+#define	__ieee754_logf	logf
+#define	__ieee754_atanhf atanhf
+#define	__ieee754_asinf	asinf
+#define	__ieee754_atan2f atan2f
+#define	__ieee754_expf	expf
+#define	__ieee754_coshf	coshf
+#define	__ieee754_fmodf	fmodf
+#define	__ieee754_powf	powf
+#define	__ieee754_lgammaf lgammaf
+#define	__ieee754_gammaf gammaf
+#define	__ieee754_lgammaf_r lgammaf_r
+#define	__ieee754_gammaf_r gammaf_r
+#define	__ieee754_log10f log10f
+#define	__ieee754_log2f log2f
+#define	__ieee754_sinhf	sinhf
+#define	__ieee754_hypotf hypotf
+#define	__ieee754_j0f	j0f
+#define	__ieee754_j1f	j1f
+#define	__ieee754_y0f	y0f
+#define	__ieee754_y1f	y1f
+#define	__ieee754_jnf	jnf
+#define	__ieee754_ynf	ynf
+#define	__ieee754_remainderf remainderf
+#define	__ieee754_scalbf scalbf
+
+#define acos fdlibm::acos
+#define asin fdlibm::asin
+#define atan fdlibm::atan
+#define atan2 fdlibm::atan2
+#define cos fdlibm::cos
+#define sin fdlibm::sin
+#define tan fdlibm::tan
+#define cosh fdlibm::cosh
+#define sinh fdlibm::sinh
+#define tanh fdlibm::tanh
+#define exp fdlibm::exp
+#define log fdlibm::log
+#define log10 fdlibm::log10
+#define pow fdlibm::pow
+#define ceil fdlibm::ceil
+#define ceilf fdlibm::ceilf
+#define fabs fdlibm::fabs
+#define floor fdlibm::floor
+#define acosh fdlibm::acosh
+#define asinh fdlibm::asinh
+#define atanh fdlibm::atanh
+#define cbrt fdlibm::cbrt
+#define expm1 fdlibm::expm1
+#define hypot fdlibm::hypot
+#define log1p fdlibm::log1p
+#define log2 fdlibm::log2
+#define scalb fdlibm::scalb
+#define copysign fdlibm::copysign
+#define scalbn fdlibm::scalbn
+#define trunc fdlibm::trunc
+#define truncf fdlibm::truncf
+#define floorf fdlibm::floorf
+#define nearbyint fdlibm::nearbyint
+#define nearbyintf fdlibm::nearbyintf
+#define rint fdlibm::rint
+#define rintf fdlibm::rintf
+
+/* fdlibm kernel function */
+int	__kernel_rem_pio2(double*,double*,int,int,int);
+
+/* double precision kernel functions */
+#ifndef INLINE_REM_PIO2
+int	__ieee754_rem_pio2(double,double*);
+#endif
+double	__kernel_sin(double,double,int);
+double	__kernel_cos(double,double);
+double	__kernel_tan(double,double,int);
+double	__ldexp_exp(double,int);
+#ifdef _COMPLEX_H
+double complex __ldexp_cexp(double complex,int);
+#endif
+
+/* float precision kernel functions */
+#ifndef INLINE_REM_PIO2F
+int	__ieee754_rem_pio2f(float,double*);
+#endif
+#ifndef INLINE_KERNEL_SINDF
+float	__kernel_sindf(double);
+#endif
+#ifndef INLINE_KERNEL_COSDF
+float	__kernel_cosdf(double);
+#endif
+#ifndef INLINE_KERNEL_TANDF
+float	__kernel_tandf(double,int);
+#endif
+float	__ldexp_expf(float,int);
+#ifdef _COMPLEX_H
+float complex __ldexp_cexpf(float complex,int);
+#endif
+
+/* long double precision kernel functions */
+long double __kernel_sinl(long double, long double, int);
+long double __kernel_cosl(long double, long double);
+long double __kernel_tanl(long double, long double, int);
+
+#endif /* !_MATH_PRIVATE_H_ */
Index: mozjs/patches/README
===================================================================
--- mozjs/patches/README	(nonexistent)
+++ mozjs/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: mozjs/patches
===================================================================
--- mozjs/patches	(nonexistent)
+++ mozjs/patches	(revision 385)

Property changes on: mozjs/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mozjs
===================================================================
--- mozjs	(nonexistent)
+++ mozjs	(revision 385)

Property changes on: mozjs
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: mypaint-brushes/Makefile
===================================================================
--- mypaint-brushes/Makefile	(nonexistent)
+++ mypaint-brushes/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/mypaint-brushes
+
+versions    = 1.3.1
+pkgname     = mypaint-brushes
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: mypaint-brushes
===================================================================
--- mypaint-brushes	(nonexistent)
+++ mypaint-brushes	(revision 385)

Property changes on: mypaint-brushes
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: openbox/Makefile
===================================================================
--- openbox/Makefile	(revision 384)
+++ openbox/Makefile	(revision 385)
@@ -14,7 +14,9 @@
 tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
 sha1s       = $(addsuffix .sha1sum, $(tarballs))
 
-patches     = $(CURDIR)/patches/openbox-3.6.1-xdg-autostart.patch
+patches     = $(CURDIR)/patches/openbox-3.6.1-mkdir-autostart.patch
+patches    += $(CURDIR)/patches/openbox-3.6.1-xdg-autostart.patch
+patches    += $(CURDIR)/patches/openbox-3.6.1-darkred-theme.patch
 
 .NOTPARALLEL: $(patches)
 
@@ -49,7 +51,9 @@
 
 $(patches): $(sha1s)
 	@echo -e "\n======= Create Patches =======\n" ; \
-	 ( cd create-3.6.1-xdg-autostart-patch ; ./create.patch.sh ) ; \
+	 ( cd create-3.6.1-mkdir-autostart-patch ; ./create.patch.sh ) ; \
+	 ( cd create-3.6.1-xdg-autostart-patch   ; ./create.patch.sh ) ; \
+	 ( cd create-3.6.1-darkred-theme-patch   ; ./create.patch.sh ) ; \
 	 echo -e "\n"
 
 download_clean:
Index: openbox/create-3.6.1-darkred-theme-patch/create.patch.sh
===================================================================
--- openbox/create-3.6.1-darkred-theme-patch/create.patch.sh	(nonexistent)
+++ openbox/create-3.6.1-darkred-theme-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.6.1
+
+tar --files-from=file.list -xJvf ../openbox-$VERSION.tar.xz
+mv openbox-$VERSION openbox-$VERSION-orig
+
+cp -rf ./openbox-$VERSION-new ./openbox-$VERSION
+
+diff --unified -Nr  openbox-$VERSION-orig  openbox-$VERSION > openbox-$VERSION-darkred-theme.patch
+
+mv openbox-$VERSION-darkred-theme.patch ../patches
+
+rm -rf ./openbox-$VERSION
+rm -rf ./openbox-$VERSION-orig

Property changes on: openbox/create-3.6.1-darkred-theme-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: openbox/create-3.6.1-darkred-theme-patch/file.list
===================================================================
--- openbox/create-3.6.1-darkred-theme-patch/file.list	(nonexistent)
+++ openbox/create-3.6.1-darkred-theme-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+openbox-3.6.1/Makefile.am
+openbox-3.6.1/Makefile.in
Index: openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.am
===================================================================
--- openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.am	(nonexistent)
+++ openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.am	(revision 385)
@@ -0,0 +1,632 @@
+SUBDIRS = m4 po
+
+docxbmdir       = $(docdir)/xbm
+themedir        = $(datadir)/themes
+localedir       = $(datadir)/locale
+configdir       = $(sysconfdir)/xdg
+rcdir           = $(configdir)/openbox
+xsessionsdir    = $(datadir)/xsessions
+gnomesessiondir = $(datadir)/gnome-session/sessions
+gnomewmfilesdir = $(datadir)/gnome/wm-properties
+pkgconfigdir    = $(libdir)/pkgconfig
+obtpubincludedir= $(includedir)/openbox/@OBT_VERSION@/obt
+rrpubincludedir = $(includedir)/openbox/@RR_VERSION@/obrender
+pixmapdir       = $(datadir)/pixmaps
+xsddir          = $(datadir)/openbox
+appsdir         = $(datadir)/applications
+
+theme = Clearlooks
+
+AUTOMAKE_OPTIONS = subdir-objects foreign
+
+ACLOCAL_AMFLAGS = -I m4
+
+INCLUDES = -I.
+
+check_PROGRAMS = \
+	obrender/rendertest
+
+lib_LTLIBRARIES = \
+	obt/libobt.la \
+	obrender/libobrender.la
+
+bin_PROGRAMS = \
+	openbox/openbox \
+	tools/gdm-control/gdm-control \
+	tools/gnome-panel-control/gnome-panel-control \
+	tools/obxprop/obxprop
+
+noinst_PROGRAMS = \
+	obt/obt_unittests
+
+nodist_bin_SCRIPTS = \
+	data/xsession/openbox-session \
+	data/xsession/openbox-gnome-session \
+	data/xsession/openbox-kde-session
+
+dist_rc_SCRIPTS = \
+	data/environment
+
+nodist_rc_SCRIPTS = \
+	data/autostart/autostart
+
+dist_libexec_SCRIPTS = \
+	data/autostart/openbox-xdg-autostart
+
+nodist_libexec_SCRIPTS = \
+	data/autostart/openbox-autostart
+
+
+## obrender ##
+
+obrender_rendertest_CPPFLAGS = \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	-DG_LOG_DOMAIN=\"RenderTest\"
+obrender_rendertest_LDADD = \
+	obt/libobt.la \
+	obrender/libobrender.la \
+	$(GLIB_LIBS) \
+	$(PANGO_LIBS) \
+	$(XML_LIBS) \
+	$(X_LIBS)
+obrender_rendertest_SOURCES = obrender/test.c
+
+obrender_libobrender_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(IMLIB2_CFLAGS) \
+	$(LIBRSVG_CFLAGS) \
+	-DG_LOG_DOMAIN=\"ObRender\" \
+	-DDEFAULT_THEME=\"$(theme)\"
+obrender_libobrender_la_LDFLAGS = \
+	-version-info $(RR_CURRENT):$(RR_REVISION):$(RR_AGE)
+obrender_libobrender_la_LIBADD = \
+	obt/libobt.la \
+	$(X_LIBS) \
+	$(PANGO_LIBS) \
+	$(GLIB_LIBS) \
+	$(IMLIB2_LIBS) \
+	$(LIBRSVG_LIBS) \
+	$(XML_LIBS)
+obrender_libobrender_la_SOURCES = \
+	gettext.h \
+	obrender/button.c \
+	obrender/color.h \
+	obrender/color.c \
+	obrender/font.h \
+	obrender/font.c \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/gradient.c \
+	obrender/icon.h \
+	obrender/image.h \
+	obrender/image.c \
+	obrender/imagecache.h \
+	obrender/imagecache.c \
+	obrender/instance.h \
+	obrender/instance.c \
+	obrender/mask.h \
+	obrender/mask.c \
+	obrender/render.h \
+	obrender/render.c \
+	obrender/theme.h \
+	obrender/theme.c
+
+## obt ##
+
+obt_libobt_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(XINERAMA_CFLAGS) \
+	$(XKB_CFLAGS) \
+	$(XRANDR_CFLAGS) \
+	$(XSHAPE_CFLAGS) \
+	$(XSYNC_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DG_LOG_DOMAIN=\"Obt\" \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\"
+obt_libobt_la_LDFLAGS = \
+	-version-info $(OBT_CURRENT):$(OBT_REVISION):$(OBT_AGE)
+obt_libobt_la_LIBADD = \
+	$(X_LIBS) \
+	$(XINERAMA_LIBS) \
+	$(XKB_LIBS) \
+	$(XRANDR_LIBS) \
+	$(XSHAPE_LIBS) \
+	$(XSYNC_LIBS) \
+	$(GLIB_LIBS) \
+	$(XML_LIBS)
+obt_libobt_la_SOURCES = \
+	obt/bsearch.h \
+	obt/display.h \
+	obt/display.c \
+	obt/internal.h \
+	obt/keyboard.h \
+	obt/keyboard.c \
+	obt/xml.h \
+	obt/xml.c \
+	obt/ddparse.h \
+	obt/ddparse.c \
+	obt/link.h \
+	obt/link.c \
+	obt/paths.h \
+	obt/paths.c \
+	obt/prop.h \
+	obt/prop.c \
+	obt/signal.h \
+	obt/signal.c \
+	obt/util.h \
+	obt/xqueue.h \
+	obt/xqueue.c
+
+## openbox ##
+
+openbox_openbox_CPPFLAGS = \
+	$(SM_CFLAGS) \
+	$(X_CFLAGS) \
+	$(XCURSOR_CFLAGS) \
+	$(SM_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(LIBSN_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Openbox\"
+openbox_openbox_LDADD = \
+	$(XINERAMA_LIBS) \
+	$(XRANDR_LIBS) \
+	$(SM_LIBS) \
+	$(GLIB_LIBS) \
+	$(X_LIBS) \
+	$(XCURSOR_LIBS) \
+	$(LIBSN_LIBS) \
+	$(XML_LIBS) \
+	$(EFENCE_LIBS) \
+	$(LIBINTL) \
+	obrender/libobrender.la \
+	obt/libobt.la
+openbox_openbox_LDFLAGS = -export-dynamic
+openbox_openbox_SOURCES = \
+	gettext.h \
+	openbox/actions/all.c \
+	openbox/actions/all.h \
+	openbox/actions/addremovedesktop.c \
+	openbox/actions/breakchroot.c \
+	openbox/actions/close.c \
+	openbox/actions/cyclewindows.c \
+	openbox/actions/debug.c \
+	openbox/actions/decorations.c \
+	openbox/actions/desktop.c \
+	openbox/actions/dock.c \
+	openbox/actions/dockautohide.c \
+	openbox/actions/directionalwindows.c \
+	openbox/actions/execute.c \
+	openbox/actions/exit.c \
+	openbox/actions/focus.c \
+	openbox/actions/focustobottom.c \
+	openbox/actions/fullscreen.c \
+	openbox/actions/growtoedge.c \
+	openbox/actions/iconify.c \
+	openbox/actions/if.c \
+	openbox/actions/kill.c \
+	openbox/actions/layer.c \
+	openbox/actions/lower.c \
+	openbox/actions/maximize.c \
+	openbox/actions/move.c \
+	openbox/actions/moverelative.c \
+	openbox/actions/moveresizeto.c \
+	openbox/actions/movetoedge.c \
+	openbox/actions/omnipresent.c \
+	openbox/actions/raise.c \
+	openbox/actions/raiselower.c \
+	openbox/actions/reconfigure.c \
+	openbox/actions/resize.c \
+	openbox/actions/resizerelative.c \
+	openbox/actions/restart.c \
+	openbox/actions/shade.c \
+	openbox/actions/shadelowerraise.c \
+	openbox/actions/showdesktop.c \
+	openbox/actions/showmenu.c \
+	openbox/actions/unfocus.c \
+	openbox/actions.c \
+	openbox/actions.h \
+	openbox/client.c \
+	openbox/client.h \
+	openbox/client_list_menu.c \
+	openbox/client_list_menu.h \
+	openbox/client_list_combined_menu.c \
+	openbox/client_list_combined_menu.h \
+	openbox/client_menu.c \
+	openbox/client_menu.h \
+	openbox/config.c \
+	openbox/config.h \
+	openbox/debug.c \
+	openbox/debug.h \
+	openbox/dock.c \
+	openbox/dock.h \
+	openbox/event.c \
+	openbox/event.h \
+	openbox/focus.c \
+	openbox/focus.h \
+	openbox/focus_cycle.c \
+	openbox/focus_cycle.h \
+	openbox/focus_cycle_indicator.c \
+	openbox/focus_cycle_indicator.h \
+	openbox/focus_cycle_popup.c \
+	openbox/focus_cycle_popup.h \
+	openbox/frame.c \
+	openbox/frame.h \
+	openbox/framerender.c \
+	openbox/framerender.h \
+	openbox/geom.h \
+	openbox/grab.c \
+	openbox/grab.h \
+	openbox/group.c \
+	openbox/group.h \
+	openbox/keyboard.c \
+	openbox/keyboard.h \
+	openbox/keytree.c \
+	openbox/keytree.h \
+	openbox/menuframe.c \
+	openbox/menuframe.h \
+	openbox/menu.c \
+	openbox/menu.h \
+	openbox/misc.h \
+	openbox/mouse.c \
+	openbox/mouse.h \
+	openbox/moveresize.c \
+	openbox/moveresize.h \
+	openbox/mwm.h \
+	openbox/openbox.c \
+	openbox/openbox.h \
+	openbox/ping.c \
+	openbox/ping.h \
+	openbox/place.c \
+	openbox/place.h \
+	openbox/place_overlap.c \
+	openbox/place_overlap.h \
+	openbox/prompt.c \
+	openbox/prompt.h \
+	openbox/popup.c \
+	openbox/popup.h \
+	openbox/resist.c \
+	openbox/resist.h \
+	openbox/screen.c \
+	openbox/screen.h \
+	openbox/session.c \
+	openbox/session.h \
+	openbox/stacking.c \
+	openbox/stacking.h \
+	openbox/startupnotify.c \
+	openbox/startupnotify.h \
+	openbox/translate.c \
+	openbox/translate.h \
+	openbox/window.c \
+	openbox/window.h
+
+## obt_unittests ##
+
+obt_obt_unittests_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Obt-Unittests\"
+obt_obt_unittests_LDADD = \
+	$(GLIB_LIBS) \
+	obt/libobt.la
+obt_obt_unittests_LDFLAGS = -export-dynamic
+obt_obt_unittests_SOURCES = \
+	obt/unittest_base.h \
+	obt/unittest_base.c \
+	obt/bsearch_unittest.c
+
+## gnome-panel-control ##
+
+tools_gnome_panel_control_gnome_panel_control_CPPFLAGS = \
+	$(X_CFLAGS)
+tools_gnome_panel_control_gnome_panel_control_LDADD = \
+	$(X_LIBS)
+tools_gnome_panel_control_gnome_panel_control_SOURCES = \
+	tools/gnome-panel-control/gnome-panel-control.c
+
+## obxprop ##
+
+tools_obxprop_obxprop_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	$(X_CFLAGS)
+tools_obxprop_obxprop_LDADD = \
+	$(GLIB_LIBS) \
+	$(X_LIBS)
+tools_obxprop_obxprop_SOURCES = \
+	tools/obxprop/obxprop.c
+
+## gdm-control ##
+
+tools_gdm_control_gdm_control_CPPFLAGS = \
+	$(XAUTH_CFLAGS) \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS)
+tools_gdm_control_gdm_control_LDADD = \
+	$(XAUTH_LIBS) \
+	$(X_LIBS) \
+	$(GLIB_LIBS)
+tools_gdm_control_gdm_control_SOURCES = \
+	tools/gdm-control/gdm-control.c
+
+
+## default button masks ##
+dist_docxbm_DATA = \
+        data/xbm/bullet.xbm \
+        data/xbm/close.xbm \
+        data/xbm/desk_toggled.xbm \
+        data/xbm/desk.xbm \
+        data/xbm/iconify.xbm \
+        data/xbm/max_toggled.xbm \
+        data/xbm/max.xbm \
+        data/xbm/shade_toggled.xbm \
+        data/xbm/shade.xbm
+
+
+## themes ##
+
+clearlooks_themedir = $(themedir)/Clearlooks/openbox-3
+dist_clearlooks_theme_DATA= \
+	themes/Clearlooks/openbox-3/themerc
+
+clearlooks34_themedir = $(themedir)/Clearlooks-3.4/openbox-3
+dist_clearlooks34_theme_DATA= \
+	themes/Clearlooks-3.4/openbox-3/themerc
+
+clearlooksolive_themedir = $(themedir)/Clearlooks-Olive/openbox-3
+dist_clearlooksolive_theme_DATA= \
+	themes/Clearlooks-Olive/openbox-3/themerc
+
+mikachu_themedir = $(themedir)/Mikachu/openbox-3
+dist_mikachu_theme_DATA= \
+	themes/Mikachu/openbox-3/bullet.xbm \
+	themes/Mikachu/openbox-3/close.xbm \
+	themes/Mikachu/openbox-3/desk.xbm \
+	themes/Mikachu/openbox-3/iconify.xbm \
+	themes/Mikachu/openbox-3/max.xbm \
+	themes/Mikachu/openbox-3/themerc
+
+
+natura_themedir = $(themedir)/Natura/openbox-3
+dist_natura_theme_DATA= \
+	themes/Natura/openbox-3/close_hover.xbm \
+	themes/Natura/openbox-3/close.xbm \
+	themes/Natura/openbox-3/desk_toggled.xbm \
+	themes/Natura/openbox-3/desk_hover.xbm \
+	themes/Natura/openbox-3/desk.xbm \
+	themes/Natura/openbox-3/iconify_hover.xbm \
+	themes/Natura/openbox-3/iconify.xbm \
+	themes/Natura/openbox-3/max_hover.xbm \
+	themes/Natura/openbox-3/max_toggled.xbm \
+	themes/Natura/openbox-3/max.xbm \
+	themes/Natura/openbox-3/shade.xbm \
+	themes/Natura/openbox-3/shade_hover.xbm \
+	themes/Natura/openbox-3/themerc
+
+artwizboxed_themedir = $(themedir)/Artwiz-boxed/openbox-3
+dist_artwizboxed_theme_DATA= \
+	themes/Artwiz-boxed/openbox-3/themerc
+
+bear2_themedir = $(themedir)/Bear2/openbox-3
+dist_bear2_theme_DATA= \
+	themes/Bear2/openbox-3/close_pressed.xbm \
+	themes/Bear2/openbox-3/close.xbm \
+	themes/Bear2/openbox-3/desk_toggled.xbm \
+	themes/Bear2/openbox-3/desk.xbm \
+	themes/Bear2/openbox-3/iconify_pressed.xbm \
+	themes/Bear2/openbox-3/iconify.xbm \
+	themes/Bear2/openbox-3/max_pressed.xbm \
+	themes/Bear2/openbox-3/max_toggled.xbm \
+	themes/Bear2/openbox-3/max.xbm \
+	themes/Bear2/openbox-3/shade_pressed.xbm \
+	themes/Bear2/openbox-3/shade.xbm \
+	themes/Bear2/openbox-3/themerc
+
+orang_themedir = $(themedir)/Orang/openbox-3
+dist_orang_theme_DATA= \
+	themes/Orang/openbox-3/themerc
+
+onyx_themedir = $(themedir)/Onyx/openbox-3
+dist_onyx_theme_DATA= \
+	themes/Onyx/openbox-3/themerc
+
+onyxcitrus_themedir = $(themedir)/Onyx-Citrus/openbox-3
+dist_onyxcitrus_theme_DATA= \
+	themes/Onyx-Citrus/openbox-3/themerc
+
+onyxdarkred_themedir = $(themedir)/Onyx-DarkRed/openbox-3
+dist_onyxdarkred_theme_DATA= \
+	themes/Onyx-DarkRed/openbox-3/themerc
+
+syscrash_themedir = $(themedir)/Syscrash/openbox-3
+dist_syscrash_theme_DATA= \
+	themes/Syscrash/openbox-3/max_disabled.xbm \
+	themes/Syscrash/openbox-3/max_pressed.xbm \
+	themes/Syscrash/openbox-3/max_toggled.xbm \
+	themes/Syscrash/openbox-3/max.xbm \
+	themes/Syscrash/openbox-3/themerc
+
+## public headers ##
+
+rrpubinclude_HEADERS = \
+	obrender/color.h \
+	obrender/font.h \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/image.h \
+	obrender/instance.h \
+	obrender/mask.h \
+	obrender/render.h \
+	obrender/theme.h \
+	obrender/version.h
+
+obtpubinclude_HEADERS = \
+	obt/link.h \
+	obt/display.h \
+	obt/keyboard.h \
+	obt/xml.h \
+	obt/paths.h \
+	obt/prop.h \
+	obt/signal.h \
+	obt/util.h \
+	obt/version.h \
+	obt/xqueue.h
+
+nodist_pkgconfig_DATA = \
+	obrender/obrender-3.5.pc \
+	obt/obt-3.5.pc
+
+## data ##
+
+dist_apps_DATA = \
+	data/openbox.desktop
+
+dist_pixmap_DATA = \
+	data/openbox.png
+
+dist_rc_DATA = \
+	data/rc.xml \
+	data/menu.xml
+
+edit = $(SED) \
+	-e 's!@version\@!$(VERSION)!' \
+	-e 's!@configdir\@!$(configdir)!' \
+	-e 's!@rcdir\@!$(rcdir)!' \
+	-e 's!@libexecdir\@!$(libexecdir)!' \
+	-e 's!@bindir\@!$(bindir)!'
+
+data/autostart/autostart: $(top_srcdir)/data/autostart/autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+data/autostart/openbox-autostart: $(top_srcdir)/data/autostart/openbox-autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+%.desktop: %.desktop.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%-session: %-session.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%.1.in: %.1.sgml
+	@echo make: creating $@
+	@docbook-to-man $< >$@
+
+%.1: %.1.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+dist_gnomewmfiles_DATA = \
+	data/gnome-wm-properties/openbox.desktop
+
+nodist_xsessions_DATA = \
+	data/xsession/openbox.desktop \
+	data/xsession/openbox-gnome.desktop \
+	data/xsession/openbox-kde.desktop
+
+dist_gnomesession_DATA = \
+	data/gnome-session/openbox-gnome.session \
+	data/gnome-session/openbox-gnome-fallback.session
+
+dist_noinst_DATA = \
+	data/rc.xsd \
+	data/menu.xsd \
+	data/autostart/autostart.in \
+	data/autostart/openbox-autostart.in \
+	data/xsession/openbox.desktop.in \
+	data/xsession/openbox-gnome.desktop.in \
+	data/xsession/openbox-kde.desktop.in \
+	data/xsession/openbox-session.in \
+	data/xsession/openbox-gnome-session.in \
+	data/xsession/openbox-kde-session.in \
+	doc/openbox.1.sgml \
+	doc/openbox.1.in \
+	doc/openbox-session.1.sgml \
+	doc/openbox-session.1.in \
+	doc/openbox-gnome-session.1.sgml \
+	doc/openbox-gnome-session.1.in \
+	doc/openbox-kde-session.1.sgml \
+	doc/openbox-kde-session.1.in \
+	doc/obxprop.1.sgml \
+	doc/obxprop.1.in \
+	obrender/version.h.in \
+	obrender/obrender-3.5.pc.in \
+	obt/obt-3.5.pc.in \
+	obt/version.h.in \
+	tools/themeupdate/themeupdate.py \
+	tests/hideshow.py \
+	tests/Makefile \
+	tests/aspect.c \
+	tests/fullscreen.c \
+	tests/grav.c \
+	tests/grouptran.c \
+	tests/icons.c \
+	tests/modal2.c \
+	tests/modal3.c \
+	tests/modal.c \
+	tests/noresize.c \
+	tests/override.c \
+	tests/positioned.c \
+	tests/strut.c \
+	tests/title.c \
+	tests/urgent.c
+
+dist_doc_DATA = \
+	COMPLIANCE \
+	README \
+	AUTHORS \
+	CHANGELOG \
+	COPYING \
+	data/rc.xsd \
+	data/menu.xsd \
+	doc/rc-mouse-focus.xml
+
+nodist_man_MANS = \
+	doc/openbox.1 \
+	doc/openbox-session.1 \
+	doc/openbox-gnome-session.1 \
+	doc/openbox-kde-session.1 \
+	doc/obxprop.1
+
+EXTRA_DIST = \
+	config.rpath
+
+# make clean doesn't delete these for some reason, even though they are
+# built by make
+CLEANFILES = \
+	$(nodist_man_MANS) \
+	$(nodist_bin_SCRIPTS) \
+	$(nodist_xsessions_DATA) \
+	$(nodist_rc_SCRIPTS) \
+	$(nodist_libexec_SCRIPTS)
+
+#doc:
+#       $(MAKE) -$(MAKEFLAGS) -C doc/doxygen doc
+
+distclean-local:
+	for d in . m4 po obrender parser obt openbox; do \
+		for p in core core.* gmon.out *\~ *.orig *.rej .\#*; do \
+			rm -f "$$d/$$p"; \
+		done \
+	done
+
+.PHONY: doc
Index: openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.in
===================================================================
--- openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.in	(nonexistent)
+++ openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/Makefile.in	(revision 385)
@@ -0,0 +1,4718 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = obrender/rendertest$(EXEEXT)
+bin_PROGRAMS = openbox/openbox$(EXEEXT) \
+	tools/gdm-control/gdm-control$(EXEEXT) \
+	tools/gnome-panel-control/gnome-panel-control$(EXEEXT) \
+	tools/obxprop/obxprop$(EXEEXT)
+noinst_PROGRAMS = obt/obt_unittests$(EXEEXT)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
+	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/openbox.m4 $(top_srcdir)/m4/po.m4 \
+	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/x11.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(dist_libexec_SCRIPTS) \
+	$(dist_rc_SCRIPTS) $(dist_apps_DATA) \
+	$(dist_artwizboxed_theme_DATA) $(dist_bear2_theme_DATA) \
+	$(dist_clearlooks34_theme_DATA) $(dist_clearlooks_theme_DATA) \
+	$(dist_clearlooksolive_theme_DATA) $(dist_doc_DATA) \
+	$(dist_docxbm_DATA) $(dist_gnomesession_DATA) \
+	$(dist_gnomewmfiles_DATA) $(dist_mikachu_theme_DATA) \
+	$(dist_natura_theme_DATA) $(dist_noinst_DATA) \
+	$(dist_onyx_theme_DATA) $(dist_onyxcitrus_theme_DATA)  $(dist_onyxdarkred_theme_DATA) \
+	$(dist_orang_theme_DATA) $(dist_pixmap_DATA) $(dist_rc_DATA) \
+	$(dist_syscrash_theme_DATA) $(obtpubinclude_HEADERS) \
+	$(rrpubinclude_HEADERS) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = obrender/obrender-3.5.pc obt/obt-3.5.pc \
+	obrender/version.h obt/version.h version.h
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" \
+	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+	"$(DESTDIR)$(rcdir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(appsdir)" "$(DESTDIR)$(artwizboxed_themedir)" \
+	"$(DESTDIR)$(bear2_themedir)" \
+	"$(DESTDIR)$(clearlooks34_themedir)" \
+	"$(DESTDIR)$(clearlooks_themedir)" \
+	"$(DESTDIR)$(clearlooksolive_themedir)" "$(DESTDIR)$(docdir)" \
+	"$(DESTDIR)$(docxbmdir)" "$(DESTDIR)$(gnomesessiondir)" \
+	"$(DESTDIR)$(gnomewmfilesdir)" "$(DESTDIR)$(mikachu_themedir)" \
+	"$(DESTDIR)$(natura_themedir)" "$(DESTDIR)$(onyx_themedir)" \
+	"$(DESTDIR)$(onyxcitrus_themedir)" \
+	"$(DESTDIR)$(onyxdarkred_themedir)" \
+	"$(DESTDIR)$(orang_themedir)" "$(DESTDIR)$(pixmapdir)" \
+	"$(DESTDIR)$(rcdir)" "$(DESTDIR)$(syscrash_themedir)" \
+	"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xsessionsdir)" \
+	"$(DESTDIR)$(obtpubincludedir)" "$(DESTDIR)$(rrpubincludedir)"
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+obrender_libobrender_la_DEPENDENCIES = obt/libobt.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_obrender_libobrender_la_OBJECTS =  \
+	obrender/libobrender_la-button.lo \
+	obrender/libobrender_la-color.lo \
+	obrender/libobrender_la-font.lo \
+	obrender/libobrender_la-gradient.lo \
+	obrender/libobrender_la-image.lo \
+	obrender/libobrender_la-imagecache.lo \
+	obrender/libobrender_la-instance.lo \
+	obrender/libobrender_la-mask.lo \
+	obrender/libobrender_la-render.lo \
+	obrender/libobrender_la-theme.lo
+obrender_libobrender_la_OBJECTS =  \
+	$(am_obrender_libobrender_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+obrender_libobrender_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(obrender_libobrender_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+obt_libobt_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_obt_libobt_la_OBJECTS = obt/libobt_la-display.lo \
+	obt/libobt_la-keyboard.lo obt/libobt_la-xml.lo \
+	obt/libobt_la-ddparse.lo obt/libobt_la-link.lo \
+	obt/libobt_la-paths.lo obt/libobt_la-prop.lo \
+	obt/libobt_la-signal.lo obt/libobt_la-xqueue.lo
+obt_libobt_la_OBJECTS = $(am_obt_libobt_la_OBJECTS)
+obt_libobt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(obt_libobt_la_LDFLAGS) $(LDFLAGS) -o $@
+am_obrender_rendertest_OBJECTS = obrender/rendertest-test.$(OBJEXT)
+obrender_rendertest_OBJECTS = $(am_obrender_rendertest_OBJECTS)
+obrender_rendertest_DEPENDENCIES = obt/libobt.la \
+	obrender/libobrender.la $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_obt_obt_unittests_OBJECTS =  \
+	obt/obt_unittests-unittest_base.$(OBJEXT) \
+	obt/obt_unittests-bsearch_unittest.$(OBJEXT)
+obt_obt_unittests_OBJECTS = $(am_obt_obt_unittests_OBJECTS)
+obt_obt_unittests_DEPENDENCIES = $(am__DEPENDENCIES_1) obt/libobt.la
+obt_obt_unittests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(obt_obt_unittests_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_openbox_openbox_OBJECTS = openbox/actions/openbox-all.$(OBJEXT) \
+	openbox/actions/openbox-addremovedesktop.$(OBJEXT) \
+	openbox/actions/openbox-breakchroot.$(OBJEXT) \
+	openbox/actions/openbox-close.$(OBJEXT) \
+	openbox/actions/openbox-cyclewindows.$(OBJEXT) \
+	openbox/actions/openbox-debug.$(OBJEXT) \
+	openbox/actions/openbox-decorations.$(OBJEXT) \
+	openbox/actions/openbox-desktop.$(OBJEXT) \
+	openbox/actions/openbox-dock.$(OBJEXT) \
+	openbox/actions/openbox-dockautohide.$(OBJEXT) \
+	openbox/actions/openbox-directionalwindows.$(OBJEXT) \
+	openbox/actions/openbox-execute.$(OBJEXT) \
+	openbox/actions/openbox-exit.$(OBJEXT) \
+	openbox/actions/openbox-focus.$(OBJEXT) \
+	openbox/actions/openbox-focustobottom.$(OBJEXT) \
+	openbox/actions/openbox-fullscreen.$(OBJEXT) \
+	openbox/actions/openbox-growtoedge.$(OBJEXT) \
+	openbox/actions/openbox-iconify.$(OBJEXT) \
+	openbox/actions/openbox-if.$(OBJEXT) \
+	openbox/actions/openbox-kill.$(OBJEXT) \
+	openbox/actions/openbox-layer.$(OBJEXT) \
+	openbox/actions/openbox-lower.$(OBJEXT) \
+	openbox/actions/openbox-maximize.$(OBJEXT) \
+	openbox/actions/openbox-move.$(OBJEXT) \
+	openbox/actions/openbox-moverelative.$(OBJEXT) \
+	openbox/actions/openbox-moveresizeto.$(OBJEXT) \
+	openbox/actions/openbox-movetoedge.$(OBJEXT) \
+	openbox/actions/openbox-omnipresent.$(OBJEXT) \
+	openbox/actions/openbox-raise.$(OBJEXT) \
+	openbox/actions/openbox-raiselower.$(OBJEXT) \
+	openbox/actions/openbox-reconfigure.$(OBJEXT) \
+	openbox/actions/openbox-resize.$(OBJEXT) \
+	openbox/actions/openbox-resizerelative.$(OBJEXT) \
+	openbox/actions/openbox-restart.$(OBJEXT) \
+	openbox/actions/openbox-shade.$(OBJEXT) \
+	openbox/actions/openbox-shadelowerraise.$(OBJEXT) \
+	openbox/actions/openbox-showdesktop.$(OBJEXT) \
+	openbox/actions/openbox-showmenu.$(OBJEXT) \
+	openbox/actions/openbox-unfocus.$(OBJEXT) \
+	openbox/openbox-actions.$(OBJEXT) \
+	openbox/openbox-client.$(OBJEXT) \
+	openbox/openbox-client_list_menu.$(OBJEXT) \
+	openbox/openbox-client_list_combined_menu.$(OBJEXT) \
+	openbox/openbox-client_menu.$(OBJEXT) \
+	openbox/openbox-config.$(OBJEXT) \
+	openbox/openbox-debug.$(OBJEXT) openbox/openbox-dock.$(OBJEXT) \
+	openbox/openbox-event.$(OBJEXT) \
+	openbox/openbox-focus.$(OBJEXT) \
+	openbox/openbox-focus_cycle.$(OBJEXT) \
+	openbox/openbox-focus_cycle_indicator.$(OBJEXT) \
+	openbox/openbox-focus_cycle_popup.$(OBJEXT) \
+	openbox/openbox-frame.$(OBJEXT) \
+	openbox/openbox-framerender.$(OBJEXT) \
+	openbox/openbox-grab.$(OBJEXT) openbox/openbox-group.$(OBJEXT) \
+	openbox/openbox-keyboard.$(OBJEXT) \
+	openbox/openbox-keytree.$(OBJEXT) \
+	openbox/openbox-menuframe.$(OBJEXT) \
+	openbox/openbox-menu.$(OBJEXT) openbox/openbox-mouse.$(OBJEXT) \
+	openbox/openbox-moveresize.$(OBJEXT) \
+	openbox/openbox-openbox.$(OBJEXT) \
+	openbox/openbox-ping.$(OBJEXT) openbox/openbox-place.$(OBJEXT) \
+	openbox/openbox-place_overlap.$(OBJEXT) \
+	openbox/openbox-prompt.$(OBJEXT) \
+	openbox/openbox-popup.$(OBJEXT) \
+	openbox/openbox-resist.$(OBJEXT) \
+	openbox/openbox-screen.$(OBJEXT) \
+	openbox/openbox-session.$(OBJEXT) \
+	openbox/openbox-stacking.$(OBJEXT) \
+	openbox/openbox-startupnotify.$(OBJEXT) \
+	openbox/openbox-translate.$(OBJEXT) \
+	openbox/openbox-window.$(OBJEXT)
+openbox_openbox_OBJECTS = $(am_openbox_openbox_OBJECTS)
+openbox_openbox_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) obrender/libobrender.la obt/libobt.la
+openbox_openbox_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(openbox_openbox_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_tools_gdm_control_gdm_control_OBJECTS =  \
+	tools/gdm-control/gdm_control-gdm-control.$(OBJEXT)
+tools_gdm_control_gdm_control_OBJECTS =  \
+	$(am_tools_gdm_control_gdm_control_OBJECTS)
+tools_gdm_control_gdm_control_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_tools_gnome_panel_control_gnome_panel_control_OBJECTS = tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.$(OBJEXT)
+tools_gnome_panel_control_gnome_panel_control_OBJECTS =  \
+	$(am_tools_gnome_panel_control_gnome_panel_control_OBJECTS)
+tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1)
+am_tools_obxprop_obxprop_OBJECTS =  \
+	tools/obxprop/obxprop-obxprop.$(OBJEXT)
+tools_obxprop_obxprop_OBJECTS = $(am_tools_obxprop_obxprop_OBJECTS)
+tools_obxprop_obxprop_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+SCRIPTS = $(dist_libexec_SCRIPTS) $(dist_rc_SCRIPTS) \
+	$(nodist_bin_SCRIPTS) $(nodist_libexec_SCRIPTS) \
+	$(nodist_rc_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = obrender/$(DEPDIR)/libobrender_la-button.Plo \
+	obrender/$(DEPDIR)/libobrender_la-color.Plo \
+	obrender/$(DEPDIR)/libobrender_la-font.Plo \
+	obrender/$(DEPDIR)/libobrender_la-gradient.Plo \
+	obrender/$(DEPDIR)/libobrender_la-image.Plo \
+	obrender/$(DEPDIR)/libobrender_la-imagecache.Plo \
+	obrender/$(DEPDIR)/libobrender_la-instance.Plo \
+	obrender/$(DEPDIR)/libobrender_la-mask.Plo \
+	obrender/$(DEPDIR)/libobrender_la-render.Plo \
+	obrender/$(DEPDIR)/libobrender_la-theme.Plo \
+	obrender/$(DEPDIR)/rendertest-test.Po \
+	obt/$(DEPDIR)/libobt_la-ddparse.Plo \
+	obt/$(DEPDIR)/libobt_la-display.Plo \
+	obt/$(DEPDIR)/libobt_la-keyboard.Plo \
+	obt/$(DEPDIR)/libobt_la-link.Plo \
+	obt/$(DEPDIR)/libobt_la-paths.Plo \
+	obt/$(DEPDIR)/libobt_la-prop.Plo \
+	obt/$(DEPDIR)/libobt_la-signal.Plo \
+	obt/$(DEPDIR)/libobt_la-xml.Plo \
+	obt/$(DEPDIR)/libobt_la-xqueue.Plo \
+	obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po \
+	obt/$(DEPDIR)/obt_unittests-unittest_base.Po \
+	openbox/$(DEPDIR)/openbox-actions.Po \
+	openbox/$(DEPDIR)/openbox-client.Po \
+	openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po \
+	openbox/$(DEPDIR)/openbox-client_list_menu.Po \
+	openbox/$(DEPDIR)/openbox-client_menu.Po \
+	openbox/$(DEPDIR)/openbox-config.Po \
+	openbox/$(DEPDIR)/openbox-debug.Po \
+	openbox/$(DEPDIR)/openbox-dock.Po \
+	openbox/$(DEPDIR)/openbox-event.Po \
+	openbox/$(DEPDIR)/openbox-focus.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po \
+	openbox/$(DEPDIR)/openbox-frame.Po \
+	openbox/$(DEPDIR)/openbox-framerender.Po \
+	openbox/$(DEPDIR)/openbox-grab.Po \
+	openbox/$(DEPDIR)/openbox-group.Po \
+	openbox/$(DEPDIR)/openbox-keyboard.Po \
+	openbox/$(DEPDIR)/openbox-keytree.Po \
+	openbox/$(DEPDIR)/openbox-menu.Po \
+	openbox/$(DEPDIR)/openbox-menuframe.Po \
+	openbox/$(DEPDIR)/openbox-mouse.Po \
+	openbox/$(DEPDIR)/openbox-moveresize.Po \
+	openbox/$(DEPDIR)/openbox-openbox.Po \
+	openbox/$(DEPDIR)/openbox-ping.Po \
+	openbox/$(DEPDIR)/openbox-place.Po \
+	openbox/$(DEPDIR)/openbox-place_overlap.Po \
+	openbox/$(DEPDIR)/openbox-popup.Po \
+	openbox/$(DEPDIR)/openbox-prompt.Po \
+	openbox/$(DEPDIR)/openbox-resist.Po \
+	openbox/$(DEPDIR)/openbox-screen.Po \
+	openbox/$(DEPDIR)/openbox-session.Po \
+	openbox/$(DEPDIR)/openbox-stacking.Po \
+	openbox/$(DEPDIR)/openbox-startupnotify.Po \
+	openbox/$(DEPDIR)/openbox-translate.Po \
+	openbox/$(DEPDIR)/openbox-window.Po \
+	openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-all.Po \
+	openbox/actions/$(DEPDIR)/openbox-breakchroot.Po \
+	openbox/actions/$(DEPDIR)/openbox-close.Po \
+	openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po \
+	openbox/actions/$(DEPDIR)/openbox-debug.Po \
+	openbox/actions/$(DEPDIR)/openbox-decorations.Po \
+	openbox/actions/$(DEPDIR)/openbox-desktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po \
+	openbox/actions/$(DEPDIR)/openbox-dock.Po \
+	openbox/actions/$(DEPDIR)/openbox-dockautohide.Po \
+	openbox/actions/$(DEPDIR)/openbox-execute.Po \
+	openbox/actions/$(DEPDIR)/openbox-exit.Po \
+	openbox/actions/$(DEPDIR)/openbox-focus.Po \
+	openbox/actions/$(DEPDIR)/openbox-focustobottom.Po \
+	openbox/actions/$(DEPDIR)/openbox-fullscreen.Po \
+	openbox/actions/$(DEPDIR)/openbox-growtoedge.Po \
+	openbox/actions/$(DEPDIR)/openbox-iconify.Po \
+	openbox/actions/$(DEPDIR)/openbox-if.Po \
+	openbox/actions/$(DEPDIR)/openbox-kill.Po \
+	openbox/actions/$(DEPDIR)/openbox-layer.Po \
+	openbox/actions/$(DEPDIR)/openbox-lower.Po \
+	openbox/actions/$(DEPDIR)/openbox-maximize.Po \
+	openbox/actions/$(DEPDIR)/openbox-move.Po \
+	openbox/actions/$(DEPDIR)/openbox-moverelative.Po \
+	openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po \
+	openbox/actions/$(DEPDIR)/openbox-movetoedge.Po \
+	openbox/actions/$(DEPDIR)/openbox-omnipresent.Po \
+	openbox/actions/$(DEPDIR)/openbox-raise.Po \
+	openbox/actions/$(DEPDIR)/openbox-raiselower.Po \
+	openbox/actions/$(DEPDIR)/openbox-reconfigure.Po \
+	openbox/actions/$(DEPDIR)/openbox-resize.Po \
+	openbox/actions/$(DEPDIR)/openbox-resizerelative.Po \
+	openbox/actions/$(DEPDIR)/openbox-restart.Po \
+	openbox/actions/$(DEPDIR)/openbox-shade.Po \
+	openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po \
+	openbox/actions/$(DEPDIR)/openbox-showdesktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-showmenu.Po \
+	openbox/actions/$(DEPDIR)/openbox-unfocus.Po \
+	tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po \
+	tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po \
+	tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(obrender_libobrender_la_SOURCES) $(obt_libobt_la_SOURCES) \
+	$(obrender_rendertest_SOURCES) $(obt_obt_unittests_SOURCES) \
+	$(openbox_openbox_SOURCES) \
+	$(tools_gdm_control_gdm_control_SOURCES) \
+	$(tools_gnome_panel_control_gnome_panel_control_SOURCES) \
+	$(tools_obxprop_obxprop_SOURCES)
+DIST_SOURCES = $(obrender_libobrender_la_SOURCES) \
+	$(obt_libobt_la_SOURCES) $(obrender_rendertest_SOURCES) \
+	$(obt_obt_unittests_SOURCES) $(openbox_openbox_SOURCES) \
+	$(tools_gdm_control_gdm_control_SOURCES) \
+	$(tools_gnome_panel_control_gnome_panel_control_SOURCES) \
+	$(tools_obxprop_obxprop_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(nodist_man_MANS)
+DATA = $(dist_apps_DATA) $(dist_artwizboxed_theme_DATA) \
+	$(dist_bear2_theme_DATA) $(dist_clearlooks34_theme_DATA) \
+	$(dist_clearlooks_theme_DATA) \
+	$(dist_clearlooksolive_theme_DATA) $(dist_doc_DATA) \
+	$(dist_docxbm_DATA) $(dist_gnomesession_DATA) \
+	$(dist_gnomewmfiles_DATA) $(dist_mikachu_theme_DATA) \
+	$(dist_natura_theme_DATA) $(dist_noinst_DATA) \
+	$(dist_onyx_theme_DATA) $(dist_onyxcitrus_theme_DATA)  $(dist_onyxdarkred_theme_DATA) \
+	$(dist_orang_theme_DATA) $(dist_pixmap_DATA) $(dist_rc_DATA) \
+	$(dist_syscrash_theme_DATA) $(nodist_pkgconfig_DATA) \
+	$(nodist_xsessions_DATA)
+HEADERS = $(obtpubinclude_HEADERS) $(rrpubinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.h.in \
+	$(top_srcdir)/obrender/obrender-3.5.pc.in \
+	$(top_srcdir)/obrender/version.h.in \
+	$(top_srcdir)/obt/obt-3.5.pc.in $(top_srcdir)/obt/version.h.in \
+	ABOUT-NLS AUTHORS COPYING README compile config.guess \
+	config.rpath config.sub depcomp install-sh ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIRNAME = @DIRNAME@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EFENCE_LIBS = @EFENCE_LIBS@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILECMD = @FILECMD@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+IMLIB2_CFLAGS = @IMLIB2_CFLAGS@
+IMLIB2_LIBS = @IMLIB2_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBRSVG_CFLAGS = @LIBRSVG_CFLAGS@
+LIBRSVG_LIBS = @LIBRSVG_LIBS@
+LIBS = @LIBS@
+LIBSN_CFLAGS = @LIBSN_CFLAGS@
+LIBSN_LIBS = @LIBSN_LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBT_AGE = @OBT_AGE@
+OBT_BINARY_AGE = @OBT_BINARY_AGE@
+OBT_CURRENT = @OBT_CURRENT@
+OBT_CURRENT_MINUS_AGE = @OBT_CURRENT_MINUS_AGE@
+OBT_INTERFACE_AGE = @OBT_INTERFACE_AGE@
+OBT_MAJOR_VERSION = @OBT_MAJOR_VERSION@
+OBT_MICRO_VERSION = @OBT_MICRO_VERSION@
+OBT_MINOR_VERSION = @OBT_MINOR_VERSION@
+OBT_RELEASE = @OBT_RELEASE@
+OBT_REVISION = @OBT_REVISION@
+OBT_VERSION = @OBT_VERSION@
+OB_VERSION = @OB_VERSION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PANGO_CFLAGS = @PANGO_CFLAGS@
+PANGO_LIBS = @PANGO_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_IMLIB = @PKG_CONFIG_IMLIB@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_LIBRSVG = @PKG_CONFIG_LIBRSVG@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+RR_AGE = @RR_AGE@
+RR_BINARY_AGE = @RR_BINARY_AGE@
+RR_CURRENT = @RR_CURRENT@
+RR_CURRENT_MINUS_AGE = @RR_CURRENT_MINUS_AGE@
+RR_INTERFACE_AGE = @RR_INTERFACE_AGE@
+RR_MAJOR_VERSION = @RR_MAJOR_VERSION@
+RR_MICRO_VERSION = @RR_MICRO_VERSION@
+RR_MINOR_VERSION = @RR_MINOR_VERSION@
+RR_RELEASE = @RR_RELEASE@
+RR_REVISION = @RR_REVISION@
+RR_VERSION = @RR_VERSION@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SM_CFLAGS = @SM_CFLAGS@
+SM_LIBS = @SM_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XAUTH_CFLAGS = @XAUTH_CFLAGS@
+XAUTH_LIBS = @XAUTH_LIBS@
+XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
+XCURSOR_LIBS = @XCURSOR_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XINERAMA_LIBS = @XINERAMA_LIBS@
+XKB_CFLAGS = @XKB_CFLAGS@
+XKB_LIBS = @XKB_LIBS@
+XMKMF = @XMKMF@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+XRANDR_CFLAGS = @XRANDR_CFLAGS@
+XRANDR_LIBS = @XRANDR_LIBS@
+XSHAPE_CFLAGS = @XSHAPE_CFLAGS@
+XSHAPE_LIBS = @XSHAPE_LIBS@
+XSYNC_CFLAGS = @XSYNC_CFLAGS@
+XSYNC_LIBS = @XSYNC_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = m4 po
+docxbmdir = $(docdir)/xbm
+themedir = $(datadir)/themes
+configdir = $(sysconfdir)/xdg
+rcdir = $(configdir)/openbox
+xsessionsdir = $(datadir)/xsessions
+gnomesessiondir = $(datadir)/gnome-session/sessions
+gnomewmfilesdir = $(datadir)/gnome/wm-properties
+pkgconfigdir = $(libdir)/pkgconfig
+obtpubincludedir = $(includedir)/openbox/@OBT_VERSION@/obt
+rrpubincludedir = $(includedir)/openbox/@RR_VERSION@/obrender
+pixmapdir = $(datadir)/pixmaps
+xsddir = $(datadir)/openbox
+appsdir = $(datadir)/applications
+theme = Clearlooks
+AUTOMAKE_OPTIONS = subdir-objects foreign
+ACLOCAL_AMFLAGS = -I m4
+INCLUDES = -I.
+lib_LTLIBRARIES = \
+	obt/libobt.la \
+	obrender/libobrender.la
+
+nodist_bin_SCRIPTS = \
+	data/xsession/openbox-session \
+	data/xsession/openbox-gnome-session \
+	data/xsession/openbox-kde-session
+
+dist_rc_SCRIPTS = \
+	data/environment
+
+nodist_rc_SCRIPTS = \
+	data/autostart/autostart
+
+dist_libexec_SCRIPTS = \
+	data/autostart/openbox-xdg-autostart
+
+nodist_libexec_SCRIPTS = \
+	data/autostart/openbox-autostart
+
+obrender_rendertest_CPPFLAGS = \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	-DG_LOG_DOMAIN=\"RenderTest\"
+
+obrender_rendertest_LDADD = \
+	obt/libobt.la \
+	obrender/libobrender.la \
+	$(GLIB_LIBS) \
+	$(PANGO_LIBS) \
+	$(XML_LIBS) \
+	$(X_LIBS)
+
+obrender_rendertest_SOURCES = obrender/test.c
+obrender_libobrender_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(IMLIB2_CFLAGS) \
+	$(LIBRSVG_CFLAGS) \
+	-DG_LOG_DOMAIN=\"ObRender\" \
+	-DDEFAULT_THEME=\"$(theme)\"
+
+obrender_libobrender_la_LDFLAGS = \
+	-version-info $(RR_CURRENT):$(RR_REVISION):$(RR_AGE)
+
+obrender_libobrender_la_LIBADD = \
+	obt/libobt.la \
+	$(X_LIBS) \
+	$(PANGO_LIBS) \
+	$(GLIB_LIBS) \
+	$(IMLIB2_LIBS) \
+	$(LIBRSVG_LIBS) \
+	$(XML_LIBS)
+
+obrender_libobrender_la_SOURCES = \
+	gettext.h \
+	obrender/button.c \
+	obrender/color.h \
+	obrender/color.c \
+	obrender/font.h \
+	obrender/font.c \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/gradient.c \
+	obrender/icon.h \
+	obrender/image.h \
+	obrender/image.c \
+	obrender/imagecache.h \
+	obrender/imagecache.c \
+	obrender/instance.h \
+	obrender/instance.c \
+	obrender/mask.h \
+	obrender/mask.c \
+	obrender/render.h \
+	obrender/render.c \
+	obrender/theme.h \
+	obrender/theme.c
+
+obt_libobt_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(XINERAMA_CFLAGS) \
+	$(XKB_CFLAGS) \
+	$(XRANDR_CFLAGS) \
+	$(XSHAPE_CFLAGS) \
+	$(XSYNC_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DG_LOG_DOMAIN=\"Obt\" \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\"
+
+obt_libobt_la_LDFLAGS = \
+	-version-info $(OBT_CURRENT):$(OBT_REVISION):$(OBT_AGE)
+
+obt_libobt_la_LIBADD = \
+	$(X_LIBS) \
+	$(XINERAMA_LIBS) \
+	$(XKB_LIBS) \
+	$(XRANDR_LIBS) \
+	$(XSHAPE_LIBS) \
+	$(XSYNC_LIBS) \
+	$(GLIB_LIBS) \
+	$(XML_LIBS)
+
+obt_libobt_la_SOURCES = \
+	obt/bsearch.h \
+	obt/display.h \
+	obt/display.c \
+	obt/internal.h \
+	obt/keyboard.h \
+	obt/keyboard.c \
+	obt/xml.h \
+	obt/xml.c \
+	obt/ddparse.h \
+	obt/ddparse.c \
+	obt/link.h \
+	obt/link.c \
+	obt/paths.h \
+	obt/paths.c \
+	obt/prop.h \
+	obt/prop.c \
+	obt/signal.h \
+	obt/signal.c \
+	obt/util.h \
+	obt/xqueue.h \
+	obt/xqueue.c
+
+openbox_openbox_CPPFLAGS = \
+	$(SM_CFLAGS) \
+	$(X_CFLAGS) \
+	$(XCURSOR_CFLAGS) \
+	$(SM_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(LIBSN_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Openbox\"
+
+openbox_openbox_LDADD = \
+	$(XINERAMA_LIBS) \
+	$(XRANDR_LIBS) \
+	$(SM_LIBS) \
+	$(GLIB_LIBS) \
+	$(X_LIBS) \
+	$(XCURSOR_LIBS) \
+	$(LIBSN_LIBS) \
+	$(XML_LIBS) \
+	$(EFENCE_LIBS) \
+	$(LIBINTL) \
+	obrender/libobrender.la \
+	obt/libobt.la
+
+openbox_openbox_LDFLAGS = -export-dynamic
+openbox_openbox_SOURCES = \
+	gettext.h \
+	openbox/actions/all.c \
+	openbox/actions/all.h \
+	openbox/actions/addremovedesktop.c \
+	openbox/actions/breakchroot.c \
+	openbox/actions/close.c \
+	openbox/actions/cyclewindows.c \
+	openbox/actions/debug.c \
+	openbox/actions/decorations.c \
+	openbox/actions/desktop.c \
+	openbox/actions/dock.c \
+	openbox/actions/dockautohide.c \
+	openbox/actions/directionalwindows.c \
+	openbox/actions/execute.c \
+	openbox/actions/exit.c \
+	openbox/actions/focus.c \
+	openbox/actions/focustobottom.c \
+	openbox/actions/fullscreen.c \
+	openbox/actions/growtoedge.c \
+	openbox/actions/iconify.c \
+	openbox/actions/if.c \
+	openbox/actions/kill.c \
+	openbox/actions/layer.c \
+	openbox/actions/lower.c \
+	openbox/actions/maximize.c \
+	openbox/actions/move.c \
+	openbox/actions/moverelative.c \
+	openbox/actions/moveresizeto.c \
+	openbox/actions/movetoedge.c \
+	openbox/actions/omnipresent.c \
+	openbox/actions/raise.c \
+	openbox/actions/raiselower.c \
+	openbox/actions/reconfigure.c \
+	openbox/actions/resize.c \
+	openbox/actions/resizerelative.c \
+	openbox/actions/restart.c \
+	openbox/actions/shade.c \
+	openbox/actions/shadelowerraise.c \
+	openbox/actions/showdesktop.c \
+	openbox/actions/showmenu.c \
+	openbox/actions/unfocus.c \
+	openbox/actions.c \
+	openbox/actions.h \
+	openbox/client.c \
+	openbox/client.h \
+	openbox/client_list_menu.c \
+	openbox/client_list_menu.h \
+	openbox/client_list_combined_menu.c \
+	openbox/client_list_combined_menu.h \
+	openbox/client_menu.c \
+	openbox/client_menu.h \
+	openbox/config.c \
+	openbox/config.h \
+	openbox/debug.c \
+	openbox/debug.h \
+	openbox/dock.c \
+	openbox/dock.h \
+	openbox/event.c \
+	openbox/event.h \
+	openbox/focus.c \
+	openbox/focus.h \
+	openbox/focus_cycle.c \
+	openbox/focus_cycle.h \
+	openbox/focus_cycle_indicator.c \
+	openbox/focus_cycle_indicator.h \
+	openbox/focus_cycle_popup.c \
+	openbox/focus_cycle_popup.h \
+	openbox/frame.c \
+	openbox/frame.h \
+	openbox/framerender.c \
+	openbox/framerender.h \
+	openbox/geom.h \
+	openbox/grab.c \
+	openbox/grab.h \
+	openbox/group.c \
+	openbox/group.h \
+	openbox/keyboard.c \
+	openbox/keyboard.h \
+	openbox/keytree.c \
+	openbox/keytree.h \
+	openbox/menuframe.c \
+	openbox/menuframe.h \
+	openbox/menu.c \
+	openbox/menu.h \
+	openbox/misc.h \
+	openbox/mouse.c \
+	openbox/mouse.h \
+	openbox/moveresize.c \
+	openbox/moveresize.h \
+	openbox/mwm.h \
+	openbox/openbox.c \
+	openbox/openbox.h \
+	openbox/ping.c \
+	openbox/ping.h \
+	openbox/place.c \
+	openbox/place.h \
+	openbox/place_overlap.c \
+	openbox/place_overlap.h \
+	openbox/prompt.c \
+	openbox/prompt.h \
+	openbox/popup.c \
+	openbox/popup.h \
+	openbox/resist.c \
+	openbox/resist.h \
+	openbox/screen.c \
+	openbox/screen.h \
+	openbox/session.c \
+	openbox/session.h \
+	openbox/stacking.c \
+	openbox/stacking.h \
+	openbox/startupnotify.c \
+	openbox/startupnotify.h \
+	openbox/translate.c \
+	openbox/translate.h \
+	openbox/window.c \
+	openbox/window.h
+
+obt_obt_unittests_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Obt-Unittests\"
+
+obt_obt_unittests_LDADD = \
+	$(GLIB_LIBS) \
+	obt/libobt.la
+
+obt_obt_unittests_LDFLAGS = -export-dynamic
+obt_obt_unittests_SOURCES = \
+	obt/unittest_base.h \
+	obt/unittest_base.c \
+	obt/bsearch_unittest.c
+
+tools_gnome_panel_control_gnome_panel_control_CPPFLAGS = \
+	$(X_CFLAGS)
+
+tools_gnome_panel_control_gnome_panel_control_LDADD = \
+	$(X_LIBS)
+
+tools_gnome_panel_control_gnome_panel_control_SOURCES = \
+	tools/gnome-panel-control/gnome-panel-control.c
+
+tools_obxprop_obxprop_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	$(X_CFLAGS)
+
+tools_obxprop_obxprop_LDADD = \
+	$(GLIB_LIBS) \
+	$(X_LIBS)
+
+tools_obxprop_obxprop_SOURCES = \
+	tools/obxprop/obxprop.c
+
+tools_gdm_control_gdm_control_CPPFLAGS = \
+	$(XAUTH_CFLAGS) \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS)
+
+tools_gdm_control_gdm_control_LDADD = \
+	$(XAUTH_LIBS) \
+	$(X_LIBS) \
+	$(GLIB_LIBS)
+
+tools_gdm_control_gdm_control_SOURCES = \
+	tools/gdm-control/gdm-control.c
+
+dist_docxbm_DATA = \
+        data/xbm/bullet.xbm \
+        data/xbm/close.xbm \
+        data/xbm/desk_toggled.xbm \
+        data/xbm/desk.xbm \
+        data/xbm/iconify.xbm \
+        data/xbm/max_toggled.xbm \
+        data/xbm/max.xbm \
+        data/xbm/shade_toggled.xbm \
+        data/xbm/shade.xbm
+
+clearlooks_themedir = $(themedir)/Clearlooks/openbox-3
+dist_clearlooks_theme_DATA = \
+	themes/Clearlooks/openbox-3/themerc
+
+clearlooks34_themedir = $(themedir)/Clearlooks-3.4/openbox-3
+dist_clearlooks34_theme_DATA = \
+	themes/Clearlooks-3.4/openbox-3/themerc
+
+clearlooksolive_themedir = $(themedir)/Clearlooks-Olive/openbox-3
+dist_clearlooksolive_theme_DATA = \
+	themes/Clearlooks-Olive/openbox-3/themerc
+
+mikachu_themedir = $(themedir)/Mikachu/openbox-3
+dist_mikachu_theme_DATA = \
+	themes/Mikachu/openbox-3/bullet.xbm \
+	themes/Mikachu/openbox-3/close.xbm \
+	themes/Mikachu/openbox-3/desk.xbm \
+	themes/Mikachu/openbox-3/iconify.xbm \
+	themes/Mikachu/openbox-3/max.xbm \
+	themes/Mikachu/openbox-3/themerc
+
+natura_themedir = $(themedir)/Natura/openbox-3
+dist_natura_theme_DATA = \
+	themes/Natura/openbox-3/close_hover.xbm \
+	themes/Natura/openbox-3/close.xbm \
+	themes/Natura/openbox-3/desk_toggled.xbm \
+	themes/Natura/openbox-3/desk_hover.xbm \
+	themes/Natura/openbox-3/desk.xbm \
+	themes/Natura/openbox-3/iconify_hover.xbm \
+	themes/Natura/openbox-3/iconify.xbm \
+	themes/Natura/openbox-3/max_hover.xbm \
+	themes/Natura/openbox-3/max_toggled.xbm \
+	themes/Natura/openbox-3/max.xbm \
+	themes/Natura/openbox-3/shade.xbm \
+	themes/Natura/openbox-3/shade_hover.xbm \
+	themes/Natura/openbox-3/themerc
+
+artwizboxed_themedir = $(themedir)/Artwiz-boxed/openbox-3
+dist_artwizboxed_theme_DATA = \
+	themes/Artwiz-boxed/openbox-3/themerc
+
+bear2_themedir = $(themedir)/Bear2/openbox-3
+dist_bear2_theme_DATA = \
+	themes/Bear2/openbox-3/close_pressed.xbm \
+	themes/Bear2/openbox-3/close.xbm \
+	themes/Bear2/openbox-3/desk_toggled.xbm \
+	themes/Bear2/openbox-3/desk.xbm \
+	themes/Bear2/openbox-3/iconify_pressed.xbm \
+	themes/Bear2/openbox-3/iconify.xbm \
+	themes/Bear2/openbox-3/max_pressed.xbm \
+	themes/Bear2/openbox-3/max_toggled.xbm \
+	themes/Bear2/openbox-3/max.xbm \
+	themes/Bear2/openbox-3/shade_pressed.xbm \
+	themes/Bear2/openbox-3/shade.xbm \
+	themes/Bear2/openbox-3/themerc
+
+orang_themedir = $(themedir)/Orang/openbox-3
+dist_orang_theme_DATA = \
+	themes/Orang/openbox-3/themerc
+
+onyx_themedir = $(themedir)/Onyx/openbox-3
+dist_onyx_theme_DATA = \
+	themes/Onyx/openbox-3/themerc
+
+onyxcitrus_themedir = $(themedir)/Onyx-Citrus/openbox-3
+dist_onyxcitrus_theme_DATA = \
+	themes/Onyx-Citrus/openbox-3/themerc
+
+onyxdarkred_themedir = $(themedir)/Onyx-DarkRed/openbox-3
+dist_onyxdarkred_theme_DATA = \
+	themes/Onyx-DarkRed/openbox-3/themerc
+
+syscrash_themedir = $(themedir)/Syscrash/openbox-3
+dist_syscrash_theme_DATA = \
+	themes/Syscrash/openbox-3/max_disabled.xbm \
+	themes/Syscrash/openbox-3/max_pressed.xbm \
+	themes/Syscrash/openbox-3/max_toggled.xbm \
+	themes/Syscrash/openbox-3/max.xbm \
+	themes/Syscrash/openbox-3/themerc
+
+rrpubinclude_HEADERS = \
+	obrender/color.h \
+	obrender/font.h \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/image.h \
+	obrender/instance.h \
+	obrender/mask.h \
+	obrender/render.h \
+	obrender/theme.h \
+	obrender/version.h
+
+obtpubinclude_HEADERS = \
+	obt/link.h \
+	obt/display.h \
+	obt/keyboard.h \
+	obt/xml.h \
+	obt/paths.h \
+	obt/prop.h \
+	obt/signal.h \
+	obt/util.h \
+	obt/version.h \
+	obt/xqueue.h
+
+nodist_pkgconfig_DATA = \
+	obrender/obrender-3.5.pc \
+	obt/obt-3.5.pc
+
+dist_apps_DATA = \
+	data/openbox.desktop
+
+dist_pixmap_DATA = \
+	data/openbox.png
+
+dist_rc_DATA = \
+	data/rc.xml \
+	data/menu.xml
+
+edit = $(SED) \
+	-e 's!@version\@!$(VERSION)!' \
+	-e 's!@configdir\@!$(configdir)!' \
+	-e 's!@rcdir\@!$(rcdir)!' \
+	-e 's!@libexecdir\@!$(libexecdir)!' \
+	-e 's!@bindir\@!$(bindir)!'
+
+dist_gnomewmfiles_DATA = \
+	data/gnome-wm-properties/openbox.desktop
+
+nodist_xsessions_DATA = \
+	data/xsession/openbox.desktop \
+	data/xsession/openbox-gnome.desktop \
+	data/xsession/openbox-kde.desktop
+
+dist_gnomesession_DATA = \
+	data/gnome-session/openbox-gnome.session \
+	data/gnome-session/openbox-gnome-fallback.session
+
+dist_noinst_DATA = \
+	data/rc.xsd \
+	data/menu.xsd \
+	data/autostart/autostart.in \
+	data/autostart/openbox-autostart.in \
+	data/xsession/openbox.desktop.in \
+	data/xsession/openbox-gnome.desktop.in \
+	data/xsession/openbox-kde.desktop.in \
+	data/xsession/openbox-session.in \
+	data/xsession/openbox-gnome-session.in \
+	data/xsession/openbox-kde-session.in \
+	doc/openbox.1.sgml \
+	doc/openbox.1.in \
+	doc/openbox-session.1.sgml \
+	doc/openbox-session.1.in \
+	doc/openbox-gnome-session.1.sgml \
+	doc/openbox-gnome-session.1.in \
+	doc/openbox-kde-session.1.sgml \
+	doc/openbox-kde-session.1.in \
+	doc/obxprop.1.sgml \
+	doc/obxprop.1.in \
+	obrender/version.h.in \
+	obrender/obrender-3.5.pc.in \
+	obt/obt-3.5.pc.in \
+	obt/version.h.in \
+	tools/themeupdate/themeupdate.py \
+	tests/hideshow.py \
+	tests/Makefile \
+	tests/aspect.c \
+	tests/fullscreen.c \
+	tests/grav.c \
+	tests/grouptran.c \
+	tests/icons.c \
+	tests/modal2.c \
+	tests/modal3.c \
+	tests/modal.c \
+	tests/noresize.c \
+	tests/override.c \
+	tests/positioned.c \
+	tests/strut.c \
+	tests/title.c \
+	tests/urgent.c
+
+dist_doc_DATA = \
+	COMPLIANCE \
+	README \
+	AUTHORS \
+	CHANGELOG \
+	COPYING \
+	data/rc.xsd \
+	data/menu.xsd \
+	doc/rc-mouse-focus.xml
+
+nodist_man_MANS = \
+	doc/openbox.1 \
+	doc/openbox-session.1 \
+	doc/openbox-gnome-session.1 \
+	doc/openbox-kde-session.1 \
+	doc/obxprop.1
+
+EXTRA_DIST = \
+	config.rpath
+
+
+# make clean doesn't delete these for some reason, even though they are
+# built by make
+CLEANFILES = \
+	$(nodist_man_MANS) \
+	$(nodist_bin_SCRIPTS) \
+	$(nodist_xsessions_DATA) \
+	$(nodist_rc_SCRIPTS) \
+	$(nodist_libexec_SCRIPTS)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+obrender/obrender-3.5.pc: $(top_builddir)/config.status $(top_srcdir)/obrender/obrender-3.5.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obt/obt-3.5.pc: $(top_builddir)/config.status $(top_srcdir)/obt/obt-3.5.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obrender/version.h: $(top_builddir)/config.status $(top_srcdir)/obrender/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obt/version.h: $(top_builddir)/config.status $(top_srcdir)/obt/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+version.h: $(top_builddir)/config.status $(srcdir)/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p \
+	 || test -f $$p1 \
+	  ; then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' \
+	    -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+obrender/$(am__dirstamp):
+	@$(MKDIR_P) obrender
+	@: > obrender/$(am__dirstamp)
+obrender/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) obrender/$(DEPDIR)
+	@: > obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-button.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-color.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-font.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-gradient.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-image.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-imagecache.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-instance.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-mask.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-render.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-theme.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+
+obrender/libobrender.la: $(obrender_libobrender_la_OBJECTS) $(obrender_libobrender_la_DEPENDENCIES) $(EXTRA_obrender_libobrender_la_DEPENDENCIES) obrender/$(am__dirstamp)
+	$(AM_V_CCLD)$(obrender_libobrender_la_LINK) -rpath $(libdir) $(obrender_libobrender_la_OBJECTS) $(obrender_libobrender_la_LIBADD) $(LIBS)
+obt/$(am__dirstamp):
+	@$(MKDIR_P) obt
+	@: > obt/$(am__dirstamp)
+obt/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) obt/$(DEPDIR)
+	@: > obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-display.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-keyboard.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-xml.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-ddparse.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-link.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-paths.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-prop.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-signal.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-xqueue.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+
+obt/libobt.la: $(obt_libobt_la_OBJECTS) $(obt_libobt_la_DEPENDENCIES) $(EXTRA_obt_libobt_la_DEPENDENCIES) obt/$(am__dirstamp)
+	$(AM_V_CCLD)$(obt_libobt_la_LINK) -rpath $(libdir) $(obt_libobt_la_OBJECTS) $(obt_libobt_la_LIBADD) $(LIBS)
+obrender/rendertest-test.$(OBJEXT): obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+
+obrender/rendertest$(EXEEXT): $(obrender_rendertest_OBJECTS) $(obrender_rendertest_DEPENDENCIES) $(EXTRA_obrender_rendertest_DEPENDENCIES) obrender/$(am__dirstamp)
+	@rm -f obrender/rendertest$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(obrender_rendertest_OBJECTS) $(obrender_rendertest_LDADD) $(LIBS)
+obt/obt_unittests-unittest_base.$(OBJEXT): obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/obt_unittests-bsearch_unittest.$(OBJEXT): obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+
+obt/obt_unittests$(EXEEXT): $(obt_obt_unittests_OBJECTS) $(obt_obt_unittests_DEPENDENCIES) $(EXTRA_obt_obt_unittests_DEPENDENCIES) obt/$(am__dirstamp)
+	@rm -f obt/obt_unittests$(EXEEXT)
+	$(AM_V_CCLD)$(obt_obt_unittests_LINK) $(obt_obt_unittests_OBJECTS) $(obt_obt_unittests_LDADD) $(LIBS)
+openbox/actions/$(am__dirstamp):
+	@$(MKDIR_P) openbox/actions
+	@: > openbox/actions/$(am__dirstamp)
+openbox/actions/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) openbox/actions/$(DEPDIR)
+	@: > openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-all.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-addremovedesktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-breakchroot.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-close.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-cyclewindows.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-debug.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-decorations.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-desktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-dock.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-dockautohide.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-directionalwindows.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-execute.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-exit.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-focus.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-focustobottom.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-fullscreen.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-growtoedge.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-iconify.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-if.$(OBJEXT): openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-kill.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-layer.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-lower.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-maximize.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-move.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-moverelative.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-moveresizeto.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-movetoedge.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-omnipresent.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-raise.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-raiselower.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-reconfigure.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-resize.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-resizerelative.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-restart.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-shade.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-shadelowerraise.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-showdesktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-showmenu.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-unfocus.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/$(am__dirstamp):
+	@$(MKDIR_P) openbox
+	@: > openbox/$(am__dirstamp)
+openbox/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) openbox/$(DEPDIR)
+	@: > openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-actions.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_list_menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_list_combined_menu.$(OBJEXT):  \
+	openbox/$(am__dirstamp) openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-config.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-debug.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-dock.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-event.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle_indicator.$(OBJEXT):  \
+	openbox/$(am__dirstamp) openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle_popup.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-frame.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-framerender.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-grab.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-group.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-keyboard.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-keytree.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-menuframe.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-mouse.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-moveresize.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-openbox.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-ping.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-place.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-place_overlap.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-prompt.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-popup.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-resist.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-screen.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-session.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-stacking.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-startupnotify.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-translate.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-window.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+
+openbox/openbox$(EXEEXT): $(openbox_openbox_OBJECTS) $(openbox_openbox_DEPENDENCIES) $(EXTRA_openbox_openbox_DEPENDENCIES) openbox/$(am__dirstamp)
+	@rm -f openbox/openbox$(EXEEXT)
+	$(AM_V_CCLD)$(openbox_openbox_LINK) $(openbox_openbox_OBJECTS) $(openbox_openbox_LDADD) $(LIBS)
+tools/gdm-control/$(am__dirstamp):
+	@$(MKDIR_P) tools/gdm-control
+	@: > tools/gdm-control/$(am__dirstamp)
+tools/gdm-control/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/gdm-control/$(DEPDIR)
+	@: > tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+tools/gdm-control/gdm_control-gdm-control.$(OBJEXT):  \
+	tools/gdm-control/$(am__dirstamp) \
+	tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+
+tools/gdm-control/gdm-control$(EXEEXT): $(tools_gdm_control_gdm_control_OBJECTS) $(tools_gdm_control_gdm_control_DEPENDENCIES) $(EXTRA_tools_gdm_control_gdm_control_DEPENDENCIES) tools/gdm-control/$(am__dirstamp)
+	@rm -f tools/gdm-control/gdm-control$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_gdm_control_gdm_control_OBJECTS) $(tools_gdm_control_gdm_control_LDADD) $(LIBS)
+tools/gnome-panel-control/$(am__dirstamp):
+	@$(MKDIR_P) tools/gnome-panel-control
+	@: > tools/gnome-panel-control/$(am__dirstamp)
+tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/gnome-panel-control/$(DEPDIR)
+	@: > tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.$(OBJEXT):  \
+	tools/gnome-panel-control/$(am__dirstamp) \
+	tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+
+tools/gnome-panel-control/gnome-panel-control$(EXEEXT): $(tools_gnome_panel_control_gnome_panel_control_OBJECTS) $(tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES) $(EXTRA_tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES) tools/gnome-panel-control/$(am__dirstamp)
+	@rm -f tools/gnome-panel-control/gnome-panel-control$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_gnome_panel_control_gnome_panel_control_OBJECTS) $(tools_gnome_panel_control_gnome_panel_control_LDADD) $(LIBS)
+tools/obxprop/$(am__dirstamp):
+	@$(MKDIR_P) tools/obxprop
+	@: > tools/obxprop/$(am__dirstamp)
+tools/obxprop/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/obxprop/$(DEPDIR)
+	@: > tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+tools/obxprop/obxprop-obxprop.$(OBJEXT):  \
+	tools/obxprop/$(am__dirstamp) \
+	tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+
+tools/obxprop/obxprop$(EXEEXT): $(tools_obxprop_obxprop_OBJECTS) $(tools_obxprop_obxprop_DEPENDENCIES) $(EXTRA_tools_obxprop_obxprop_DEPENDENCIES) tools/obxprop/$(am__dirstamp)
+	@rm -f tools/obxprop/obxprop$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_obxprop_obxprop_OBJECTS) $(tools_obxprop_obxprop_LDADD) $(LIBS)
+install-dist_libexecSCRIPTS: $(dist_libexec_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-dist_libexecSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+install-dist_rcSCRIPTS: $(dist_rc_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_rc_SCRIPTS)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(rcdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(rcdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-dist_rcSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_rc_SCRIPTS)'; test -n "$(rcdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+install-nodist_libexecSCRIPTS: $(nodist_libexec_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_libexecSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+install-nodist_rcSCRIPTS: $(nodist_rc_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_rc_SCRIPTS)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(rcdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(rcdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_rcSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_rc_SCRIPTS)'; test -n "$(rcdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+	-rm -f obrender/*.$(OBJEXT)
+	-rm -f obrender/*.lo
+	-rm -f obt/*.$(OBJEXT)
+	-rm -f obt/*.lo
+	-rm -f openbox/*.$(OBJEXT)
+	-rm -f openbox/actions/*.$(OBJEXT)
+	-rm -f tools/gdm-control/*.$(OBJEXT)
+	-rm -f tools/gnome-panel-control/*.$(OBJEXT)
+	-rm -f tools/obxprop/*.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-button.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-color.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-font.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-gradient.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-image.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-imagecache.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-instance.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-mask.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-render.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-theme.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/rendertest-test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-ddparse.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-display.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-keyboard.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-link.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-paths.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-prop.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-signal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-xml.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-xqueue.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/obt_unittests-unittest_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-actions.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_list_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-config.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-debug.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-dock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-event.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-frame.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-framerender.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-grab.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-group.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-keyboard.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-keytree.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-menuframe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-mouse.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-moveresize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-openbox.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-ping.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-place.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-place_overlap.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-popup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-prompt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-resist.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-screen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-session.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-stacking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-startupnotify.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-translate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-window.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-breakchroot.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-close.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-debug.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-decorations.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-desktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-dock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-dockautohide.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-execute.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-exit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-focus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-focustobottom.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-fullscreen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-growtoedge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-iconify.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-if.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-kill.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-layer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-lower.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-maximize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-move.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-moverelative.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-movetoedge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-omnipresent.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-raise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-raiselower.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-reconfigure.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-resize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-resizerelative.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-restart.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-shade.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-showdesktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-showmenu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-unfocus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+obrender/libobrender_la-button.lo: obrender/button.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-button.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-button.Tpo -c -o obrender/libobrender_la-button.lo `test -f 'obrender/button.c' || echo '$(srcdir)/'`obrender/button.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-button.Tpo obrender/$(DEPDIR)/libobrender_la-button.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/button.c' object='obrender/libobrender_la-button.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-button.lo `test -f 'obrender/button.c' || echo '$(srcdir)/'`obrender/button.c
+
+obrender/libobrender_la-color.lo: obrender/color.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-color.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-color.Tpo -c -o obrender/libobrender_la-color.lo `test -f 'obrender/color.c' || echo '$(srcdir)/'`obrender/color.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-color.Tpo obrender/$(DEPDIR)/libobrender_la-color.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/color.c' object='obrender/libobrender_la-color.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-color.lo `test -f 'obrender/color.c' || echo '$(srcdir)/'`obrender/color.c
+
+obrender/libobrender_la-font.lo: obrender/font.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-font.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-font.Tpo -c -o obrender/libobrender_la-font.lo `test -f 'obrender/font.c' || echo '$(srcdir)/'`obrender/font.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-font.Tpo obrender/$(DEPDIR)/libobrender_la-font.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/font.c' object='obrender/libobrender_la-font.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-font.lo `test -f 'obrender/font.c' || echo '$(srcdir)/'`obrender/font.c
+
+obrender/libobrender_la-gradient.lo: obrender/gradient.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-gradient.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-gradient.Tpo -c -o obrender/libobrender_la-gradient.lo `test -f 'obrender/gradient.c' || echo '$(srcdir)/'`obrender/gradient.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-gradient.Tpo obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/gradient.c' object='obrender/libobrender_la-gradient.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-gradient.lo `test -f 'obrender/gradient.c' || echo '$(srcdir)/'`obrender/gradient.c
+
+obrender/libobrender_la-image.lo: obrender/image.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-image.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-image.Tpo -c -o obrender/libobrender_la-image.lo `test -f 'obrender/image.c' || echo '$(srcdir)/'`obrender/image.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-image.Tpo obrender/$(DEPDIR)/libobrender_la-image.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/image.c' object='obrender/libobrender_la-image.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-image.lo `test -f 'obrender/image.c' || echo '$(srcdir)/'`obrender/image.c
+
+obrender/libobrender_la-imagecache.lo: obrender/imagecache.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-imagecache.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-imagecache.Tpo -c -o obrender/libobrender_la-imagecache.lo `test -f 'obrender/imagecache.c' || echo '$(srcdir)/'`obrender/imagecache.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-imagecache.Tpo obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/imagecache.c' object='obrender/libobrender_la-imagecache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-imagecache.lo `test -f 'obrender/imagecache.c' || echo '$(srcdir)/'`obrender/imagecache.c
+
+obrender/libobrender_la-instance.lo: obrender/instance.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-instance.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-instance.Tpo -c -o obrender/libobrender_la-instance.lo `test -f 'obrender/instance.c' || echo '$(srcdir)/'`obrender/instance.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-instance.Tpo obrender/$(DEPDIR)/libobrender_la-instance.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/instance.c' object='obrender/libobrender_la-instance.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-instance.lo `test -f 'obrender/instance.c' || echo '$(srcdir)/'`obrender/instance.c
+
+obrender/libobrender_la-mask.lo: obrender/mask.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-mask.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-mask.Tpo -c -o obrender/libobrender_la-mask.lo `test -f 'obrender/mask.c' || echo '$(srcdir)/'`obrender/mask.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-mask.Tpo obrender/$(DEPDIR)/libobrender_la-mask.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/mask.c' object='obrender/libobrender_la-mask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-mask.lo `test -f 'obrender/mask.c' || echo '$(srcdir)/'`obrender/mask.c
+
+obrender/libobrender_la-render.lo: obrender/render.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-render.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-render.Tpo -c -o obrender/libobrender_la-render.lo `test -f 'obrender/render.c' || echo '$(srcdir)/'`obrender/render.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-render.Tpo obrender/$(DEPDIR)/libobrender_la-render.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/render.c' object='obrender/libobrender_la-render.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-render.lo `test -f 'obrender/render.c' || echo '$(srcdir)/'`obrender/render.c
+
+obrender/libobrender_la-theme.lo: obrender/theme.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-theme.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-theme.Tpo -c -o obrender/libobrender_la-theme.lo `test -f 'obrender/theme.c' || echo '$(srcdir)/'`obrender/theme.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-theme.Tpo obrender/$(DEPDIR)/libobrender_la-theme.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/theme.c' object='obrender/libobrender_la-theme.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-theme.lo `test -f 'obrender/theme.c' || echo '$(srcdir)/'`obrender/theme.c
+
+obt/libobt_la-display.lo: obt/display.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-display.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-display.Tpo -c -o obt/libobt_la-display.lo `test -f 'obt/display.c' || echo '$(srcdir)/'`obt/display.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-display.Tpo obt/$(DEPDIR)/libobt_la-display.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/display.c' object='obt/libobt_la-display.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-display.lo `test -f 'obt/display.c' || echo '$(srcdir)/'`obt/display.c
+
+obt/libobt_la-keyboard.lo: obt/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-keyboard.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-keyboard.Tpo -c -o obt/libobt_la-keyboard.lo `test -f 'obt/keyboard.c' || echo '$(srcdir)/'`obt/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-keyboard.Tpo obt/$(DEPDIR)/libobt_la-keyboard.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/keyboard.c' object='obt/libobt_la-keyboard.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-keyboard.lo `test -f 'obt/keyboard.c' || echo '$(srcdir)/'`obt/keyboard.c
+
+obt/libobt_la-xml.lo: obt/xml.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-xml.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-xml.Tpo -c -o obt/libobt_la-xml.lo `test -f 'obt/xml.c' || echo '$(srcdir)/'`obt/xml.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-xml.Tpo obt/$(DEPDIR)/libobt_la-xml.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/xml.c' object='obt/libobt_la-xml.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-xml.lo `test -f 'obt/xml.c' || echo '$(srcdir)/'`obt/xml.c
+
+obt/libobt_la-ddparse.lo: obt/ddparse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-ddparse.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-ddparse.Tpo -c -o obt/libobt_la-ddparse.lo `test -f 'obt/ddparse.c' || echo '$(srcdir)/'`obt/ddparse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-ddparse.Tpo obt/$(DEPDIR)/libobt_la-ddparse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/ddparse.c' object='obt/libobt_la-ddparse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-ddparse.lo `test -f 'obt/ddparse.c' || echo '$(srcdir)/'`obt/ddparse.c
+
+obt/libobt_la-link.lo: obt/link.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-link.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-link.Tpo -c -o obt/libobt_la-link.lo `test -f 'obt/link.c' || echo '$(srcdir)/'`obt/link.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-link.Tpo obt/$(DEPDIR)/libobt_la-link.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/link.c' object='obt/libobt_la-link.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-link.lo `test -f 'obt/link.c' || echo '$(srcdir)/'`obt/link.c
+
+obt/libobt_la-paths.lo: obt/paths.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-paths.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-paths.Tpo -c -o obt/libobt_la-paths.lo `test -f 'obt/paths.c' || echo '$(srcdir)/'`obt/paths.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-paths.Tpo obt/$(DEPDIR)/libobt_la-paths.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/paths.c' object='obt/libobt_la-paths.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-paths.lo `test -f 'obt/paths.c' || echo '$(srcdir)/'`obt/paths.c
+
+obt/libobt_la-prop.lo: obt/prop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-prop.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-prop.Tpo -c -o obt/libobt_la-prop.lo `test -f 'obt/prop.c' || echo '$(srcdir)/'`obt/prop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-prop.Tpo obt/$(DEPDIR)/libobt_la-prop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/prop.c' object='obt/libobt_la-prop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-prop.lo `test -f 'obt/prop.c' || echo '$(srcdir)/'`obt/prop.c
+
+obt/libobt_la-signal.lo: obt/signal.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-signal.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-signal.Tpo -c -o obt/libobt_la-signal.lo `test -f 'obt/signal.c' || echo '$(srcdir)/'`obt/signal.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-signal.Tpo obt/$(DEPDIR)/libobt_la-signal.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/signal.c' object='obt/libobt_la-signal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-signal.lo `test -f 'obt/signal.c' || echo '$(srcdir)/'`obt/signal.c
+
+obt/libobt_la-xqueue.lo: obt/xqueue.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-xqueue.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-xqueue.Tpo -c -o obt/libobt_la-xqueue.lo `test -f 'obt/xqueue.c' || echo '$(srcdir)/'`obt/xqueue.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-xqueue.Tpo obt/$(DEPDIR)/libobt_la-xqueue.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/xqueue.c' object='obt/libobt_la-xqueue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-xqueue.lo `test -f 'obt/xqueue.c' || echo '$(srcdir)/'`obt/xqueue.c
+
+obrender/rendertest-test.o: obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/rendertest-test.o -MD -MP -MF obrender/$(DEPDIR)/rendertest-test.Tpo -c -o obrender/rendertest-test.o `test -f 'obrender/test.c' || echo '$(srcdir)/'`obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/rendertest-test.Tpo obrender/$(DEPDIR)/rendertest-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/test.c' object='obrender/rendertest-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/rendertest-test.o `test -f 'obrender/test.c' || echo '$(srcdir)/'`obrender/test.c
+
+obrender/rendertest-test.obj: obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/rendertest-test.obj -MD -MP -MF obrender/$(DEPDIR)/rendertest-test.Tpo -c -o obrender/rendertest-test.obj `if test -f 'obrender/test.c'; then $(CYGPATH_W) 'obrender/test.c'; else $(CYGPATH_W) '$(srcdir)/obrender/test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/rendertest-test.Tpo obrender/$(DEPDIR)/rendertest-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/test.c' object='obrender/rendertest-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/rendertest-test.obj `if test -f 'obrender/test.c'; then $(CYGPATH_W) 'obrender/test.c'; else $(CYGPATH_W) '$(srcdir)/obrender/test.c'; fi`
+
+obt/obt_unittests-unittest_base.o: obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-unittest_base.o -MD -MP -MF obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo -c -o obt/obt_unittests-unittest_base.o `test -f 'obt/unittest_base.c' || echo '$(srcdir)/'`obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/unittest_base.c' object='obt/obt_unittests-unittest_base.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-unittest_base.o `test -f 'obt/unittest_base.c' || echo '$(srcdir)/'`obt/unittest_base.c
+
+obt/obt_unittests-unittest_base.obj: obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-unittest_base.obj -MD -MP -MF obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo -c -o obt/obt_unittests-unittest_base.obj `if test -f 'obt/unittest_base.c'; then $(CYGPATH_W) 'obt/unittest_base.c'; else $(CYGPATH_W) '$(srcdir)/obt/unittest_base.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/unittest_base.c' object='obt/obt_unittests-unittest_base.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-unittest_base.obj `if test -f 'obt/unittest_base.c'; then $(CYGPATH_W) 'obt/unittest_base.c'; else $(CYGPATH_W) '$(srcdir)/obt/unittest_base.c'; fi`
+
+obt/obt_unittests-bsearch_unittest.o: obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-bsearch_unittest.o -MD -MP -MF obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo -c -o obt/obt_unittests-bsearch_unittest.o `test -f 'obt/bsearch_unittest.c' || echo '$(srcdir)/'`obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/bsearch_unittest.c' object='obt/obt_unittests-bsearch_unittest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-bsearch_unittest.o `test -f 'obt/bsearch_unittest.c' || echo '$(srcdir)/'`obt/bsearch_unittest.c
+
+obt/obt_unittests-bsearch_unittest.obj: obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-bsearch_unittest.obj -MD -MP -MF obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo -c -o obt/obt_unittests-bsearch_unittest.obj `if test -f 'obt/bsearch_unittest.c'; then $(CYGPATH_W) 'obt/bsearch_unittest.c'; else $(CYGPATH_W) '$(srcdir)/obt/bsearch_unittest.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/bsearch_unittest.c' object='obt/obt_unittests-bsearch_unittest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-bsearch_unittest.obj `if test -f 'obt/bsearch_unittest.c'; then $(CYGPATH_W) 'obt/bsearch_unittest.c'; else $(CYGPATH_W) '$(srcdir)/obt/bsearch_unittest.c'; fi`
+
+openbox/actions/openbox-all.o: openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-all.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-all.Tpo -c -o openbox/actions/openbox-all.o `test -f 'openbox/actions/all.c' || echo '$(srcdir)/'`openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-all.Tpo openbox/actions/$(DEPDIR)/openbox-all.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/all.c' object='openbox/actions/openbox-all.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-all.o `test -f 'openbox/actions/all.c' || echo '$(srcdir)/'`openbox/actions/all.c
+
+openbox/actions/openbox-all.obj: openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-all.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-all.Tpo -c -o openbox/actions/openbox-all.obj `if test -f 'openbox/actions/all.c'; then $(CYGPATH_W) 'openbox/actions/all.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/all.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-all.Tpo openbox/actions/$(DEPDIR)/openbox-all.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/all.c' object='openbox/actions/openbox-all.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-all.obj `if test -f 'openbox/actions/all.c'; then $(CYGPATH_W) 'openbox/actions/all.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/all.c'; fi`
+
+openbox/actions/openbox-addremovedesktop.o: openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-addremovedesktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo -c -o openbox/actions/openbox-addremovedesktop.o `test -f 'openbox/actions/addremovedesktop.c' || echo '$(srcdir)/'`openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/addremovedesktop.c' object='openbox/actions/openbox-addremovedesktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-addremovedesktop.o `test -f 'openbox/actions/addremovedesktop.c' || echo '$(srcdir)/'`openbox/actions/addremovedesktop.c
+
+openbox/actions/openbox-addremovedesktop.obj: openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-addremovedesktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo -c -o openbox/actions/openbox-addremovedesktop.obj `if test -f 'openbox/actions/addremovedesktop.c'; then $(CYGPATH_W) 'openbox/actions/addremovedesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/addremovedesktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/addremovedesktop.c' object='openbox/actions/openbox-addremovedesktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-addremovedesktop.obj `if test -f 'openbox/actions/addremovedesktop.c'; then $(CYGPATH_W) 'openbox/actions/addremovedesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/addremovedesktop.c'; fi`
+
+openbox/actions/openbox-breakchroot.o: openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-breakchroot.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo -c -o openbox/actions/openbox-breakchroot.o `test -f 'openbox/actions/breakchroot.c' || echo '$(srcdir)/'`openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/breakchroot.c' object='openbox/actions/openbox-breakchroot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-breakchroot.o `test -f 'openbox/actions/breakchroot.c' || echo '$(srcdir)/'`openbox/actions/breakchroot.c
+
+openbox/actions/openbox-breakchroot.obj: openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-breakchroot.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo -c -o openbox/actions/openbox-breakchroot.obj `if test -f 'openbox/actions/breakchroot.c'; then $(CYGPATH_W) 'openbox/actions/breakchroot.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/breakchroot.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/breakchroot.c' object='openbox/actions/openbox-breakchroot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-breakchroot.obj `if test -f 'openbox/actions/breakchroot.c'; then $(CYGPATH_W) 'openbox/actions/breakchroot.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/breakchroot.c'; fi`
+
+openbox/actions/openbox-close.o: openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-close.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-close.Tpo -c -o openbox/actions/openbox-close.o `test -f 'openbox/actions/close.c' || echo '$(srcdir)/'`openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-close.Tpo openbox/actions/$(DEPDIR)/openbox-close.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/close.c' object='openbox/actions/openbox-close.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-close.o `test -f 'openbox/actions/close.c' || echo '$(srcdir)/'`openbox/actions/close.c
+
+openbox/actions/openbox-close.obj: openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-close.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-close.Tpo -c -o openbox/actions/openbox-close.obj `if test -f 'openbox/actions/close.c'; then $(CYGPATH_W) 'openbox/actions/close.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/close.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-close.Tpo openbox/actions/$(DEPDIR)/openbox-close.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/close.c' object='openbox/actions/openbox-close.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-close.obj `if test -f 'openbox/actions/close.c'; then $(CYGPATH_W) 'openbox/actions/close.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/close.c'; fi`
+
+openbox/actions/openbox-cyclewindows.o: openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-cyclewindows.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo -c -o openbox/actions/openbox-cyclewindows.o `test -f 'openbox/actions/cyclewindows.c' || echo '$(srcdir)/'`openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/cyclewindows.c' object='openbox/actions/openbox-cyclewindows.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-cyclewindows.o `test -f 'openbox/actions/cyclewindows.c' || echo '$(srcdir)/'`openbox/actions/cyclewindows.c
+
+openbox/actions/openbox-cyclewindows.obj: openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-cyclewindows.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo -c -o openbox/actions/openbox-cyclewindows.obj `if test -f 'openbox/actions/cyclewindows.c'; then $(CYGPATH_W) 'openbox/actions/cyclewindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/cyclewindows.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/cyclewindows.c' object='openbox/actions/openbox-cyclewindows.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-cyclewindows.obj `if test -f 'openbox/actions/cyclewindows.c'; then $(CYGPATH_W) 'openbox/actions/cyclewindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/cyclewindows.c'; fi`
+
+openbox/actions/openbox-debug.o: openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-debug.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/actions/openbox-debug.o `test -f 'openbox/actions/debug.c' || echo '$(srcdir)/'`openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-debug.Tpo openbox/actions/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/debug.c' object='openbox/actions/openbox-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-debug.o `test -f 'openbox/actions/debug.c' || echo '$(srcdir)/'`openbox/actions/debug.c
+
+openbox/actions/openbox-debug.obj: openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-debug.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/actions/openbox-debug.obj `if test -f 'openbox/actions/debug.c'; then $(CYGPATH_W) 'openbox/actions/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-debug.Tpo openbox/actions/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/debug.c' object='openbox/actions/openbox-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-debug.obj `if test -f 'openbox/actions/debug.c'; then $(CYGPATH_W) 'openbox/actions/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/debug.c'; fi`
+
+openbox/actions/openbox-decorations.o: openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-decorations.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-decorations.Tpo -c -o openbox/actions/openbox-decorations.o `test -f 'openbox/actions/decorations.c' || echo '$(srcdir)/'`openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-decorations.Tpo openbox/actions/$(DEPDIR)/openbox-decorations.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/decorations.c' object='openbox/actions/openbox-decorations.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-decorations.o `test -f 'openbox/actions/decorations.c' || echo '$(srcdir)/'`openbox/actions/decorations.c
+
+openbox/actions/openbox-decorations.obj: openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-decorations.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-decorations.Tpo -c -o openbox/actions/openbox-decorations.obj `if test -f 'openbox/actions/decorations.c'; then $(CYGPATH_W) 'openbox/actions/decorations.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/decorations.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-decorations.Tpo openbox/actions/$(DEPDIR)/openbox-decorations.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/decorations.c' object='openbox/actions/openbox-decorations.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-decorations.obj `if test -f 'openbox/actions/decorations.c'; then $(CYGPATH_W) 'openbox/actions/decorations.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/decorations.c'; fi`
+
+openbox/actions/openbox-desktop.o: openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-desktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-desktop.Tpo -c -o openbox/actions/openbox-desktop.o `test -f 'openbox/actions/desktop.c' || echo '$(srcdir)/'`openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-desktop.Tpo openbox/actions/$(DEPDIR)/openbox-desktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/desktop.c' object='openbox/actions/openbox-desktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-desktop.o `test -f 'openbox/actions/desktop.c' || echo '$(srcdir)/'`openbox/actions/desktop.c
+
+openbox/actions/openbox-desktop.obj: openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-desktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-desktop.Tpo -c -o openbox/actions/openbox-desktop.obj `if test -f 'openbox/actions/desktop.c'; then $(CYGPATH_W) 'openbox/actions/desktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/desktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-desktop.Tpo openbox/actions/$(DEPDIR)/openbox-desktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/desktop.c' object='openbox/actions/openbox-desktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-desktop.obj `if test -f 'openbox/actions/desktop.c'; then $(CYGPATH_W) 'openbox/actions/desktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/desktop.c'; fi`
+
+openbox/actions/openbox-dock.o: openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dock.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/actions/openbox-dock.o `test -f 'openbox/actions/dock.c' || echo '$(srcdir)/'`openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dock.Tpo openbox/actions/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dock.c' object='openbox/actions/openbox-dock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dock.o `test -f 'openbox/actions/dock.c' || echo '$(srcdir)/'`openbox/actions/dock.c
+
+openbox/actions/openbox-dock.obj: openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dock.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/actions/openbox-dock.obj `if test -f 'openbox/actions/dock.c'; then $(CYGPATH_W) 'openbox/actions/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dock.Tpo openbox/actions/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dock.c' object='openbox/actions/openbox-dock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dock.obj `if test -f 'openbox/actions/dock.c'; then $(CYGPATH_W) 'openbox/actions/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dock.c'; fi`
+
+openbox/actions/openbox-dockautohide.o: openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dockautohide.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo -c -o openbox/actions/openbox-dockautohide.o `test -f 'openbox/actions/dockautohide.c' || echo '$(srcdir)/'`openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dockautohide.c' object='openbox/actions/openbox-dockautohide.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dockautohide.o `test -f 'openbox/actions/dockautohide.c' || echo '$(srcdir)/'`openbox/actions/dockautohide.c
+
+openbox/actions/openbox-dockautohide.obj: openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dockautohide.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo -c -o openbox/actions/openbox-dockautohide.obj `if test -f 'openbox/actions/dockautohide.c'; then $(CYGPATH_W) 'openbox/actions/dockautohide.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dockautohide.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dockautohide.c' object='openbox/actions/openbox-dockautohide.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dockautohide.obj `if test -f 'openbox/actions/dockautohide.c'; then $(CYGPATH_W) 'openbox/actions/dockautohide.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dockautohide.c'; fi`
+
+openbox/actions/openbox-directionalwindows.o: openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-directionalwindows.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo -c -o openbox/actions/openbox-directionalwindows.o `test -f 'openbox/actions/directionalwindows.c' || echo '$(srcdir)/'`openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/directionalwindows.c' object='openbox/actions/openbox-directionalwindows.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-directionalwindows.o `test -f 'openbox/actions/directionalwindows.c' || echo '$(srcdir)/'`openbox/actions/directionalwindows.c
+
+openbox/actions/openbox-directionalwindows.obj: openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-directionalwindows.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo -c -o openbox/actions/openbox-directionalwindows.obj `if test -f 'openbox/actions/directionalwindows.c'; then $(CYGPATH_W) 'openbox/actions/directionalwindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/directionalwindows.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/directionalwindows.c' object='openbox/actions/openbox-directionalwindows.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-directionalwindows.obj `if test -f 'openbox/actions/directionalwindows.c'; then $(CYGPATH_W) 'openbox/actions/directionalwindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/directionalwindows.c'; fi`
+
+openbox/actions/openbox-execute.o: openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-execute.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-execute.Tpo -c -o openbox/actions/openbox-execute.o `test -f 'openbox/actions/execute.c' || echo '$(srcdir)/'`openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-execute.Tpo openbox/actions/$(DEPDIR)/openbox-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/execute.c' object='openbox/actions/openbox-execute.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-execute.o `test -f 'openbox/actions/execute.c' || echo '$(srcdir)/'`openbox/actions/execute.c
+
+openbox/actions/openbox-execute.obj: openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-execute.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-execute.Tpo -c -o openbox/actions/openbox-execute.obj `if test -f 'openbox/actions/execute.c'; then $(CYGPATH_W) 'openbox/actions/execute.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/execute.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-execute.Tpo openbox/actions/$(DEPDIR)/openbox-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/execute.c' object='openbox/actions/openbox-execute.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-execute.obj `if test -f 'openbox/actions/execute.c'; then $(CYGPATH_W) 'openbox/actions/execute.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/execute.c'; fi`
+
+openbox/actions/openbox-exit.o: openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-exit.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-exit.Tpo -c -o openbox/actions/openbox-exit.o `test -f 'openbox/actions/exit.c' || echo '$(srcdir)/'`openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-exit.Tpo openbox/actions/$(DEPDIR)/openbox-exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/exit.c' object='openbox/actions/openbox-exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-exit.o `test -f 'openbox/actions/exit.c' || echo '$(srcdir)/'`openbox/actions/exit.c
+
+openbox/actions/openbox-exit.obj: openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-exit.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-exit.Tpo -c -o openbox/actions/openbox-exit.obj `if test -f 'openbox/actions/exit.c'; then $(CYGPATH_W) 'openbox/actions/exit.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/exit.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-exit.Tpo openbox/actions/$(DEPDIR)/openbox-exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/exit.c' object='openbox/actions/openbox-exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-exit.obj `if test -f 'openbox/actions/exit.c'; then $(CYGPATH_W) 'openbox/actions/exit.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/exit.c'; fi`
+
+openbox/actions/openbox-focus.o: openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focus.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/actions/openbox-focus.o `test -f 'openbox/actions/focus.c' || echo '$(srcdir)/'`openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focus.Tpo openbox/actions/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focus.c' object='openbox/actions/openbox-focus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focus.o `test -f 'openbox/actions/focus.c' || echo '$(srcdir)/'`openbox/actions/focus.c
+
+openbox/actions/openbox-focus.obj: openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focus.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/actions/openbox-focus.obj `if test -f 'openbox/actions/focus.c'; then $(CYGPATH_W) 'openbox/actions/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focus.Tpo openbox/actions/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focus.c' object='openbox/actions/openbox-focus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focus.obj `if test -f 'openbox/actions/focus.c'; then $(CYGPATH_W) 'openbox/actions/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focus.c'; fi`
+
+openbox/actions/openbox-focustobottom.o: openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focustobottom.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo -c -o openbox/actions/openbox-focustobottom.o `test -f 'openbox/actions/focustobottom.c' || echo '$(srcdir)/'`openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focustobottom.c' object='openbox/actions/openbox-focustobottom.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focustobottom.o `test -f 'openbox/actions/focustobottom.c' || echo '$(srcdir)/'`openbox/actions/focustobottom.c
+
+openbox/actions/openbox-focustobottom.obj: openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focustobottom.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo -c -o openbox/actions/openbox-focustobottom.obj `if test -f 'openbox/actions/focustobottom.c'; then $(CYGPATH_W) 'openbox/actions/focustobottom.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focustobottom.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focustobottom.c' object='openbox/actions/openbox-focustobottom.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focustobottom.obj `if test -f 'openbox/actions/focustobottom.c'; then $(CYGPATH_W) 'openbox/actions/focustobottom.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focustobottom.c'; fi`
+
+openbox/actions/openbox-fullscreen.o: openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-fullscreen.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo -c -o openbox/actions/openbox-fullscreen.o `test -f 'openbox/actions/fullscreen.c' || echo '$(srcdir)/'`openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/fullscreen.c' object='openbox/actions/openbox-fullscreen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-fullscreen.o `test -f 'openbox/actions/fullscreen.c' || echo '$(srcdir)/'`openbox/actions/fullscreen.c
+
+openbox/actions/openbox-fullscreen.obj: openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-fullscreen.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo -c -o openbox/actions/openbox-fullscreen.obj `if test -f 'openbox/actions/fullscreen.c'; then $(CYGPATH_W) 'openbox/actions/fullscreen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/fullscreen.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/fullscreen.c' object='openbox/actions/openbox-fullscreen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-fullscreen.obj `if test -f 'openbox/actions/fullscreen.c'; then $(CYGPATH_W) 'openbox/actions/fullscreen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/fullscreen.c'; fi`
+
+openbox/actions/openbox-growtoedge.o: openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-growtoedge.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo -c -o openbox/actions/openbox-growtoedge.o `test -f 'openbox/actions/growtoedge.c' || echo '$(srcdir)/'`openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/growtoedge.c' object='openbox/actions/openbox-growtoedge.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-growtoedge.o `test -f 'openbox/actions/growtoedge.c' || echo '$(srcdir)/'`openbox/actions/growtoedge.c
+
+openbox/actions/openbox-growtoedge.obj: openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-growtoedge.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo -c -o openbox/actions/openbox-growtoedge.obj `if test -f 'openbox/actions/growtoedge.c'; then $(CYGPATH_W) 'openbox/actions/growtoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/growtoedge.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/growtoedge.c' object='openbox/actions/openbox-growtoedge.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-growtoedge.obj `if test -f 'openbox/actions/growtoedge.c'; then $(CYGPATH_W) 'openbox/actions/growtoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/growtoedge.c'; fi`
+
+openbox/actions/openbox-iconify.o: openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-iconify.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-iconify.Tpo -c -o openbox/actions/openbox-iconify.o `test -f 'openbox/actions/iconify.c' || echo '$(srcdir)/'`openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-iconify.Tpo openbox/actions/$(DEPDIR)/openbox-iconify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/iconify.c' object='openbox/actions/openbox-iconify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-iconify.o `test -f 'openbox/actions/iconify.c' || echo '$(srcdir)/'`openbox/actions/iconify.c
+
+openbox/actions/openbox-iconify.obj: openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-iconify.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-iconify.Tpo -c -o openbox/actions/openbox-iconify.obj `if test -f 'openbox/actions/iconify.c'; then $(CYGPATH_W) 'openbox/actions/iconify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/iconify.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-iconify.Tpo openbox/actions/$(DEPDIR)/openbox-iconify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/iconify.c' object='openbox/actions/openbox-iconify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-iconify.obj `if test -f 'openbox/actions/iconify.c'; then $(CYGPATH_W) 'openbox/actions/iconify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/iconify.c'; fi`
+
+openbox/actions/openbox-if.o: openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-if.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-if.Tpo -c -o openbox/actions/openbox-if.o `test -f 'openbox/actions/if.c' || echo '$(srcdir)/'`openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-if.Tpo openbox/actions/$(DEPDIR)/openbox-if.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/if.c' object='openbox/actions/openbox-if.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-if.o `test -f 'openbox/actions/if.c' || echo '$(srcdir)/'`openbox/actions/if.c
+
+openbox/actions/openbox-if.obj: openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-if.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-if.Tpo -c -o openbox/actions/openbox-if.obj `if test -f 'openbox/actions/if.c'; then $(CYGPATH_W) 'openbox/actions/if.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/if.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-if.Tpo openbox/actions/$(DEPDIR)/openbox-if.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/if.c' object='openbox/actions/openbox-if.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-if.obj `if test -f 'openbox/actions/if.c'; then $(CYGPATH_W) 'openbox/actions/if.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/if.c'; fi`
+
+openbox/actions/openbox-kill.o: openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-kill.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-kill.Tpo -c -o openbox/actions/openbox-kill.o `test -f 'openbox/actions/kill.c' || echo '$(srcdir)/'`openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-kill.Tpo openbox/actions/$(DEPDIR)/openbox-kill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/kill.c' object='openbox/actions/openbox-kill.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-kill.o `test -f 'openbox/actions/kill.c' || echo '$(srcdir)/'`openbox/actions/kill.c
+
+openbox/actions/openbox-kill.obj: openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-kill.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-kill.Tpo -c -o openbox/actions/openbox-kill.obj `if test -f 'openbox/actions/kill.c'; then $(CYGPATH_W) 'openbox/actions/kill.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/kill.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-kill.Tpo openbox/actions/$(DEPDIR)/openbox-kill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/kill.c' object='openbox/actions/openbox-kill.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-kill.obj `if test -f 'openbox/actions/kill.c'; then $(CYGPATH_W) 'openbox/actions/kill.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/kill.c'; fi`
+
+openbox/actions/openbox-layer.o: openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-layer.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-layer.Tpo -c -o openbox/actions/openbox-layer.o `test -f 'openbox/actions/layer.c' || echo '$(srcdir)/'`openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-layer.Tpo openbox/actions/$(DEPDIR)/openbox-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/layer.c' object='openbox/actions/openbox-layer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-layer.o `test -f 'openbox/actions/layer.c' || echo '$(srcdir)/'`openbox/actions/layer.c
+
+openbox/actions/openbox-layer.obj: openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-layer.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-layer.Tpo -c -o openbox/actions/openbox-layer.obj `if test -f 'openbox/actions/layer.c'; then $(CYGPATH_W) 'openbox/actions/layer.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/layer.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-layer.Tpo openbox/actions/$(DEPDIR)/openbox-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/layer.c' object='openbox/actions/openbox-layer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-layer.obj `if test -f 'openbox/actions/layer.c'; then $(CYGPATH_W) 'openbox/actions/layer.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/layer.c'; fi`
+
+openbox/actions/openbox-lower.o: openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-lower.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-lower.Tpo -c -o openbox/actions/openbox-lower.o `test -f 'openbox/actions/lower.c' || echo '$(srcdir)/'`openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-lower.Tpo openbox/actions/$(DEPDIR)/openbox-lower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/lower.c' object='openbox/actions/openbox-lower.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-lower.o `test -f 'openbox/actions/lower.c' || echo '$(srcdir)/'`openbox/actions/lower.c
+
+openbox/actions/openbox-lower.obj: openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-lower.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-lower.Tpo -c -o openbox/actions/openbox-lower.obj `if test -f 'openbox/actions/lower.c'; then $(CYGPATH_W) 'openbox/actions/lower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/lower.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-lower.Tpo openbox/actions/$(DEPDIR)/openbox-lower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/lower.c' object='openbox/actions/openbox-lower.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-lower.obj `if test -f 'openbox/actions/lower.c'; then $(CYGPATH_W) 'openbox/actions/lower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/lower.c'; fi`
+
+openbox/actions/openbox-maximize.o: openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-maximize.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-maximize.Tpo -c -o openbox/actions/openbox-maximize.o `test -f 'openbox/actions/maximize.c' || echo '$(srcdir)/'`openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-maximize.Tpo openbox/actions/$(DEPDIR)/openbox-maximize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/maximize.c' object='openbox/actions/openbox-maximize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-maximize.o `test -f 'openbox/actions/maximize.c' || echo '$(srcdir)/'`openbox/actions/maximize.c
+
+openbox/actions/openbox-maximize.obj: openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-maximize.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-maximize.Tpo -c -o openbox/actions/openbox-maximize.obj `if test -f 'openbox/actions/maximize.c'; then $(CYGPATH_W) 'openbox/actions/maximize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/maximize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-maximize.Tpo openbox/actions/$(DEPDIR)/openbox-maximize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/maximize.c' object='openbox/actions/openbox-maximize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-maximize.obj `if test -f 'openbox/actions/maximize.c'; then $(CYGPATH_W) 'openbox/actions/maximize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/maximize.c'; fi`
+
+openbox/actions/openbox-move.o: openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-move.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-move.Tpo -c -o openbox/actions/openbox-move.o `test -f 'openbox/actions/move.c' || echo '$(srcdir)/'`openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-move.Tpo openbox/actions/$(DEPDIR)/openbox-move.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/move.c' object='openbox/actions/openbox-move.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-move.o `test -f 'openbox/actions/move.c' || echo '$(srcdir)/'`openbox/actions/move.c
+
+openbox/actions/openbox-move.obj: openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-move.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-move.Tpo -c -o openbox/actions/openbox-move.obj `if test -f 'openbox/actions/move.c'; then $(CYGPATH_W) 'openbox/actions/move.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/move.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-move.Tpo openbox/actions/$(DEPDIR)/openbox-move.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/move.c' object='openbox/actions/openbox-move.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-move.obj `if test -f 'openbox/actions/move.c'; then $(CYGPATH_W) 'openbox/actions/move.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/move.c'; fi`
+
+openbox/actions/openbox-moverelative.o: openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moverelative.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo -c -o openbox/actions/openbox-moverelative.o `test -f 'openbox/actions/moverelative.c' || echo '$(srcdir)/'`openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moverelative.c' object='openbox/actions/openbox-moverelative.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moverelative.o `test -f 'openbox/actions/moverelative.c' || echo '$(srcdir)/'`openbox/actions/moverelative.c
+
+openbox/actions/openbox-moverelative.obj: openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moverelative.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo -c -o openbox/actions/openbox-moverelative.obj `if test -f 'openbox/actions/moverelative.c'; then $(CYGPATH_W) 'openbox/actions/moverelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moverelative.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moverelative.c' object='openbox/actions/openbox-moverelative.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moverelative.obj `if test -f 'openbox/actions/moverelative.c'; then $(CYGPATH_W) 'openbox/actions/moverelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moverelative.c'; fi`
+
+openbox/actions/openbox-moveresizeto.o: openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moveresizeto.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo -c -o openbox/actions/openbox-moveresizeto.o `test -f 'openbox/actions/moveresizeto.c' || echo '$(srcdir)/'`openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moveresizeto.c' object='openbox/actions/openbox-moveresizeto.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moveresizeto.o `test -f 'openbox/actions/moveresizeto.c' || echo '$(srcdir)/'`openbox/actions/moveresizeto.c
+
+openbox/actions/openbox-moveresizeto.obj: openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moveresizeto.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo -c -o openbox/actions/openbox-moveresizeto.obj `if test -f 'openbox/actions/moveresizeto.c'; then $(CYGPATH_W) 'openbox/actions/moveresizeto.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moveresizeto.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moveresizeto.c' object='openbox/actions/openbox-moveresizeto.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moveresizeto.obj `if test -f 'openbox/actions/moveresizeto.c'; then $(CYGPATH_W) 'openbox/actions/moveresizeto.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moveresizeto.c'; fi`
+
+openbox/actions/openbox-movetoedge.o: openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-movetoedge.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo -c -o openbox/actions/openbox-movetoedge.o `test -f 'openbox/actions/movetoedge.c' || echo '$(srcdir)/'`openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/movetoedge.c' object='openbox/actions/openbox-movetoedge.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-movetoedge.o `test -f 'openbox/actions/movetoedge.c' || echo '$(srcdir)/'`openbox/actions/movetoedge.c
+
+openbox/actions/openbox-movetoedge.obj: openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-movetoedge.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo -c -o openbox/actions/openbox-movetoedge.obj `if test -f 'openbox/actions/movetoedge.c'; then $(CYGPATH_W) 'openbox/actions/movetoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/movetoedge.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/movetoedge.c' object='openbox/actions/openbox-movetoedge.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-movetoedge.obj `if test -f 'openbox/actions/movetoedge.c'; then $(CYGPATH_W) 'openbox/actions/movetoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/movetoedge.c'; fi`
+
+openbox/actions/openbox-omnipresent.o: openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-omnipresent.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo -c -o openbox/actions/openbox-omnipresent.o `test -f 'openbox/actions/omnipresent.c' || echo '$(srcdir)/'`openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/omnipresent.c' object='openbox/actions/openbox-omnipresent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-omnipresent.o `test -f 'openbox/actions/omnipresent.c' || echo '$(srcdir)/'`openbox/actions/omnipresent.c
+
+openbox/actions/openbox-omnipresent.obj: openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-omnipresent.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo -c -o openbox/actions/openbox-omnipresent.obj `if test -f 'openbox/actions/omnipresent.c'; then $(CYGPATH_W) 'openbox/actions/omnipresent.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/omnipresent.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/omnipresent.c' object='openbox/actions/openbox-omnipresent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-omnipresent.obj `if test -f 'openbox/actions/omnipresent.c'; then $(CYGPATH_W) 'openbox/actions/omnipresent.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/omnipresent.c'; fi`
+
+openbox/actions/openbox-raise.o: openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raise.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raise.Tpo -c -o openbox/actions/openbox-raise.o `test -f 'openbox/actions/raise.c' || echo '$(srcdir)/'`openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raise.Tpo openbox/actions/$(DEPDIR)/openbox-raise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raise.c' object='openbox/actions/openbox-raise.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raise.o `test -f 'openbox/actions/raise.c' || echo '$(srcdir)/'`openbox/actions/raise.c
+
+openbox/actions/openbox-raise.obj: openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raise.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raise.Tpo -c -o openbox/actions/openbox-raise.obj `if test -f 'openbox/actions/raise.c'; then $(CYGPATH_W) 'openbox/actions/raise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raise.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raise.Tpo openbox/actions/$(DEPDIR)/openbox-raise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raise.c' object='openbox/actions/openbox-raise.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raise.obj `if test -f 'openbox/actions/raise.c'; then $(CYGPATH_W) 'openbox/actions/raise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raise.c'; fi`
+
+openbox/actions/openbox-raiselower.o: openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raiselower.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo -c -o openbox/actions/openbox-raiselower.o `test -f 'openbox/actions/raiselower.c' || echo '$(srcdir)/'`openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raiselower.c' object='openbox/actions/openbox-raiselower.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raiselower.o `test -f 'openbox/actions/raiselower.c' || echo '$(srcdir)/'`openbox/actions/raiselower.c
+
+openbox/actions/openbox-raiselower.obj: openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raiselower.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo -c -o openbox/actions/openbox-raiselower.obj `if test -f 'openbox/actions/raiselower.c'; then $(CYGPATH_W) 'openbox/actions/raiselower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raiselower.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raiselower.c' object='openbox/actions/openbox-raiselower.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raiselower.obj `if test -f 'openbox/actions/raiselower.c'; then $(CYGPATH_W) 'openbox/actions/raiselower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raiselower.c'; fi`
+
+openbox/actions/openbox-reconfigure.o: openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-reconfigure.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo -c -o openbox/actions/openbox-reconfigure.o `test -f 'openbox/actions/reconfigure.c' || echo '$(srcdir)/'`openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/reconfigure.c' object='openbox/actions/openbox-reconfigure.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-reconfigure.o `test -f 'openbox/actions/reconfigure.c' || echo '$(srcdir)/'`openbox/actions/reconfigure.c
+
+openbox/actions/openbox-reconfigure.obj: openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-reconfigure.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo -c -o openbox/actions/openbox-reconfigure.obj `if test -f 'openbox/actions/reconfigure.c'; then $(CYGPATH_W) 'openbox/actions/reconfigure.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/reconfigure.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/reconfigure.c' object='openbox/actions/openbox-reconfigure.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-reconfigure.obj `if test -f 'openbox/actions/reconfigure.c'; then $(CYGPATH_W) 'openbox/actions/reconfigure.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/reconfigure.c'; fi`
+
+openbox/actions/openbox-resize.o: openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resize.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resize.Tpo -c -o openbox/actions/openbox-resize.o `test -f 'openbox/actions/resize.c' || echo '$(srcdir)/'`openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resize.Tpo openbox/actions/$(DEPDIR)/openbox-resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resize.c' object='openbox/actions/openbox-resize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resize.o `test -f 'openbox/actions/resize.c' || echo '$(srcdir)/'`openbox/actions/resize.c
+
+openbox/actions/openbox-resize.obj: openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resize.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resize.Tpo -c -o openbox/actions/openbox-resize.obj `if test -f 'openbox/actions/resize.c'; then $(CYGPATH_W) 'openbox/actions/resize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resize.Tpo openbox/actions/$(DEPDIR)/openbox-resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resize.c' object='openbox/actions/openbox-resize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resize.obj `if test -f 'openbox/actions/resize.c'; then $(CYGPATH_W) 'openbox/actions/resize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resize.c'; fi`
+
+openbox/actions/openbox-resizerelative.o: openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resizerelative.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo -c -o openbox/actions/openbox-resizerelative.o `test -f 'openbox/actions/resizerelative.c' || echo '$(srcdir)/'`openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resizerelative.c' object='openbox/actions/openbox-resizerelative.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resizerelative.o `test -f 'openbox/actions/resizerelative.c' || echo '$(srcdir)/'`openbox/actions/resizerelative.c
+
+openbox/actions/openbox-resizerelative.obj: openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resizerelative.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo -c -o openbox/actions/openbox-resizerelative.obj `if test -f 'openbox/actions/resizerelative.c'; then $(CYGPATH_W) 'openbox/actions/resizerelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resizerelative.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resizerelative.c' object='openbox/actions/openbox-resizerelative.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resizerelative.obj `if test -f 'openbox/actions/resizerelative.c'; then $(CYGPATH_W) 'openbox/actions/resizerelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resizerelative.c'; fi`
+
+openbox/actions/openbox-restart.o: openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-restart.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-restart.Tpo -c -o openbox/actions/openbox-restart.o `test -f 'openbox/actions/restart.c' || echo '$(srcdir)/'`openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-restart.Tpo openbox/actions/$(DEPDIR)/openbox-restart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/restart.c' object='openbox/actions/openbox-restart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-restart.o `test -f 'openbox/actions/restart.c' || echo '$(srcdir)/'`openbox/actions/restart.c
+
+openbox/actions/openbox-restart.obj: openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-restart.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-restart.Tpo -c -o openbox/actions/openbox-restart.obj `if test -f 'openbox/actions/restart.c'; then $(CYGPATH_W) 'openbox/actions/restart.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/restart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-restart.Tpo openbox/actions/$(DEPDIR)/openbox-restart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/restart.c' object='openbox/actions/openbox-restart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-restart.obj `if test -f 'openbox/actions/restart.c'; then $(CYGPATH_W) 'openbox/actions/restart.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/restart.c'; fi`
+
+openbox/actions/openbox-shade.o: openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shade.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shade.Tpo -c -o openbox/actions/openbox-shade.o `test -f 'openbox/actions/shade.c' || echo '$(srcdir)/'`openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shade.Tpo openbox/actions/$(DEPDIR)/openbox-shade.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shade.c' object='openbox/actions/openbox-shade.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shade.o `test -f 'openbox/actions/shade.c' || echo '$(srcdir)/'`openbox/actions/shade.c
+
+openbox/actions/openbox-shade.obj: openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shade.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shade.Tpo -c -o openbox/actions/openbox-shade.obj `if test -f 'openbox/actions/shade.c'; then $(CYGPATH_W) 'openbox/actions/shade.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shade.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shade.Tpo openbox/actions/$(DEPDIR)/openbox-shade.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shade.c' object='openbox/actions/openbox-shade.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shade.obj `if test -f 'openbox/actions/shade.c'; then $(CYGPATH_W) 'openbox/actions/shade.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shade.c'; fi`
+
+openbox/actions/openbox-shadelowerraise.o: openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shadelowerraise.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo -c -o openbox/actions/openbox-shadelowerraise.o `test -f 'openbox/actions/shadelowerraise.c' || echo '$(srcdir)/'`openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shadelowerraise.c' object='openbox/actions/openbox-shadelowerraise.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shadelowerraise.o `test -f 'openbox/actions/shadelowerraise.c' || echo '$(srcdir)/'`openbox/actions/shadelowerraise.c
+
+openbox/actions/openbox-shadelowerraise.obj: openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shadelowerraise.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo -c -o openbox/actions/openbox-shadelowerraise.obj `if test -f 'openbox/actions/shadelowerraise.c'; then $(CYGPATH_W) 'openbox/actions/shadelowerraise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shadelowerraise.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shadelowerraise.c' object='openbox/actions/openbox-shadelowerraise.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shadelowerraise.obj `if test -f 'openbox/actions/shadelowerraise.c'; then $(CYGPATH_W) 'openbox/actions/shadelowerraise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shadelowerraise.c'; fi`
+
+openbox/actions/openbox-showdesktop.o: openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showdesktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo -c -o openbox/actions/openbox-showdesktop.o `test -f 'openbox/actions/showdesktop.c' || echo '$(srcdir)/'`openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showdesktop.c' object='openbox/actions/openbox-showdesktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showdesktop.o `test -f 'openbox/actions/showdesktop.c' || echo '$(srcdir)/'`openbox/actions/showdesktop.c
+
+openbox/actions/openbox-showdesktop.obj: openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showdesktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo -c -o openbox/actions/openbox-showdesktop.obj `if test -f 'openbox/actions/showdesktop.c'; then $(CYGPATH_W) 'openbox/actions/showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showdesktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showdesktop.c' object='openbox/actions/openbox-showdesktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showdesktop.obj `if test -f 'openbox/actions/showdesktop.c'; then $(CYGPATH_W) 'openbox/actions/showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showdesktop.c'; fi`
+
+openbox/actions/openbox-showmenu.o: openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showmenu.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo -c -o openbox/actions/openbox-showmenu.o `test -f 'openbox/actions/showmenu.c' || echo '$(srcdir)/'`openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showmenu.c' object='openbox/actions/openbox-showmenu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showmenu.o `test -f 'openbox/actions/showmenu.c' || echo '$(srcdir)/'`openbox/actions/showmenu.c
+
+openbox/actions/openbox-showmenu.obj: openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showmenu.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo -c -o openbox/actions/openbox-showmenu.obj `if test -f 'openbox/actions/showmenu.c'; then $(CYGPATH_W) 'openbox/actions/showmenu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showmenu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showmenu.c' object='openbox/actions/openbox-showmenu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showmenu.obj `if test -f 'openbox/actions/showmenu.c'; then $(CYGPATH_W) 'openbox/actions/showmenu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showmenu.c'; fi`
+
+openbox/actions/openbox-unfocus.o: openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-unfocus.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo -c -o openbox/actions/openbox-unfocus.o `test -f 'openbox/actions/unfocus.c' || echo '$(srcdir)/'`openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/unfocus.c' object='openbox/actions/openbox-unfocus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-unfocus.o `test -f 'openbox/actions/unfocus.c' || echo '$(srcdir)/'`openbox/actions/unfocus.c
+
+openbox/actions/openbox-unfocus.obj: openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-unfocus.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo -c -o openbox/actions/openbox-unfocus.obj `if test -f 'openbox/actions/unfocus.c'; then $(CYGPATH_W) 'openbox/actions/unfocus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/unfocus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/unfocus.c' object='openbox/actions/openbox-unfocus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-unfocus.obj `if test -f 'openbox/actions/unfocus.c'; then $(CYGPATH_W) 'openbox/actions/unfocus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/unfocus.c'; fi`
+
+openbox/openbox-actions.o: openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-actions.o -MD -MP -MF openbox/$(DEPDIR)/openbox-actions.Tpo -c -o openbox/openbox-actions.o `test -f 'openbox/actions.c' || echo '$(srcdir)/'`openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-actions.Tpo openbox/$(DEPDIR)/openbox-actions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions.c' object='openbox/openbox-actions.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-actions.o `test -f 'openbox/actions.c' || echo '$(srcdir)/'`openbox/actions.c
+
+openbox/openbox-actions.obj: openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-actions.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-actions.Tpo -c -o openbox/openbox-actions.obj `if test -f 'openbox/actions.c'; then $(CYGPATH_W) 'openbox/actions.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-actions.Tpo openbox/$(DEPDIR)/openbox-actions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions.c' object='openbox/openbox-actions.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-actions.obj `if test -f 'openbox/actions.c'; then $(CYGPATH_W) 'openbox/actions.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions.c'; fi`
+
+openbox/openbox-client.o: openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client.Tpo -c -o openbox/openbox-client.o `test -f 'openbox/client.c' || echo '$(srcdir)/'`openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client.Tpo openbox/$(DEPDIR)/openbox-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client.c' object='openbox/openbox-client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client.o `test -f 'openbox/client.c' || echo '$(srcdir)/'`openbox/client.c
+
+openbox/openbox-client.obj: openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client.Tpo -c -o openbox/openbox-client.obj `if test -f 'openbox/client.c'; then $(CYGPATH_W) 'openbox/client.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client.Tpo openbox/$(DEPDIR)/openbox-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client.c' object='openbox/openbox-client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client.obj `if test -f 'openbox/client.c'; then $(CYGPATH_W) 'openbox/client.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client.c'; fi`
+
+openbox/openbox-client_list_menu.o: openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_menu.Tpo -c -o openbox/openbox-client_list_menu.o `test -f 'openbox/client_list_menu.c' || echo '$(srcdir)/'`openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_menu.c' object='openbox/openbox-client_list_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_menu.o `test -f 'openbox/client_list_menu.c' || echo '$(srcdir)/'`openbox/client_list_menu.c
+
+openbox/openbox-client_list_menu.obj: openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_menu.Tpo -c -o openbox/openbox-client_list_menu.obj `if test -f 'openbox/client_list_menu.c'; then $(CYGPATH_W) 'openbox/client_list_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_menu.c' object='openbox/openbox-client_list_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_menu.obj `if test -f 'openbox/client_list_menu.c'; then $(CYGPATH_W) 'openbox/client_list_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_menu.c'; fi`
+
+openbox/openbox-client_list_combined_menu.o: openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_combined_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo -c -o openbox/openbox-client_list_combined_menu.o `test -f 'openbox/client_list_combined_menu.c' || echo '$(srcdir)/'`openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_combined_menu.c' object='openbox/openbox-client_list_combined_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_combined_menu.o `test -f 'openbox/client_list_combined_menu.c' || echo '$(srcdir)/'`openbox/client_list_combined_menu.c
+
+openbox/openbox-client_list_combined_menu.obj: openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_combined_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo -c -o openbox/openbox-client_list_combined_menu.obj `if test -f 'openbox/client_list_combined_menu.c'; then $(CYGPATH_W) 'openbox/client_list_combined_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_combined_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_combined_menu.c' object='openbox/openbox-client_list_combined_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_combined_menu.obj `if test -f 'openbox/client_list_combined_menu.c'; then $(CYGPATH_W) 'openbox/client_list_combined_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_combined_menu.c'; fi`
+
+openbox/openbox-client_menu.o: openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_menu.Tpo -c -o openbox/openbox-client_menu.o `test -f 'openbox/client_menu.c' || echo '$(srcdir)/'`openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_menu.Tpo openbox/$(DEPDIR)/openbox-client_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_menu.c' object='openbox/openbox-client_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_menu.o `test -f 'openbox/client_menu.c' || echo '$(srcdir)/'`openbox/client_menu.c
+
+openbox/openbox-client_menu.obj: openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_menu.Tpo -c -o openbox/openbox-client_menu.obj `if test -f 'openbox/client_menu.c'; then $(CYGPATH_W) 'openbox/client_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_menu.Tpo openbox/$(DEPDIR)/openbox-client_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_menu.c' object='openbox/openbox-client_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_menu.obj `if test -f 'openbox/client_menu.c'; then $(CYGPATH_W) 'openbox/client_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_menu.c'; fi`
+
+openbox/openbox-config.o: openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-config.o -MD -MP -MF openbox/$(DEPDIR)/openbox-config.Tpo -c -o openbox/openbox-config.o `test -f 'openbox/config.c' || echo '$(srcdir)/'`openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-config.Tpo openbox/$(DEPDIR)/openbox-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/config.c' object='openbox/openbox-config.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-config.o `test -f 'openbox/config.c' || echo '$(srcdir)/'`openbox/config.c
+
+openbox/openbox-config.obj: openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-config.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-config.Tpo -c -o openbox/openbox-config.obj `if test -f 'openbox/config.c'; then $(CYGPATH_W) 'openbox/config.c'; else $(CYGPATH_W) '$(srcdir)/openbox/config.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-config.Tpo openbox/$(DEPDIR)/openbox-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/config.c' object='openbox/openbox-config.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-config.obj `if test -f 'openbox/config.c'; then $(CYGPATH_W) 'openbox/config.c'; else $(CYGPATH_W) '$(srcdir)/openbox/config.c'; fi`
+
+openbox/openbox-debug.o: openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-debug.o -MD -MP -MF openbox/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/openbox-debug.o `test -f 'openbox/debug.c' || echo '$(srcdir)/'`openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-debug.Tpo openbox/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/debug.c' object='openbox/openbox-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-debug.o `test -f 'openbox/debug.c' || echo '$(srcdir)/'`openbox/debug.c
+
+openbox/openbox-debug.obj: openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-debug.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/openbox-debug.obj `if test -f 'openbox/debug.c'; then $(CYGPATH_W) 'openbox/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-debug.Tpo openbox/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/debug.c' object='openbox/openbox-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-debug.obj `if test -f 'openbox/debug.c'; then $(CYGPATH_W) 'openbox/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/debug.c'; fi`
+
+openbox/openbox-dock.o: openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-dock.o -MD -MP -MF openbox/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/openbox-dock.o `test -f 'openbox/dock.c' || echo '$(srcdir)/'`openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-dock.Tpo openbox/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/dock.c' object='openbox/openbox-dock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-dock.o `test -f 'openbox/dock.c' || echo '$(srcdir)/'`openbox/dock.c
+
+openbox/openbox-dock.obj: openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-dock.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/openbox-dock.obj `if test -f 'openbox/dock.c'; then $(CYGPATH_W) 'openbox/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/dock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-dock.Tpo openbox/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/dock.c' object='openbox/openbox-dock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-dock.obj `if test -f 'openbox/dock.c'; then $(CYGPATH_W) 'openbox/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/dock.c'; fi`
+
+openbox/openbox-event.o: openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-event.o -MD -MP -MF openbox/$(DEPDIR)/openbox-event.Tpo -c -o openbox/openbox-event.o `test -f 'openbox/event.c' || echo '$(srcdir)/'`openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-event.Tpo openbox/$(DEPDIR)/openbox-event.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/event.c' object='openbox/openbox-event.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-event.o `test -f 'openbox/event.c' || echo '$(srcdir)/'`openbox/event.c
+
+openbox/openbox-event.obj: openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-event.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-event.Tpo -c -o openbox/openbox-event.obj `if test -f 'openbox/event.c'; then $(CYGPATH_W) 'openbox/event.c'; else $(CYGPATH_W) '$(srcdir)/openbox/event.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-event.Tpo openbox/$(DEPDIR)/openbox-event.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/event.c' object='openbox/openbox-event.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-event.obj `if test -f 'openbox/event.c'; then $(CYGPATH_W) 'openbox/event.c'; else $(CYGPATH_W) '$(srcdir)/openbox/event.c'; fi`
+
+openbox/openbox-focus.o: openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/openbox-focus.o `test -f 'openbox/focus.c' || echo '$(srcdir)/'`openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus.Tpo openbox/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus.c' object='openbox/openbox-focus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus.o `test -f 'openbox/focus.c' || echo '$(srcdir)/'`openbox/focus.c
+
+openbox/openbox-focus.obj: openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/openbox-focus.obj `if test -f 'openbox/focus.c'; then $(CYGPATH_W) 'openbox/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus.Tpo openbox/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus.c' object='openbox/openbox-focus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus.obj `if test -f 'openbox/focus.c'; then $(CYGPATH_W) 'openbox/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus.c'; fi`
+
+openbox/openbox-focus_cycle.o: openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle.Tpo -c -o openbox/openbox-focus_cycle.o `test -f 'openbox/focus_cycle.c' || echo '$(srcdir)/'`openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle.Tpo openbox/$(DEPDIR)/openbox-focus_cycle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle.c' object='openbox/openbox-focus_cycle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle.o `test -f 'openbox/focus_cycle.c' || echo '$(srcdir)/'`openbox/focus_cycle.c
+
+openbox/openbox-focus_cycle.obj: openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle.Tpo -c -o openbox/openbox-focus_cycle.obj `if test -f 'openbox/focus_cycle.c'; then $(CYGPATH_W) 'openbox/focus_cycle.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle.Tpo openbox/$(DEPDIR)/openbox-focus_cycle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle.c' object='openbox/openbox-focus_cycle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle.obj `if test -f 'openbox/focus_cycle.c'; then $(CYGPATH_W) 'openbox/focus_cycle.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle.c'; fi`
+
+openbox/openbox-focus_cycle_indicator.o: openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_indicator.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo -c -o openbox/openbox-focus_cycle_indicator.o `test -f 'openbox/focus_cycle_indicator.c' || echo '$(srcdir)/'`openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_indicator.c' object='openbox/openbox-focus_cycle_indicator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_indicator.o `test -f 'openbox/focus_cycle_indicator.c' || echo '$(srcdir)/'`openbox/focus_cycle_indicator.c
+
+openbox/openbox-focus_cycle_indicator.obj: openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_indicator.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo -c -o openbox/openbox-focus_cycle_indicator.obj `if test -f 'openbox/focus_cycle_indicator.c'; then $(CYGPATH_W) 'openbox/focus_cycle_indicator.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_indicator.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_indicator.c' object='openbox/openbox-focus_cycle_indicator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_indicator.obj `if test -f 'openbox/focus_cycle_indicator.c'; then $(CYGPATH_W) 'openbox/focus_cycle_indicator.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_indicator.c'; fi`
+
+openbox/openbox-focus_cycle_popup.o: openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_popup.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo -c -o openbox/openbox-focus_cycle_popup.o `test -f 'openbox/focus_cycle_popup.c' || echo '$(srcdir)/'`openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_popup.c' object='openbox/openbox-focus_cycle_popup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_popup.o `test -f 'openbox/focus_cycle_popup.c' || echo '$(srcdir)/'`openbox/focus_cycle_popup.c
+
+openbox/openbox-focus_cycle_popup.obj: openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_popup.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo -c -o openbox/openbox-focus_cycle_popup.obj `if test -f 'openbox/focus_cycle_popup.c'; then $(CYGPATH_W) 'openbox/focus_cycle_popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_popup.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_popup.c' object='openbox/openbox-focus_cycle_popup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_popup.obj `if test -f 'openbox/focus_cycle_popup.c'; then $(CYGPATH_W) 'openbox/focus_cycle_popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_popup.c'; fi`
+
+openbox/openbox-frame.o: openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-frame.o -MD -MP -MF openbox/$(DEPDIR)/openbox-frame.Tpo -c -o openbox/openbox-frame.o `test -f 'openbox/frame.c' || echo '$(srcdir)/'`openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-frame.Tpo openbox/$(DEPDIR)/openbox-frame.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/frame.c' object='openbox/openbox-frame.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-frame.o `test -f 'openbox/frame.c' || echo '$(srcdir)/'`openbox/frame.c
+
+openbox/openbox-frame.obj: openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-frame.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-frame.Tpo -c -o openbox/openbox-frame.obj `if test -f 'openbox/frame.c'; then $(CYGPATH_W) 'openbox/frame.c'; else $(CYGPATH_W) '$(srcdir)/openbox/frame.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-frame.Tpo openbox/$(DEPDIR)/openbox-frame.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/frame.c' object='openbox/openbox-frame.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-frame.obj `if test -f 'openbox/frame.c'; then $(CYGPATH_W) 'openbox/frame.c'; else $(CYGPATH_W) '$(srcdir)/openbox/frame.c'; fi`
+
+openbox/openbox-framerender.o: openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-framerender.o -MD -MP -MF openbox/$(DEPDIR)/openbox-framerender.Tpo -c -o openbox/openbox-framerender.o `test -f 'openbox/framerender.c' || echo '$(srcdir)/'`openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-framerender.Tpo openbox/$(DEPDIR)/openbox-framerender.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/framerender.c' object='openbox/openbox-framerender.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-framerender.o `test -f 'openbox/framerender.c' || echo '$(srcdir)/'`openbox/framerender.c
+
+openbox/openbox-framerender.obj: openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-framerender.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-framerender.Tpo -c -o openbox/openbox-framerender.obj `if test -f 'openbox/framerender.c'; then $(CYGPATH_W) 'openbox/framerender.c'; else $(CYGPATH_W) '$(srcdir)/openbox/framerender.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-framerender.Tpo openbox/$(DEPDIR)/openbox-framerender.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/framerender.c' object='openbox/openbox-framerender.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-framerender.obj `if test -f 'openbox/framerender.c'; then $(CYGPATH_W) 'openbox/framerender.c'; else $(CYGPATH_W) '$(srcdir)/openbox/framerender.c'; fi`
+
+openbox/openbox-grab.o: openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-grab.o -MD -MP -MF openbox/$(DEPDIR)/openbox-grab.Tpo -c -o openbox/openbox-grab.o `test -f 'openbox/grab.c' || echo '$(srcdir)/'`openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-grab.Tpo openbox/$(DEPDIR)/openbox-grab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/grab.c' object='openbox/openbox-grab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-grab.o `test -f 'openbox/grab.c' || echo '$(srcdir)/'`openbox/grab.c
+
+openbox/openbox-grab.obj: openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-grab.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-grab.Tpo -c -o openbox/openbox-grab.obj `if test -f 'openbox/grab.c'; then $(CYGPATH_W) 'openbox/grab.c'; else $(CYGPATH_W) '$(srcdir)/openbox/grab.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-grab.Tpo openbox/$(DEPDIR)/openbox-grab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/grab.c' object='openbox/openbox-grab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-grab.obj `if test -f 'openbox/grab.c'; then $(CYGPATH_W) 'openbox/grab.c'; else $(CYGPATH_W) '$(srcdir)/openbox/grab.c'; fi`
+
+openbox/openbox-group.o: openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-group.o -MD -MP -MF openbox/$(DEPDIR)/openbox-group.Tpo -c -o openbox/openbox-group.o `test -f 'openbox/group.c' || echo '$(srcdir)/'`openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-group.Tpo openbox/$(DEPDIR)/openbox-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/group.c' object='openbox/openbox-group.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-group.o `test -f 'openbox/group.c' || echo '$(srcdir)/'`openbox/group.c
+
+openbox/openbox-group.obj: openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-group.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-group.Tpo -c -o openbox/openbox-group.obj `if test -f 'openbox/group.c'; then $(CYGPATH_W) 'openbox/group.c'; else $(CYGPATH_W) '$(srcdir)/openbox/group.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-group.Tpo openbox/$(DEPDIR)/openbox-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/group.c' object='openbox/openbox-group.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-group.obj `if test -f 'openbox/group.c'; then $(CYGPATH_W) 'openbox/group.c'; else $(CYGPATH_W) '$(srcdir)/openbox/group.c'; fi`
+
+openbox/openbox-keyboard.o: openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keyboard.o -MD -MP -MF openbox/$(DEPDIR)/openbox-keyboard.Tpo -c -o openbox/openbox-keyboard.o `test -f 'openbox/keyboard.c' || echo '$(srcdir)/'`openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keyboard.Tpo openbox/$(DEPDIR)/openbox-keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keyboard.c' object='openbox/openbox-keyboard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keyboard.o `test -f 'openbox/keyboard.c' || echo '$(srcdir)/'`openbox/keyboard.c
+
+openbox/openbox-keyboard.obj: openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keyboard.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-keyboard.Tpo -c -o openbox/openbox-keyboard.obj `if test -f 'openbox/keyboard.c'; then $(CYGPATH_W) 'openbox/keyboard.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keyboard.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keyboard.Tpo openbox/$(DEPDIR)/openbox-keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keyboard.c' object='openbox/openbox-keyboard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keyboard.obj `if test -f 'openbox/keyboard.c'; then $(CYGPATH_W) 'openbox/keyboard.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keyboard.c'; fi`
+
+openbox/openbox-keytree.o: openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keytree.o -MD -MP -MF openbox/$(DEPDIR)/openbox-keytree.Tpo -c -o openbox/openbox-keytree.o `test -f 'openbox/keytree.c' || echo '$(srcdir)/'`openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keytree.Tpo openbox/$(DEPDIR)/openbox-keytree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keytree.c' object='openbox/openbox-keytree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keytree.o `test -f 'openbox/keytree.c' || echo '$(srcdir)/'`openbox/keytree.c
+
+openbox/openbox-keytree.obj: openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keytree.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-keytree.Tpo -c -o openbox/openbox-keytree.obj `if test -f 'openbox/keytree.c'; then $(CYGPATH_W) 'openbox/keytree.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keytree.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keytree.Tpo openbox/$(DEPDIR)/openbox-keytree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keytree.c' object='openbox/openbox-keytree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keytree.obj `if test -f 'openbox/keytree.c'; then $(CYGPATH_W) 'openbox/keytree.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keytree.c'; fi`
+
+openbox/openbox-menuframe.o: openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menuframe.o -MD -MP -MF openbox/$(DEPDIR)/openbox-menuframe.Tpo -c -o openbox/openbox-menuframe.o `test -f 'openbox/menuframe.c' || echo '$(srcdir)/'`openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menuframe.Tpo openbox/$(DEPDIR)/openbox-menuframe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menuframe.c' object='openbox/openbox-menuframe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menuframe.o `test -f 'openbox/menuframe.c' || echo '$(srcdir)/'`openbox/menuframe.c
+
+openbox/openbox-menuframe.obj: openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menuframe.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-menuframe.Tpo -c -o openbox/openbox-menuframe.obj `if test -f 'openbox/menuframe.c'; then $(CYGPATH_W) 'openbox/menuframe.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menuframe.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menuframe.Tpo openbox/$(DEPDIR)/openbox-menuframe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menuframe.c' object='openbox/openbox-menuframe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menuframe.obj `if test -f 'openbox/menuframe.c'; then $(CYGPATH_W) 'openbox/menuframe.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menuframe.c'; fi`
+
+openbox/openbox-menu.o: openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-menu.Tpo -c -o openbox/openbox-menu.o `test -f 'openbox/menu.c' || echo '$(srcdir)/'`openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menu.Tpo openbox/$(DEPDIR)/openbox-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menu.c' object='openbox/openbox-menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menu.o `test -f 'openbox/menu.c' || echo '$(srcdir)/'`openbox/menu.c
+
+openbox/openbox-menu.obj: openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-menu.Tpo -c -o openbox/openbox-menu.obj `if test -f 'openbox/menu.c'; then $(CYGPATH_W) 'openbox/menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menu.Tpo openbox/$(DEPDIR)/openbox-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menu.c' object='openbox/openbox-menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menu.obj `if test -f 'openbox/menu.c'; then $(CYGPATH_W) 'openbox/menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menu.c'; fi`
+
+openbox/openbox-mouse.o: openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-mouse.o -MD -MP -MF openbox/$(DEPDIR)/openbox-mouse.Tpo -c -o openbox/openbox-mouse.o `test -f 'openbox/mouse.c' || echo '$(srcdir)/'`openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-mouse.Tpo openbox/$(DEPDIR)/openbox-mouse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/mouse.c' object='openbox/openbox-mouse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-mouse.o `test -f 'openbox/mouse.c' || echo '$(srcdir)/'`openbox/mouse.c
+
+openbox/openbox-mouse.obj: openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-mouse.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-mouse.Tpo -c -o openbox/openbox-mouse.obj `if test -f 'openbox/mouse.c'; then $(CYGPATH_W) 'openbox/mouse.c'; else $(CYGPATH_W) '$(srcdir)/openbox/mouse.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-mouse.Tpo openbox/$(DEPDIR)/openbox-mouse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/mouse.c' object='openbox/openbox-mouse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-mouse.obj `if test -f 'openbox/mouse.c'; then $(CYGPATH_W) 'openbox/mouse.c'; else $(CYGPATH_W) '$(srcdir)/openbox/mouse.c'; fi`
+
+openbox/openbox-moveresize.o: openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-moveresize.o -MD -MP -MF openbox/$(DEPDIR)/openbox-moveresize.Tpo -c -o openbox/openbox-moveresize.o `test -f 'openbox/moveresize.c' || echo '$(srcdir)/'`openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-moveresize.Tpo openbox/$(DEPDIR)/openbox-moveresize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/moveresize.c' object='openbox/openbox-moveresize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-moveresize.o `test -f 'openbox/moveresize.c' || echo '$(srcdir)/'`openbox/moveresize.c
+
+openbox/openbox-moveresize.obj: openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-moveresize.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-moveresize.Tpo -c -o openbox/openbox-moveresize.obj `if test -f 'openbox/moveresize.c'; then $(CYGPATH_W) 'openbox/moveresize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/moveresize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-moveresize.Tpo openbox/$(DEPDIR)/openbox-moveresize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/moveresize.c' object='openbox/openbox-moveresize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-moveresize.obj `if test -f 'openbox/moveresize.c'; then $(CYGPATH_W) 'openbox/moveresize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/moveresize.c'; fi`
+
+openbox/openbox-openbox.o: openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-openbox.o -MD -MP -MF openbox/$(DEPDIR)/openbox-openbox.Tpo -c -o openbox/openbox-openbox.o `test -f 'openbox/openbox.c' || echo '$(srcdir)/'`openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-openbox.Tpo openbox/$(DEPDIR)/openbox-openbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/openbox.c' object='openbox/openbox-openbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-openbox.o `test -f 'openbox/openbox.c' || echo '$(srcdir)/'`openbox/openbox.c
+
+openbox/openbox-openbox.obj: openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-openbox.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-openbox.Tpo -c -o openbox/openbox-openbox.obj `if test -f 'openbox/openbox.c'; then $(CYGPATH_W) 'openbox/openbox.c'; else $(CYGPATH_W) '$(srcdir)/openbox/openbox.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-openbox.Tpo openbox/$(DEPDIR)/openbox-openbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/openbox.c' object='openbox/openbox-openbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-openbox.obj `if test -f 'openbox/openbox.c'; then $(CYGPATH_W) 'openbox/openbox.c'; else $(CYGPATH_W) '$(srcdir)/openbox/openbox.c'; fi`
+
+openbox/openbox-ping.o: openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-ping.o -MD -MP -MF openbox/$(DEPDIR)/openbox-ping.Tpo -c -o openbox/openbox-ping.o `test -f 'openbox/ping.c' || echo '$(srcdir)/'`openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-ping.Tpo openbox/$(DEPDIR)/openbox-ping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/ping.c' object='openbox/openbox-ping.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-ping.o `test -f 'openbox/ping.c' || echo '$(srcdir)/'`openbox/ping.c
+
+openbox/openbox-ping.obj: openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-ping.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-ping.Tpo -c -o openbox/openbox-ping.obj `if test -f 'openbox/ping.c'; then $(CYGPATH_W) 'openbox/ping.c'; else $(CYGPATH_W) '$(srcdir)/openbox/ping.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-ping.Tpo openbox/$(DEPDIR)/openbox-ping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/ping.c' object='openbox/openbox-ping.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-ping.obj `if test -f 'openbox/ping.c'; then $(CYGPATH_W) 'openbox/ping.c'; else $(CYGPATH_W) '$(srcdir)/openbox/ping.c'; fi`
+
+openbox/openbox-place.o: openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place.o -MD -MP -MF openbox/$(DEPDIR)/openbox-place.Tpo -c -o openbox/openbox-place.o `test -f 'openbox/place.c' || echo '$(srcdir)/'`openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place.Tpo openbox/$(DEPDIR)/openbox-place.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place.c' object='openbox/openbox-place.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place.o `test -f 'openbox/place.c' || echo '$(srcdir)/'`openbox/place.c
+
+openbox/openbox-place.obj: openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-place.Tpo -c -o openbox/openbox-place.obj `if test -f 'openbox/place.c'; then $(CYGPATH_W) 'openbox/place.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place.Tpo openbox/$(DEPDIR)/openbox-place.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place.c' object='openbox/openbox-place.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place.obj `if test -f 'openbox/place.c'; then $(CYGPATH_W) 'openbox/place.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place.c'; fi`
+
+openbox/openbox-place_overlap.o: openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place_overlap.o -MD -MP -MF openbox/$(DEPDIR)/openbox-place_overlap.Tpo -c -o openbox/openbox-place_overlap.o `test -f 'openbox/place_overlap.c' || echo '$(srcdir)/'`openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place_overlap.Tpo openbox/$(DEPDIR)/openbox-place_overlap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place_overlap.c' object='openbox/openbox-place_overlap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place_overlap.o `test -f 'openbox/place_overlap.c' || echo '$(srcdir)/'`openbox/place_overlap.c
+
+openbox/openbox-place_overlap.obj: openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place_overlap.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-place_overlap.Tpo -c -o openbox/openbox-place_overlap.obj `if test -f 'openbox/place_overlap.c'; then $(CYGPATH_W) 'openbox/place_overlap.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place_overlap.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place_overlap.Tpo openbox/$(DEPDIR)/openbox-place_overlap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place_overlap.c' object='openbox/openbox-place_overlap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place_overlap.obj `if test -f 'openbox/place_overlap.c'; then $(CYGPATH_W) 'openbox/place_overlap.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place_overlap.c'; fi`
+
+openbox/openbox-prompt.o: openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-prompt.o -MD -MP -MF openbox/$(DEPDIR)/openbox-prompt.Tpo -c -o openbox/openbox-prompt.o `test -f 'openbox/prompt.c' || echo '$(srcdir)/'`openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-prompt.Tpo openbox/$(DEPDIR)/openbox-prompt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/prompt.c' object='openbox/openbox-prompt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-prompt.o `test -f 'openbox/prompt.c' || echo '$(srcdir)/'`openbox/prompt.c
+
+openbox/openbox-prompt.obj: openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-prompt.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-prompt.Tpo -c -o openbox/openbox-prompt.obj `if test -f 'openbox/prompt.c'; then $(CYGPATH_W) 'openbox/prompt.c'; else $(CYGPATH_W) '$(srcdir)/openbox/prompt.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-prompt.Tpo openbox/$(DEPDIR)/openbox-prompt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/prompt.c' object='openbox/openbox-prompt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-prompt.obj `if test -f 'openbox/prompt.c'; then $(CYGPATH_W) 'openbox/prompt.c'; else $(CYGPATH_W) '$(srcdir)/openbox/prompt.c'; fi`
+
+openbox/openbox-popup.o: openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-popup.o -MD -MP -MF openbox/$(DEPDIR)/openbox-popup.Tpo -c -o openbox/openbox-popup.o `test -f 'openbox/popup.c' || echo '$(srcdir)/'`openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-popup.Tpo openbox/$(DEPDIR)/openbox-popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/popup.c' object='openbox/openbox-popup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-popup.o `test -f 'openbox/popup.c' || echo '$(srcdir)/'`openbox/popup.c
+
+openbox/openbox-popup.obj: openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-popup.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-popup.Tpo -c -o openbox/openbox-popup.obj `if test -f 'openbox/popup.c'; then $(CYGPATH_W) 'openbox/popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/popup.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-popup.Tpo openbox/$(DEPDIR)/openbox-popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/popup.c' object='openbox/openbox-popup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-popup.obj `if test -f 'openbox/popup.c'; then $(CYGPATH_W) 'openbox/popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/popup.c'; fi`
+
+openbox/openbox-resist.o: openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-resist.o -MD -MP -MF openbox/$(DEPDIR)/openbox-resist.Tpo -c -o openbox/openbox-resist.o `test -f 'openbox/resist.c' || echo '$(srcdir)/'`openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-resist.Tpo openbox/$(DEPDIR)/openbox-resist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/resist.c' object='openbox/openbox-resist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-resist.o `test -f 'openbox/resist.c' || echo '$(srcdir)/'`openbox/resist.c
+
+openbox/openbox-resist.obj: openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-resist.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-resist.Tpo -c -o openbox/openbox-resist.obj `if test -f 'openbox/resist.c'; then $(CYGPATH_W) 'openbox/resist.c'; else $(CYGPATH_W) '$(srcdir)/openbox/resist.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-resist.Tpo openbox/$(DEPDIR)/openbox-resist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/resist.c' object='openbox/openbox-resist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-resist.obj `if test -f 'openbox/resist.c'; then $(CYGPATH_W) 'openbox/resist.c'; else $(CYGPATH_W) '$(srcdir)/openbox/resist.c'; fi`
+
+openbox/openbox-screen.o: openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-screen.o -MD -MP -MF openbox/$(DEPDIR)/openbox-screen.Tpo -c -o openbox/openbox-screen.o `test -f 'openbox/screen.c' || echo '$(srcdir)/'`openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-screen.Tpo openbox/$(DEPDIR)/openbox-screen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/screen.c' object='openbox/openbox-screen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-screen.o `test -f 'openbox/screen.c' || echo '$(srcdir)/'`openbox/screen.c
+
+openbox/openbox-screen.obj: openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-screen.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-screen.Tpo -c -o openbox/openbox-screen.obj `if test -f 'openbox/screen.c'; then $(CYGPATH_W) 'openbox/screen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/screen.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-screen.Tpo openbox/$(DEPDIR)/openbox-screen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/screen.c' object='openbox/openbox-screen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-screen.obj `if test -f 'openbox/screen.c'; then $(CYGPATH_W) 'openbox/screen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/screen.c'; fi`
+
+openbox/openbox-session.o: openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-session.o -MD -MP -MF openbox/$(DEPDIR)/openbox-session.Tpo -c -o openbox/openbox-session.o `test -f 'openbox/session.c' || echo '$(srcdir)/'`openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-session.Tpo openbox/$(DEPDIR)/openbox-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/session.c' object='openbox/openbox-session.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-session.o `test -f 'openbox/session.c' || echo '$(srcdir)/'`openbox/session.c
+
+openbox/openbox-session.obj: openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-session.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-session.Tpo -c -o openbox/openbox-session.obj `if test -f 'openbox/session.c'; then $(CYGPATH_W) 'openbox/session.c'; else $(CYGPATH_W) '$(srcdir)/openbox/session.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-session.Tpo openbox/$(DEPDIR)/openbox-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/session.c' object='openbox/openbox-session.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-session.obj `if test -f 'openbox/session.c'; then $(CYGPATH_W) 'openbox/session.c'; else $(CYGPATH_W) '$(srcdir)/openbox/session.c'; fi`
+
+openbox/openbox-stacking.o: openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-stacking.o -MD -MP -MF openbox/$(DEPDIR)/openbox-stacking.Tpo -c -o openbox/openbox-stacking.o `test -f 'openbox/stacking.c' || echo '$(srcdir)/'`openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-stacking.Tpo openbox/$(DEPDIR)/openbox-stacking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/stacking.c' object='openbox/openbox-stacking.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-stacking.o `test -f 'openbox/stacking.c' || echo '$(srcdir)/'`openbox/stacking.c
+
+openbox/openbox-stacking.obj: openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-stacking.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-stacking.Tpo -c -o openbox/openbox-stacking.obj `if test -f 'openbox/stacking.c'; then $(CYGPATH_W) 'openbox/stacking.c'; else $(CYGPATH_W) '$(srcdir)/openbox/stacking.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-stacking.Tpo openbox/$(DEPDIR)/openbox-stacking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/stacking.c' object='openbox/openbox-stacking.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-stacking.obj `if test -f 'openbox/stacking.c'; then $(CYGPATH_W) 'openbox/stacking.c'; else $(CYGPATH_W) '$(srcdir)/openbox/stacking.c'; fi`
+
+openbox/openbox-startupnotify.o: openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-startupnotify.o -MD -MP -MF openbox/$(DEPDIR)/openbox-startupnotify.Tpo -c -o openbox/openbox-startupnotify.o `test -f 'openbox/startupnotify.c' || echo '$(srcdir)/'`openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-startupnotify.Tpo openbox/$(DEPDIR)/openbox-startupnotify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/startupnotify.c' object='openbox/openbox-startupnotify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-startupnotify.o `test -f 'openbox/startupnotify.c' || echo '$(srcdir)/'`openbox/startupnotify.c
+
+openbox/openbox-startupnotify.obj: openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-startupnotify.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-startupnotify.Tpo -c -o openbox/openbox-startupnotify.obj `if test -f 'openbox/startupnotify.c'; then $(CYGPATH_W) 'openbox/startupnotify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/startupnotify.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-startupnotify.Tpo openbox/$(DEPDIR)/openbox-startupnotify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/startupnotify.c' object='openbox/openbox-startupnotify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-startupnotify.obj `if test -f 'openbox/startupnotify.c'; then $(CYGPATH_W) 'openbox/startupnotify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/startupnotify.c'; fi`
+
+openbox/openbox-translate.o: openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-translate.o -MD -MP -MF openbox/$(DEPDIR)/openbox-translate.Tpo -c -o openbox/openbox-translate.o `test -f 'openbox/translate.c' || echo '$(srcdir)/'`openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-translate.Tpo openbox/$(DEPDIR)/openbox-translate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/translate.c' object='openbox/openbox-translate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-translate.o `test -f 'openbox/translate.c' || echo '$(srcdir)/'`openbox/translate.c
+
+openbox/openbox-translate.obj: openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-translate.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-translate.Tpo -c -o openbox/openbox-translate.obj `if test -f 'openbox/translate.c'; then $(CYGPATH_W) 'openbox/translate.c'; else $(CYGPATH_W) '$(srcdir)/openbox/translate.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-translate.Tpo openbox/$(DEPDIR)/openbox-translate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/translate.c' object='openbox/openbox-translate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-translate.obj `if test -f 'openbox/translate.c'; then $(CYGPATH_W) 'openbox/translate.c'; else $(CYGPATH_W) '$(srcdir)/openbox/translate.c'; fi`
+
+openbox/openbox-window.o: openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-window.o -MD -MP -MF openbox/$(DEPDIR)/openbox-window.Tpo -c -o openbox/openbox-window.o `test -f 'openbox/window.c' || echo '$(srcdir)/'`openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-window.Tpo openbox/$(DEPDIR)/openbox-window.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/window.c' object='openbox/openbox-window.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-window.o `test -f 'openbox/window.c' || echo '$(srcdir)/'`openbox/window.c
+
+openbox/openbox-window.obj: openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-window.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-window.Tpo -c -o openbox/openbox-window.obj `if test -f 'openbox/window.c'; then $(CYGPATH_W) 'openbox/window.c'; else $(CYGPATH_W) '$(srcdir)/openbox/window.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-window.Tpo openbox/$(DEPDIR)/openbox-window.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/window.c' object='openbox/openbox-window.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-window.obj `if test -f 'openbox/window.c'; then $(CYGPATH_W) 'openbox/window.c'; else $(CYGPATH_W) '$(srcdir)/openbox/window.c'; fi`
+
+tools/gdm-control/gdm_control-gdm-control.o: tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gdm-control/gdm_control-gdm-control.o -MD -MP -MF tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo -c -o tools/gdm-control/gdm_control-gdm-control.o `test -f 'tools/gdm-control/gdm-control.c' || echo '$(srcdir)/'`tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gdm-control/gdm-control.c' object='tools/gdm-control/gdm_control-gdm-control.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gdm-control/gdm_control-gdm-control.o `test -f 'tools/gdm-control/gdm-control.c' || echo '$(srcdir)/'`tools/gdm-control/gdm-control.c
+
+tools/gdm-control/gdm_control-gdm-control.obj: tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gdm-control/gdm_control-gdm-control.obj -MD -MP -MF tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo -c -o tools/gdm-control/gdm_control-gdm-control.obj `if test -f 'tools/gdm-control/gdm-control.c'; then $(CYGPATH_W) 'tools/gdm-control/gdm-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gdm-control/gdm-control.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gdm-control/gdm-control.c' object='tools/gdm-control/gdm_control-gdm-control.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gdm-control/gdm_control-gdm-control.obj `if test -f 'tools/gdm-control/gdm-control.c'; then $(CYGPATH_W) 'tools/gdm-control/gdm-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gdm-control/gdm-control.c'; fi`
+
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o: tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o -MD -MP -MF tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o `test -f 'tools/gnome-panel-control/gnome-panel-control.c' || echo '$(srcdir)/'`tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gnome-panel-control/gnome-panel-control.c' object='tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o `test -f 'tools/gnome-panel-control/gnome-panel-control.c' || echo '$(srcdir)/'`tools/gnome-panel-control/gnome-panel-control.c
+
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj: tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj -MD -MP -MF tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj `if test -f 'tools/gnome-panel-control/gnome-panel-control.c'; then $(CYGPATH_W) 'tools/gnome-panel-control/gnome-panel-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gnome-panel-control/gnome-panel-control.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gnome-panel-control/gnome-panel-control.c' object='tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj `if test -f 'tools/gnome-panel-control/gnome-panel-control.c'; then $(CYGPATH_W) 'tools/gnome-panel-control/gnome-panel-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gnome-panel-control/gnome-panel-control.c'; fi`
+
+tools/obxprop/obxprop-obxprop.o: tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/obxprop/obxprop-obxprop.o -MD -MP -MF tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo -c -o tools/obxprop/obxprop-obxprop.o `test -f 'tools/obxprop/obxprop.c' || echo '$(srcdir)/'`tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/obxprop/obxprop.c' object='tools/obxprop/obxprop-obxprop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/obxprop/obxprop-obxprop.o `test -f 'tools/obxprop/obxprop.c' || echo '$(srcdir)/'`tools/obxprop/obxprop.c
+
+tools/obxprop/obxprop-obxprop.obj: tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/obxprop/obxprop-obxprop.obj -MD -MP -MF tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo -c -o tools/obxprop/obxprop-obxprop.obj `if test -f 'tools/obxprop/obxprop.c'; then $(CYGPATH_W) 'tools/obxprop/obxprop.c'; else $(CYGPATH_W) '$(srcdir)/tools/obxprop/obxprop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/obxprop/obxprop.c' object='tools/obxprop/obxprop-obxprop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/obxprop/obxprop-obxprop.obj `if test -f 'tools/obxprop/obxprop.c'; then $(CYGPATH_W) 'tools/obxprop/obxprop.c'; else $(CYGPATH_W) '$(srcdir)/tools/obxprop/obxprop.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf obrender/.libs obrender/_libs
+	-rm -rf obt/.libs obt/_libs
+	-rm -rf openbox/.libs openbox/_libs
+	-rm -rf tools/gdm-control/.libs tools/gdm-control/_libs
+	-rm -rf tools/gnome-panel-control/.libs tools/gnome-panel-control/_libs
+	-rm -rf tools/obxprop/.libs tools/obxprop/_libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-man1: $(nodist_man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(nodist_man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(nodist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-dist_appsDATA: $(dist_apps_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_apps_DATA)'; test -n "$(appsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(appsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(appsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appsdir)" || exit $$?; \
+	done
+
+uninstall-dist_appsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_apps_DATA)'; test -n "$(appsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(appsdir)'; $(am__uninstall_files_from_dir)
+install-dist_artwizboxed_themeDATA: $(dist_artwizboxed_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_artwizboxed_theme_DATA)'; test -n "$(artwizboxed_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(artwizboxed_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(artwizboxed_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(artwizboxed_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(artwizboxed_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_artwizboxed_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_artwizboxed_theme_DATA)'; test -n "$(artwizboxed_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(artwizboxed_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_bear2_themeDATA: $(dist_bear2_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_bear2_theme_DATA)'; test -n "$(bear2_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bear2_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bear2_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bear2_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(bear2_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_bear2_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_bear2_theme_DATA)'; test -n "$(bear2_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(bear2_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooks34_themeDATA: $(dist_clearlooks34_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooks34_theme_DATA)'; test -n "$(clearlooks34_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooks34_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooks34_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooks34_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooks34_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooks34_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooks34_theme_DATA)'; test -n "$(clearlooks34_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooks34_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooks_themeDATA: $(dist_clearlooks_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooks_theme_DATA)'; test -n "$(clearlooks_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooks_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooks_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooks_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooks_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooks_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooks_theme_DATA)'; test -n "$(clearlooks_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooks_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooksolive_themeDATA: $(dist_clearlooksolive_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooksolive_theme_DATA)'; test -n "$(clearlooksolive_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooksolive_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooksolive_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooksolive_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooksolive_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooksolive_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooksolive_theme_DATA)'; test -n "$(clearlooksolive_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooksolive_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_docDATA: $(dist_doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-dist_docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+install-dist_docxbmDATA: $(dist_docxbm_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_docxbm_DATA)'; test -n "$(docxbmdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docxbmdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docxbmdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docxbmdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docxbmdir)" || exit $$?; \
+	done
+
+uninstall-dist_docxbmDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_docxbm_DATA)'; test -n "$(docxbmdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docxbmdir)'; $(am__uninstall_files_from_dir)
+install-dist_gnomesessionDATA: $(dist_gnomesession_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_gnomesession_DATA)'; test -n "$(gnomesessiondir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(gnomesessiondir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(gnomesessiondir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gnomesessiondir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(gnomesessiondir)" || exit $$?; \
+	done
+
+uninstall-dist_gnomesessionDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_gnomesession_DATA)'; test -n "$(gnomesessiondir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(gnomesessiondir)'; $(am__uninstall_files_from_dir)
+install-dist_gnomewmfilesDATA: $(dist_gnomewmfiles_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_gnomewmfiles_DATA)'; test -n "$(gnomewmfilesdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(gnomewmfilesdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(gnomewmfilesdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gnomewmfilesdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(gnomewmfilesdir)" || exit $$?; \
+	done
+
+uninstall-dist_gnomewmfilesDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_gnomewmfiles_DATA)'; test -n "$(gnomewmfilesdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(gnomewmfilesdir)'; $(am__uninstall_files_from_dir)
+install-dist_mikachu_themeDATA: $(dist_mikachu_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_mikachu_theme_DATA)'; test -n "$(mikachu_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(mikachu_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(mikachu_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mikachu_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(mikachu_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_mikachu_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_mikachu_theme_DATA)'; test -n "$(mikachu_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(mikachu_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_natura_themeDATA: $(dist_natura_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_natura_theme_DATA)'; test -n "$(natura_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(natura_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(natura_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(natura_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(natura_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_natura_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_natura_theme_DATA)'; test -n "$(natura_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(natura_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_onyx_themeDATA: $(dist_onyx_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_onyx_theme_DATA)'; test -n "$(onyx_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(onyx_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(onyx_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(onyx_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(onyx_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_onyx_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_onyx_theme_DATA)'; test -n "$(onyx_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(onyx_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_onyxcitrus_themeDATA: $(dist_onyxcitrus_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_onyxcitrus_theme_DATA)'; test -n "$(onyxcitrus_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(onyxcitrus_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(onyxcitrus_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(onyxcitrus_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(onyxcitrus_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_onyxcitrus_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_onyxcitrus_theme_DATA)'; test -n "$(onyxcitrus_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(onyxcitrus_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_onyxdarkred_themeDATA: $(dist_onyxdarkred_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_onyxdarkred_theme_DATA)'; test -n "$(onyxdarkred_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(onyxdarkred_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(onyxdarkred_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(onyxdarkred_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(onyxdarkred_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_onyxdarkred_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_onyxdarkred_theme_DATA)'; test -n "$(onyxdarkred_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(onyxdarkred_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_orang_themeDATA: $(dist_orang_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_orang_theme_DATA)'; test -n "$(orang_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(orang_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(orang_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(orang_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(orang_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_orang_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_orang_theme_DATA)'; test -n "$(orang_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(orang_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_pixmapDATA: $(dist_pixmap_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pixmapdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pixmapdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapdir)" || exit $$?; \
+	done
+
+uninstall-dist_pixmapDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pixmapdir)'; $(am__uninstall_files_from_dir)
+install-dist_rcDATA: $(dist_rc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_rc_DATA)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rcdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(rcdir)" || exit $$?; \
+	done
+
+uninstall-dist_rcDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_rc_DATA)'; test -n "$(rcdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+install-dist_syscrash_themeDATA: $(dist_syscrash_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_syscrash_theme_DATA)'; test -n "$(syscrash_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(syscrash_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(syscrash_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(syscrash_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(syscrash_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_syscrash_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_syscrash_theme_DATA)'; test -n "$(syscrash_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(syscrash_themedir)'; $(am__uninstall_files_from_dir)
+install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-nodist_pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+install-nodist_xsessionsDATA: $(nodist_xsessions_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_xsessions_DATA)'; test -n "$(xsessionsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(xsessionsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(xsessionsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xsessionsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(xsessionsdir)" || exit $$?; \
+	done
+
+uninstall-nodist_xsessionsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_xsessions_DATA)'; test -n "$(xsessionsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(xsessionsdir)'; $(am__uninstall_files_from_dir)
+install-obtpubincludeHEADERS: $(obtpubinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(obtpubinclude_HEADERS)'; test -n "$(obtpubincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(obtpubincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(obtpubincludedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(obtpubincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(obtpubincludedir)" || exit $$?; \
+	done
+
+uninstall-obtpubincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(obtpubinclude_HEADERS)'; test -n "$(obtpubincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(obtpubincludedir)'; $(am__uninstall_files_from_dir)
+install-rrpubincludeHEADERS: $(rrpubinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(rrpubinclude_HEADERS)'; test -n "$(rrpubincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rrpubincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rrpubincludedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(rrpubincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(rrpubincludedir)" || exit $$?; \
+	done
+
+uninstall-rrpubincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(rrpubinclude_HEADERS)'; test -n "$(rrpubincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(rrpubincludedir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
+
+dist-zstd: distdir
+	tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+	$(am__post_remove_distdir)
+
+dist-tarZ: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+
+dist-shar: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_remove_distdir)
+
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	*.tar.zst*) \
+	  zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__post_remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
+		$(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+install-checkPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appsdir)" "$(DESTDIR)$(artwizboxed_themedir)" "$(DESTDIR)$(bear2_themedir)" "$(DESTDIR)$(clearlooks34_themedir)" "$(DESTDIR)$(clearlooks_themedir)" "$(DESTDIR)$(clearlooksolive_themedir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(docxbmdir)" "$(DESTDIR)$(gnomesessiondir)" "$(DESTDIR)$(gnomewmfilesdir)" "$(DESTDIR)$(mikachu_themedir)" "$(DESTDIR)$(natura_themedir)" "$(DESTDIR)$(onyx_themedir)" "$(DESTDIR)$(onyxcitrus_themedir)" "$(DESTDIR)$(onyxdarkred_themedir)" "$(DESTDIR)$(orang_themedir)" "$(DESTDIR)$(pixmapdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(syscrash_themedir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xsessionsdir)" "$(DESTDIR)$(obtpubincludedir)" "$(DESTDIR)$(rrpubincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f obrender/$(DEPDIR)/$(am__dirstamp)
+	-rm -f obrender/$(am__dirstamp)
+	-rm -f obt/$(DEPDIR)/$(am__dirstamp)
+	-rm -f obt/$(am__dirstamp)
+	-rm -f openbox/$(DEPDIR)/$(am__dirstamp)
+	-rm -f openbox/$(am__dirstamp)
+	-rm -f openbox/actions/$(DEPDIR)/$(am__dirstamp)
+	-rm -f openbox/actions/$(am__dirstamp)
+	-rm -f tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/gdm-control/$(am__dirstamp)
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/gnome-panel-control/$(am__dirstamp)
+	-rm -f tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/obxprop/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+		-rm -f obrender/$(DEPDIR)/libobrender_la-button.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-color.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-font.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-image.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-instance.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-mask.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-render.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-theme.Plo
+	-rm -f obrender/$(DEPDIR)/rendertest-test.Po
+	-rm -f obt/$(DEPDIR)/libobt_la-ddparse.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-display.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-keyboard.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-link.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-paths.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-prop.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-signal.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xml.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xqueue.Plo
+	-rm -f obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+	-rm -f obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+	-rm -f openbox/$(DEPDIR)/openbox-actions.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-config.Po
+	-rm -f openbox/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/$(DEPDIR)/openbox-event.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-frame.Po
+	-rm -f openbox/$(DEPDIR)/openbox-framerender.Po
+	-rm -f openbox/$(DEPDIR)/openbox-grab.Po
+	-rm -f openbox/$(DEPDIR)/openbox-group.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keyboard.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keytree.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menuframe.Po
+	-rm -f openbox/$(DEPDIR)/openbox-mouse.Po
+	-rm -f openbox/$(DEPDIR)/openbox-moveresize.Po
+	-rm -f openbox/$(DEPDIR)/openbox-openbox.Po
+	-rm -f openbox/$(DEPDIR)/openbox-ping.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place_overlap.Po
+	-rm -f openbox/$(DEPDIR)/openbox-popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-prompt.Po
+	-rm -f openbox/$(DEPDIR)/openbox-resist.Po
+	-rm -f openbox/$(DEPDIR)/openbox-screen.Po
+	-rm -f openbox/$(DEPDIR)/openbox-session.Po
+	-rm -f openbox/$(DEPDIR)/openbox-stacking.Po
+	-rm -f openbox/$(DEPDIR)/openbox-startupnotify.Po
+	-rm -f openbox/$(DEPDIR)/openbox-translate.Po
+	-rm -f openbox/$(DEPDIR)/openbox-window.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-all.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-close.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-decorations.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-desktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-execute.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-exit.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-iconify.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-if.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-kill.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-layer.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-lower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-maximize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-move.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-restart.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shade.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+	-rm -f tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+	-rm -f tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_appsDATA \
+	install-dist_artwizboxed_themeDATA \
+	install-dist_bear2_themeDATA \
+	install-dist_clearlooks34_themeDATA \
+	install-dist_clearlooks_themeDATA \
+	install-dist_clearlooksolive_themeDATA install-dist_docDATA \
+	install-dist_docxbmDATA install-dist_gnomesessionDATA \
+	install-dist_gnomewmfilesDATA install-dist_mikachu_themeDATA \
+	install-dist_natura_themeDATA install-dist_onyx_themeDATA \
+	install-dist_onyxcitrus_themeDATA install-dist_onyxdarkred_themeDATA install-dist_orang_themeDATA \
+	install-dist_pixmapDATA install-dist_rcDATA \
+	install-dist_rcSCRIPTS install-dist_syscrash_themeDATA \
+	install-man install-nodist_pkgconfigDATA \
+	install-nodist_rcSCRIPTS install-nodist_xsessionsDATA \
+	install-obtpubincludeHEADERS install-rrpubincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-dist_libexecSCRIPTS \
+	install-libLTLIBRARIES install-nodist_binSCRIPTS \
+	install-nodist_libexecSCRIPTS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+		-rm -f obrender/$(DEPDIR)/libobrender_la-button.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-color.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-font.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-image.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-instance.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-mask.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-render.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-theme.Plo
+	-rm -f obrender/$(DEPDIR)/rendertest-test.Po
+	-rm -f obt/$(DEPDIR)/libobt_la-ddparse.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-display.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-keyboard.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-link.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-paths.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-prop.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-signal.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xml.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xqueue.Plo
+	-rm -f obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+	-rm -f obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+	-rm -f openbox/$(DEPDIR)/openbox-actions.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-config.Po
+	-rm -f openbox/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/$(DEPDIR)/openbox-event.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-frame.Po
+	-rm -f openbox/$(DEPDIR)/openbox-framerender.Po
+	-rm -f openbox/$(DEPDIR)/openbox-grab.Po
+	-rm -f openbox/$(DEPDIR)/openbox-group.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keyboard.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keytree.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menuframe.Po
+	-rm -f openbox/$(DEPDIR)/openbox-mouse.Po
+	-rm -f openbox/$(DEPDIR)/openbox-moveresize.Po
+	-rm -f openbox/$(DEPDIR)/openbox-openbox.Po
+	-rm -f openbox/$(DEPDIR)/openbox-ping.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place_overlap.Po
+	-rm -f openbox/$(DEPDIR)/openbox-popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-prompt.Po
+	-rm -f openbox/$(DEPDIR)/openbox-resist.Po
+	-rm -f openbox/$(DEPDIR)/openbox-screen.Po
+	-rm -f openbox/$(DEPDIR)/openbox-session.Po
+	-rm -f openbox/$(DEPDIR)/openbox-stacking.Po
+	-rm -f openbox/$(DEPDIR)/openbox-startupnotify.Po
+	-rm -f openbox/$(DEPDIR)/openbox-translate.Po
+	-rm -f openbox/$(DEPDIR)/openbox-window.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-all.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-close.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-decorations.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-desktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-execute.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-exit.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-iconify.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-if.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-kill.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-layer.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-lower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-maximize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-move.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-restart.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shade.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+	-rm -f tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+	-rm -f tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_appsDATA \
+	uninstall-dist_artwizboxed_themeDATA \
+	uninstall-dist_bear2_themeDATA \
+	uninstall-dist_clearlooks34_themeDATA \
+	uninstall-dist_clearlooks_themeDATA \
+	uninstall-dist_clearlooksolive_themeDATA \
+	uninstall-dist_docDATA uninstall-dist_docxbmDATA \
+	uninstall-dist_gnomesessionDATA \
+	uninstall-dist_gnomewmfilesDATA uninstall-dist_libexecSCRIPTS \
+	uninstall-dist_mikachu_themeDATA \
+	uninstall-dist_natura_themeDATA uninstall-dist_onyx_themeDATA \
+	uninstall-dist_onyxcitrus_themeDATA \
+	uninstall-dist_onyxdarkred_themeDATA \
+	uninstall-dist_orang_themeDATA uninstall-dist_pixmapDATA \
+	uninstall-dist_rcDATA uninstall-dist_rcSCRIPTS \
+	uninstall-dist_syscrash_themeDATA uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-nodist_binSCRIPTS \
+	uninstall-nodist_libexecSCRIPTS uninstall-nodist_pkgconfigDATA \
+	uninstall-nodist_rcSCRIPTS uninstall-nodist_xsessionsDATA \
+	uninstall-obtpubincludeHEADERS uninstall-rrpubincludeHEADERS
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--depfiles am--refresh check check-am clean \
+	clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \
+	clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+	dist-xz dist-zip dist-zstd distcheck distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-local distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-binPROGRAMS install-data \
+	install-data-am install-dist_appsDATA \
+	install-dist_artwizboxed_themeDATA \
+	install-dist_bear2_themeDATA \
+	install-dist_clearlooks34_themeDATA \
+	install-dist_clearlooks_themeDATA \
+	install-dist_clearlooksolive_themeDATA install-dist_docDATA \
+	install-dist_docxbmDATA install-dist_gnomesessionDATA \
+	install-dist_gnomewmfilesDATA install-dist_libexecSCRIPTS \
+	install-dist_mikachu_themeDATA install-dist_natura_themeDATA \
+	install-dist_onyx_themeDATA install-dist_onyxcitrus_themeDATA install-dist_onyxdarkred_themeDATA \
+	install-dist_orang_themeDATA install-dist_pixmapDATA \
+	install-dist_rcDATA install-dist_rcSCRIPTS \
+	install-dist_syscrash_themeDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-man1 install-nodist_binSCRIPTS \
+	install-nodist_libexecSCRIPTS install-nodist_pkgconfigDATA \
+	install-nodist_rcSCRIPTS install-nodist_xsessionsDATA \
+	install-obtpubincludeHEADERS install-pdf install-pdf-am \
+	install-ps install-ps-am install-rrpubincludeHEADERS \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-dist_appsDATA \
+	uninstall-dist_artwizboxed_themeDATA \
+	uninstall-dist_bear2_themeDATA \
+	uninstall-dist_clearlooks34_themeDATA \
+	uninstall-dist_clearlooks_themeDATA \
+	uninstall-dist_clearlooksolive_themeDATA \
+	uninstall-dist_docDATA uninstall-dist_docxbmDATA \
+	uninstall-dist_gnomesessionDATA \
+	uninstall-dist_gnomewmfilesDATA uninstall-dist_libexecSCRIPTS \
+	uninstall-dist_mikachu_themeDATA \
+	uninstall-dist_natura_themeDATA uninstall-dist_onyx_themeDATA \
+	uninstall-dist_onyxcitrus_themeDATA \
+	uninstall-dist_onyxdarkred_themeDATA \
+	uninstall-dist_orang_themeDATA uninstall-dist_pixmapDATA \
+	uninstall-dist_rcDATA uninstall-dist_rcSCRIPTS \
+	uninstall-dist_syscrash_themeDATA uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-man1 uninstall-nodist_binSCRIPTS \
+	uninstall-nodist_libexecSCRIPTS uninstall-nodist_pkgconfigDATA \
+	uninstall-nodist_rcSCRIPTS uninstall-nodist_xsessionsDATA \
+	uninstall-obtpubincludeHEADERS uninstall-rrpubincludeHEADERS
+
+.PRECIOUS: Makefile
+
+
+data/autostart/autostart: $(top_srcdir)/data/autostart/autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+data/autostart/openbox-autostart: $(top_srcdir)/data/autostart/openbox-autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+%.desktop: %.desktop.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%-session: %-session.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%.1.in: %.1.sgml
+	@echo make: creating $@
+	@docbook-to-man $< >$@
+
+%.1: %.1.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+#doc:
+#       $(MAKE) -$(MAKEFLAGS) -C doc/doxygen doc
+
+distclean-local:
+	for d in . m4 po obrender parser obt openbox; do \
+		for p in core core.* gmon.out *\~ *.orig *.rej .\#*; do \
+			rm -f "$$d/$$p"; \
+		done \
+	done
+
+.PHONY: doc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/themes/Onyx-DarkRed/openbox-3/themerc
===================================================================
--- openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/themes/Onyx-DarkRed/openbox-3/themerc	(nonexistent)
+++ openbox/create-3.6.1-darkred-theme-patch/openbox-3.6.1-new/themes/Onyx-DarkRed/openbox-3/themerc	(revision 385)
@@ -0,0 +1,86 @@
+!! Onyx-Darkred by Dana Jansens
+!! inspired by "Carbon" by p0ng, and the ever so popular Vista glass look
+
+!! Menu background
+menu.items.bg: flat gradient vertical
+menu.items.bg.color: #303030
+menu.items.bg.colorTo: #080808
+
+!! Menu text
+menu.items.text.color: #b8b8b8
+menu.items.justify: left
+menu.items.disabled.text.color: #606060
+
+!! Menu headers
+menu.title.bg: raised splitvertical gradient
+menu.title.bg.color: #303030
+menu.title.bg.colorTo: #181818
+menu.title.text.color: white
+menu.title.text.justify: left
+
+!! Selected menu item
+menu.items.active.bg: raised splitvertical gradient
+menu.items.active.bg.color: #5a1720
+menu.items.active.bg.colorTo: #5a0510
+menu.items.active.text.color: white
+
+
+!! Titlebar
+window.active.title.bg: raised splitvertical gradient
+window.active.title.bg.color: #414141
+window.active.title.bg.colorTo: #202020
+window.inactive.title.bg: gradient splitvertical gradient flat
+window.inactive.title.bg.color: #DEE0D8
+window.inactive.title.bg.colorTo: #E0E0D8
+
+!! Titlebar text
+window.label.text.justify: center
+window.active.label.bg: parentrelative
+window.active.label.text.color: #f8f8f8
+window.inactive.label.bg: parentrelative
+window.inactive.label.text.color: #747474
+
+!! Window buttons
+window.*.button.*.bg: parentrelative
+window.active.button.*.hover.bg: flat splitvertical gradient border
+window.inactive.button.*.hover.bg: parentrelative
+window.*.button.*.pressed.bg: flat splitvertical gradient border
+
+window.active.button.*.hover.bg.color: #e18a51
+window.active.button.*.hover.bg.colorTo: #e1621d
+window.active.button.*.hover.bg.border.color: #ab5d20
+
+window.active.button.*.pressed.bg.color: #99663c
+window.active.button.*.pressed.bg.colorTo: #99663c
+window.active.button.*.pressed.image.color: #888888
+window.active.button.*.pressed.bg.border.color: #683913
+window.inactive.button.*.pressed.bg.color: #ffaa64
+window.inactive.button.*.pressed.bg.colorTo: #ffaa64
+window.inactive.button.*.pressed.image.color: #fdceb7
+window.inactive.button.*.pressed.bg.border.color: #f0832c
+
+window.active.button.*.image.color: #e0e0e0
+window.active.button.disabled.image.color: #707070
+window.inactive.button.*.image.color: #747474
+window.inactive.button.disabled.image.color: #c0c0c0
+
+!! Borders
+window.active.border.color: #181818
+window.inactive.border.color: #404040
+window.inactive.title.separator.color: #eeeee6
+border.width: 1
+padding.width: 2
+window.handle.width: 0
+window.active.client.color:  #181818
+window.inactive.client.color:  #CACAB6
+window.client.padding.width: 1
+window.client.padding.height: 1
+menu.overlap: 0
+
+!! Font shadows
+menu.items.font:shadow=y:shadowtint=30
+
+!! On-screen displays
+osd.bg: gradient vertical flat
+osd.bg.color: #303030
+osd.bg.colorTo: #080808
Index: openbox/create-3.6.1-mkdir-autostart-patch/create.patch.sh
===================================================================
--- openbox/create-3.6.1-mkdir-autostart-patch/create.patch.sh	(nonexistent)
+++ openbox/create-3.6.1-mkdir-autostart-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=3.6.1
+
+tar --files-from=file.list -xJvf ../openbox-$VERSION.tar.xz
+mv openbox-$VERSION openbox-$VERSION-orig
+
+cp -rf ./openbox-$VERSION-new ./openbox-$VERSION
+
+diff --unified -Nr  openbox-$VERSION-orig  openbox-$VERSION > openbox-$VERSION-mkdir-autostart.patch
+
+mv openbox-$VERSION-mkdir-autostart.patch ../patches
+
+rm -rf ./openbox-$VERSION
+rm -rf ./openbox-$VERSION-orig

Property changes on: openbox/create-3.6.1-mkdir-autostart-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: openbox/create-3.6.1-mkdir-autostart-patch/file.list
===================================================================
--- openbox/create-3.6.1-mkdir-autostart-patch/file.list	(nonexistent)
+++ openbox/create-3.6.1-mkdir-autostart-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+openbox-3.6.1/Makefile.am
+openbox-3.6.1/Makefile.in
Index: openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.am
===================================================================
--- openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.am	(nonexistent)
+++ openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.am	(revision 385)
@@ -0,0 +1,628 @@
+SUBDIRS = m4 po
+
+docxbmdir       = $(docdir)/xbm
+themedir        = $(datadir)/themes
+localedir       = $(datadir)/locale
+configdir       = $(sysconfdir)/xdg
+rcdir           = $(configdir)/openbox
+xsessionsdir    = $(datadir)/xsessions
+gnomesessiondir = $(datadir)/gnome-session/sessions
+gnomewmfilesdir = $(datadir)/gnome/wm-properties
+pkgconfigdir    = $(libdir)/pkgconfig
+obtpubincludedir= $(includedir)/openbox/@OBT_VERSION@/obt
+rrpubincludedir = $(includedir)/openbox/@RR_VERSION@/obrender
+pixmapdir       = $(datadir)/pixmaps
+xsddir          = $(datadir)/openbox
+appsdir         = $(datadir)/applications
+
+theme = Clearlooks
+
+AUTOMAKE_OPTIONS = subdir-objects foreign
+
+ACLOCAL_AMFLAGS = -I m4
+
+INCLUDES = -I.
+
+check_PROGRAMS = \
+	obrender/rendertest
+
+lib_LTLIBRARIES = \
+	obt/libobt.la \
+	obrender/libobrender.la
+
+bin_PROGRAMS = \
+	openbox/openbox \
+	tools/gdm-control/gdm-control \
+	tools/gnome-panel-control/gnome-panel-control \
+	tools/obxprop/obxprop
+
+noinst_PROGRAMS = \
+	obt/obt_unittests
+
+nodist_bin_SCRIPTS = \
+	data/xsession/openbox-session \
+	data/xsession/openbox-gnome-session \
+	data/xsession/openbox-kde-session
+
+dist_rc_SCRIPTS = \
+	data/environment
+
+nodist_rc_SCRIPTS = \
+	data/autostart/autostart
+
+dist_libexec_SCRIPTS = \
+	data/autostart/openbox-xdg-autostart
+
+nodist_libexec_SCRIPTS = \
+	data/autostart/openbox-autostart
+
+
+## obrender ##
+
+obrender_rendertest_CPPFLAGS = \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	-DG_LOG_DOMAIN=\"RenderTest\"
+obrender_rendertest_LDADD = \
+	obt/libobt.la \
+	obrender/libobrender.la \
+	$(GLIB_LIBS) \
+	$(PANGO_LIBS) \
+	$(XML_LIBS) \
+	$(X_LIBS)
+obrender_rendertest_SOURCES = obrender/test.c
+
+obrender_libobrender_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(IMLIB2_CFLAGS) \
+	$(LIBRSVG_CFLAGS) \
+	-DG_LOG_DOMAIN=\"ObRender\" \
+	-DDEFAULT_THEME=\"$(theme)\"
+obrender_libobrender_la_LDFLAGS = \
+	-version-info $(RR_CURRENT):$(RR_REVISION):$(RR_AGE)
+obrender_libobrender_la_LIBADD = \
+	obt/libobt.la \
+	$(X_LIBS) \
+	$(PANGO_LIBS) \
+	$(GLIB_LIBS) \
+	$(IMLIB2_LIBS) \
+	$(LIBRSVG_LIBS) \
+	$(XML_LIBS)
+obrender_libobrender_la_SOURCES = \
+	gettext.h \
+	obrender/button.c \
+	obrender/color.h \
+	obrender/color.c \
+	obrender/font.h \
+	obrender/font.c \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/gradient.c \
+	obrender/icon.h \
+	obrender/image.h \
+	obrender/image.c \
+	obrender/imagecache.h \
+	obrender/imagecache.c \
+	obrender/instance.h \
+	obrender/instance.c \
+	obrender/mask.h \
+	obrender/mask.c \
+	obrender/render.h \
+	obrender/render.c \
+	obrender/theme.h \
+	obrender/theme.c
+
+## obt ##
+
+obt_libobt_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(XINERAMA_CFLAGS) \
+	$(XKB_CFLAGS) \
+	$(XRANDR_CFLAGS) \
+	$(XSHAPE_CFLAGS) \
+	$(XSYNC_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DG_LOG_DOMAIN=\"Obt\" \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\"
+obt_libobt_la_LDFLAGS = \
+	-version-info $(OBT_CURRENT):$(OBT_REVISION):$(OBT_AGE)
+obt_libobt_la_LIBADD = \
+	$(X_LIBS) \
+	$(XINERAMA_LIBS) \
+	$(XKB_LIBS) \
+	$(XRANDR_LIBS) \
+	$(XSHAPE_LIBS) \
+	$(XSYNC_LIBS) \
+	$(GLIB_LIBS) \
+	$(XML_LIBS)
+obt_libobt_la_SOURCES = \
+	obt/bsearch.h \
+	obt/display.h \
+	obt/display.c \
+	obt/internal.h \
+	obt/keyboard.h \
+	obt/keyboard.c \
+	obt/xml.h \
+	obt/xml.c \
+	obt/ddparse.h \
+	obt/ddparse.c \
+	obt/link.h \
+	obt/link.c \
+	obt/paths.h \
+	obt/paths.c \
+	obt/prop.h \
+	obt/prop.c \
+	obt/signal.h \
+	obt/signal.c \
+	obt/util.h \
+	obt/xqueue.h \
+	obt/xqueue.c
+
+## openbox ##
+
+openbox_openbox_CPPFLAGS = \
+	$(SM_CFLAGS) \
+	$(X_CFLAGS) \
+	$(XCURSOR_CFLAGS) \
+	$(SM_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(LIBSN_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Openbox\"
+openbox_openbox_LDADD = \
+	$(XINERAMA_LIBS) \
+	$(XRANDR_LIBS) \
+	$(SM_LIBS) \
+	$(GLIB_LIBS) \
+	$(X_LIBS) \
+	$(XCURSOR_LIBS) \
+	$(LIBSN_LIBS) \
+	$(XML_LIBS) \
+	$(EFENCE_LIBS) \
+	$(LIBINTL) \
+	obrender/libobrender.la \
+	obt/libobt.la
+openbox_openbox_LDFLAGS = -export-dynamic
+openbox_openbox_SOURCES = \
+	gettext.h \
+	openbox/actions/all.c \
+	openbox/actions/all.h \
+	openbox/actions/addremovedesktop.c \
+	openbox/actions/breakchroot.c \
+	openbox/actions/close.c \
+	openbox/actions/cyclewindows.c \
+	openbox/actions/debug.c \
+	openbox/actions/decorations.c \
+	openbox/actions/desktop.c \
+	openbox/actions/dock.c \
+	openbox/actions/dockautohide.c \
+	openbox/actions/directionalwindows.c \
+	openbox/actions/execute.c \
+	openbox/actions/exit.c \
+	openbox/actions/focus.c \
+	openbox/actions/focustobottom.c \
+	openbox/actions/fullscreen.c \
+	openbox/actions/growtoedge.c \
+	openbox/actions/iconify.c \
+	openbox/actions/if.c \
+	openbox/actions/kill.c \
+	openbox/actions/layer.c \
+	openbox/actions/lower.c \
+	openbox/actions/maximize.c \
+	openbox/actions/move.c \
+	openbox/actions/moverelative.c \
+	openbox/actions/moveresizeto.c \
+	openbox/actions/movetoedge.c \
+	openbox/actions/omnipresent.c \
+	openbox/actions/raise.c \
+	openbox/actions/raiselower.c \
+	openbox/actions/reconfigure.c \
+	openbox/actions/resize.c \
+	openbox/actions/resizerelative.c \
+	openbox/actions/restart.c \
+	openbox/actions/shade.c \
+	openbox/actions/shadelowerraise.c \
+	openbox/actions/showdesktop.c \
+	openbox/actions/showmenu.c \
+	openbox/actions/unfocus.c \
+	openbox/actions.c \
+	openbox/actions.h \
+	openbox/client.c \
+	openbox/client.h \
+	openbox/client_list_menu.c \
+	openbox/client_list_menu.h \
+	openbox/client_list_combined_menu.c \
+	openbox/client_list_combined_menu.h \
+	openbox/client_menu.c \
+	openbox/client_menu.h \
+	openbox/config.c \
+	openbox/config.h \
+	openbox/debug.c \
+	openbox/debug.h \
+	openbox/dock.c \
+	openbox/dock.h \
+	openbox/event.c \
+	openbox/event.h \
+	openbox/focus.c \
+	openbox/focus.h \
+	openbox/focus_cycle.c \
+	openbox/focus_cycle.h \
+	openbox/focus_cycle_indicator.c \
+	openbox/focus_cycle_indicator.h \
+	openbox/focus_cycle_popup.c \
+	openbox/focus_cycle_popup.h \
+	openbox/frame.c \
+	openbox/frame.h \
+	openbox/framerender.c \
+	openbox/framerender.h \
+	openbox/geom.h \
+	openbox/grab.c \
+	openbox/grab.h \
+	openbox/group.c \
+	openbox/group.h \
+	openbox/keyboard.c \
+	openbox/keyboard.h \
+	openbox/keytree.c \
+	openbox/keytree.h \
+	openbox/menuframe.c \
+	openbox/menuframe.h \
+	openbox/menu.c \
+	openbox/menu.h \
+	openbox/misc.h \
+	openbox/mouse.c \
+	openbox/mouse.h \
+	openbox/moveresize.c \
+	openbox/moveresize.h \
+	openbox/mwm.h \
+	openbox/openbox.c \
+	openbox/openbox.h \
+	openbox/ping.c \
+	openbox/ping.h \
+	openbox/place.c \
+	openbox/place.h \
+	openbox/place_overlap.c \
+	openbox/place_overlap.h \
+	openbox/prompt.c \
+	openbox/prompt.h \
+	openbox/popup.c \
+	openbox/popup.h \
+	openbox/resist.c \
+	openbox/resist.h \
+	openbox/screen.c \
+	openbox/screen.h \
+	openbox/session.c \
+	openbox/session.h \
+	openbox/stacking.c \
+	openbox/stacking.h \
+	openbox/startupnotify.c \
+	openbox/startupnotify.h \
+	openbox/translate.c \
+	openbox/translate.h \
+	openbox/window.c \
+	openbox/window.h
+
+## obt_unittests ##
+
+obt_obt_unittests_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Obt-Unittests\"
+obt_obt_unittests_LDADD = \
+	$(GLIB_LIBS) \
+	obt/libobt.la
+obt_obt_unittests_LDFLAGS = -export-dynamic
+obt_obt_unittests_SOURCES = \
+	obt/unittest_base.h \
+	obt/unittest_base.c \
+	obt/bsearch_unittest.c
+
+## gnome-panel-control ##
+
+tools_gnome_panel_control_gnome_panel_control_CPPFLAGS = \
+	$(X_CFLAGS)
+tools_gnome_panel_control_gnome_panel_control_LDADD = \
+	$(X_LIBS)
+tools_gnome_panel_control_gnome_panel_control_SOURCES = \
+	tools/gnome-panel-control/gnome-panel-control.c
+
+## obxprop ##
+
+tools_obxprop_obxprop_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	$(X_CFLAGS)
+tools_obxprop_obxprop_LDADD = \
+	$(GLIB_LIBS) \
+	$(X_LIBS)
+tools_obxprop_obxprop_SOURCES = \
+	tools/obxprop/obxprop.c
+
+## gdm-control ##
+
+tools_gdm_control_gdm_control_CPPFLAGS = \
+	$(XAUTH_CFLAGS) \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS)
+tools_gdm_control_gdm_control_LDADD = \
+	$(XAUTH_LIBS) \
+	$(X_LIBS) \
+	$(GLIB_LIBS)
+tools_gdm_control_gdm_control_SOURCES = \
+	tools/gdm-control/gdm-control.c
+
+
+## default button masks ##
+dist_docxbm_DATA = \
+        data/xbm/bullet.xbm \
+        data/xbm/close.xbm \
+        data/xbm/desk_toggled.xbm \
+        data/xbm/desk.xbm \
+        data/xbm/iconify.xbm \
+        data/xbm/max_toggled.xbm \
+        data/xbm/max.xbm \
+        data/xbm/shade_toggled.xbm \
+        data/xbm/shade.xbm
+
+
+## themes ##
+
+clearlooks_themedir = $(themedir)/Clearlooks/openbox-3
+dist_clearlooks_theme_DATA= \
+	themes/Clearlooks/openbox-3/themerc
+
+clearlooks34_themedir = $(themedir)/Clearlooks-3.4/openbox-3
+dist_clearlooks34_theme_DATA= \
+	themes/Clearlooks-3.4/openbox-3/themerc
+
+clearlooksolive_themedir = $(themedir)/Clearlooks-Olive/openbox-3
+dist_clearlooksolive_theme_DATA= \
+	themes/Clearlooks-Olive/openbox-3/themerc
+
+mikachu_themedir = $(themedir)/Mikachu/openbox-3
+dist_mikachu_theme_DATA= \
+	themes/Mikachu/openbox-3/bullet.xbm \
+	themes/Mikachu/openbox-3/close.xbm \
+	themes/Mikachu/openbox-3/desk.xbm \
+	themes/Mikachu/openbox-3/iconify.xbm \
+	themes/Mikachu/openbox-3/max.xbm \
+	themes/Mikachu/openbox-3/themerc
+
+
+natura_themedir = $(themedir)/Natura/openbox-3
+dist_natura_theme_DATA= \
+	themes/Natura/openbox-3/close_hover.xbm \
+	themes/Natura/openbox-3/close.xbm \
+	themes/Natura/openbox-3/desk_toggled.xbm \
+	themes/Natura/openbox-3/desk_hover.xbm \
+	themes/Natura/openbox-3/desk.xbm \
+	themes/Natura/openbox-3/iconify_hover.xbm \
+	themes/Natura/openbox-3/iconify.xbm \
+	themes/Natura/openbox-3/max_hover.xbm \
+	themes/Natura/openbox-3/max_toggled.xbm \
+	themes/Natura/openbox-3/max.xbm \
+	themes/Natura/openbox-3/shade.xbm \
+	themes/Natura/openbox-3/shade_hover.xbm \
+	themes/Natura/openbox-3/themerc
+
+artwizboxed_themedir = $(themedir)/Artwiz-boxed/openbox-3
+dist_artwizboxed_theme_DATA= \
+	themes/Artwiz-boxed/openbox-3/themerc
+
+bear2_themedir = $(themedir)/Bear2/openbox-3
+dist_bear2_theme_DATA= \
+	themes/Bear2/openbox-3/close_pressed.xbm \
+	themes/Bear2/openbox-3/close.xbm \
+	themes/Bear2/openbox-3/desk_toggled.xbm \
+	themes/Bear2/openbox-3/desk.xbm \
+	themes/Bear2/openbox-3/iconify_pressed.xbm \
+	themes/Bear2/openbox-3/iconify.xbm \
+	themes/Bear2/openbox-3/max_pressed.xbm \
+	themes/Bear2/openbox-3/max_toggled.xbm \
+	themes/Bear2/openbox-3/max.xbm \
+	themes/Bear2/openbox-3/shade_pressed.xbm \
+	themes/Bear2/openbox-3/shade.xbm \
+	themes/Bear2/openbox-3/themerc
+
+orang_themedir = $(themedir)/Orang/openbox-3
+dist_orang_theme_DATA= \
+	themes/Orang/openbox-3/themerc
+
+onyx_themedir = $(themedir)/Onyx/openbox-3
+dist_onyx_theme_DATA= \
+	themes/Onyx/openbox-3/themerc
+
+onyxcitrus_themedir = $(themedir)/Onyx-Citrus/openbox-3
+dist_onyxcitrus_theme_DATA= \
+	themes/Onyx-Citrus/openbox-3/themerc
+
+syscrash_themedir = $(themedir)/Syscrash/openbox-3
+dist_syscrash_theme_DATA= \
+	themes/Syscrash/openbox-3/max_disabled.xbm \
+	themes/Syscrash/openbox-3/max_pressed.xbm \
+	themes/Syscrash/openbox-3/max_toggled.xbm \
+	themes/Syscrash/openbox-3/max.xbm \
+	themes/Syscrash/openbox-3/themerc
+
+## public headers ##
+
+rrpubinclude_HEADERS = \
+	obrender/color.h \
+	obrender/font.h \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/image.h \
+	obrender/instance.h \
+	obrender/mask.h \
+	obrender/render.h \
+	obrender/theme.h \
+	obrender/version.h
+
+obtpubinclude_HEADERS = \
+	obt/link.h \
+	obt/display.h \
+	obt/keyboard.h \
+	obt/xml.h \
+	obt/paths.h \
+	obt/prop.h \
+	obt/signal.h \
+	obt/util.h \
+	obt/version.h \
+	obt/xqueue.h
+
+nodist_pkgconfig_DATA = \
+	obrender/obrender-3.5.pc \
+	obt/obt-3.5.pc
+
+## data ##
+
+dist_apps_DATA = \
+	data/openbox.desktop
+
+dist_pixmap_DATA = \
+	data/openbox.png
+
+dist_rc_DATA = \
+	data/rc.xml \
+	data/menu.xml
+
+edit = $(SED) \
+	-e 's!@version\@!$(VERSION)!' \
+	-e 's!@configdir\@!$(configdir)!' \
+	-e 's!@rcdir\@!$(rcdir)!' \
+	-e 's!@libexecdir\@!$(libexecdir)!' \
+	-e 's!@bindir\@!$(bindir)!'
+
+data/autostart/autostart: $(top_srcdir)/data/autostart/autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir -p $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+data/autostart/openbox-autostart: $(top_srcdir)/data/autostart/openbox-autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir -p $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+%.desktop: %.desktop.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%-session: %-session.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%.1.in: %.1.sgml
+	@echo make: creating $@
+	@docbook-to-man $< >$@
+
+%.1: %.1.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+dist_gnomewmfiles_DATA = \
+	data/gnome-wm-properties/openbox.desktop
+
+nodist_xsessions_DATA = \
+	data/xsession/openbox.desktop \
+	data/xsession/openbox-gnome.desktop \
+	data/xsession/openbox-kde.desktop
+
+dist_gnomesession_DATA = \
+	data/gnome-session/openbox-gnome.session \
+	data/gnome-session/openbox-gnome-fallback.session
+
+dist_noinst_DATA = \
+	data/rc.xsd \
+	data/menu.xsd \
+	data/autostart/autostart.in \
+	data/autostart/openbox-autostart.in \
+	data/xsession/openbox.desktop.in \
+	data/xsession/openbox-gnome.desktop.in \
+	data/xsession/openbox-kde.desktop.in \
+	data/xsession/openbox-session.in \
+	data/xsession/openbox-gnome-session.in \
+	data/xsession/openbox-kde-session.in \
+	doc/openbox.1.sgml \
+	doc/openbox.1.in \
+	doc/openbox-session.1.sgml \
+	doc/openbox-session.1.in \
+	doc/openbox-gnome-session.1.sgml \
+	doc/openbox-gnome-session.1.in \
+	doc/openbox-kde-session.1.sgml \
+	doc/openbox-kde-session.1.in \
+	doc/obxprop.1.sgml \
+	doc/obxprop.1.in \
+	obrender/version.h.in \
+	obrender/obrender-3.5.pc.in \
+	obt/obt-3.5.pc.in \
+	obt/version.h.in \
+	tools/themeupdate/themeupdate.py \
+	tests/hideshow.py \
+	tests/Makefile \
+	tests/aspect.c \
+	tests/fullscreen.c \
+	tests/grav.c \
+	tests/grouptran.c \
+	tests/icons.c \
+	tests/modal2.c \
+	tests/modal3.c \
+	tests/modal.c \
+	tests/noresize.c \
+	tests/override.c \
+	tests/positioned.c \
+	tests/strut.c \
+	tests/title.c \
+	tests/urgent.c
+
+dist_doc_DATA = \
+	COMPLIANCE \
+	README \
+	AUTHORS \
+	CHANGELOG \
+	COPYING \
+	data/rc.xsd \
+	data/menu.xsd \
+	doc/rc-mouse-focus.xml
+
+nodist_man_MANS = \
+	doc/openbox.1 \
+	doc/openbox-session.1 \
+	doc/openbox-gnome-session.1 \
+	doc/openbox-kde-session.1 \
+	doc/obxprop.1
+
+EXTRA_DIST = \
+	config.rpath
+
+# make clean doesn't delete these for some reason, even though they are
+# built by make
+CLEANFILES = \
+	$(nodist_man_MANS) \
+	$(nodist_bin_SCRIPTS) \
+	$(nodist_xsessions_DATA) \
+	$(nodist_rc_SCRIPTS) \
+	$(nodist_libexec_SCRIPTS)
+
+#doc:
+#       $(MAKE) -$(MAKEFLAGS) -C doc/doxygen doc
+
+distclean-local:
+	for d in . m4 po obrender parser obt openbox; do \
+		for p in core core.* gmon.out *\~ *.orig *.rej .\#*; do \
+			rm -f "$$d/$$p"; \
+		done \
+	done
+
+.PHONY: doc
Index: openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.in
===================================================================
--- openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.in	(nonexistent)
+++ openbox/create-3.6.1-mkdir-autostart-patch/openbox-3.6.1-new/Makefile.in	(revision 385)
@@ -0,0 +1,4690 @@
+# Makefile.in generated by automake 1.16.5 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2021 Free Software Foundation, Inc.
+
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+
+
+
+
+VPATH = @srcdir@
+am__is_gnu_make = { \
+  if test -z '$(MAKELEVEL)'; then \
+    false; \
+  elif test -n '$(MAKE_HOST)'; then \
+    true; \
+  elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
+    true; \
+  else \
+    false; \
+  fi; \
+}
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+check_PROGRAMS = obrender/rendertest$(EXEEXT)
+bin_PROGRAMS = openbox/openbox$(EXEEXT) \
+	tools/gdm-control/gdm-control$(EXEEXT) \
+	tools/gnome-panel-control/gnome-panel-control$(EXEEXT) \
+	tools/obxprop/obxprop$(EXEEXT)
+noinst_PROGRAMS = obt/obt_unittests$(EXEEXT)
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/m4/gettext.m4 \
+	$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \
+	$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
+	$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \
+	$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \
+	$(top_srcdir)/m4/lt~obsolete.m4 $(top_srcdir)/m4/nls.m4 \
+	$(top_srcdir)/m4/openbox.m4 $(top_srcdir)/m4/po.m4 \
+	$(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/x11.m4 \
+	$(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
+	$(am__configure_deps) $(dist_libexec_SCRIPTS) \
+	$(dist_rc_SCRIPTS) $(dist_apps_DATA) \
+	$(dist_artwizboxed_theme_DATA) $(dist_bear2_theme_DATA) \
+	$(dist_clearlooks34_theme_DATA) $(dist_clearlooks_theme_DATA) \
+	$(dist_clearlooksolive_theme_DATA) $(dist_doc_DATA) \
+	$(dist_docxbm_DATA) $(dist_gnomesession_DATA) \
+	$(dist_gnomewmfiles_DATA) $(dist_mikachu_theme_DATA) \
+	$(dist_natura_theme_DATA) $(dist_noinst_DATA) \
+	$(dist_onyx_theme_DATA) $(dist_onyxcitrus_theme_DATA) \
+	$(dist_orang_theme_DATA) $(dist_pixmap_DATA) $(dist_rc_DATA) \
+	$(dist_syscrash_theme_DATA) $(obtpubinclude_HEADERS) \
+	$(rrpubinclude_HEADERS) $(am__DIST_COMMON)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = obrender/obrender-3.5.pc obt/obt-3.5.pc \
+	obrender/version.h obt/version.h version.h
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" \
+	"$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" \
+	"$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" \
+	"$(DESTDIR)$(rcdir)" "$(DESTDIR)$(man1dir)" \
+	"$(DESTDIR)$(appsdir)" "$(DESTDIR)$(artwizboxed_themedir)" \
+	"$(DESTDIR)$(bear2_themedir)" \
+	"$(DESTDIR)$(clearlooks34_themedir)" \
+	"$(DESTDIR)$(clearlooks_themedir)" \
+	"$(DESTDIR)$(clearlooksolive_themedir)" "$(DESTDIR)$(docdir)" \
+	"$(DESTDIR)$(docxbmdir)" "$(DESTDIR)$(gnomesessiondir)" \
+	"$(DESTDIR)$(gnomewmfilesdir)" "$(DESTDIR)$(mikachu_themedir)" \
+	"$(DESTDIR)$(natura_themedir)" "$(DESTDIR)$(onyx_themedir)" \
+	"$(DESTDIR)$(onyxcitrus_themedir)" \
+	"$(DESTDIR)$(orang_themedir)" "$(DESTDIR)$(pixmapdir)" \
+	"$(DESTDIR)$(rcdir)" "$(DESTDIR)$(syscrash_themedir)" \
+	"$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xsessionsdir)" \
+	"$(DESTDIR)$(obtpubincludedir)" "$(DESTDIR)$(rrpubincludedir)"
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+LTLIBRARIES = $(lib_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+obrender_libobrender_la_DEPENDENCIES = obt/libobt.la \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_obrender_libobrender_la_OBJECTS =  \
+	obrender/libobrender_la-button.lo \
+	obrender/libobrender_la-color.lo \
+	obrender/libobrender_la-font.lo \
+	obrender/libobrender_la-gradient.lo \
+	obrender/libobrender_la-image.lo \
+	obrender/libobrender_la-imagecache.lo \
+	obrender/libobrender_la-instance.lo \
+	obrender/libobrender_la-mask.lo \
+	obrender/libobrender_la-render.lo \
+	obrender/libobrender_la-theme.lo
+obrender_libobrender_la_OBJECTS =  \
+	$(am_obrender_libobrender_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 = 
+obrender_libobrender_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(obrender_libobrender_la_LDFLAGS) \
+	$(LDFLAGS) -o $@
+obt_libobt_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_obt_libobt_la_OBJECTS = obt/libobt_la-display.lo \
+	obt/libobt_la-keyboard.lo obt/libobt_la-xml.lo \
+	obt/libobt_la-ddparse.lo obt/libobt_la-link.lo \
+	obt/libobt_la-paths.lo obt/libobt_la-prop.lo \
+	obt/libobt_la-signal.lo obt/libobt_la-xqueue.lo
+obt_libobt_la_OBJECTS = $(am_obt_libobt_la_OBJECTS)
+obt_libobt_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(obt_libobt_la_LDFLAGS) $(LDFLAGS) -o $@
+am_obrender_rendertest_OBJECTS = obrender/rendertest-test.$(OBJEXT)
+obrender_rendertest_OBJECTS = $(am_obrender_rendertest_OBJECTS)
+obrender_rendertest_DEPENDENCIES = obt/libobt.la \
+	obrender/libobrender.la $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+am_obt_obt_unittests_OBJECTS =  \
+	obt/obt_unittests-unittest_base.$(OBJEXT) \
+	obt/obt_unittests-bsearch_unittest.$(OBJEXT)
+obt_obt_unittests_OBJECTS = $(am_obt_obt_unittests_OBJECTS)
+obt_obt_unittests_DEPENDENCIES = $(am__DEPENDENCIES_1) obt/libobt.la
+obt_obt_unittests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(obt_obt_unittests_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_openbox_openbox_OBJECTS = openbox/actions/openbox-all.$(OBJEXT) \
+	openbox/actions/openbox-addremovedesktop.$(OBJEXT) \
+	openbox/actions/openbox-breakchroot.$(OBJEXT) \
+	openbox/actions/openbox-close.$(OBJEXT) \
+	openbox/actions/openbox-cyclewindows.$(OBJEXT) \
+	openbox/actions/openbox-debug.$(OBJEXT) \
+	openbox/actions/openbox-decorations.$(OBJEXT) \
+	openbox/actions/openbox-desktop.$(OBJEXT) \
+	openbox/actions/openbox-dock.$(OBJEXT) \
+	openbox/actions/openbox-dockautohide.$(OBJEXT) \
+	openbox/actions/openbox-directionalwindows.$(OBJEXT) \
+	openbox/actions/openbox-execute.$(OBJEXT) \
+	openbox/actions/openbox-exit.$(OBJEXT) \
+	openbox/actions/openbox-focus.$(OBJEXT) \
+	openbox/actions/openbox-focustobottom.$(OBJEXT) \
+	openbox/actions/openbox-fullscreen.$(OBJEXT) \
+	openbox/actions/openbox-growtoedge.$(OBJEXT) \
+	openbox/actions/openbox-iconify.$(OBJEXT) \
+	openbox/actions/openbox-if.$(OBJEXT) \
+	openbox/actions/openbox-kill.$(OBJEXT) \
+	openbox/actions/openbox-layer.$(OBJEXT) \
+	openbox/actions/openbox-lower.$(OBJEXT) \
+	openbox/actions/openbox-maximize.$(OBJEXT) \
+	openbox/actions/openbox-move.$(OBJEXT) \
+	openbox/actions/openbox-moverelative.$(OBJEXT) \
+	openbox/actions/openbox-moveresizeto.$(OBJEXT) \
+	openbox/actions/openbox-movetoedge.$(OBJEXT) \
+	openbox/actions/openbox-omnipresent.$(OBJEXT) \
+	openbox/actions/openbox-raise.$(OBJEXT) \
+	openbox/actions/openbox-raiselower.$(OBJEXT) \
+	openbox/actions/openbox-reconfigure.$(OBJEXT) \
+	openbox/actions/openbox-resize.$(OBJEXT) \
+	openbox/actions/openbox-resizerelative.$(OBJEXT) \
+	openbox/actions/openbox-restart.$(OBJEXT) \
+	openbox/actions/openbox-shade.$(OBJEXT) \
+	openbox/actions/openbox-shadelowerraise.$(OBJEXT) \
+	openbox/actions/openbox-showdesktop.$(OBJEXT) \
+	openbox/actions/openbox-showmenu.$(OBJEXT) \
+	openbox/actions/openbox-unfocus.$(OBJEXT) \
+	openbox/openbox-actions.$(OBJEXT) \
+	openbox/openbox-client.$(OBJEXT) \
+	openbox/openbox-client_list_menu.$(OBJEXT) \
+	openbox/openbox-client_list_combined_menu.$(OBJEXT) \
+	openbox/openbox-client_menu.$(OBJEXT) \
+	openbox/openbox-config.$(OBJEXT) \
+	openbox/openbox-debug.$(OBJEXT) openbox/openbox-dock.$(OBJEXT) \
+	openbox/openbox-event.$(OBJEXT) \
+	openbox/openbox-focus.$(OBJEXT) \
+	openbox/openbox-focus_cycle.$(OBJEXT) \
+	openbox/openbox-focus_cycle_indicator.$(OBJEXT) \
+	openbox/openbox-focus_cycle_popup.$(OBJEXT) \
+	openbox/openbox-frame.$(OBJEXT) \
+	openbox/openbox-framerender.$(OBJEXT) \
+	openbox/openbox-grab.$(OBJEXT) openbox/openbox-group.$(OBJEXT) \
+	openbox/openbox-keyboard.$(OBJEXT) \
+	openbox/openbox-keytree.$(OBJEXT) \
+	openbox/openbox-menuframe.$(OBJEXT) \
+	openbox/openbox-menu.$(OBJEXT) openbox/openbox-mouse.$(OBJEXT) \
+	openbox/openbox-moveresize.$(OBJEXT) \
+	openbox/openbox-openbox.$(OBJEXT) \
+	openbox/openbox-ping.$(OBJEXT) openbox/openbox-place.$(OBJEXT) \
+	openbox/openbox-place_overlap.$(OBJEXT) \
+	openbox/openbox-prompt.$(OBJEXT) \
+	openbox/openbox-popup.$(OBJEXT) \
+	openbox/openbox-resist.$(OBJEXT) \
+	openbox/openbox-screen.$(OBJEXT) \
+	openbox/openbox-session.$(OBJEXT) \
+	openbox/openbox-stacking.$(OBJEXT) \
+	openbox/openbox-startupnotify.$(OBJEXT) \
+	openbox/openbox-translate.$(OBJEXT) \
+	openbox/openbox-window.$(OBJEXT)
+openbox_openbox_OBJECTS = $(am_openbox_openbox_OBJECTS)
+openbox_openbox_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) obrender/libobrender.la obt/libobt.la
+openbox_openbox_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+	$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+	$(AM_CFLAGS) $(CFLAGS) $(openbox_openbox_LDFLAGS) $(LDFLAGS) \
+	-o $@
+am_tools_gdm_control_gdm_control_OBJECTS =  \
+	tools/gdm-control/gdm_control-gdm-control.$(OBJEXT)
+tools_gdm_control_gdm_control_OBJECTS =  \
+	$(am_tools_gdm_control_gdm_control_OBJECTS)
+tools_gdm_control_gdm_control_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am_tools_gnome_panel_control_gnome_panel_control_OBJECTS = tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.$(OBJEXT)
+tools_gnome_panel_control_gnome_panel_control_OBJECTS =  \
+	$(am_tools_gnome_panel_control_gnome_panel_control_OBJECTS)
+tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES =  \
+	$(am__DEPENDENCIES_1)
+am_tools_obxprop_obxprop_OBJECTS =  \
+	tools/obxprop/obxprop-obxprop.$(OBJEXT)
+tools_obxprop_obxprop_OBJECTS = $(am_tools_obxprop_obxprop_OBJECTS)
+tools_obxprop_obxprop_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
+SCRIPTS = $(dist_libexec_SCRIPTS) $(dist_rc_SCRIPTS) \
+	$(nodist_bin_SCRIPTS) $(nodist_libexec_SCRIPTS) \
+	$(nodist_rc_SCRIPTS)
+AM_V_P = $(am__v_P_@AM_V@)
+am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_@AM_V@)
+am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_@AM_V@)
+am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__maybe_remake_depfiles = depfiles
+am__depfiles_remade = obrender/$(DEPDIR)/libobrender_la-button.Plo \
+	obrender/$(DEPDIR)/libobrender_la-color.Plo \
+	obrender/$(DEPDIR)/libobrender_la-font.Plo \
+	obrender/$(DEPDIR)/libobrender_la-gradient.Plo \
+	obrender/$(DEPDIR)/libobrender_la-image.Plo \
+	obrender/$(DEPDIR)/libobrender_la-imagecache.Plo \
+	obrender/$(DEPDIR)/libobrender_la-instance.Plo \
+	obrender/$(DEPDIR)/libobrender_la-mask.Plo \
+	obrender/$(DEPDIR)/libobrender_la-render.Plo \
+	obrender/$(DEPDIR)/libobrender_la-theme.Plo \
+	obrender/$(DEPDIR)/rendertest-test.Po \
+	obt/$(DEPDIR)/libobt_la-ddparse.Plo \
+	obt/$(DEPDIR)/libobt_la-display.Plo \
+	obt/$(DEPDIR)/libobt_la-keyboard.Plo \
+	obt/$(DEPDIR)/libobt_la-link.Plo \
+	obt/$(DEPDIR)/libobt_la-paths.Plo \
+	obt/$(DEPDIR)/libobt_la-prop.Plo \
+	obt/$(DEPDIR)/libobt_la-signal.Plo \
+	obt/$(DEPDIR)/libobt_la-xml.Plo \
+	obt/$(DEPDIR)/libobt_la-xqueue.Plo \
+	obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po \
+	obt/$(DEPDIR)/obt_unittests-unittest_base.Po \
+	openbox/$(DEPDIR)/openbox-actions.Po \
+	openbox/$(DEPDIR)/openbox-client.Po \
+	openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po \
+	openbox/$(DEPDIR)/openbox-client_list_menu.Po \
+	openbox/$(DEPDIR)/openbox-client_menu.Po \
+	openbox/$(DEPDIR)/openbox-config.Po \
+	openbox/$(DEPDIR)/openbox-debug.Po \
+	openbox/$(DEPDIR)/openbox-dock.Po \
+	openbox/$(DEPDIR)/openbox-event.Po \
+	openbox/$(DEPDIR)/openbox-focus.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po \
+	openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po \
+	openbox/$(DEPDIR)/openbox-frame.Po \
+	openbox/$(DEPDIR)/openbox-framerender.Po \
+	openbox/$(DEPDIR)/openbox-grab.Po \
+	openbox/$(DEPDIR)/openbox-group.Po \
+	openbox/$(DEPDIR)/openbox-keyboard.Po \
+	openbox/$(DEPDIR)/openbox-keytree.Po \
+	openbox/$(DEPDIR)/openbox-menu.Po \
+	openbox/$(DEPDIR)/openbox-menuframe.Po \
+	openbox/$(DEPDIR)/openbox-mouse.Po \
+	openbox/$(DEPDIR)/openbox-moveresize.Po \
+	openbox/$(DEPDIR)/openbox-openbox.Po \
+	openbox/$(DEPDIR)/openbox-ping.Po \
+	openbox/$(DEPDIR)/openbox-place.Po \
+	openbox/$(DEPDIR)/openbox-place_overlap.Po \
+	openbox/$(DEPDIR)/openbox-popup.Po \
+	openbox/$(DEPDIR)/openbox-prompt.Po \
+	openbox/$(DEPDIR)/openbox-resist.Po \
+	openbox/$(DEPDIR)/openbox-screen.Po \
+	openbox/$(DEPDIR)/openbox-session.Po \
+	openbox/$(DEPDIR)/openbox-stacking.Po \
+	openbox/$(DEPDIR)/openbox-startupnotify.Po \
+	openbox/$(DEPDIR)/openbox-translate.Po \
+	openbox/$(DEPDIR)/openbox-window.Po \
+	openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-all.Po \
+	openbox/actions/$(DEPDIR)/openbox-breakchroot.Po \
+	openbox/actions/$(DEPDIR)/openbox-close.Po \
+	openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po \
+	openbox/actions/$(DEPDIR)/openbox-debug.Po \
+	openbox/actions/$(DEPDIR)/openbox-decorations.Po \
+	openbox/actions/$(DEPDIR)/openbox-desktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po \
+	openbox/actions/$(DEPDIR)/openbox-dock.Po \
+	openbox/actions/$(DEPDIR)/openbox-dockautohide.Po \
+	openbox/actions/$(DEPDIR)/openbox-execute.Po \
+	openbox/actions/$(DEPDIR)/openbox-exit.Po \
+	openbox/actions/$(DEPDIR)/openbox-focus.Po \
+	openbox/actions/$(DEPDIR)/openbox-focustobottom.Po \
+	openbox/actions/$(DEPDIR)/openbox-fullscreen.Po \
+	openbox/actions/$(DEPDIR)/openbox-growtoedge.Po \
+	openbox/actions/$(DEPDIR)/openbox-iconify.Po \
+	openbox/actions/$(DEPDIR)/openbox-if.Po \
+	openbox/actions/$(DEPDIR)/openbox-kill.Po \
+	openbox/actions/$(DEPDIR)/openbox-layer.Po \
+	openbox/actions/$(DEPDIR)/openbox-lower.Po \
+	openbox/actions/$(DEPDIR)/openbox-maximize.Po \
+	openbox/actions/$(DEPDIR)/openbox-move.Po \
+	openbox/actions/$(DEPDIR)/openbox-moverelative.Po \
+	openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po \
+	openbox/actions/$(DEPDIR)/openbox-movetoedge.Po \
+	openbox/actions/$(DEPDIR)/openbox-omnipresent.Po \
+	openbox/actions/$(DEPDIR)/openbox-raise.Po \
+	openbox/actions/$(DEPDIR)/openbox-raiselower.Po \
+	openbox/actions/$(DEPDIR)/openbox-reconfigure.Po \
+	openbox/actions/$(DEPDIR)/openbox-resize.Po \
+	openbox/actions/$(DEPDIR)/openbox-resizerelative.Po \
+	openbox/actions/$(DEPDIR)/openbox-restart.Po \
+	openbox/actions/$(DEPDIR)/openbox-shade.Po \
+	openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po \
+	openbox/actions/$(DEPDIR)/openbox-showdesktop.Po \
+	openbox/actions/$(DEPDIR)/openbox-showmenu.Po \
+	openbox/actions/$(DEPDIR)/openbox-unfocus.Po \
+	tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po \
+	tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po \
+	tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+	$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+	$(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_@AM_V@)
+am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+	$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+	$(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_@AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(obrender_libobrender_la_SOURCES) $(obt_libobt_la_SOURCES) \
+	$(obrender_rendertest_SOURCES) $(obt_obt_unittests_SOURCES) \
+	$(openbox_openbox_SOURCES) \
+	$(tools_gdm_control_gdm_control_SOURCES) \
+	$(tools_gnome_panel_control_gnome_panel_control_SOURCES) \
+	$(tools_obxprop_obxprop_SOURCES)
+DIST_SOURCES = $(obrender_libobrender_la_SOURCES) \
+	$(obt_libobt_la_SOURCES) $(obrender_rendertest_SOURCES) \
+	$(obt_obt_unittests_SOURCES) $(openbox_openbox_SOURCES) \
+	$(tools_gdm_control_gdm_control_SOURCES) \
+	$(tools_gnome_panel_control_gnome_panel_control_SOURCES) \
+	$(tools_obxprop_obxprop_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-recursive uninstall-recursive
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(nodist_man_MANS)
+DATA = $(dist_apps_DATA) $(dist_artwizboxed_theme_DATA) \
+	$(dist_bear2_theme_DATA) $(dist_clearlooks34_theme_DATA) \
+	$(dist_clearlooks_theme_DATA) \
+	$(dist_clearlooksolive_theme_DATA) $(dist_doc_DATA) \
+	$(dist_docxbm_DATA) $(dist_gnomesession_DATA) \
+	$(dist_gnomewmfiles_DATA) $(dist_mikachu_theme_DATA) \
+	$(dist_natura_theme_DATA) $(dist_noinst_DATA) \
+	$(dist_onyx_theme_DATA) $(dist_onyxcitrus_theme_DATA) \
+	$(dist_orang_theme_DATA) $(dist_pixmap_DATA) $(dist_rc_DATA) \
+	$(dist_syscrash_theme_DATA) $(nodist_pkgconfig_DATA) \
+	$(nodist_xsessions_DATA)
+HEADERS = $(obtpubinclude_HEADERS) $(rrpubinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive	\
+  distclean-recursive maintainer-clean-recursive
+am__recursive_targets = \
+  $(RECURSIVE_TARGETS) \
+  $(RECURSIVE_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir distdir-am dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+DIST_SUBDIRS = $(SUBDIRS)
+am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/version.h.in \
+	$(top_srcdir)/obrender/obrender-3.5.pc.in \
+	$(top_srcdir)/obrender/version.h.in \
+	$(top_srcdir)/obt/obt-3.5.pc.in $(top_srcdir)/obt/version.h.in \
+	ABOUT-NLS AUTHORS COPYING README compile config.guess \
+	config.rpath config.sub depcomp install-sh ltmain.sh missing
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+  if test -d "$(distdir)"; then \
+    find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+      && rm -rf "$(distdir)" \
+      || { sleep 5 && rm -rf "$(distdir)"; }; \
+  else :; fi
+am__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
+distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CSCOPE = @CSCOPE@
+CTAGS = @CTAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIRNAME = @DIRNAME@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EFENCE_LIBS = @EFENCE_LIBS@
+EGREP = @EGREP@
+ETAGS = @ETAGS@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FILECMD = @FILECMD@
+GLIB_CFLAGS = @GLIB_CFLAGS@
+GLIB_LIBS = @GLIB_LIBS@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GREP = @GREP@
+IMLIB2_CFLAGS = @IMLIB2_CFLAGS@
+IMLIB2_LIBS = @IMLIB2_LIBS@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBRSVG_CFLAGS = @LIBRSVG_CFLAGS@
+LIBRSVG_LIBS = @LIBRSVG_LIBS@
+LIBS = @LIBS@
+LIBSN_CFLAGS = @LIBSN_CFLAGS@
+LIBSN_LIBS = @LIBSN_LIBS@
+LIBTOOL = @LIBTOOL@
+LIBTOOL_DEPS = @LIBTOOL_DEPS@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBT_AGE = @OBT_AGE@
+OBT_BINARY_AGE = @OBT_BINARY_AGE@
+OBT_CURRENT = @OBT_CURRENT@
+OBT_CURRENT_MINUS_AGE = @OBT_CURRENT_MINUS_AGE@
+OBT_INTERFACE_AGE = @OBT_INTERFACE_AGE@
+OBT_MAJOR_VERSION = @OBT_MAJOR_VERSION@
+OBT_MICRO_VERSION = @OBT_MICRO_VERSION@
+OBT_MINOR_VERSION = @OBT_MINOR_VERSION@
+OBT_RELEASE = @OBT_RELEASE@
+OBT_REVISION = @OBT_REVISION@
+OBT_VERSION = @OBT_VERSION@
+OB_VERSION = @OB_VERSION@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PANGO_CFLAGS = @PANGO_CFLAGS@
+PANGO_LIBS = @PANGO_LIBS@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_IMLIB = @PKG_CONFIG_IMLIB@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_LIBRSVG = @PKG_CONFIG_LIBRSVG@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+RR_AGE = @RR_AGE@
+RR_BINARY_AGE = @RR_BINARY_AGE@
+RR_CURRENT = @RR_CURRENT@
+RR_CURRENT_MINUS_AGE = @RR_CURRENT_MINUS_AGE@
+RR_INTERFACE_AGE = @RR_INTERFACE_AGE@
+RR_MAJOR_VERSION = @RR_MAJOR_VERSION@
+RR_MICRO_VERSION = @RR_MICRO_VERSION@
+RR_MINOR_VERSION = @RR_MINOR_VERSION@
+RR_RELEASE = @RR_RELEASE@
+RR_REVISION = @RR_REVISION@
+RR_VERSION = @RR_VERSION@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SM_CFLAGS = @SM_CFLAGS@
+SM_LIBS = @SM_LIBS@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XAUTH_CFLAGS = @XAUTH_CFLAGS@
+XAUTH_LIBS = @XAUTH_LIBS@
+XCURSOR_CFLAGS = @XCURSOR_CFLAGS@
+XCURSOR_LIBS = @XCURSOR_LIBS@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XINERAMA_LIBS = @XINERAMA_LIBS@
+XKB_CFLAGS = @XKB_CFLAGS@
+XKB_LIBS = @XKB_LIBS@
+XMKMF = @XMKMF@
+XML_CFLAGS = @XML_CFLAGS@
+XML_LIBS = @XML_LIBS@
+XRANDR_CFLAGS = @XRANDR_CFLAGS@
+XRANDR_LIBS = @XRANDR_LIBS@
+XSHAPE_CFLAGS = @XSHAPE_CFLAGS@
+XSHAPE_LIBS = @XSHAPE_LIBS@
+XSYNC_CFLAGS = @XSYNC_CFLAGS@
+XSYNC_LIBS = @XSYNC_LIBS@
+X_CFLAGS = @X_CFLAGS@
+X_EXTRA_LIBS = @X_EXTRA_LIBS@
+X_LIBS = @X_LIBS@
+X_PRE_LIBS = @X_PRE_LIBS@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+runstatedir = @runstatedir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = m4 po
+docxbmdir = $(docdir)/xbm
+themedir = $(datadir)/themes
+configdir = $(sysconfdir)/xdg
+rcdir = $(configdir)/openbox
+xsessionsdir = $(datadir)/xsessions
+gnomesessiondir = $(datadir)/gnome-session/sessions
+gnomewmfilesdir = $(datadir)/gnome/wm-properties
+pkgconfigdir = $(libdir)/pkgconfig
+obtpubincludedir = $(includedir)/openbox/@OBT_VERSION@/obt
+rrpubincludedir = $(includedir)/openbox/@RR_VERSION@/obrender
+pixmapdir = $(datadir)/pixmaps
+xsddir = $(datadir)/openbox
+appsdir = $(datadir)/applications
+theme = Clearlooks
+AUTOMAKE_OPTIONS = subdir-objects foreign
+ACLOCAL_AMFLAGS = -I m4
+INCLUDES = -I.
+lib_LTLIBRARIES = \
+	obt/libobt.la \
+	obrender/libobrender.la
+
+nodist_bin_SCRIPTS = \
+	data/xsession/openbox-session \
+	data/xsession/openbox-gnome-session \
+	data/xsession/openbox-kde-session
+
+dist_rc_SCRIPTS = \
+	data/environment
+
+nodist_rc_SCRIPTS = \
+	data/autostart/autostart
+
+dist_libexec_SCRIPTS = \
+	data/autostart/openbox-xdg-autostart
+
+nodist_libexec_SCRIPTS = \
+	data/autostart/openbox-autostart
+
+obrender_rendertest_CPPFLAGS = \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	-DG_LOG_DOMAIN=\"RenderTest\"
+
+obrender_rendertest_LDADD = \
+	obt/libobt.la \
+	obrender/libobrender.la \
+	$(GLIB_LIBS) \
+	$(PANGO_LIBS) \
+	$(XML_LIBS) \
+	$(X_LIBS)
+
+obrender_rendertest_SOURCES = obrender/test.c
+obrender_libobrender_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(IMLIB2_CFLAGS) \
+	$(LIBRSVG_CFLAGS) \
+	-DG_LOG_DOMAIN=\"ObRender\" \
+	-DDEFAULT_THEME=\"$(theme)\"
+
+obrender_libobrender_la_LDFLAGS = \
+	-version-info $(RR_CURRENT):$(RR_REVISION):$(RR_AGE)
+
+obrender_libobrender_la_LIBADD = \
+	obt/libobt.la \
+	$(X_LIBS) \
+	$(PANGO_LIBS) \
+	$(GLIB_LIBS) \
+	$(IMLIB2_LIBS) \
+	$(LIBRSVG_LIBS) \
+	$(XML_LIBS)
+
+obrender_libobrender_la_SOURCES = \
+	gettext.h \
+	obrender/button.c \
+	obrender/color.h \
+	obrender/color.c \
+	obrender/font.h \
+	obrender/font.c \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/gradient.c \
+	obrender/icon.h \
+	obrender/image.h \
+	obrender/image.c \
+	obrender/imagecache.h \
+	obrender/imagecache.c \
+	obrender/instance.h \
+	obrender/instance.c \
+	obrender/mask.h \
+	obrender/mask.c \
+	obrender/render.h \
+	obrender/render.c \
+	obrender/theme.h \
+	obrender/theme.c
+
+obt_libobt_la_CPPFLAGS = \
+	$(X_CFLAGS) \
+	$(XINERAMA_CFLAGS) \
+	$(XKB_CFLAGS) \
+	$(XRANDR_CFLAGS) \
+	$(XSHAPE_CFLAGS) \
+	$(XSYNC_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DG_LOG_DOMAIN=\"Obt\" \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\"
+
+obt_libobt_la_LDFLAGS = \
+	-version-info $(OBT_CURRENT):$(OBT_REVISION):$(OBT_AGE)
+
+obt_libobt_la_LIBADD = \
+	$(X_LIBS) \
+	$(XINERAMA_LIBS) \
+	$(XKB_LIBS) \
+	$(XRANDR_LIBS) \
+	$(XSHAPE_LIBS) \
+	$(XSYNC_LIBS) \
+	$(GLIB_LIBS) \
+	$(XML_LIBS)
+
+obt_libobt_la_SOURCES = \
+	obt/bsearch.h \
+	obt/display.h \
+	obt/display.c \
+	obt/internal.h \
+	obt/keyboard.h \
+	obt/keyboard.c \
+	obt/xml.h \
+	obt/xml.c \
+	obt/ddparse.h \
+	obt/ddparse.c \
+	obt/link.h \
+	obt/link.c \
+	obt/paths.h \
+	obt/paths.c \
+	obt/prop.h \
+	obt/prop.c \
+	obt/signal.h \
+	obt/signal.c \
+	obt/util.h \
+	obt/xqueue.h \
+	obt/xqueue.c
+
+openbox_openbox_CPPFLAGS = \
+	$(SM_CFLAGS) \
+	$(X_CFLAGS) \
+	$(XCURSOR_CFLAGS) \
+	$(SM_CFLAGS) \
+	$(PANGO_CFLAGS) \
+	$(GLIB_CFLAGS) \
+	$(LIBSN_CFLAGS) \
+	$(XML_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Openbox\"
+
+openbox_openbox_LDADD = \
+	$(XINERAMA_LIBS) \
+	$(XRANDR_LIBS) \
+	$(SM_LIBS) \
+	$(GLIB_LIBS) \
+	$(X_LIBS) \
+	$(XCURSOR_LIBS) \
+	$(LIBSN_LIBS) \
+	$(XML_LIBS) \
+	$(EFENCE_LIBS) \
+	$(LIBINTL) \
+	obrender/libobrender.la \
+	obt/libobt.la
+
+openbox_openbox_LDFLAGS = -export-dynamic
+openbox_openbox_SOURCES = \
+	gettext.h \
+	openbox/actions/all.c \
+	openbox/actions/all.h \
+	openbox/actions/addremovedesktop.c \
+	openbox/actions/breakchroot.c \
+	openbox/actions/close.c \
+	openbox/actions/cyclewindows.c \
+	openbox/actions/debug.c \
+	openbox/actions/decorations.c \
+	openbox/actions/desktop.c \
+	openbox/actions/dock.c \
+	openbox/actions/dockautohide.c \
+	openbox/actions/directionalwindows.c \
+	openbox/actions/execute.c \
+	openbox/actions/exit.c \
+	openbox/actions/focus.c \
+	openbox/actions/focustobottom.c \
+	openbox/actions/fullscreen.c \
+	openbox/actions/growtoedge.c \
+	openbox/actions/iconify.c \
+	openbox/actions/if.c \
+	openbox/actions/kill.c \
+	openbox/actions/layer.c \
+	openbox/actions/lower.c \
+	openbox/actions/maximize.c \
+	openbox/actions/move.c \
+	openbox/actions/moverelative.c \
+	openbox/actions/moveresizeto.c \
+	openbox/actions/movetoedge.c \
+	openbox/actions/omnipresent.c \
+	openbox/actions/raise.c \
+	openbox/actions/raiselower.c \
+	openbox/actions/reconfigure.c \
+	openbox/actions/resize.c \
+	openbox/actions/resizerelative.c \
+	openbox/actions/restart.c \
+	openbox/actions/shade.c \
+	openbox/actions/shadelowerraise.c \
+	openbox/actions/showdesktop.c \
+	openbox/actions/showmenu.c \
+	openbox/actions/unfocus.c \
+	openbox/actions.c \
+	openbox/actions.h \
+	openbox/client.c \
+	openbox/client.h \
+	openbox/client_list_menu.c \
+	openbox/client_list_menu.h \
+	openbox/client_list_combined_menu.c \
+	openbox/client_list_combined_menu.h \
+	openbox/client_menu.c \
+	openbox/client_menu.h \
+	openbox/config.c \
+	openbox/config.h \
+	openbox/debug.c \
+	openbox/debug.h \
+	openbox/dock.c \
+	openbox/dock.h \
+	openbox/event.c \
+	openbox/event.h \
+	openbox/focus.c \
+	openbox/focus.h \
+	openbox/focus_cycle.c \
+	openbox/focus_cycle.h \
+	openbox/focus_cycle_indicator.c \
+	openbox/focus_cycle_indicator.h \
+	openbox/focus_cycle_popup.c \
+	openbox/focus_cycle_popup.h \
+	openbox/frame.c \
+	openbox/frame.h \
+	openbox/framerender.c \
+	openbox/framerender.h \
+	openbox/geom.h \
+	openbox/grab.c \
+	openbox/grab.h \
+	openbox/group.c \
+	openbox/group.h \
+	openbox/keyboard.c \
+	openbox/keyboard.h \
+	openbox/keytree.c \
+	openbox/keytree.h \
+	openbox/menuframe.c \
+	openbox/menuframe.h \
+	openbox/menu.c \
+	openbox/menu.h \
+	openbox/misc.h \
+	openbox/mouse.c \
+	openbox/mouse.h \
+	openbox/moveresize.c \
+	openbox/moveresize.h \
+	openbox/mwm.h \
+	openbox/openbox.c \
+	openbox/openbox.h \
+	openbox/ping.c \
+	openbox/ping.h \
+	openbox/place.c \
+	openbox/place.h \
+	openbox/place_overlap.c \
+	openbox/place_overlap.h \
+	openbox/prompt.c \
+	openbox/prompt.h \
+	openbox/popup.c \
+	openbox/popup.h \
+	openbox/resist.c \
+	openbox/resist.h \
+	openbox/screen.c \
+	openbox/screen.h \
+	openbox/session.c \
+	openbox/session.h \
+	openbox/stacking.c \
+	openbox/stacking.h \
+	openbox/startupnotify.c \
+	openbox/startupnotify.h \
+	openbox/translate.c \
+	openbox/translate.h \
+	openbox/window.c \
+	openbox/window.h
+
+obt_obt_unittests_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	-DLOCALEDIR=\"$(localedir)\" \
+	-DDATADIR=\"$(datadir)\" \
+	-DCONFIGDIR=\"$(configdir)\" \
+	-DG_LOG_DOMAIN=\"Obt-Unittests\"
+
+obt_obt_unittests_LDADD = \
+	$(GLIB_LIBS) \
+	obt/libobt.la
+
+obt_obt_unittests_LDFLAGS = -export-dynamic
+obt_obt_unittests_SOURCES = \
+	obt/unittest_base.h \
+	obt/unittest_base.c \
+	obt/bsearch_unittest.c
+
+tools_gnome_panel_control_gnome_panel_control_CPPFLAGS = \
+	$(X_CFLAGS)
+
+tools_gnome_panel_control_gnome_panel_control_LDADD = \
+	$(X_LIBS)
+
+tools_gnome_panel_control_gnome_panel_control_SOURCES = \
+	tools/gnome-panel-control/gnome-panel-control.c
+
+tools_obxprop_obxprop_CPPFLAGS = \
+	$(GLIB_CFLAGS) \
+	$(X_CFLAGS)
+
+tools_obxprop_obxprop_LDADD = \
+	$(GLIB_LIBS) \
+	$(X_LIBS)
+
+tools_obxprop_obxprop_SOURCES = \
+	tools/obxprop/obxprop.c
+
+tools_gdm_control_gdm_control_CPPFLAGS = \
+	$(XAUTH_CFLAGS) \
+	$(X_CFLAGS) \
+	$(GLIB_CFLAGS)
+
+tools_gdm_control_gdm_control_LDADD = \
+	$(XAUTH_LIBS) \
+	$(X_LIBS) \
+	$(GLIB_LIBS)
+
+tools_gdm_control_gdm_control_SOURCES = \
+	tools/gdm-control/gdm-control.c
+
+dist_docxbm_DATA = \
+        data/xbm/bullet.xbm \
+        data/xbm/close.xbm \
+        data/xbm/desk_toggled.xbm \
+        data/xbm/desk.xbm \
+        data/xbm/iconify.xbm \
+        data/xbm/max_toggled.xbm \
+        data/xbm/max.xbm \
+        data/xbm/shade_toggled.xbm \
+        data/xbm/shade.xbm
+
+clearlooks_themedir = $(themedir)/Clearlooks/openbox-3
+dist_clearlooks_theme_DATA = \
+	themes/Clearlooks/openbox-3/themerc
+
+clearlooks34_themedir = $(themedir)/Clearlooks-3.4/openbox-3
+dist_clearlooks34_theme_DATA = \
+	themes/Clearlooks-3.4/openbox-3/themerc
+
+clearlooksolive_themedir = $(themedir)/Clearlooks-Olive/openbox-3
+dist_clearlooksolive_theme_DATA = \
+	themes/Clearlooks-Olive/openbox-3/themerc
+
+mikachu_themedir = $(themedir)/Mikachu/openbox-3
+dist_mikachu_theme_DATA = \
+	themes/Mikachu/openbox-3/bullet.xbm \
+	themes/Mikachu/openbox-3/close.xbm \
+	themes/Mikachu/openbox-3/desk.xbm \
+	themes/Mikachu/openbox-3/iconify.xbm \
+	themes/Mikachu/openbox-3/max.xbm \
+	themes/Mikachu/openbox-3/themerc
+
+natura_themedir = $(themedir)/Natura/openbox-3
+dist_natura_theme_DATA = \
+	themes/Natura/openbox-3/close_hover.xbm \
+	themes/Natura/openbox-3/close.xbm \
+	themes/Natura/openbox-3/desk_toggled.xbm \
+	themes/Natura/openbox-3/desk_hover.xbm \
+	themes/Natura/openbox-3/desk.xbm \
+	themes/Natura/openbox-3/iconify_hover.xbm \
+	themes/Natura/openbox-3/iconify.xbm \
+	themes/Natura/openbox-3/max_hover.xbm \
+	themes/Natura/openbox-3/max_toggled.xbm \
+	themes/Natura/openbox-3/max.xbm \
+	themes/Natura/openbox-3/shade.xbm \
+	themes/Natura/openbox-3/shade_hover.xbm \
+	themes/Natura/openbox-3/themerc
+
+artwizboxed_themedir = $(themedir)/Artwiz-boxed/openbox-3
+dist_artwizboxed_theme_DATA = \
+	themes/Artwiz-boxed/openbox-3/themerc
+
+bear2_themedir = $(themedir)/Bear2/openbox-3
+dist_bear2_theme_DATA = \
+	themes/Bear2/openbox-3/close_pressed.xbm \
+	themes/Bear2/openbox-3/close.xbm \
+	themes/Bear2/openbox-3/desk_toggled.xbm \
+	themes/Bear2/openbox-3/desk.xbm \
+	themes/Bear2/openbox-3/iconify_pressed.xbm \
+	themes/Bear2/openbox-3/iconify.xbm \
+	themes/Bear2/openbox-3/max_pressed.xbm \
+	themes/Bear2/openbox-3/max_toggled.xbm \
+	themes/Bear2/openbox-3/max.xbm \
+	themes/Bear2/openbox-3/shade_pressed.xbm \
+	themes/Bear2/openbox-3/shade.xbm \
+	themes/Bear2/openbox-3/themerc
+
+orang_themedir = $(themedir)/Orang/openbox-3
+dist_orang_theme_DATA = \
+	themes/Orang/openbox-3/themerc
+
+onyx_themedir = $(themedir)/Onyx/openbox-3
+dist_onyx_theme_DATA = \
+	themes/Onyx/openbox-3/themerc
+
+onyxcitrus_themedir = $(themedir)/Onyx-Citrus/openbox-3
+dist_onyxcitrus_theme_DATA = \
+	themes/Onyx-Citrus/openbox-3/themerc
+
+syscrash_themedir = $(themedir)/Syscrash/openbox-3
+dist_syscrash_theme_DATA = \
+	themes/Syscrash/openbox-3/max_disabled.xbm \
+	themes/Syscrash/openbox-3/max_pressed.xbm \
+	themes/Syscrash/openbox-3/max_toggled.xbm \
+	themes/Syscrash/openbox-3/max.xbm \
+	themes/Syscrash/openbox-3/themerc
+
+rrpubinclude_HEADERS = \
+	obrender/color.h \
+	obrender/font.h \
+	obrender/geom.h \
+	obrender/gradient.h \
+	obrender/image.h \
+	obrender/instance.h \
+	obrender/mask.h \
+	obrender/render.h \
+	obrender/theme.h \
+	obrender/version.h
+
+obtpubinclude_HEADERS = \
+	obt/link.h \
+	obt/display.h \
+	obt/keyboard.h \
+	obt/xml.h \
+	obt/paths.h \
+	obt/prop.h \
+	obt/signal.h \
+	obt/util.h \
+	obt/version.h \
+	obt/xqueue.h
+
+nodist_pkgconfig_DATA = \
+	obrender/obrender-3.5.pc \
+	obt/obt-3.5.pc
+
+dist_apps_DATA = \
+	data/openbox.desktop
+
+dist_pixmap_DATA = \
+	data/openbox.png
+
+dist_rc_DATA = \
+	data/rc.xml \
+	data/menu.xml
+
+edit = $(SED) \
+	-e 's!@version\@!$(VERSION)!' \
+	-e 's!@configdir\@!$(configdir)!' \
+	-e 's!@rcdir\@!$(rcdir)!' \
+	-e 's!@libexecdir\@!$(libexecdir)!' \
+	-e 's!@bindir\@!$(bindir)!'
+
+dist_gnomewmfiles_DATA = \
+	data/gnome-wm-properties/openbox.desktop
+
+nodist_xsessions_DATA = \
+	data/xsession/openbox.desktop \
+	data/xsession/openbox-gnome.desktop \
+	data/xsession/openbox-kde.desktop
+
+dist_gnomesession_DATA = \
+	data/gnome-session/openbox-gnome.session \
+	data/gnome-session/openbox-gnome-fallback.session
+
+dist_noinst_DATA = \
+	data/rc.xsd \
+	data/menu.xsd \
+	data/autostart/autostart.in \
+	data/autostart/openbox-autostart.in \
+	data/xsession/openbox.desktop.in \
+	data/xsession/openbox-gnome.desktop.in \
+	data/xsession/openbox-kde.desktop.in \
+	data/xsession/openbox-session.in \
+	data/xsession/openbox-gnome-session.in \
+	data/xsession/openbox-kde-session.in \
+	doc/openbox.1.sgml \
+	doc/openbox.1.in \
+	doc/openbox-session.1.sgml \
+	doc/openbox-session.1.in \
+	doc/openbox-gnome-session.1.sgml \
+	doc/openbox-gnome-session.1.in \
+	doc/openbox-kde-session.1.sgml \
+	doc/openbox-kde-session.1.in \
+	doc/obxprop.1.sgml \
+	doc/obxprop.1.in \
+	obrender/version.h.in \
+	obrender/obrender-3.5.pc.in \
+	obt/obt-3.5.pc.in \
+	obt/version.h.in \
+	tools/themeupdate/themeupdate.py \
+	tests/hideshow.py \
+	tests/Makefile \
+	tests/aspect.c \
+	tests/fullscreen.c \
+	tests/grav.c \
+	tests/grouptran.c \
+	tests/icons.c \
+	tests/modal2.c \
+	tests/modal3.c \
+	tests/modal.c \
+	tests/noresize.c \
+	tests/override.c \
+	tests/positioned.c \
+	tests/strut.c \
+	tests/title.c \
+	tests/urgent.c
+
+dist_doc_DATA = \
+	COMPLIANCE \
+	README \
+	AUTHORS \
+	CHANGELOG \
+	COPYING \
+	data/rc.xsd \
+	data/menu.xsd \
+	doc/rc-mouse-focus.xml
+
+nodist_man_MANS = \
+	doc/openbox.1 \
+	doc/openbox-session.1 \
+	doc/openbox-gnome-session.1 \
+	doc/openbox-kde-session.1 \
+	doc/obxprop.1
+
+EXTRA_DIST = \
+	config.rpath
+
+
+# make clean doesn't delete these for some reason, even though they are
+# built by make
+CLEANFILES = \
+	$(nodist_man_MANS) \
+	$(nodist_bin_SCRIPTS) \
+	$(nodist_xsessions_DATA) \
+	$(nodist_rc_SCRIPTS) \
+	$(nodist_libexec_SCRIPTS)
+
+all: all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+obrender/obrender-3.5.pc: $(top_builddir)/config.status $(top_srcdir)/obrender/obrender-3.5.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obt/obt-3.5.pc: $(top_builddir)/config.status $(top_srcdir)/obt/obt-3.5.pc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obrender/version.h: $(top_builddir)/config.status $(top_srcdir)/obrender/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+obt/version.h: $(top_builddir)/config.status $(top_srcdir)/obt/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+version.h: $(top_builddir)/config.status $(srcdir)/version.h.in
+	cd $(top_builddir) && $(SHELL) ./config.status $@
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do echo "$$p $$p"; done | \
+	sed 's/$(EXEEXT)$$//' | \
+	while read p p1; do if test -f $$p \
+	 || test -f $$p1 \
+	  ; then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' \
+	    -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	    echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	    $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	@list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+clean-checkPROGRAMS:
+	@list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+clean-noinstPROGRAMS:
+	@list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+	echo " rm -f" $$list; \
+	rm -f $$list || exit $$?; \
+	test -n "$(EXEEXT)" || exit 0; \
+	list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+	echo " rm -f" $$list; \
+	rm -f $$list
+
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	list2=; for p in $$list; do \
+	  if test -f $$p; then \
+	    list2="$$list2 $$p"; \
+	  else :; fi; \
+	done; \
+	test -z "$$list2" || { \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+	}
+
+uninstall-libLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+	for p in $$list; do \
+	  $(am__strip_dir) \
+	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+	done
+
+clean-libLTLIBRARIES:
+	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+	@list='$(lib_LTLIBRARIES)'; \
+	locs=`for p in $$list; do echo $$p; done | \
+	      sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+	      sort -u`; \
+	test -z "$$locs" || { \
+	  echo rm -f $${locs}; \
+	  rm -f $${locs}; \
+	}
+obrender/$(am__dirstamp):
+	@$(MKDIR_P) obrender
+	@: > obrender/$(am__dirstamp)
+obrender/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) obrender/$(DEPDIR)
+	@: > obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-button.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-color.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-font.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-gradient.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-image.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-imagecache.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-instance.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-mask.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-render.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+obrender/libobrender_la-theme.lo: obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+
+obrender/libobrender.la: $(obrender_libobrender_la_OBJECTS) $(obrender_libobrender_la_DEPENDENCIES) $(EXTRA_obrender_libobrender_la_DEPENDENCIES) obrender/$(am__dirstamp)
+	$(AM_V_CCLD)$(obrender_libobrender_la_LINK) -rpath $(libdir) $(obrender_libobrender_la_OBJECTS) $(obrender_libobrender_la_LIBADD) $(LIBS)
+obt/$(am__dirstamp):
+	@$(MKDIR_P) obt
+	@: > obt/$(am__dirstamp)
+obt/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) obt/$(DEPDIR)
+	@: > obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-display.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-keyboard.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-xml.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-ddparse.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-link.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-paths.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-prop.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-signal.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/libobt_la-xqueue.lo: obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+
+obt/libobt.la: $(obt_libobt_la_OBJECTS) $(obt_libobt_la_DEPENDENCIES) $(EXTRA_obt_libobt_la_DEPENDENCIES) obt/$(am__dirstamp)
+	$(AM_V_CCLD)$(obt_libobt_la_LINK) -rpath $(libdir) $(obt_libobt_la_OBJECTS) $(obt_libobt_la_LIBADD) $(LIBS)
+obrender/rendertest-test.$(OBJEXT): obrender/$(am__dirstamp) \
+	obrender/$(DEPDIR)/$(am__dirstamp)
+
+obrender/rendertest$(EXEEXT): $(obrender_rendertest_OBJECTS) $(obrender_rendertest_DEPENDENCIES) $(EXTRA_obrender_rendertest_DEPENDENCIES) obrender/$(am__dirstamp)
+	@rm -f obrender/rendertest$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(obrender_rendertest_OBJECTS) $(obrender_rendertest_LDADD) $(LIBS)
+obt/obt_unittests-unittest_base.$(OBJEXT): obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+obt/obt_unittests-bsearch_unittest.$(OBJEXT): obt/$(am__dirstamp) \
+	obt/$(DEPDIR)/$(am__dirstamp)
+
+obt/obt_unittests$(EXEEXT): $(obt_obt_unittests_OBJECTS) $(obt_obt_unittests_DEPENDENCIES) $(EXTRA_obt_obt_unittests_DEPENDENCIES) obt/$(am__dirstamp)
+	@rm -f obt/obt_unittests$(EXEEXT)
+	$(AM_V_CCLD)$(obt_obt_unittests_LINK) $(obt_obt_unittests_OBJECTS) $(obt_obt_unittests_LDADD) $(LIBS)
+openbox/actions/$(am__dirstamp):
+	@$(MKDIR_P) openbox/actions
+	@: > openbox/actions/$(am__dirstamp)
+openbox/actions/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) openbox/actions/$(DEPDIR)
+	@: > openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-all.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-addremovedesktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-breakchroot.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-close.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-cyclewindows.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-debug.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-decorations.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-desktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-dock.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-dockautohide.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-directionalwindows.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-execute.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-exit.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-focus.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-focustobottom.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-fullscreen.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-growtoedge.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-iconify.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-if.$(OBJEXT): openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-kill.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-layer.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-lower.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-maximize.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-move.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-moverelative.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-moveresizeto.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-movetoedge.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-omnipresent.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-raise.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-raiselower.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-reconfigure.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-resize.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-resizerelative.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-restart.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-shade.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-shadelowerraise.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-showdesktop.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-showmenu.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/actions/openbox-unfocus.$(OBJEXT):  \
+	openbox/actions/$(am__dirstamp) \
+	openbox/actions/$(DEPDIR)/$(am__dirstamp)
+openbox/$(am__dirstamp):
+	@$(MKDIR_P) openbox
+	@: > openbox/$(am__dirstamp)
+openbox/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) openbox/$(DEPDIR)
+	@: > openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-actions.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_list_menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_list_combined_menu.$(OBJEXT):  \
+	openbox/$(am__dirstamp) openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-client_menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-config.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-debug.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-dock.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-event.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle_indicator.$(OBJEXT):  \
+	openbox/$(am__dirstamp) openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-focus_cycle_popup.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-frame.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-framerender.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-grab.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-group.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-keyboard.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-keytree.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-menuframe.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-menu.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-mouse.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-moveresize.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-openbox.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-ping.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-place.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-place_overlap.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-prompt.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-popup.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-resist.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-screen.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-session.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-stacking.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-startupnotify.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-translate.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+openbox/openbox-window.$(OBJEXT): openbox/$(am__dirstamp) \
+	openbox/$(DEPDIR)/$(am__dirstamp)
+
+openbox/openbox$(EXEEXT): $(openbox_openbox_OBJECTS) $(openbox_openbox_DEPENDENCIES) $(EXTRA_openbox_openbox_DEPENDENCIES) openbox/$(am__dirstamp)
+	@rm -f openbox/openbox$(EXEEXT)
+	$(AM_V_CCLD)$(openbox_openbox_LINK) $(openbox_openbox_OBJECTS) $(openbox_openbox_LDADD) $(LIBS)
+tools/gdm-control/$(am__dirstamp):
+	@$(MKDIR_P) tools/gdm-control
+	@: > tools/gdm-control/$(am__dirstamp)
+tools/gdm-control/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/gdm-control/$(DEPDIR)
+	@: > tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+tools/gdm-control/gdm_control-gdm-control.$(OBJEXT):  \
+	tools/gdm-control/$(am__dirstamp) \
+	tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+
+tools/gdm-control/gdm-control$(EXEEXT): $(tools_gdm_control_gdm_control_OBJECTS) $(tools_gdm_control_gdm_control_DEPENDENCIES) $(EXTRA_tools_gdm_control_gdm_control_DEPENDENCIES) tools/gdm-control/$(am__dirstamp)
+	@rm -f tools/gdm-control/gdm-control$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_gdm_control_gdm_control_OBJECTS) $(tools_gdm_control_gdm_control_LDADD) $(LIBS)
+tools/gnome-panel-control/$(am__dirstamp):
+	@$(MKDIR_P) tools/gnome-panel-control
+	@: > tools/gnome-panel-control/$(am__dirstamp)
+tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/gnome-panel-control/$(DEPDIR)
+	@: > tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.$(OBJEXT):  \
+	tools/gnome-panel-control/$(am__dirstamp) \
+	tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+
+tools/gnome-panel-control/gnome-panel-control$(EXEEXT): $(tools_gnome_panel_control_gnome_panel_control_OBJECTS) $(tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES) $(EXTRA_tools_gnome_panel_control_gnome_panel_control_DEPENDENCIES) tools/gnome-panel-control/$(am__dirstamp)
+	@rm -f tools/gnome-panel-control/gnome-panel-control$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_gnome_panel_control_gnome_panel_control_OBJECTS) $(tools_gnome_panel_control_gnome_panel_control_LDADD) $(LIBS)
+tools/obxprop/$(am__dirstamp):
+	@$(MKDIR_P) tools/obxprop
+	@: > tools/obxprop/$(am__dirstamp)
+tools/obxprop/$(DEPDIR)/$(am__dirstamp):
+	@$(MKDIR_P) tools/obxprop/$(DEPDIR)
+	@: > tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+tools/obxprop/obxprop-obxprop.$(OBJEXT):  \
+	tools/obxprop/$(am__dirstamp) \
+	tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+
+tools/obxprop/obxprop$(EXEEXT): $(tools_obxprop_obxprop_OBJECTS) $(tools_obxprop_obxprop_DEPENDENCIES) $(EXTRA_tools_obxprop_obxprop_DEPENDENCIES) tools/obxprop/$(am__dirstamp)
+	@rm -f tools/obxprop/obxprop$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(tools_obxprop_obxprop_OBJECTS) $(tools_obxprop_obxprop_LDADD) $(LIBS)
+install-dist_libexecSCRIPTS: $(dist_libexec_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-dist_libexecSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+install-dist_rcSCRIPTS: $(dist_rc_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_rc_SCRIPTS)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(rcdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(rcdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-dist_rcSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_rc_SCRIPTS)'; test -n "$(rcdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+install-nodist_libexecSCRIPTS: $(nodist_libexec_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(libexecdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(libexecdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_libexecSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_libexec_SCRIPTS)'; test -n "$(libexecdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(libexecdir)'; $(am__uninstall_files_from_dir)
+install-nodist_rcSCRIPTS: $(nodist_rc_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_rc_SCRIPTS)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n' \
+	    -e 'h;s|.*|.|' \
+	    -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+	      if (++n[d] == $(am__install_max)) { \
+		print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+	    else { print "f", d "/" $$4, $$1 } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	     if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	     test -z "$$files" || { \
+	       echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(rcdir)$$dir'"; \
+	       $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(rcdir)$$dir" || exit $$?; \
+	     } \
+	; done
+
+uninstall-nodist_rcSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_rc_SCRIPTS)'; test -n "$(rcdir)" || exit 0; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	       sed -e 's,.*/,,;$(transform)'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+	-rm -f obrender/*.$(OBJEXT)
+	-rm -f obrender/*.lo
+	-rm -f obt/*.$(OBJEXT)
+	-rm -f obt/*.lo
+	-rm -f openbox/*.$(OBJEXT)
+	-rm -f openbox/actions/*.$(OBJEXT)
+	-rm -f tools/gdm-control/*.$(OBJEXT)
+	-rm -f tools/gnome-panel-control/*.$(OBJEXT)
+	-rm -f tools/obxprop/*.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-button.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-color.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-font.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-gradient.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-image.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-imagecache.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-instance.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-mask.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-render.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/libobrender_la-theme.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obrender/$(DEPDIR)/rendertest-test.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-ddparse.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-display.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-keyboard.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-link.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-paths.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-prop.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-signal.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-xml.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/libobt_la-xqueue.Plo@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@obt/$(DEPDIR)/obt_unittests-unittest_base.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-actions.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_list_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-client_menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-config.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-debug.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-dock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-event.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-frame.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-framerender.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-grab.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-group.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-keyboard.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-keytree.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-menu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-menuframe.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-mouse.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-moveresize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-openbox.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-ping.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-place.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-place_overlap.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-popup.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-prompt.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-resist.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-screen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-session.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-stacking.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-startupnotify.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-translate.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/$(DEPDIR)/openbox-window.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-all.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-breakchroot.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-close.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-debug.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-decorations.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-desktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-dock.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-dockautohide.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-execute.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-exit.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-focus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-focustobottom.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-fullscreen.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-growtoedge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-iconify.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-if.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-kill.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-layer.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-lower.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-maximize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-move.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-moverelative.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-movetoedge.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-omnipresent.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-raise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-raiselower.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-reconfigure.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-resize.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-resizerelative.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-restart.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-shade.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-showdesktop.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-showmenu.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@openbox/actions/$(DEPDIR)/openbox-unfocus.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po@am__quote@ # am--include-marker
+@AMDEP_TRUE@@am__include@ @am__quote@tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po@am__quote@ # am--include-marker
+
+$(am__depfiles_remade):
+	@$(MKDIR_P) $(@D)
+	@echo '# dummy' >$@-t && $(am__mv) $@-t $@
+
+am--depfiles: $(am__depfiles_remade)
+
+.c.o:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@	$(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@	$(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@	$(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@	$(am__mv) $$depbase.Tpo $$depbase.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
+
+obrender/libobrender_la-button.lo: obrender/button.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-button.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-button.Tpo -c -o obrender/libobrender_la-button.lo `test -f 'obrender/button.c' || echo '$(srcdir)/'`obrender/button.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-button.Tpo obrender/$(DEPDIR)/libobrender_la-button.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/button.c' object='obrender/libobrender_la-button.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-button.lo `test -f 'obrender/button.c' || echo '$(srcdir)/'`obrender/button.c
+
+obrender/libobrender_la-color.lo: obrender/color.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-color.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-color.Tpo -c -o obrender/libobrender_la-color.lo `test -f 'obrender/color.c' || echo '$(srcdir)/'`obrender/color.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-color.Tpo obrender/$(DEPDIR)/libobrender_la-color.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/color.c' object='obrender/libobrender_la-color.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-color.lo `test -f 'obrender/color.c' || echo '$(srcdir)/'`obrender/color.c
+
+obrender/libobrender_la-font.lo: obrender/font.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-font.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-font.Tpo -c -o obrender/libobrender_la-font.lo `test -f 'obrender/font.c' || echo '$(srcdir)/'`obrender/font.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-font.Tpo obrender/$(DEPDIR)/libobrender_la-font.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/font.c' object='obrender/libobrender_la-font.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-font.lo `test -f 'obrender/font.c' || echo '$(srcdir)/'`obrender/font.c
+
+obrender/libobrender_la-gradient.lo: obrender/gradient.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-gradient.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-gradient.Tpo -c -o obrender/libobrender_la-gradient.lo `test -f 'obrender/gradient.c' || echo '$(srcdir)/'`obrender/gradient.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-gradient.Tpo obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/gradient.c' object='obrender/libobrender_la-gradient.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-gradient.lo `test -f 'obrender/gradient.c' || echo '$(srcdir)/'`obrender/gradient.c
+
+obrender/libobrender_la-image.lo: obrender/image.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-image.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-image.Tpo -c -o obrender/libobrender_la-image.lo `test -f 'obrender/image.c' || echo '$(srcdir)/'`obrender/image.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-image.Tpo obrender/$(DEPDIR)/libobrender_la-image.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/image.c' object='obrender/libobrender_la-image.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-image.lo `test -f 'obrender/image.c' || echo '$(srcdir)/'`obrender/image.c
+
+obrender/libobrender_la-imagecache.lo: obrender/imagecache.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-imagecache.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-imagecache.Tpo -c -o obrender/libobrender_la-imagecache.lo `test -f 'obrender/imagecache.c' || echo '$(srcdir)/'`obrender/imagecache.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-imagecache.Tpo obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/imagecache.c' object='obrender/libobrender_la-imagecache.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-imagecache.lo `test -f 'obrender/imagecache.c' || echo '$(srcdir)/'`obrender/imagecache.c
+
+obrender/libobrender_la-instance.lo: obrender/instance.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-instance.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-instance.Tpo -c -o obrender/libobrender_la-instance.lo `test -f 'obrender/instance.c' || echo '$(srcdir)/'`obrender/instance.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-instance.Tpo obrender/$(DEPDIR)/libobrender_la-instance.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/instance.c' object='obrender/libobrender_la-instance.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-instance.lo `test -f 'obrender/instance.c' || echo '$(srcdir)/'`obrender/instance.c
+
+obrender/libobrender_la-mask.lo: obrender/mask.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-mask.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-mask.Tpo -c -o obrender/libobrender_la-mask.lo `test -f 'obrender/mask.c' || echo '$(srcdir)/'`obrender/mask.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-mask.Tpo obrender/$(DEPDIR)/libobrender_la-mask.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/mask.c' object='obrender/libobrender_la-mask.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-mask.lo `test -f 'obrender/mask.c' || echo '$(srcdir)/'`obrender/mask.c
+
+obrender/libobrender_la-render.lo: obrender/render.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-render.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-render.Tpo -c -o obrender/libobrender_la-render.lo `test -f 'obrender/render.c' || echo '$(srcdir)/'`obrender/render.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-render.Tpo obrender/$(DEPDIR)/libobrender_la-render.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/render.c' object='obrender/libobrender_la-render.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-render.lo `test -f 'obrender/render.c' || echo '$(srcdir)/'`obrender/render.c
+
+obrender/libobrender_la-theme.lo: obrender/theme.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/libobrender_la-theme.lo -MD -MP -MF obrender/$(DEPDIR)/libobrender_la-theme.Tpo -c -o obrender/libobrender_la-theme.lo `test -f 'obrender/theme.c' || echo '$(srcdir)/'`obrender/theme.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/libobrender_la-theme.Tpo obrender/$(DEPDIR)/libobrender_la-theme.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/theme.c' object='obrender/libobrender_la-theme.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_libobrender_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/libobrender_la-theme.lo `test -f 'obrender/theme.c' || echo '$(srcdir)/'`obrender/theme.c
+
+obt/libobt_la-display.lo: obt/display.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-display.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-display.Tpo -c -o obt/libobt_la-display.lo `test -f 'obt/display.c' || echo '$(srcdir)/'`obt/display.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-display.Tpo obt/$(DEPDIR)/libobt_la-display.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/display.c' object='obt/libobt_la-display.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-display.lo `test -f 'obt/display.c' || echo '$(srcdir)/'`obt/display.c
+
+obt/libobt_la-keyboard.lo: obt/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-keyboard.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-keyboard.Tpo -c -o obt/libobt_la-keyboard.lo `test -f 'obt/keyboard.c' || echo '$(srcdir)/'`obt/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-keyboard.Tpo obt/$(DEPDIR)/libobt_la-keyboard.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/keyboard.c' object='obt/libobt_la-keyboard.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-keyboard.lo `test -f 'obt/keyboard.c' || echo '$(srcdir)/'`obt/keyboard.c
+
+obt/libobt_la-xml.lo: obt/xml.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-xml.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-xml.Tpo -c -o obt/libobt_la-xml.lo `test -f 'obt/xml.c' || echo '$(srcdir)/'`obt/xml.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-xml.Tpo obt/$(DEPDIR)/libobt_la-xml.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/xml.c' object='obt/libobt_la-xml.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-xml.lo `test -f 'obt/xml.c' || echo '$(srcdir)/'`obt/xml.c
+
+obt/libobt_la-ddparse.lo: obt/ddparse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-ddparse.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-ddparse.Tpo -c -o obt/libobt_la-ddparse.lo `test -f 'obt/ddparse.c' || echo '$(srcdir)/'`obt/ddparse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-ddparse.Tpo obt/$(DEPDIR)/libobt_la-ddparse.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/ddparse.c' object='obt/libobt_la-ddparse.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-ddparse.lo `test -f 'obt/ddparse.c' || echo '$(srcdir)/'`obt/ddparse.c
+
+obt/libobt_la-link.lo: obt/link.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-link.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-link.Tpo -c -o obt/libobt_la-link.lo `test -f 'obt/link.c' || echo '$(srcdir)/'`obt/link.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-link.Tpo obt/$(DEPDIR)/libobt_la-link.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/link.c' object='obt/libobt_la-link.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-link.lo `test -f 'obt/link.c' || echo '$(srcdir)/'`obt/link.c
+
+obt/libobt_la-paths.lo: obt/paths.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-paths.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-paths.Tpo -c -o obt/libobt_la-paths.lo `test -f 'obt/paths.c' || echo '$(srcdir)/'`obt/paths.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-paths.Tpo obt/$(DEPDIR)/libobt_la-paths.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/paths.c' object='obt/libobt_la-paths.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-paths.lo `test -f 'obt/paths.c' || echo '$(srcdir)/'`obt/paths.c
+
+obt/libobt_la-prop.lo: obt/prop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-prop.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-prop.Tpo -c -o obt/libobt_la-prop.lo `test -f 'obt/prop.c' || echo '$(srcdir)/'`obt/prop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-prop.Tpo obt/$(DEPDIR)/libobt_la-prop.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/prop.c' object='obt/libobt_la-prop.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-prop.lo `test -f 'obt/prop.c' || echo '$(srcdir)/'`obt/prop.c
+
+obt/libobt_la-signal.lo: obt/signal.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-signal.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-signal.Tpo -c -o obt/libobt_la-signal.lo `test -f 'obt/signal.c' || echo '$(srcdir)/'`obt/signal.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-signal.Tpo obt/$(DEPDIR)/libobt_la-signal.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/signal.c' object='obt/libobt_la-signal.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-signal.lo `test -f 'obt/signal.c' || echo '$(srcdir)/'`obt/signal.c
+
+obt/libobt_la-xqueue.lo: obt/xqueue.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/libobt_la-xqueue.lo -MD -MP -MF obt/$(DEPDIR)/libobt_la-xqueue.Tpo -c -o obt/libobt_la-xqueue.lo `test -f 'obt/xqueue.c' || echo '$(srcdir)/'`obt/xqueue.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/libobt_la-xqueue.Tpo obt/$(DEPDIR)/libobt_la-xqueue.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/xqueue.c' object='obt/libobt_la-xqueue.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_libobt_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/libobt_la-xqueue.lo `test -f 'obt/xqueue.c' || echo '$(srcdir)/'`obt/xqueue.c
+
+obrender/rendertest-test.o: obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/rendertest-test.o -MD -MP -MF obrender/$(DEPDIR)/rendertest-test.Tpo -c -o obrender/rendertest-test.o `test -f 'obrender/test.c' || echo '$(srcdir)/'`obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/rendertest-test.Tpo obrender/$(DEPDIR)/rendertest-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/test.c' object='obrender/rendertest-test.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/rendertest-test.o `test -f 'obrender/test.c' || echo '$(srcdir)/'`obrender/test.c
+
+obrender/rendertest-test.obj: obrender/test.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obrender/rendertest-test.obj -MD -MP -MF obrender/$(DEPDIR)/rendertest-test.Tpo -c -o obrender/rendertest-test.obj `if test -f 'obrender/test.c'; then $(CYGPATH_W) 'obrender/test.c'; else $(CYGPATH_W) '$(srcdir)/obrender/test.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obrender/$(DEPDIR)/rendertest-test.Tpo obrender/$(DEPDIR)/rendertest-test.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obrender/test.c' object='obrender/rendertest-test.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obrender_rendertest_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obrender/rendertest-test.obj `if test -f 'obrender/test.c'; then $(CYGPATH_W) 'obrender/test.c'; else $(CYGPATH_W) '$(srcdir)/obrender/test.c'; fi`
+
+obt/obt_unittests-unittest_base.o: obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-unittest_base.o -MD -MP -MF obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo -c -o obt/obt_unittests-unittest_base.o `test -f 'obt/unittest_base.c' || echo '$(srcdir)/'`obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/unittest_base.c' object='obt/obt_unittests-unittest_base.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-unittest_base.o `test -f 'obt/unittest_base.c' || echo '$(srcdir)/'`obt/unittest_base.c
+
+obt/obt_unittests-unittest_base.obj: obt/unittest_base.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-unittest_base.obj -MD -MP -MF obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo -c -o obt/obt_unittests-unittest_base.obj `if test -f 'obt/unittest_base.c'; then $(CYGPATH_W) 'obt/unittest_base.c'; else $(CYGPATH_W) '$(srcdir)/obt/unittest_base.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-unittest_base.Tpo obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/unittest_base.c' object='obt/obt_unittests-unittest_base.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-unittest_base.obj `if test -f 'obt/unittest_base.c'; then $(CYGPATH_W) 'obt/unittest_base.c'; else $(CYGPATH_W) '$(srcdir)/obt/unittest_base.c'; fi`
+
+obt/obt_unittests-bsearch_unittest.o: obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-bsearch_unittest.o -MD -MP -MF obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo -c -o obt/obt_unittests-bsearch_unittest.o `test -f 'obt/bsearch_unittest.c' || echo '$(srcdir)/'`obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/bsearch_unittest.c' object='obt/obt_unittests-bsearch_unittest.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-bsearch_unittest.o `test -f 'obt/bsearch_unittest.c' || echo '$(srcdir)/'`obt/bsearch_unittest.c
+
+obt/obt_unittests-bsearch_unittest.obj: obt/bsearch_unittest.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT obt/obt_unittests-bsearch_unittest.obj -MD -MP -MF obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo -c -o obt/obt_unittests-bsearch_unittest.obj `if test -f 'obt/bsearch_unittest.c'; then $(CYGPATH_W) 'obt/bsearch_unittest.c'; else $(CYGPATH_W) '$(srcdir)/obt/bsearch_unittest.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Tpo obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='obt/bsearch_unittest.c' object='obt/obt_unittests-bsearch_unittest.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(obt_obt_unittests_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o obt/obt_unittests-bsearch_unittest.obj `if test -f 'obt/bsearch_unittest.c'; then $(CYGPATH_W) 'obt/bsearch_unittest.c'; else $(CYGPATH_W) '$(srcdir)/obt/bsearch_unittest.c'; fi`
+
+openbox/actions/openbox-all.o: openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-all.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-all.Tpo -c -o openbox/actions/openbox-all.o `test -f 'openbox/actions/all.c' || echo '$(srcdir)/'`openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-all.Tpo openbox/actions/$(DEPDIR)/openbox-all.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/all.c' object='openbox/actions/openbox-all.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-all.o `test -f 'openbox/actions/all.c' || echo '$(srcdir)/'`openbox/actions/all.c
+
+openbox/actions/openbox-all.obj: openbox/actions/all.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-all.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-all.Tpo -c -o openbox/actions/openbox-all.obj `if test -f 'openbox/actions/all.c'; then $(CYGPATH_W) 'openbox/actions/all.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/all.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-all.Tpo openbox/actions/$(DEPDIR)/openbox-all.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/all.c' object='openbox/actions/openbox-all.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-all.obj `if test -f 'openbox/actions/all.c'; then $(CYGPATH_W) 'openbox/actions/all.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/all.c'; fi`
+
+openbox/actions/openbox-addremovedesktop.o: openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-addremovedesktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo -c -o openbox/actions/openbox-addremovedesktop.o `test -f 'openbox/actions/addremovedesktop.c' || echo '$(srcdir)/'`openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/addremovedesktop.c' object='openbox/actions/openbox-addremovedesktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-addremovedesktop.o `test -f 'openbox/actions/addremovedesktop.c' || echo '$(srcdir)/'`openbox/actions/addremovedesktop.c
+
+openbox/actions/openbox-addremovedesktop.obj: openbox/actions/addremovedesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-addremovedesktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo -c -o openbox/actions/openbox-addremovedesktop.obj `if test -f 'openbox/actions/addremovedesktop.c'; then $(CYGPATH_W) 'openbox/actions/addremovedesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/addremovedesktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Tpo openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/addremovedesktop.c' object='openbox/actions/openbox-addremovedesktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-addremovedesktop.obj `if test -f 'openbox/actions/addremovedesktop.c'; then $(CYGPATH_W) 'openbox/actions/addremovedesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/addremovedesktop.c'; fi`
+
+openbox/actions/openbox-breakchroot.o: openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-breakchroot.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo -c -o openbox/actions/openbox-breakchroot.o `test -f 'openbox/actions/breakchroot.c' || echo '$(srcdir)/'`openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/breakchroot.c' object='openbox/actions/openbox-breakchroot.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-breakchroot.o `test -f 'openbox/actions/breakchroot.c' || echo '$(srcdir)/'`openbox/actions/breakchroot.c
+
+openbox/actions/openbox-breakchroot.obj: openbox/actions/breakchroot.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-breakchroot.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo -c -o openbox/actions/openbox-breakchroot.obj `if test -f 'openbox/actions/breakchroot.c'; then $(CYGPATH_W) 'openbox/actions/breakchroot.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/breakchroot.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-breakchroot.Tpo openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/breakchroot.c' object='openbox/actions/openbox-breakchroot.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-breakchroot.obj `if test -f 'openbox/actions/breakchroot.c'; then $(CYGPATH_W) 'openbox/actions/breakchroot.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/breakchroot.c'; fi`
+
+openbox/actions/openbox-close.o: openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-close.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-close.Tpo -c -o openbox/actions/openbox-close.o `test -f 'openbox/actions/close.c' || echo '$(srcdir)/'`openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-close.Tpo openbox/actions/$(DEPDIR)/openbox-close.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/close.c' object='openbox/actions/openbox-close.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-close.o `test -f 'openbox/actions/close.c' || echo '$(srcdir)/'`openbox/actions/close.c
+
+openbox/actions/openbox-close.obj: openbox/actions/close.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-close.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-close.Tpo -c -o openbox/actions/openbox-close.obj `if test -f 'openbox/actions/close.c'; then $(CYGPATH_W) 'openbox/actions/close.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/close.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-close.Tpo openbox/actions/$(DEPDIR)/openbox-close.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/close.c' object='openbox/actions/openbox-close.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-close.obj `if test -f 'openbox/actions/close.c'; then $(CYGPATH_W) 'openbox/actions/close.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/close.c'; fi`
+
+openbox/actions/openbox-cyclewindows.o: openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-cyclewindows.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo -c -o openbox/actions/openbox-cyclewindows.o `test -f 'openbox/actions/cyclewindows.c' || echo '$(srcdir)/'`openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/cyclewindows.c' object='openbox/actions/openbox-cyclewindows.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-cyclewindows.o `test -f 'openbox/actions/cyclewindows.c' || echo '$(srcdir)/'`openbox/actions/cyclewindows.c
+
+openbox/actions/openbox-cyclewindows.obj: openbox/actions/cyclewindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-cyclewindows.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo -c -o openbox/actions/openbox-cyclewindows.obj `if test -f 'openbox/actions/cyclewindows.c'; then $(CYGPATH_W) 'openbox/actions/cyclewindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/cyclewindows.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-cyclewindows.Tpo openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/cyclewindows.c' object='openbox/actions/openbox-cyclewindows.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-cyclewindows.obj `if test -f 'openbox/actions/cyclewindows.c'; then $(CYGPATH_W) 'openbox/actions/cyclewindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/cyclewindows.c'; fi`
+
+openbox/actions/openbox-debug.o: openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-debug.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/actions/openbox-debug.o `test -f 'openbox/actions/debug.c' || echo '$(srcdir)/'`openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-debug.Tpo openbox/actions/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/debug.c' object='openbox/actions/openbox-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-debug.o `test -f 'openbox/actions/debug.c' || echo '$(srcdir)/'`openbox/actions/debug.c
+
+openbox/actions/openbox-debug.obj: openbox/actions/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-debug.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/actions/openbox-debug.obj `if test -f 'openbox/actions/debug.c'; then $(CYGPATH_W) 'openbox/actions/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-debug.Tpo openbox/actions/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/debug.c' object='openbox/actions/openbox-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-debug.obj `if test -f 'openbox/actions/debug.c'; then $(CYGPATH_W) 'openbox/actions/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/debug.c'; fi`
+
+openbox/actions/openbox-decorations.o: openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-decorations.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-decorations.Tpo -c -o openbox/actions/openbox-decorations.o `test -f 'openbox/actions/decorations.c' || echo '$(srcdir)/'`openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-decorations.Tpo openbox/actions/$(DEPDIR)/openbox-decorations.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/decorations.c' object='openbox/actions/openbox-decorations.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-decorations.o `test -f 'openbox/actions/decorations.c' || echo '$(srcdir)/'`openbox/actions/decorations.c
+
+openbox/actions/openbox-decorations.obj: openbox/actions/decorations.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-decorations.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-decorations.Tpo -c -o openbox/actions/openbox-decorations.obj `if test -f 'openbox/actions/decorations.c'; then $(CYGPATH_W) 'openbox/actions/decorations.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/decorations.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-decorations.Tpo openbox/actions/$(DEPDIR)/openbox-decorations.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/decorations.c' object='openbox/actions/openbox-decorations.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-decorations.obj `if test -f 'openbox/actions/decorations.c'; then $(CYGPATH_W) 'openbox/actions/decorations.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/decorations.c'; fi`
+
+openbox/actions/openbox-desktop.o: openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-desktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-desktop.Tpo -c -o openbox/actions/openbox-desktop.o `test -f 'openbox/actions/desktop.c' || echo '$(srcdir)/'`openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-desktop.Tpo openbox/actions/$(DEPDIR)/openbox-desktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/desktop.c' object='openbox/actions/openbox-desktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-desktop.o `test -f 'openbox/actions/desktop.c' || echo '$(srcdir)/'`openbox/actions/desktop.c
+
+openbox/actions/openbox-desktop.obj: openbox/actions/desktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-desktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-desktop.Tpo -c -o openbox/actions/openbox-desktop.obj `if test -f 'openbox/actions/desktop.c'; then $(CYGPATH_W) 'openbox/actions/desktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/desktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-desktop.Tpo openbox/actions/$(DEPDIR)/openbox-desktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/desktop.c' object='openbox/actions/openbox-desktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-desktop.obj `if test -f 'openbox/actions/desktop.c'; then $(CYGPATH_W) 'openbox/actions/desktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/desktop.c'; fi`
+
+openbox/actions/openbox-dock.o: openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dock.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/actions/openbox-dock.o `test -f 'openbox/actions/dock.c' || echo '$(srcdir)/'`openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dock.Tpo openbox/actions/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dock.c' object='openbox/actions/openbox-dock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dock.o `test -f 'openbox/actions/dock.c' || echo '$(srcdir)/'`openbox/actions/dock.c
+
+openbox/actions/openbox-dock.obj: openbox/actions/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dock.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/actions/openbox-dock.obj `if test -f 'openbox/actions/dock.c'; then $(CYGPATH_W) 'openbox/actions/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dock.Tpo openbox/actions/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dock.c' object='openbox/actions/openbox-dock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dock.obj `if test -f 'openbox/actions/dock.c'; then $(CYGPATH_W) 'openbox/actions/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dock.c'; fi`
+
+openbox/actions/openbox-dockautohide.o: openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dockautohide.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo -c -o openbox/actions/openbox-dockautohide.o `test -f 'openbox/actions/dockautohide.c' || echo '$(srcdir)/'`openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dockautohide.c' object='openbox/actions/openbox-dockautohide.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dockautohide.o `test -f 'openbox/actions/dockautohide.c' || echo '$(srcdir)/'`openbox/actions/dockautohide.c
+
+openbox/actions/openbox-dockautohide.obj: openbox/actions/dockautohide.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-dockautohide.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo -c -o openbox/actions/openbox-dockautohide.obj `if test -f 'openbox/actions/dockautohide.c'; then $(CYGPATH_W) 'openbox/actions/dockautohide.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dockautohide.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-dockautohide.Tpo openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/dockautohide.c' object='openbox/actions/openbox-dockautohide.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-dockautohide.obj `if test -f 'openbox/actions/dockautohide.c'; then $(CYGPATH_W) 'openbox/actions/dockautohide.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/dockautohide.c'; fi`
+
+openbox/actions/openbox-directionalwindows.o: openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-directionalwindows.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo -c -o openbox/actions/openbox-directionalwindows.o `test -f 'openbox/actions/directionalwindows.c' || echo '$(srcdir)/'`openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/directionalwindows.c' object='openbox/actions/openbox-directionalwindows.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-directionalwindows.o `test -f 'openbox/actions/directionalwindows.c' || echo '$(srcdir)/'`openbox/actions/directionalwindows.c
+
+openbox/actions/openbox-directionalwindows.obj: openbox/actions/directionalwindows.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-directionalwindows.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo -c -o openbox/actions/openbox-directionalwindows.obj `if test -f 'openbox/actions/directionalwindows.c'; then $(CYGPATH_W) 'openbox/actions/directionalwindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/directionalwindows.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-directionalwindows.Tpo openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/directionalwindows.c' object='openbox/actions/openbox-directionalwindows.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-directionalwindows.obj `if test -f 'openbox/actions/directionalwindows.c'; then $(CYGPATH_W) 'openbox/actions/directionalwindows.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/directionalwindows.c'; fi`
+
+openbox/actions/openbox-execute.o: openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-execute.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-execute.Tpo -c -o openbox/actions/openbox-execute.o `test -f 'openbox/actions/execute.c' || echo '$(srcdir)/'`openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-execute.Tpo openbox/actions/$(DEPDIR)/openbox-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/execute.c' object='openbox/actions/openbox-execute.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-execute.o `test -f 'openbox/actions/execute.c' || echo '$(srcdir)/'`openbox/actions/execute.c
+
+openbox/actions/openbox-execute.obj: openbox/actions/execute.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-execute.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-execute.Tpo -c -o openbox/actions/openbox-execute.obj `if test -f 'openbox/actions/execute.c'; then $(CYGPATH_W) 'openbox/actions/execute.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/execute.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-execute.Tpo openbox/actions/$(DEPDIR)/openbox-execute.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/execute.c' object='openbox/actions/openbox-execute.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-execute.obj `if test -f 'openbox/actions/execute.c'; then $(CYGPATH_W) 'openbox/actions/execute.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/execute.c'; fi`
+
+openbox/actions/openbox-exit.o: openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-exit.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-exit.Tpo -c -o openbox/actions/openbox-exit.o `test -f 'openbox/actions/exit.c' || echo '$(srcdir)/'`openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-exit.Tpo openbox/actions/$(DEPDIR)/openbox-exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/exit.c' object='openbox/actions/openbox-exit.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-exit.o `test -f 'openbox/actions/exit.c' || echo '$(srcdir)/'`openbox/actions/exit.c
+
+openbox/actions/openbox-exit.obj: openbox/actions/exit.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-exit.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-exit.Tpo -c -o openbox/actions/openbox-exit.obj `if test -f 'openbox/actions/exit.c'; then $(CYGPATH_W) 'openbox/actions/exit.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/exit.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-exit.Tpo openbox/actions/$(DEPDIR)/openbox-exit.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/exit.c' object='openbox/actions/openbox-exit.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-exit.obj `if test -f 'openbox/actions/exit.c'; then $(CYGPATH_W) 'openbox/actions/exit.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/exit.c'; fi`
+
+openbox/actions/openbox-focus.o: openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focus.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/actions/openbox-focus.o `test -f 'openbox/actions/focus.c' || echo '$(srcdir)/'`openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focus.Tpo openbox/actions/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focus.c' object='openbox/actions/openbox-focus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focus.o `test -f 'openbox/actions/focus.c' || echo '$(srcdir)/'`openbox/actions/focus.c
+
+openbox/actions/openbox-focus.obj: openbox/actions/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focus.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/actions/openbox-focus.obj `if test -f 'openbox/actions/focus.c'; then $(CYGPATH_W) 'openbox/actions/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focus.Tpo openbox/actions/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focus.c' object='openbox/actions/openbox-focus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focus.obj `if test -f 'openbox/actions/focus.c'; then $(CYGPATH_W) 'openbox/actions/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focus.c'; fi`
+
+openbox/actions/openbox-focustobottom.o: openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focustobottom.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo -c -o openbox/actions/openbox-focustobottom.o `test -f 'openbox/actions/focustobottom.c' || echo '$(srcdir)/'`openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focustobottom.c' object='openbox/actions/openbox-focustobottom.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focustobottom.o `test -f 'openbox/actions/focustobottom.c' || echo '$(srcdir)/'`openbox/actions/focustobottom.c
+
+openbox/actions/openbox-focustobottom.obj: openbox/actions/focustobottom.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-focustobottom.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo -c -o openbox/actions/openbox-focustobottom.obj `if test -f 'openbox/actions/focustobottom.c'; then $(CYGPATH_W) 'openbox/actions/focustobottom.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focustobottom.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-focustobottom.Tpo openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/focustobottom.c' object='openbox/actions/openbox-focustobottom.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-focustobottom.obj `if test -f 'openbox/actions/focustobottom.c'; then $(CYGPATH_W) 'openbox/actions/focustobottom.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/focustobottom.c'; fi`
+
+openbox/actions/openbox-fullscreen.o: openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-fullscreen.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo -c -o openbox/actions/openbox-fullscreen.o `test -f 'openbox/actions/fullscreen.c' || echo '$(srcdir)/'`openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/fullscreen.c' object='openbox/actions/openbox-fullscreen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-fullscreen.o `test -f 'openbox/actions/fullscreen.c' || echo '$(srcdir)/'`openbox/actions/fullscreen.c
+
+openbox/actions/openbox-fullscreen.obj: openbox/actions/fullscreen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-fullscreen.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo -c -o openbox/actions/openbox-fullscreen.obj `if test -f 'openbox/actions/fullscreen.c'; then $(CYGPATH_W) 'openbox/actions/fullscreen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/fullscreen.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-fullscreen.Tpo openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/fullscreen.c' object='openbox/actions/openbox-fullscreen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-fullscreen.obj `if test -f 'openbox/actions/fullscreen.c'; then $(CYGPATH_W) 'openbox/actions/fullscreen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/fullscreen.c'; fi`
+
+openbox/actions/openbox-growtoedge.o: openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-growtoedge.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo -c -o openbox/actions/openbox-growtoedge.o `test -f 'openbox/actions/growtoedge.c' || echo '$(srcdir)/'`openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/growtoedge.c' object='openbox/actions/openbox-growtoedge.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-growtoedge.o `test -f 'openbox/actions/growtoedge.c' || echo '$(srcdir)/'`openbox/actions/growtoedge.c
+
+openbox/actions/openbox-growtoedge.obj: openbox/actions/growtoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-growtoedge.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo -c -o openbox/actions/openbox-growtoedge.obj `if test -f 'openbox/actions/growtoedge.c'; then $(CYGPATH_W) 'openbox/actions/growtoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/growtoedge.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-growtoedge.Tpo openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/growtoedge.c' object='openbox/actions/openbox-growtoedge.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-growtoedge.obj `if test -f 'openbox/actions/growtoedge.c'; then $(CYGPATH_W) 'openbox/actions/growtoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/growtoedge.c'; fi`
+
+openbox/actions/openbox-iconify.o: openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-iconify.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-iconify.Tpo -c -o openbox/actions/openbox-iconify.o `test -f 'openbox/actions/iconify.c' || echo '$(srcdir)/'`openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-iconify.Tpo openbox/actions/$(DEPDIR)/openbox-iconify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/iconify.c' object='openbox/actions/openbox-iconify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-iconify.o `test -f 'openbox/actions/iconify.c' || echo '$(srcdir)/'`openbox/actions/iconify.c
+
+openbox/actions/openbox-iconify.obj: openbox/actions/iconify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-iconify.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-iconify.Tpo -c -o openbox/actions/openbox-iconify.obj `if test -f 'openbox/actions/iconify.c'; then $(CYGPATH_W) 'openbox/actions/iconify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/iconify.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-iconify.Tpo openbox/actions/$(DEPDIR)/openbox-iconify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/iconify.c' object='openbox/actions/openbox-iconify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-iconify.obj `if test -f 'openbox/actions/iconify.c'; then $(CYGPATH_W) 'openbox/actions/iconify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/iconify.c'; fi`
+
+openbox/actions/openbox-if.o: openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-if.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-if.Tpo -c -o openbox/actions/openbox-if.o `test -f 'openbox/actions/if.c' || echo '$(srcdir)/'`openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-if.Tpo openbox/actions/$(DEPDIR)/openbox-if.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/if.c' object='openbox/actions/openbox-if.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-if.o `test -f 'openbox/actions/if.c' || echo '$(srcdir)/'`openbox/actions/if.c
+
+openbox/actions/openbox-if.obj: openbox/actions/if.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-if.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-if.Tpo -c -o openbox/actions/openbox-if.obj `if test -f 'openbox/actions/if.c'; then $(CYGPATH_W) 'openbox/actions/if.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/if.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-if.Tpo openbox/actions/$(DEPDIR)/openbox-if.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/if.c' object='openbox/actions/openbox-if.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-if.obj `if test -f 'openbox/actions/if.c'; then $(CYGPATH_W) 'openbox/actions/if.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/if.c'; fi`
+
+openbox/actions/openbox-kill.o: openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-kill.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-kill.Tpo -c -o openbox/actions/openbox-kill.o `test -f 'openbox/actions/kill.c' || echo '$(srcdir)/'`openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-kill.Tpo openbox/actions/$(DEPDIR)/openbox-kill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/kill.c' object='openbox/actions/openbox-kill.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-kill.o `test -f 'openbox/actions/kill.c' || echo '$(srcdir)/'`openbox/actions/kill.c
+
+openbox/actions/openbox-kill.obj: openbox/actions/kill.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-kill.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-kill.Tpo -c -o openbox/actions/openbox-kill.obj `if test -f 'openbox/actions/kill.c'; then $(CYGPATH_W) 'openbox/actions/kill.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/kill.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-kill.Tpo openbox/actions/$(DEPDIR)/openbox-kill.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/kill.c' object='openbox/actions/openbox-kill.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-kill.obj `if test -f 'openbox/actions/kill.c'; then $(CYGPATH_W) 'openbox/actions/kill.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/kill.c'; fi`
+
+openbox/actions/openbox-layer.o: openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-layer.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-layer.Tpo -c -o openbox/actions/openbox-layer.o `test -f 'openbox/actions/layer.c' || echo '$(srcdir)/'`openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-layer.Tpo openbox/actions/$(DEPDIR)/openbox-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/layer.c' object='openbox/actions/openbox-layer.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-layer.o `test -f 'openbox/actions/layer.c' || echo '$(srcdir)/'`openbox/actions/layer.c
+
+openbox/actions/openbox-layer.obj: openbox/actions/layer.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-layer.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-layer.Tpo -c -o openbox/actions/openbox-layer.obj `if test -f 'openbox/actions/layer.c'; then $(CYGPATH_W) 'openbox/actions/layer.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/layer.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-layer.Tpo openbox/actions/$(DEPDIR)/openbox-layer.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/layer.c' object='openbox/actions/openbox-layer.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-layer.obj `if test -f 'openbox/actions/layer.c'; then $(CYGPATH_W) 'openbox/actions/layer.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/layer.c'; fi`
+
+openbox/actions/openbox-lower.o: openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-lower.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-lower.Tpo -c -o openbox/actions/openbox-lower.o `test -f 'openbox/actions/lower.c' || echo '$(srcdir)/'`openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-lower.Tpo openbox/actions/$(DEPDIR)/openbox-lower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/lower.c' object='openbox/actions/openbox-lower.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-lower.o `test -f 'openbox/actions/lower.c' || echo '$(srcdir)/'`openbox/actions/lower.c
+
+openbox/actions/openbox-lower.obj: openbox/actions/lower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-lower.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-lower.Tpo -c -o openbox/actions/openbox-lower.obj `if test -f 'openbox/actions/lower.c'; then $(CYGPATH_W) 'openbox/actions/lower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/lower.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-lower.Tpo openbox/actions/$(DEPDIR)/openbox-lower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/lower.c' object='openbox/actions/openbox-lower.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-lower.obj `if test -f 'openbox/actions/lower.c'; then $(CYGPATH_W) 'openbox/actions/lower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/lower.c'; fi`
+
+openbox/actions/openbox-maximize.o: openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-maximize.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-maximize.Tpo -c -o openbox/actions/openbox-maximize.o `test -f 'openbox/actions/maximize.c' || echo '$(srcdir)/'`openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-maximize.Tpo openbox/actions/$(DEPDIR)/openbox-maximize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/maximize.c' object='openbox/actions/openbox-maximize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-maximize.o `test -f 'openbox/actions/maximize.c' || echo '$(srcdir)/'`openbox/actions/maximize.c
+
+openbox/actions/openbox-maximize.obj: openbox/actions/maximize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-maximize.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-maximize.Tpo -c -o openbox/actions/openbox-maximize.obj `if test -f 'openbox/actions/maximize.c'; then $(CYGPATH_W) 'openbox/actions/maximize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/maximize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-maximize.Tpo openbox/actions/$(DEPDIR)/openbox-maximize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/maximize.c' object='openbox/actions/openbox-maximize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-maximize.obj `if test -f 'openbox/actions/maximize.c'; then $(CYGPATH_W) 'openbox/actions/maximize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/maximize.c'; fi`
+
+openbox/actions/openbox-move.o: openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-move.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-move.Tpo -c -o openbox/actions/openbox-move.o `test -f 'openbox/actions/move.c' || echo '$(srcdir)/'`openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-move.Tpo openbox/actions/$(DEPDIR)/openbox-move.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/move.c' object='openbox/actions/openbox-move.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-move.o `test -f 'openbox/actions/move.c' || echo '$(srcdir)/'`openbox/actions/move.c
+
+openbox/actions/openbox-move.obj: openbox/actions/move.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-move.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-move.Tpo -c -o openbox/actions/openbox-move.obj `if test -f 'openbox/actions/move.c'; then $(CYGPATH_W) 'openbox/actions/move.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/move.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-move.Tpo openbox/actions/$(DEPDIR)/openbox-move.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/move.c' object='openbox/actions/openbox-move.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-move.obj `if test -f 'openbox/actions/move.c'; then $(CYGPATH_W) 'openbox/actions/move.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/move.c'; fi`
+
+openbox/actions/openbox-moverelative.o: openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moverelative.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo -c -o openbox/actions/openbox-moverelative.o `test -f 'openbox/actions/moverelative.c' || echo '$(srcdir)/'`openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moverelative.c' object='openbox/actions/openbox-moverelative.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moverelative.o `test -f 'openbox/actions/moverelative.c' || echo '$(srcdir)/'`openbox/actions/moverelative.c
+
+openbox/actions/openbox-moverelative.obj: openbox/actions/moverelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moverelative.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo -c -o openbox/actions/openbox-moverelative.obj `if test -f 'openbox/actions/moverelative.c'; then $(CYGPATH_W) 'openbox/actions/moverelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moverelative.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moverelative.Tpo openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moverelative.c' object='openbox/actions/openbox-moverelative.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moverelative.obj `if test -f 'openbox/actions/moverelative.c'; then $(CYGPATH_W) 'openbox/actions/moverelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moverelative.c'; fi`
+
+openbox/actions/openbox-moveresizeto.o: openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moveresizeto.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo -c -o openbox/actions/openbox-moveresizeto.o `test -f 'openbox/actions/moveresizeto.c' || echo '$(srcdir)/'`openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moveresizeto.c' object='openbox/actions/openbox-moveresizeto.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moveresizeto.o `test -f 'openbox/actions/moveresizeto.c' || echo '$(srcdir)/'`openbox/actions/moveresizeto.c
+
+openbox/actions/openbox-moveresizeto.obj: openbox/actions/moveresizeto.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-moveresizeto.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo -c -o openbox/actions/openbox-moveresizeto.obj `if test -f 'openbox/actions/moveresizeto.c'; then $(CYGPATH_W) 'openbox/actions/moveresizeto.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moveresizeto.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-moveresizeto.Tpo openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/moveresizeto.c' object='openbox/actions/openbox-moveresizeto.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-moveresizeto.obj `if test -f 'openbox/actions/moveresizeto.c'; then $(CYGPATH_W) 'openbox/actions/moveresizeto.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/moveresizeto.c'; fi`
+
+openbox/actions/openbox-movetoedge.o: openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-movetoedge.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo -c -o openbox/actions/openbox-movetoedge.o `test -f 'openbox/actions/movetoedge.c' || echo '$(srcdir)/'`openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/movetoedge.c' object='openbox/actions/openbox-movetoedge.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-movetoedge.o `test -f 'openbox/actions/movetoedge.c' || echo '$(srcdir)/'`openbox/actions/movetoedge.c
+
+openbox/actions/openbox-movetoedge.obj: openbox/actions/movetoedge.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-movetoedge.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo -c -o openbox/actions/openbox-movetoedge.obj `if test -f 'openbox/actions/movetoedge.c'; then $(CYGPATH_W) 'openbox/actions/movetoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/movetoedge.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-movetoedge.Tpo openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/movetoedge.c' object='openbox/actions/openbox-movetoedge.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-movetoedge.obj `if test -f 'openbox/actions/movetoedge.c'; then $(CYGPATH_W) 'openbox/actions/movetoedge.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/movetoedge.c'; fi`
+
+openbox/actions/openbox-omnipresent.o: openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-omnipresent.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo -c -o openbox/actions/openbox-omnipresent.o `test -f 'openbox/actions/omnipresent.c' || echo '$(srcdir)/'`openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/omnipresent.c' object='openbox/actions/openbox-omnipresent.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-omnipresent.o `test -f 'openbox/actions/omnipresent.c' || echo '$(srcdir)/'`openbox/actions/omnipresent.c
+
+openbox/actions/openbox-omnipresent.obj: openbox/actions/omnipresent.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-omnipresent.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo -c -o openbox/actions/openbox-omnipresent.obj `if test -f 'openbox/actions/omnipresent.c'; then $(CYGPATH_W) 'openbox/actions/omnipresent.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/omnipresent.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-omnipresent.Tpo openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/omnipresent.c' object='openbox/actions/openbox-omnipresent.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-omnipresent.obj `if test -f 'openbox/actions/omnipresent.c'; then $(CYGPATH_W) 'openbox/actions/omnipresent.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/omnipresent.c'; fi`
+
+openbox/actions/openbox-raise.o: openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raise.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raise.Tpo -c -o openbox/actions/openbox-raise.o `test -f 'openbox/actions/raise.c' || echo '$(srcdir)/'`openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raise.Tpo openbox/actions/$(DEPDIR)/openbox-raise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raise.c' object='openbox/actions/openbox-raise.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raise.o `test -f 'openbox/actions/raise.c' || echo '$(srcdir)/'`openbox/actions/raise.c
+
+openbox/actions/openbox-raise.obj: openbox/actions/raise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raise.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raise.Tpo -c -o openbox/actions/openbox-raise.obj `if test -f 'openbox/actions/raise.c'; then $(CYGPATH_W) 'openbox/actions/raise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raise.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raise.Tpo openbox/actions/$(DEPDIR)/openbox-raise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raise.c' object='openbox/actions/openbox-raise.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raise.obj `if test -f 'openbox/actions/raise.c'; then $(CYGPATH_W) 'openbox/actions/raise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raise.c'; fi`
+
+openbox/actions/openbox-raiselower.o: openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raiselower.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo -c -o openbox/actions/openbox-raiselower.o `test -f 'openbox/actions/raiselower.c' || echo '$(srcdir)/'`openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raiselower.c' object='openbox/actions/openbox-raiselower.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raiselower.o `test -f 'openbox/actions/raiselower.c' || echo '$(srcdir)/'`openbox/actions/raiselower.c
+
+openbox/actions/openbox-raiselower.obj: openbox/actions/raiselower.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-raiselower.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo -c -o openbox/actions/openbox-raiselower.obj `if test -f 'openbox/actions/raiselower.c'; then $(CYGPATH_W) 'openbox/actions/raiselower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raiselower.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-raiselower.Tpo openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/raiselower.c' object='openbox/actions/openbox-raiselower.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-raiselower.obj `if test -f 'openbox/actions/raiselower.c'; then $(CYGPATH_W) 'openbox/actions/raiselower.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/raiselower.c'; fi`
+
+openbox/actions/openbox-reconfigure.o: openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-reconfigure.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo -c -o openbox/actions/openbox-reconfigure.o `test -f 'openbox/actions/reconfigure.c' || echo '$(srcdir)/'`openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/reconfigure.c' object='openbox/actions/openbox-reconfigure.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-reconfigure.o `test -f 'openbox/actions/reconfigure.c' || echo '$(srcdir)/'`openbox/actions/reconfigure.c
+
+openbox/actions/openbox-reconfigure.obj: openbox/actions/reconfigure.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-reconfigure.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo -c -o openbox/actions/openbox-reconfigure.obj `if test -f 'openbox/actions/reconfigure.c'; then $(CYGPATH_W) 'openbox/actions/reconfigure.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/reconfigure.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-reconfigure.Tpo openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/reconfigure.c' object='openbox/actions/openbox-reconfigure.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-reconfigure.obj `if test -f 'openbox/actions/reconfigure.c'; then $(CYGPATH_W) 'openbox/actions/reconfigure.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/reconfigure.c'; fi`
+
+openbox/actions/openbox-resize.o: openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resize.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resize.Tpo -c -o openbox/actions/openbox-resize.o `test -f 'openbox/actions/resize.c' || echo '$(srcdir)/'`openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resize.Tpo openbox/actions/$(DEPDIR)/openbox-resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resize.c' object='openbox/actions/openbox-resize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resize.o `test -f 'openbox/actions/resize.c' || echo '$(srcdir)/'`openbox/actions/resize.c
+
+openbox/actions/openbox-resize.obj: openbox/actions/resize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resize.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resize.Tpo -c -o openbox/actions/openbox-resize.obj `if test -f 'openbox/actions/resize.c'; then $(CYGPATH_W) 'openbox/actions/resize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resize.Tpo openbox/actions/$(DEPDIR)/openbox-resize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resize.c' object='openbox/actions/openbox-resize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resize.obj `if test -f 'openbox/actions/resize.c'; then $(CYGPATH_W) 'openbox/actions/resize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resize.c'; fi`
+
+openbox/actions/openbox-resizerelative.o: openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resizerelative.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo -c -o openbox/actions/openbox-resizerelative.o `test -f 'openbox/actions/resizerelative.c' || echo '$(srcdir)/'`openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resizerelative.c' object='openbox/actions/openbox-resizerelative.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resizerelative.o `test -f 'openbox/actions/resizerelative.c' || echo '$(srcdir)/'`openbox/actions/resizerelative.c
+
+openbox/actions/openbox-resizerelative.obj: openbox/actions/resizerelative.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-resizerelative.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo -c -o openbox/actions/openbox-resizerelative.obj `if test -f 'openbox/actions/resizerelative.c'; then $(CYGPATH_W) 'openbox/actions/resizerelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resizerelative.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-resizerelative.Tpo openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/resizerelative.c' object='openbox/actions/openbox-resizerelative.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-resizerelative.obj `if test -f 'openbox/actions/resizerelative.c'; then $(CYGPATH_W) 'openbox/actions/resizerelative.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/resizerelative.c'; fi`
+
+openbox/actions/openbox-restart.o: openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-restart.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-restart.Tpo -c -o openbox/actions/openbox-restart.o `test -f 'openbox/actions/restart.c' || echo '$(srcdir)/'`openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-restart.Tpo openbox/actions/$(DEPDIR)/openbox-restart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/restart.c' object='openbox/actions/openbox-restart.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-restart.o `test -f 'openbox/actions/restart.c' || echo '$(srcdir)/'`openbox/actions/restart.c
+
+openbox/actions/openbox-restart.obj: openbox/actions/restart.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-restart.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-restart.Tpo -c -o openbox/actions/openbox-restart.obj `if test -f 'openbox/actions/restart.c'; then $(CYGPATH_W) 'openbox/actions/restart.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/restart.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-restart.Tpo openbox/actions/$(DEPDIR)/openbox-restart.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/restart.c' object='openbox/actions/openbox-restart.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-restart.obj `if test -f 'openbox/actions/restart.c'; then $(CYGPATH_W) 'openbox/actions/restart.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/restart.c'; fi`
+
+openbox/actions/openbox-shade.o: openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shade.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shade.Tpo -c -o openbox/actions/openbox-shade.o `test -f 'openbox/actions/shade.c' || echo '$(srcdir)/'`openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shade.Tpo openbox/actions/$(DEPDIR)/openbox-shade.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shade.c' object='openbox/actions/openbox-shade.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shade.o `test -f 'openbox/actions/shade.c' || echo '$(srcdir)/'`openbox/actions/shade.c
+
+openbox/actions/openbox-shade.obj: openbox/actions/shade.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shade.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shade.Tpo -c -o openbox/actions/openbox-shade.obj `if test -f 'openbox/actions/shade.c'; then $(CYGPATH_W) 'openbox/actions/shade.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shade.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shade.Tpo openbox/actions/$(DEPDIR)/openbox-shade.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shade.c' object='openbox/actions/openbox-shade.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shade.obj `if test -f 'openbox/actions/shade.c'; then $(CYGPATH_W) 'openbox/actions/shade.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shade.c'; fi`
+
+openbox/actions/openbox-shadelowerraise.o: openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shadelowerraise.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo -c -o openbox/actions/openbox-shadelowerraise.o `test -f 'openbox/actions/shadelowerraise.c' || echo '$(srcdir)/'`openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shadelowerraise.c' object='openbox/actions/openbox-shadelowerraise.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shadelowerraise.o `test -f 'openbox/actions/shadelowerraise.c' || echo '$(srcdir)/'`openbox/actions/shadelowerraise.c
+
+openbox/actions/openbox-shadelowerraise.obj: openbox/actions/shadelowerraise.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-shadelowerraise.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo -c -o openbox/actions/openbox-shadelowerraise.obj `if test -f 'openbox/actions/shadelowerraise.c'; then $(CYGPATH_W) 'openbox/actions/shadelowerraise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shadelowerraise.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Tpo openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/shadelowerraise.c' object='openbox/actions/openbox-shadelowerraise.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-shadelowerraise.obj `if test -f 'openbox/actions/shadelowerraise.c'; then $(CYGPATH_W) 'openbox/actions/shadelowerraise.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/shadelowerraise.c'; fi`
+
+openbox/actions/openbox-showdesktop.o: openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showdesktop.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo -c -o openbox/actions/openbox-showdesktop.o `test -f 'openbox/actions/showdesktop.c' || echo '$(srcdir)/'`openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showdesktop.c' object='openbox/actions/openbox-showdesktop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showdesktop.o `test -f 'openbox/actions/showdesktop.c' || echo '$(srcdir)/'`openbox/actions/showdesktop.c
+
+openbox/actions/openbox-showdesktop.obj: openbox/actions/showdesktop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showdesktop.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo -c -o openbox/actions/openbox-showdesktop.obj `if test -f 'openbox/actions/showdesktop.c'; then $(CYGPATH_W) 'openbox/actions/showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showdesktop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showdesktop.Tpo openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showdesktop.c' object='openbox/actions/openbox-showdesktop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showdesktop.obj `if test -f 'openbox/actions/showdesktop.c'; then $(CYGPATH_W) 'openbox/actions/showdesktop.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showdesktop.c'; fi`
+
+openbox/actions/openbox-showmenu.o: openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showmenu.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo -c -o openbox/actions/openbox-showmenu.o `test -f 'openbox/actions/showmenu.c' || echo '$(srcdir)/'`openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showmenu.c' object='openbox/actions/openbox-showmenu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showmenu.o `test -f 'openbox/actions/showmenu.c' || echo '$(srcdir)/'`openbox/actions/showmenu.c
+
+openbox/actions/openbox-showmenu.obj: openbox/actions/showmenu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-showmenu.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo -c -o openbox/actions/openbox-showmenu.obj `if test -f 'openbox/actions/showmenu.c'; then $(CYGPATH_W) 'openbox/actions/showmenu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showmenu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-showmenu.Tpo openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/showmenu.c' object='openbox/actions/openbox-showmenu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-showmenu.obj `if test -f 'openbox/actions/showmenu.c'; then $(CYGPATH_W) 'openbox/actions/showmenu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/showmenu.c'; fi`
+
+openbox/actions/openbox-unfocus.o: openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-unfocus.o -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo -c -o openbox/actions/openbox-unfocus.o `test -f 'openbox/actions/unfocus.c' || echo '$(srcdir)/'`openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/unfocus.c' object='openbox/actions/openbox-unfocus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-unfocus.o `test -f 'openbox/actions/unfocus.c' || echo '$(srcdir)/'`openbox/actions/unfocus.c
+
+openbox/actions/openbox-unfocus.obj: openbox/actions/unfocus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/actions/openbox-unfocus.obj -MD -MP -MF openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo -c -o openbox/actions/openbox-unfocus.obj `if test -f 'openbox/actions/unfocus.c'; then $(CYGPATH_W) 'openbox/actions/unfocus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/unfocus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/actions/$(DEPDIR)/openbox-unfocus.Tpo openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions/unfocus.c' object='openbox/actions/openbox-unfocus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/actions/openbox-unfocus.obj `if test -f 'openbox/actions/unfocus.c'; then $(CYGPATH_W) 'openbox/actions/unfocus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions/unfocus.c'; fi`
+
+openbox/openbox-actions.o: openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-actions.o -MD -MP -MF openbox/$(DEPDIR)/openbox-actions.Tpo -c -o openbox/openbox-actions.o `test -f 'openbox/actions.c' || echo '$(srcdir)/'`openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-actions.Tpo openbox/$(DEPDIR)/openbox-actions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions.c' object='openbox/openbox-actions.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-actions.o `test -f 'openbox/actions.c' || echo '$(srcdir)/'`openbox/actions.c
+
+openbox/openbox-actions.obj: openbox/actions.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-actions.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-actions.Tpo -c -o openbox/openbox-actions.obj `if test -f 'openbox/actions.c'; then $(CYGPATH_W) 'openbox/actions.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-actions.Tpo openbox/$(DEPDIR)/openbox-actions.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/actions.c' object='openbox/openbox-actions.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-actions.obj `if test -f 'openbox/actions.c'; then $(CYGPATH_W) 'openbox/actions.c'; else $(CYGPATH_W) '$(srcdir)/openbox/actions.c'; fi`
+
+openbox/openbox-client.o: openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client.Tpo -c -o openbox/openbox-client.o `test -f 'openbox/client.c' || echo '$(srcdir)/'`openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client.Tpo openbox/$(DEPDIR)/openbox-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client.c' object='openbox/openbox-client.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client.o `test -f 'openbox/client.c' || echo '$(srcdir)/'`openbox/client.c
+
+openbox/openbox-client.obj: openbox/client.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client.Tpo -c -o openbox/openbox-client.obj `if test -f 'openbox/client.c'; then $(CYGPATH_W) 'openbox/client.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client.Tpo openbox/$(DEPDIR)/openbox-client.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client.c' object='openbox/openbox-client.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client.obj `if test -f 'openbox/client.c'; then $(CYGPATH_W) 'openbox/client.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client.c'; fi`
+
+openbox/openbox-client_list_menu.o: openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_menu.Tpo -c -o openbox/openbox-client_list_menu.o `test -f 'openbox/client_list_menu.c' || echo '$(srcdir)/'`openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_menu.c' object='openbox/openbox-client_list_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_menu.o `test -f 'openbox/client_list_menu.c' || echo '$(srcdir)/'`openbox/client_list_menu.c
+
+openbox/openbox-client_list_menu.obj: openbox/client_list_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_menu.Tpo -c -o openbox/openbox-client_list_menu.obj `if test -f 'openbox/client_list_menu.c'; then $(CYGPATH_W) 'openbox/client_list_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_menu.c' object='openbox/openbox-client_list_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_menu.obj `if test -f 'openbox/client_list_menu.c'; then $(CYGPATH_W) 'openbox/client_list_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_menu.c'; fi`
+
+openbox/openbox-client_list_combined_menu.o: openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_combined_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo -c -o openbox/openbox-client_list_combined_menu.o `test -f 'openbox/client_list_combined_menu.c' || echo '$(srcdir)/'`openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_combined_menu.c' object='openbox/openbox-client_list_combined_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_combined_menu.o `test -f 'openbox/client_list_combined_menu.c' || echo '$(srcdir)/'`openbox/client_list_combined_menu.c
+
+openbox/openbox-client_list_combined_menu.obj: openbox/client_list_combined_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_list_combined_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo -c -o openbox/openbox-client_list_combined_menu.obj `if test -f 'openbox/client_list_combined_menu.c'; then $(CYGPATH_W) 'openbox/client_list_combined_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_combined_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_list_combined_menu.Tpo openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_list_combined_menu.c' object='openbox/openbox-client_list_combined_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_list_combined_menu.obj `if test -f 'openbox/client_list_combined_menu.c'; then $(CYGPATH_W) 'openbox/client_list_combined_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_list_combined_menu.c'; fi`
+
+openbox/openbox-client_menu.o: openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-client_menu.Tpo -c -o openbox/openbox-client_menu.o `test -f 'openbox/client_menu.c' || echo '$(srcdir)/'`openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_menu.Tpo openbox/$(DEPDIR)/openbox-client_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_menu.c' object='openbox/openbox-client_menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_menu.o `test -f 'openbox/client_menu.c' || echo '$(srcdir)/'`openbox/client_menu.c
+
+openbox/openbox-client_menu.obj: openbox/client_menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-client_menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-client_menu.Tpo -c -o openbox/openbox-client_menu.obj `if test -f 'openbox/client_menu.c'; then $(CYGPATH_W) 'openbox/client_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-client_menu.Tpo openbox/$(DEPDIR)/openbox-client_menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/client_menu.c' object='openbox/openbox-client_menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-client_menu.obj `if test -f 'openbox/client_menu.c'; then $(CYGPATH_W) 'openbox/client_menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/client_menu.c'; fi`
+
+openbox/openbox-config.o: openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-config.o -MD -MP -MF openbox/$(DEPDIR)/openbox-config.Tpo -c -o openbox/openbox-config.o `test -f 'openbox/config.c' || echo '$(srcdir)/'`openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-config.Tpo openbox/$(DEPDIR)/openbox-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/config.c' object='openbox/openbox-config.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-config.o `test -f 'openbox/config.c' || echo '$(srcdir)/'`openbox/config.c
+
+openbox/openbox-config.obj: openbox/config.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-config.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-config.Tpo -c -o openbox/openbox-config.obj `if test -f 'openbox/config.c'; then $(CYGPATH_W) 'openbox/config.c'; else $(CYGPATH_W) '$(srcdir)/openbox/config.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-config.Tpo openbox/$(DEPDIR)/openbox-config.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/config.c' object='openbox/openbox-config.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-config.obj `if test -f 'openbox/config.c'; then $(CYGPATH_W) 'openbox/config.c'; else $(CYGPATH_W) '$(srcdir)/openbox/config.c'; fi`
+
+openbox/openbox-debug.o: openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-debug.o -MD -MP -MF openbox/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/openbox-debug.o `test -f 'openbox/debug.c' || echo '$(srcdir)/'`openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-debug.Tpo openbox/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/debug.c' object='openbox/openbox-debug.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-debug.o `test -f 'openbox/debug.c' || echo '$(srcdir)/'`openbox/debug.c
+
+openbox/openbox-debug.obj: openbox/debug.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-debug.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-debug.Tpo -c -o openbox/openbox-debug.obj `if test -f 'openbox/debug.c'; then $(CYGPATH_W) 'openbox/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/debug.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-debug.Tpo openbox/$(DEPDIR)/openbox-debug.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/debug.c' object='openbox/openbox-debug.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-debug.obj `if test -f 'openbox/debug.c'; then $(CYGPATH_W) 'openbox/debug.c'; else $(CYGPATH_W) '$(srcdir)/openbox/debug.c'; fi`
+
+openbox/openbox-dock.o: openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-dock.o -MD -MP -MF openbox/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/openbox-dock.o `test -f 'openbox/dock.c' || echo '$(srcdir)/'`openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-dock.Tpo openbox/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/dock.c' object='openbox/openbox-dock.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-dock.o `test -f 'openbox/dock.c' || echo '$(srcdir)/'`openbox/dock.c
+
+openbox/openbox-dock.obj: openbox/dock.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-dock.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-dock.Tpo -c -o openbox/openbox-dock.obj `if test -f 'openbox/dock.c'; then $(CYGPATH_W) 'openbox/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/dock.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-dock.Tpo openbox/$(DEPDIR)/openbox-dock.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/dock.c' object='openbox/openbox-dock.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-dock.obj `if test -f 'openbox/dock.c'; then $(CYGPATH_W) 'openbox/dock.c'; else $(CYGPATH_W) '$(srcdir)/openbox/dock.c'; fi`
+
+openbox/openbox-event.o: openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-event.o -MD -MP -MF openbox/$(DEPDIR)/openbox-event.Tpo -c -o openbox/openbox-event.o `test -f 'openbox/event.c' || echo '$(srcdir)/'`openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-event.Tpo openbox/$(DEPDIR)/openbox-event.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/event.c' object='openbox/openbox-event.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-event.o `test -f 'openbox/event.c' || echo '$(srcdir)/'`openbox/event.c
+
+openbox/openbox-event.obj: openbox/event.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-event.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-event.Tpo -c -o openbox/openbox-event.obj `if test -f 'openbox/event.c'; then $(CYGPATH_W) 'openbox/event.c'; else $(CYGPATH_W) '$(srcdir)/openbox/event.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-event.Tpo openbox/$(DEPDIR)/openbox-event.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/event.c' object='openbox/openbox-event.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-event.obj `if test -f 'openbox/event.c'; then $(CYGPATH_W) 'openbox/event.c'; else $(CYGPATH_W) '$(srcdir)/openbox/event.c'; fi`
+
+openbox/openbox-focus.o: openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/openbox-focus.o `test -f 'openbox/focus.c' || echo '$(srcdir)/'`openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus.Tpo openbox/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus.c' object='openbox/openbox-focus.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus.o `test -f 'openbox/focus.c' || echo '$(srcdir)/'`openbox/focus.c
+
+openbox/openbox-focus.obj: openbox/focus.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus.Tpo -c -o openbox/openbox-focus.obj `if test -f 'openbox/focus.c'; then $(CYGPATH_W) 'openbox/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus.Tpo openbox/$(DEPDIR)/openbox-focus.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus.c' object='openbox/openbox-focus.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus.obj `if test -f 'openbox/focus.c'; then $(CYGPATH_W) 'openbox/focus.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus.c'; fi`
+
+openbox/openbox-focus_cycle.o: openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle.Tpo -c -o openbox/openbox-focus_cycle.o `test -f 'openbox/focus_cycle.c' || echo '$(srcdir)/'`openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle.Tpo openbox/$(DEPDIR)/openbox-focus_cycle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle.c' object='openbox/openbox-focus_cycle.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle.o `test -f 'openbox/focus_cycle.c' || echo '$(srcdir)/'`openbox/focus_cycle.c
+
+openbox/openbox-focus_cycle.obj: openbox/focus_cycle.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle.Tpo -c -o openbox/openbox-focus_cycle.obj `if test -f 'openbox/focus_cycle.c'; then $(CYGPATH_W) 'openbox/focus_cycle.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle.Tpo openbox/$(DEPDIR)/openbox-focus_cycle.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle.c' object='openbox/openbox-focus_cycle.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle.obj `if test -f 'openbox/focus_cycle.c'; then $(CYGPATH_W) 'openbox/focus_cycle.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle.c'; fi`
+
+openbox/openbox-focus_cycle_indicator.o: openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_indicator.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo -c -o openbox/openbox-focus_cycle_indicator.o `test -f 'openbox/focus_cycle_indicator.c' || echo '$(srcdir)/'`openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_indicator.c' object='openbox/openbox-focus_cycle_indicator.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_indicator.o `test -f 'openbox/focus_cycle_indicator.c' || echo '$(srcdir)/'`openbox/focus_cycle_indicator.c
+
+openbox/openbox-focus_cycle_indicator.obj: openbox/focus_cycle_indicator.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_indicator.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo -c -o openbox/openbox-focus_cycle_indicator.obj `if test -f 'openbox/focus_cycle_indicator.c'; then $(CYGPATH_W) 'openbox/focus_cycle_indicator.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_indicator.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_indicator.c' object='openbox/openbox-focus_cycle_indicator.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_indicator.obj `if test -f 'openbox/focus_cycle_indicator.c'; then $(CYGPATH_W) 'openbox/focus_cycle_indicator.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_indicator.c'; fi`
+
+openbox/openbox-focus_cycle_popup.o: openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_popup.o -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo -c -o openbox/openbox-focus_cycle_popup.o `test -f 'openbox/focus_cycle_popup.c' || echo '$(srcdir)/'`openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_popup.c' object='openbox/openbox-focus_cycle_popup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_popup.o `test -f 'openbox/focus_cycle_popup.c' || echo '$(srcdir)/'`openbox/focus_cycle_popup.c
+
+openbox/openbox-focus_cycle_popup.obj: openbox/focus_cycle_popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-focus_cycle_popup.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo -c -o openbox/openbox-focus_cycle_popup.obj `if test -f 'openbox/focus_cycle_popup.c'; then $(CYGPATH_W) 'openbox/focus_cycle_popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_popup.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-focus_cycle_popup.Tpo openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/focus_cycle_popup.c' object='openbox/openbox-focus_cycle_popup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-focus_cycle_popup.obj `if test -f 'openbox/focus_cycle_popup.c'; then $(CYGPATH_W) 'openbox/focus_cycle_popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/focus_cycle_popup.c'; fi`
+
+openbox/openbox-frame.o: openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-frame.o -MD -MP -MF openbox/$(DEPDIR)/openbox-frame.Tpo -c -o openbox/openbox-frame.o `test -f 'openbox/frame.c' || echo '$(srcdir)/'`openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-frame.Tpo openbox/$(DEPDIR)/openbox-frame.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/frame.c' object='openbox/openbox-frame.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-frame.o `test -f 'openbox/frame.c' || echo '$(srcdir)/'`openbox/frame.c
+
+openbox/openbox-frame.obj: openbox/frame.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-frame.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-frame.Tpo -c -o openbox/openbox-frame.obj `if test -f 'openbox/frame.c'; then $(CYGPATH_W) 'openbox/frame.c'; else $(CYGPATH_W) '$(srcdir)/openbox/frame.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-frame.Tpo openbox/$(DEPDIR)/openbox-frame.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/frame.c' object='openbox/openbox-frame.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-frame.obj `if test -f 'openbox/frame.c'; then $(CYGPATH_W) 'openbox/frame.c'; else $(CYGPATH_W) '$(srcdir)/openbox/frame.c'; fi`
+
+openbox/openbox-framerender.o: openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-framerender.o -MD -MP -MF openbox/$(DEPDIR)/openbox-framerender.Tpo -c -o openbox/openbox-framerender.o `test -f 'openbox/framerender.c' || echo '$(srcdir)/'`openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-framerender.Tpo openbox/$(DEPDIR)/openbox-framerender.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/framerender.c' object='openbox/openbox-framerender.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-framerender.o `test -f 'openbox/framerender.c' || echo '$(srcdir)/'`openbox/framerender.c
+
+openbox/openbox-framerender.obj: openbox/framerender.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-framerender.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-framerender.Tpo -c -o openbox/openbox-framerender.obj `if test -f 'openbox/framerender.c'; then $(CYGPATH_W) 'openbox/framerender.c'; else $(CYGPATH_W) '$(srcdir)/openbox/framerender.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-framerender.Tpo openbox/$(DEPDIR)/openbox-framerender.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/framerender.c' object='openbox/openbox-framerender.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-framerender.obj `if test -f 'openbox/framerender.c'; then $(CYGPATH_W) 'openbox/framerender.c'; else $(CYGPATH_W) '$(srcdir)/openbox/framerender.c'; fi`
+
+openbox/openbox-grab.o: openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-grab.o -MD -MP -MF openbox/$(DEPDIR)/openbox-grab.Tpo -c -o openbox/openbox-grab.o `test -f 'openbox/grab.c' || echo '$(srcdir)/'`openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-grab.Tpo openbox/$(DEPDIR)/openbox-grab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/grab.c' object='openbox/openbox-grab.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-grab.o `test -f 'openbox/grab.c' || echo '$(srcdir)/'`openbox/grab.c
+
+openbox/openbox-grab.obj: openbox/grab.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-grab.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-grab.Tpo -c -o openbox/openbox-grab.obj `if test -f 'openbox/grab.c'; then $(CYGPATH_W) 'openbox/grab.c'; else $(CYGPATH_W) '$(srcdir)/openbox/grab.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-grab.Tpo openbox/$(DEPDIR)/openbox-grab.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/grab.c' object='openbox/openbox-grab.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-grab.obj `if test -f 'openbox/grab.c'; then $(CYGPATH_W) 'openbox/grab.c'; else $(CYGPATH_W) '$(srcdir)/openbox/grab.c'; fi`
+
+openbox/openbox-group.o: openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-group.o -MD -MP -MF openbox/$(DEPDIR)/openbox-group.Tpo -c -o openbox/openbox-group.o `test -f 'openbox/group.c' || echo '$(srcdir)/'`openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-group.Tpo openbox/$(DEPDIR)/openbox-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/group.c' object='openbox/openbox-group.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-group.o `test -f 'openbox/group.c' || echo '$(srcdir)/'`openbox/group.c
+
+openbox/openbox-group.obj: openbox/group.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-group.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-group.Tpo -c -o openbox/openbox-group.obj `if test -f 'openbox/group.c'; then $(CYGPATH_W) 'openbox/group.c'; else $(CYGPATH_W) '$(srcdir)/openbox/group.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-group.Tpo openbox/$(DEPDIR)/openbox-group.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/group.c' object='openbox/openbox-group.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-group.obj `if test -f 'openbox/group.c'; then $(CYGPATH_W) 'openbox/group.c'; else $(CYGPATH_W) '$(srcdir)/openbox/group.c'; fi`
+
+openbox/openbox-keyboard.o: openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keyboard.o -MD -MP -MF openbox/$(DEPDIR)/openbox-keyboard.Tpo -c -o openbox/openbox-keyboard.o `test -f 'openbox/keyboard.c' || echo '$(srcdir)/'`openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keyboard.Tpo openbox/$(DEPDIR)/openbox-keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keyboard.c' object='openbox/openbox-keyboard.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keyboard.o `test -f 'openbox/keyboard.c' || echo '$(srcdir)/'`openbox/keyboard.c
+
+openbox/openbox-keyboard.obj: openbox/keyboard.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keyboard.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-keyboard.Tpo -c -o openbox/openbox-keyboard.obj `if test -f 'openbox/keyboard.c'; then $(CYGPATH_W) 'openbox/keyboard.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keyboard.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keyboard.Tpo openbox/$(DEPDIR)/openbox-keyboard.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keyboard.c' object='openbox/openbox-keyboard.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keyboard.obj `if test -f 'openbox/keyboard.c'; then $(CYGPATH_W) 'openbox/keyboard.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keyboard.c'; fi`
+
+openbox/openbox-keytree.o: openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keytree.o -MD -MP -MF openbox/$(DEPDIR)/openbox-keytree.Tpo -c -o openbox/openbox-keytree.o `test -f 'openbox/keytree.c' || echo '$(srcdir)/'`openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keytree.Tpo openbox/$(DEPDIR)/openbox-keytree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keytree.c' object='openbox/openbox-keytree.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keytree.o `test -f 'openbox/keytree.c' || echo '$(srcdir)/'`openbox/keytree.c
+
+openbox/openbox-keytree.obj: openbox/keytree.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-keytree.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-keytree.Tpo -c -o openbox/openbox-keytree.obj `if test -f 'openbox/keytree.c'; then $(CYGPATH_W) 'openbox/keytree.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keytree.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-keytree.Tpo openbox/$(DEPDIR)/openbox-keytree.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/keytree.c' object='openbox/openbox-keytree.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-keytree.obj `if test -f 'openbox/keytree.c'; then $(CYGPATH_W) 'openbox/keytree.c'; else $(CYGPATH_W) '$(srcdir)/openbox/keytree.c'; fi`
+
+openbox/openbox-menuframe.o: openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menuframe.o -MD -MP -MF openbox/$(DEPDIR)/openbox-menuframe.Tpo -c -o openbox/openbox-menuframe.o `test -f 'openbox/menuframe.c' || echo '$(srcdir)/'`openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menuframe.Tpo openbox/$(DEPDIR)/openbox-menuframe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menuframe.c' object='openbox/openbox-menuframe.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menuframe.o `test -f 'openbox/menuframe.c' || echo '$(srcdir)/'`openbox/menuframe.c
+
+openbox/openbox-menuframe.obj: openbox/menuframe.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menuframe.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-menuframe.Tpo -c -o openbox/openbox-menuframe.obj `if test -f 'openbox/menuframe.c'; then $(CYGPATH_W) 'openbox/menuframe.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menuframe.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menuframe.Tpo openbox/$(DEPDIR)/openbox-menuframe.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menuframe.c' object='openbox/openbox-menuframe.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menuframe.obj `if test -f 'openbox/menuframe.c'; then $(CYGPATH_W) 'openbox/menuframe.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menuframe.c'; fi`
+
+openbox/openbox-menu.o: openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menu.o -MD -MP -MF openbox/$(DEPDIR)/openbox-menu.Tpo -c -o openbox/openbox-menu.o `test -f 'openbox/menu.c' || echo '$(srcdir)/'`openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menu.Tpo openbox/$(DEPDIR)/openbox-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menu.c' object='openbox/openbox-menu.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menu.o `test -f 'openbox/menu.c' || echo '$(srcdir)/'`openbox/menu.c
+
+openbox/openbox-menu.obj: openbox/menu.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-menu.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-menu.Tpo -c -o openbox/openbox-menu.obj `if test -f 'openbox/menu.c'; then $(CYGPATH_W) 'openbox/menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menu.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-menu.Tpo openbox/$(DEPDIR)/openbox-menu.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/menu.c' object='openbox/openbox-menu.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-menu.obj `if test -f 'openbox/menu.c'; then $(CYGPATH_W) 'openbox/menu.c'; else $(CYGPATH_W) '$(srcdir)/openbox/menu.c'; fi`
+
+openbox/openbox-mouse.o: openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-mouse.o -MD -MP -MF openbox/$(DEPDIR)/openbox-mouse.Tpo -c -o openbox/openbox-mouse.o `test -f 'openbox/mouse.c' || echo '$(srcdir)/'`openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-mouse.Tpo openbox/$(DEPDIR)/openbox-mouse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/mouse.c' object='openbox/openbox-mouse.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-mouse.o `test -f 'openbox/mouse.c' || echo '$(srcdir)/'`openbox/mouse.c
+
+openbox/openbox-mouse.obj: openbox/mouse.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-mouse.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-mouse.Tpo -c -o openbox/openbox-mouse.obj `if test -f 'openbox/mouse.c'; then $(CYGPATH_W) 'openbox/mouse.c'; else $(CYGPATH_W) '$(srcdir)/openbox/mouse.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-mouse.Tpo openbox/$(DEPDIR)/openbox-mouse.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/mouse.c' object='openbox/openbox-mouse.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-mouse.obj `if test -f 'openbox/mouse.c'; then $(CYGPATH_W) 'openbox/mouse.c'; else $(CYGPATH_W) '$(srcdir)/openbox/mouse.c'; fi`
+
+openbox/openbox-moveresize.o: openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-moveresize.o -MD -MP -MF openbox/$(DEPDIR)/openbox-moveresize.Tpo -c -o openbox/openbox-moveresize.o `test -f 'openbox/moveresize.c' || echo '$(srcdir)/'`openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-moveresize.Tpo openbox/$(DEPDIR)/openbox-moveresize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/moveresize.c' object='openbox/openbox-moveresize.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-moveresize.o `test -f 'openbox/moveresize.c' || echo '$(srcdir)/'`openbox/moveresize.c
+
+openbox/openbox-moveresize.obj: openbox/moveresize.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-moveresize.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-moveresize.Tpo -c -o openbox/openbox-moveresize.obj `if test -f 'openbox/moveresize.c'; then $(CYGPATH_W) 'openbox/moveresize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/moveresize.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-moveresize.Tpo openbox/$(DEPDIR)/openbox-moveresize.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/moveresize.c' object='openbox/openbox-moveresize.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-moveresize.obj `if test -f 'openbox/moveresize.c'; then $(CYGPATH_W) 'openbox/moveresize.c'; else $(CYGPATH_W) '$(srcdir)/openbox/moveresize.c'; fi`
+
+openbox/openbox-openbox.o: openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-openbox.o -MD -MP -MF openbox/$(DEPDIR)/openbox-openbox.Tpo -c -o openbox/openbox-openbox.o `test -f 'openbox/openbox.c' || echo '$(srcdir)/'`openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-openbox.Tpo openbox/$(DEPDIR)/openbox-openbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/openbox.c' object='openbox/openbox-openbox.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-openbox.o `test -f 'openbox/openbox.c' || echo '$(srcdir)/'`openbox/openbox.c
+
+openbox/openbox-openbox.obj: openbox/openbox.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-openbox.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-openbox.Tpo -c -o openbox/openbox-openbox.obj `if test -f 'openbox/openbox.c'; then $(CYGPATH_W) 'openbox/openbox.c'; else $(CYGPATH_W) '$(srcdir)/openbox/openbox.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-openbox.Tpo openbox/$(DEPDIR)/openbox-openbox.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/openbox.c' object='openbox/openbox-openbox.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-openbox.obj `if test -f 'openbox/openbox.c'; then $(CYGPATH_W) 'openbox/openbox.c'; else $(CYGPATH_W) '$(srcdir)/openbox/openbox.c'; fi`
+
+openbox/openbox-ping.o: openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-ping.o -MD -MP -MF openbox/$(DEPDIR)/openbox-ping.Tpo -c -o openbox/openbox-ping.o `test -f 'openbox/ping.c' || echo '$(srcdir)/'`openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-ping.Tpo openbox/$(DEPDIR)/openbox-ping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/ping.c' object='openbox/openbox-ping.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-ping.o `test -f 'openbox/ping.c' || echo '$(srcdir)/'`openbox/ping.c
+
+openbox/openbox-ping.obj: openbox/ping.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-ping.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-ping.Tpo -c -o openbox/openbox-ping.obj `if test -f 'openbox/ping.c'; then $(CYGPATH_W) 'openbox/ping.c'; else $(CYGPATH_W) '$(srcdir)/openbox/ping.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-ping.Tpo openbox/$(DEPDIR)/openbox-ping.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/ping.c' object='openbox/openbox-ping.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-ping.obj `if test -f 'openbox/ping.c'; then $(CYGPATH_W) 'openbox/ping.c'; else $(CYGPATH_W) '$(srcdir)/openbox/ping.c'; fi`
+
+openbox/openbox-place.o: openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place.o -MD -MP -MF openbox/$(DEPDIR)/openbox-place.Tpo -c -o openbox/openbox-place.o `test -f 'openbox/place.c' || echo '$(srcdir)/'`openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place.Tpo openbox/$(DEPDIR)/openbox-place.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place.c' object='openbox/openbox-place.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place.o `test -f 'openbox/place.c' || echo '$(srcdir)/'`openbox/place.c
+
+openbox/openbox-place.obj: openbox/place.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-place.Tpo -c -o openbox/openbox-place.obj `if test -f 'openbox/place.c'; then $(CYGPATH_W) 'openbox/place.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place.Tpo openbox/$(DEPDIR)/openbox-place.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place.c' object='openbox/openbox-place.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place.obj `if test -f 'openbox/place.c'; then $(CYGPATH_W) 'openbox/place.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place.c'; fi`
+
+openbox/openbox-place_overlap.o: openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place_overlap.o -MD -MP -MF openbox/$(DEPDIR)/openbox-place_overlap.Tpo -c -o openbox/openbox-place_overlap.o `test -f 'openbox/place_overlap.c' || echo '$(srcdir)/'`openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place_overlap.Tpo openbox/$(DEPDIR)/openbox-place_overlap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place_overlap.c' object='openbox/openbox-place_overlap.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place_overlap.o `test -f 'openbox/place_overlap.c' || echo '$(srcdir)/'`openbox/place_overlap.c
+
+openbox/openbox-place_overlap.obj: openbox/place_overlap.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-place_overlap.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-place_overlap.Tpo -c -o openbox/openbox-place_overlap.obj `if test -f 'openbox/place_overlap.c'; then $(CYGPATH_W) 'openbox/place_overlap.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place_overlap.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-place_overlap.Tpo openbox/$(DEPDIR)/openbox-place_overlap.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/place_overlap.c' object='openbox/openbox-place_overlap.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-place_overlap.obj `if test -f 'openbox/place_overlap.c'; then $(CYGPATH_W) 'openbox/place_overlap.c'; else $(CYGPATH_W) '$(srcdir)/openbox/place_overlap.c'; fi`
+
+openbox/openbox-prompt.o: openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-prompt.o -MD -MP -MF openbox/$(DEPDIR)/openbox-prompt.Tpo -c -o openbox/openbox-prompt.o `test -f 'openbox/prompt.c' || echo '$(srcdir)/'`openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-prompt.Tpo openbox/$(DEPDIR)/openbox-prompt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/prompt.c' object='openbox/openbox-prompt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-prompt.o `test -f 'openbox/prompt.c' || echo '$(srcdir)/'`openbox/prompt.c
+
+openbox/openbox-prompt.obj: openbox/prompt.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-prompt.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-prompt.Tpo -c -o openbox/openbox-prompt.obj `if test -f 'openbox/prompt.c'; then $(CYGPATH_W) 'openbox/prompt.c'; else $(CYGPATH_W) '$(srcdir)/openbox/prompt.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-prompt.Tpo openbox/$(DEPDIR)/openbox-prompt.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/prompt.c' object='openbox/openbox-prompt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-prompt.obj `if test -f 'openbox/prompt.c'; then $(CYGPATH_W) 'openbox/prompt.c'; else $(CYGPATH_W) '$(srcdir)/openbox/prompt.c'; fi`
+
+openbox/openbox-popup.o: openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-popup.o -MD -MP -MF openbox/$(DEPDIR)/openbox-popup.Tpo -c -o openbox/openbox-popup.o `test -f 'openbox/popup.c' || echo '$(srcdir)/'`openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-popup.Tpo openbox/$(DEPDIR)/openbox-popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/popup.c' object='openbox/openbox-popup.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-popup.o `test -f 'openbox/popup.c' || echo '$(srcdir)/'`openbox/popup.c
+
+openbox/openbox-popup.obj: openbox/popup.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-popup.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-popup.Tpo -c -o openbox/openbox-popup.obj `if test -f 'openbox/popup.c'; then $(CYGPATH_W) 'openbox/popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/popup.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-popup.Tpo openbox/$(DEPDIR)/openbox-popup.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/popup.c' object='openbox/openbox-popup.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-popup.obj `if test -f 'openbox/popup.c'; then $(CYGPATH_W) 'openbox/popup.c'; else $(CYGPATH_W) '$(srcdir)/openbox/popup.c'; fi`
+
+openbox/openbox-resist.o: openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-resist.o -MD -MP -MF openbox/$(DEPDIR)/openbox-resist.Tpo -c -o openbox/openbox-resist.o `test -f 'openbox/resist.c' || echo '$(srcdir)/'`openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-resist.Tpo openbox/$(DEPDIR)/openbox-resist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/resist.c' object='openbox/openbox-resist.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-resist.o `test -f 'openbox/resist.c' || echo '$(srcdir)/'`openbox/resist.c
+
+openbox/openbox-resist.obj: openbox/resist.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-resist.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-resist.Tpo -c -o openbox/openbox-resist.obj `if test -f 'openbox/resist.c'; then $(CYGPATH_W) 'openbox/resist.c'; else $(CYGPATH_W) '$(srcdir)/openbox/resist.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-resist.Tpo openbox/$(DEPDIR)/openbox-resist.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/resist.c' object='openbox/openbox-resist.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-resist.obj `if test -f 'openbox/resist.c'; then $(CYGPATH_W) 'openbox/resist.c'; else $(CYGPATH_W) '$(srcdir)/openbox/resist.c'; fi`
+
+openbox/openbox-screen.o: openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-screen.o -MD -MP -MF openbox/$(DEPDIR)/openbox-screen.Tpo -c -o openbox/openbox-screen.o `test -f 'openbox/screen.c' || echo '$(srcdir)/'`openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-screen.Tpo openbox/$(DEPDIR)/openbox-screen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/screen.c' object='openbox/openbox-screen.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-screen.o `test -f 'openbox/screen.c' || echo '$(srcdir)/'`openbox/screen.c
+
+openbox/openbox-screen.obj: openbox/screen.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-screen.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-screen.Tpo -c -o openbox/openbox-screen.obj `if test -f 'openbox/screen.c'; then $(CYGPATH_W) 'openbox/screen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/screen.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-screen.Tpo openbox/$(DEPDIR)/openbox-screen.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/screen.c' object='openbox/openbox-screen.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-screen.obj `if test -f 'openbox/screen.c'; then $(CYGPATH_W) 'openbox/screen.c'; else $(CYGPATH_W) '$(srcdir)/openbox/screen.c'; fi`
+
+openbox/openbox-session.o: openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-session.o -MD -MP -MF openbox/$(DEPDIR)/openbox-session.Tpo -c -o openbox/openbox-session.o `test -f 'openbox/session.c' || echo '$(srcdir)/'`openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-session.Tpo openbox/$(DEPDIR)/openbox-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/session.c' object='openbox/openbox-session.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-session.o `test -f 'openbox/session.c' || echo '$(srcdir)/'`openbox/session.c
+
+openbox/openbox-session.obj: openbox/session.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-session.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-session.Tpo -c -o openbox/openbox-session.obj `if test -f 'openbox/session.c'; then $(CYGPATH_W) 'openbox/session.c'; else $(CYGPATH_W) '$(srcdir)/openbox/session.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-session.Tpo openbox/$(DEPDIR)/openbox-session.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/session.c' object='openbox/openbox-session.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-session.obj `if test -f 'openbox/session.c'; then $(CYGPATH_W) 'openbox/session.c'; else $(CYGPATH_W) '$(srcdir)/openbox/session.c'; fi`
+
+openbox/openbox-stacking.o: openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-stacking.o -MD -MP -MF openbox/$(DEPDIR)/openbox-stacking.Tpo -c -o openbox/openbox-stacking.o `test -f 'openbox/stacking.c' || echo '$(srcdir)/'`openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-stacking.Tpo openbox/$(DEPDIR)/openbox-stacking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/stacking.c' object='openbox/openbox-stacking.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-stacking.o `test -f 'openbox/stacking.c' || echo '$(srcdir)/'`openbox/stacking.c
+
+openbox/openbox-stacking.obj: openbox/stacking.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-stacking.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-stacking.Tpo -c -o openbox/openbox-stacking.obj `if test -f 'openbox/stacking.c'; then $(CYGPATH_W) 'openbox/stacking.c'; else $(CYGPATH_W) '$(srcdir)/openbox/stacking.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-stacking.Tpo openbox/$(DEPDIR)/openbox-stacking.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/stacking.c' object='openbox/openbox-stacking.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-stacking.obj `if test -f 'openbox/stacking.c'; then $(CYGPATH_W) 'openbox/stacking.c'; else $(CYGPATH_W) '$(srcdir)/openbox/stacking.c'; fi`
+
+openbox/openbox-startupnotify.o: openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-startupnotify.o -MD -MP -MF openbox/$(DEPDIR)/openbox-startupnotify.Tpo -c -o openbox/openbox-startupnotify.o `test -f 'openbox/startupnotify.c' || echo '$(srcdir)/'`openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-startupnotify.Tpo openbox/$(DEPDIR)/openbox-startupnotify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/startupnotify.c' object='openbox/openbox-startupnotify.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-startupnotify.o `test -f 'openbox/startupnotify.c' || echo '$(srcdir)/'`openbox/startupnotify.c
+
+openbox/openbox-startupnotify.obj: openbox/startupnotify.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-startupnotify.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-startupnotify.Tpo -c -o openbox/openbox-startupnotify.obj `if test -f 'openbox/startupnotify.c'; then $(CYGPATH_W) 'openbox/startupnotify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/startupnotify.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-startupnotify.Tpo openbox/$(DEPDIR)/openbox-startupnotify.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/startupnotify.c' object='openbox/openbox-startupnotify.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-startupnotify.obj `if test -f 'openbox/startupnotify.c'; then $(CYGPATH_W) 'openbox/startupnotify.c'; else $(CYGPATH_W) '$(srcdir)/openbox/startupnotify.c'; fi`
+
+openbox/openbox-translate.o: openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-translate.o -MD -MP -MF openbox/$(DEPDIR)/openbox-translate.Tpo -c -o openbox/openbox-translate.o `test -f 'openbox/translate.c' || echo '$(srcdir)/'`openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-translate.Tpo openbox/$(DEPDIR)/openbox-translate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/translate.c' object='openbox/openbox-translate.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-translate.o `test -f 'openbox/translate.c' || echo '$(srcdir)/'`openbox/translate.c
+
+openbox/openbox-translate.obj: openbox/translate.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-translate.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-translate.Tpo -c -o openbox/openbox-translate.obj `if test -f 'openbox/translate.c'; then $(CYGPATH_W) 'openbox/translate.c'; else $(CYGPATH_W) '$(srcdir)/openbox/translate.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-translate.Tpo openbox/$(DEPDIR)/openbox-translate.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/translate.c' object='openbox/openbox-translate.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-translate.obj `if test -f 'openbox/translate.c'; then $(CYGPATH_W) 'openbox/translate.c'; else $(CYGPATH_W) '$(srcdir)/openbox/translate.c'; fi`
+
+openbox/openbox-window.o: openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-window.o -MD -MP -MF openbox/$(DEPDIR)/openbox-window.Tpo -c -o openbox/openbox-window.o `test -f 'openbox/window.c' || echo '$(srcdir)/'`openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-window.Tpo openbox/$(DEPDIR)/openbox-window.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/window.c' object='openbox/openbox-window.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-window.o `test -f 'openbox/window.c' || echo '$(srcdir)/'`openbox/window.c
+
+openbox/openbox-window.obj: openbox/window.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT openbox/openbox-window.obj -MD -MP -MF openbox/$(DEPDIR)/openbox-window.Tpo -c -o openbox/openbox-window.obj `if test -f 'openbox/window.c'; then $(CYGPATH_W) 'openbox/window.c'; else $(CYGPATH_W) '$(srcdir)/openbox/window.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) openbox/$(DEPDIR)/openbox-window.Tpo openbox/$(DEPDIR)/openbox-window.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='openbox/window.c' object='openbox/openbox-window.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(openbox_openbox_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o openbox/openbox-window.obj `if test -f 'openbox/window.c'; then $(CYGPATH_W) 'openbox/window.c'; else $(CYGPATH_W) '$(srcdir)/openbox/window.c'; fi`
+
+tools/gdm-control/gdm_control-gdm-control.o: tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gdm-control/gdm_control-gdm-control.o -MD -MP -MF tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo -c -o tools/gdm-control/gdm_control-gdm-control.o `test -f 'tools/gdm-control/gdm-control.c' || echo '$(srcdir)/'`tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gdm-control/gdm-control.c' object='tools/gdm-control/gdm_control-gdm-control.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gdm-control/gdm_control-gdm-control.o `test -f 'tools/gdm-control/gdm-control.c' || echo '$(srcdir)/'`tools/gdm-control/gdm-control.c
+
+tools/gdm-control/gdm_control-gdm-control.obj: tools/gdm-control/gdm-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gdm-control/gdm_control-gdm-control.obj -MD -MP -MF tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo -c -o tools/gdm-control/gdm_control-gdm-control.obj `if test -f 'tools/gdm-control/gdm-control.c'; then $(CYGPATH_W) 'tools/gdm-control/gdm-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gdm-control/gdm-control.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Tpo tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gdm-control/gdm-control.c' object='tools/gdm-control/gdm_control-gdm-control.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gdm_control_gdm_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gdm-control/gdm_control-gdm-control.obj `if test -f 'tools/gdm-control/gdm-control.c'; then $(CYGPATH_W) 'tools/gdm-control/gdm-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gdm-control/gdm-control.c'; fi`
+
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o: tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o -MD -MP -MF tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o `test -f 'tools/gnome-panel-control/gnome-panel-control.c' || echo '$(srcdir)/'`tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gnome-panel-control/gnome-panel-control.c' object='tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.o `test -f 'tools/gnome-panel-control/gnome-panel-control.c' || echo '$(srcdir)/'`tools/gnome-panel-control/gnome-panel-control.c
+
+tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj: tools/gnome-panel-control/gnome-panel-control.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj -MD -MP -MF tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj `if test -f 'tools/gnome-panel-control/gnome-panel-control.c'; then $(CYGPATH_W) 'tools/gnome-panel-control/gnome-panel-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gnome-panel-control/gnome-panel-control.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Tpo tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/gnome-panel-control/gnome-panel-control.c' object='tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_gnome_panel_control_gnome_panel_control_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/gnome-panel-control/gnome_panel_control-gnome-panel-control.obj `if test -f 'tools/gnome-panel-control/gnome-panel-control.c'; then $(CYGPATH_W) 'tools/gnome-panel-control/gnome-panel-control.c'; else $(CYGPATH_W) '$(srcdir)/tools/gnome-panel-control/gnome-panel-control.c'; fi`
+
+tools/obxprop/obxprop-obxprop.o: tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/obxprop/obxprop-obxprop.o -MD -MP -MF tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo -c -o tools/obxprop/obxprop-obxprop.o `test -f 'tools/obxprop/obxprop.c' || echo '$(srcdir)/'`tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/obxprop/obxprop.c' object='tools/obxprop/obxprop-obxprop.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/obxprop/obxprop-obxprop.o `test -f 'tools/obxprop/obxprop.c' || echo '$(srcdir)/'`tools/obxprop/obxprop.c
+
+tools/obxprop/obxprop-obxprop.obj: tools/obxprop/obxprop.c
+@am__fastdepCC_TRUE@	$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT tools/obxprop/obxprop-obxprop.obj -MD -MP -MF tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo -c -o tools/obxprop/obxprop-obxprop.obj `if test -f 'tools/obxprop/obxprop.c'; then $(CYGPATH_W) 'tools/obxprop/obxprop.c'; else $(CYGPATH_W) '$(srcdir)/tools/obxprop/obxprop.c'; fi`
+@am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) tools/obxprop/$(DEPDIR)/obxprop-obxprop.Tpo tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='tools/obxprop/obxprop.c' object='tools/obxprop/obxprop-obxprop.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@	$(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(tools_obxprop_obxprop_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o tools/obxprop/obxprop-obxprop.obj `if test -f 'tools/obxprop/obxprop.c'; then $(CYGPATH_W) 'tools/obxprop/obxprop.c'; else $(CYGPATH_W) '$(srcdir)/tools/obxprop/obxprop.c'; fi`
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+	-rm -rf obrender/.libs obrender/_libs
+	-rm -rf obt/.libs obt/_libs
+	-rm -rf openbox/.libs openbox/_libs
+	-rm -rf tools/gdm-control/.libs tools/gdm-control/_libs
+	-rm -rf tools/gnome-panel-control/.libs tools/gnome-panel-control/_libs
+	-rm -rf tools/obxprop/.libs tools/obxprop/_libs
+
+distclean-libtool:
+	-rm -f libtool config.lt
+install-man1: $(nodist_man_MANS)
+	@$(NORMAL_INSTALL)
+	@list1=''; \
+	list2='$(nodist_man_MANS)'; \
+	test -n "$(man1dir)" \
+	  && test -n "`echo $$list1$$list2`" \
+	  || exit 0; \
+	echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+	$(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+	{ for i in $$list1; do echo "$$i"; done;  \
+	if test -n "$$list2"; then \
+	  for i in $$list2; do echo "$$i"; done \
+	    | sed -n '/\.1[a-z]*$$/p'; \
+	fi; \
+	} | while read p; do \
+	  if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; echo "$$p"; \
+	done | \
+	sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+	sed 'N;N;s,\n, ,g' | { \
+	list=; while read file base inst; do \
+	  if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+	    echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+	    $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+	  fi; \
+	done; \
+	for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+	while read files; do \
+	  test -z "$$files" || { \
+	    echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+	    $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+	done; }
+
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list=''; test -n "$(man1dir)" || exit 0; \
+	files=`{ for i in $$list; do echo "$$i"; done; \
+	l2='$(nodist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+	  sed -n '/\.1[a-z]*$$/p'; \
+	} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+	      -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+	dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
+install-dist_appsDATA: $(dist_apps_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_apps_DATA)'; test -n "$(appsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(appsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(appsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(appsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(appsdir)" || exit $$?; \
+	done
+
+uninstall-dist_appsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_apps_DATA)'; test -n "$(appsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(appsdir)'; $(am__uninstall_files_from_dir)
+install-dist_artwizboxed_themeDATA: $(dist_artwizboxed_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_artwizboxed_theme_DATA)'; test -n "$(artwizboxed_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(artwizboxed_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(artwizboxed_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(artwizboxed_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(artwizboxed_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_artwizboxed_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_artwizboxed_theme_DATA)'; test -n "$(artwizboxed_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(artwizboxed_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_bear2_themeDATA: $(dist_bear2_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_bear2_theme_DATA)'; test -n "$(bear2_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(bear2_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(bear2_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bear2_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(bear2_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_bear2_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_bear2_theme_DATA)'; test -n "$(bear2_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(bear2_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooks34_themeDATA: $(dist_clearlooks34_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooks34_theme_DATA)'; test -n "$(clearlooks34_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooks34_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooks34_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooks34_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooks34_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooks34_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooks34_theme_DATA)'; test -n "$(clearlooks34_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooks34_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooks_themeDATA: $(dist_clearlooks_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooks_theme_DATA)'; test -n "$(clearlooks_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooks_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooks_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooks_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooks_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooks_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooks_theme_DATA)'; test -n "$(clearlooks_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooks_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_clearlooksolive_themeDATA: $(dist_clearlooksolive_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_clearlooksolive_theme_DATA)'; test -n "$(clearlooksolive_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(clearlooksolive_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(clearlooksolive_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(clearlooksolive_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(clearlooksolive_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_clearlooksolive_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_clearlooksolive_theme_DATA)'; test -n "$(clearlooksolive_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(clearlooksolive_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_docDATA: $(dist_doc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
+	done
+
+uninstall-dist_docDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir)
+install-dist_docxbmDATA: $(dist_docxbm_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_docxbm_DATA)'; test -n "$(docxbmdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(docxbmdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(docxbmdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docxbmdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(docxbmdir)" || exit $$?; \
+	done
+
+uninstall-dist_docxbmDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_docxbm_DATA)'; test -n "$(docxbmdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(docxbmdir)'; $(am__uninstall_files_from_dir)
+install-dist_gnomesessionDATA: $(dist_gnomesession_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_gnomesession_DATA)'; test -n "$(gnomesessiondir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(gnomesessiondir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(gnomesessiondir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gnomesessiondir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(gnomesessiondir)" || exit $$?; \
+	done
+
+uninstall-dist_gnomesessionDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_gnomesession_DATA)'; test -n "$(gnomesessiondir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(gnomesessiondir)'; $(am__uninstall_files_from_dir)
+install-dist_gnomewmfilesDATA: $(dist_gnomewmfiles_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_gnomewmfiles_DATA)'; test -n "$(gnomewmfilesdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(gnomewmfilesdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(gnomewmfilesdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(gnomewmfilesdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(gnomewmfilesdir)" || exit $$?; \
+	done
+
+uninstall-dist_gnomewmfilesDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_gnomewmfiles_DATA)'; test -n "$(gnomewmfilesdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(gnomewmfilesdir)'; $(am__uninstall_files_from_dir)
+install-dist_mikachu_themeDATA: $(dist_mikachu_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_mikachu_theme_DATA)'; test -n "$(mikachu_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(mikachu_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(mikachu_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(mikachu_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(mikachu_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_mikachu_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_mikachu_theme_DATA)'; test -n "$(mikachu_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(mikachu_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_natura_themeDATA: $(dist_natura_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_natura_theme_DATA)'; test -n "$(natura_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(natura_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(natura_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(natura_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(natura_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_natura_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_natura_theme_DATA)'; test -n "$(natura_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(natura_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_onyx_themeDATA: $(dist_onyx_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_onyx_theme_DATA)'; test -n "$(onyx_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(onyx_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(onyx_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(onyx_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(onyx_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_onyx_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_onyx_theme_DATA)'; test -n "$(onyx_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(onyx_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_onyxcitrus_themeDATA: $(dist_onyxcitrus_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_onyxcitrus_theme_DATA)'; test -n "$(onyxcitrus_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(onyxcitrus_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(onyxcitrus_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(onyxcitrus_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(onyxcitrus_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_onyxcitrus_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_onyxcitrus_theme_DATA)'; test -n "$(onyxcitrus_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(onyxcitrus_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_orang_themeDATA: $(dist_orang_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_orang_theme_DATA)'; test -n "$(orang_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(orang_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(orang_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(orang_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(orang_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_orang_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_orang_theme_DATA)'; test -n "$(orang_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(orang_themedir)'; $(am__uninstall_files_from_dir)
+install-dist_pixmapDATA: $(dist_pixmap_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pixmapdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pixmapdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pixmapdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pixmapdir)" || exit $$?; \
+	done
+
+uninstall-dist_pixmapDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_pixmap_DATA)'; test -n "$(pixmapdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pixmapdir)'; $(am__uninstall_files_from_dir)
+install-dist_rcDATA: $(dist_rc_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_rc_DATA)'; test -n "$(rcdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rcdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rcdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rcdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(rcdir)" || exit $$?; \
+	done
+
+uninstall-dist_rcDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_rc_DATA)'; test -n "$(rcdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(rcdir)'; $(am__uninstall_files_from_dir)
+install-dist_syscrash_themeDATA: $(dist_syscrash_theme_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(dist_syscrash_theme_DATA)'; test -n "$(syscrash_themedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(syscrash_themedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(syscrash_themedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(syscrash_themedir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(syscrash_themedir)" || exit $$?; \
+	done
+
+uninstall-dist_syscrash_themeDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(dist_syscrash_theme_DATA)'; test -n "$(syscrash_themedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(syscrash_themedir)'; $(am__uninstall_files_from_dir)
+install-nodist_pkgconfigDATA: $(nodist_pkgconfig_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \
+	done
+
+uninstall-nodist_pkgconfigDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
+install-nodist_xsessionsDATA: $(nodist_xsessions_DATA)
+	@$(NORMAL_INSTALL)
+	@list='$(nodist_xsessions_DATA)'; test -n "$(xsessionsdir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(xsessionsdir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(xsessionsdir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(xsessionsdir)'"; \
+	  $(INSTALL_DATA) $$files "$(DESTDIR)$(xsessionsdir)" || exit $$?; \
+	done
+
+uninstall-nodist_xsessionsDATA:
+	@$(NORMAL_UNINSTALL)
+	@list='$(nodist_xsessions_DATA)'; test -n "$(xsessionsdir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(xsessionsdir)'; $(am__uninstall_files_from_dir)
+install-obtpubincludeHEADERS: $(obtpubinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(obtpubinclude_HEADERS)'; test -n "$(obtpubincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(obtpubincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(obtpubincludedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(obtpubincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(obtpubincludedir)" || exit $$?; \
+	done
+
+uninstall-obtpubincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(obtpubinclude_HEADERS)'; test -n "$(obtpubincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(obtpubincludedir)'; $(am__uninstall_files_from_dir)
+install-rrpubincludeHEADERS: $(rrpubinclude_HEADERS)
+	@$(NORMAL_INSTALL)
+	@list='$(rrpubinclude_HEADERS)'; test -n "$(rrpubincludedir)" || list=; \
+	if test -n "$$list"; then \
+	  echo " $(MKDIR_P) '$(DESTDIR)$(rrpubincludedir)'"; \
+	  $(MKDIR_P) "$(DESTDIR)$(rrpubincludedir)" || exit 1; \
+	fi; \
+	for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  echo "$$d$$p"; \
+	done | $(am__base_list) | \
+	while read files; do \
+	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(rrpubincludedir)'"; \
+	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(rrpubincludedir)" || exit $$?; \
+	done
+
+uninstall-rrpubincludeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(rrpubinclude_HEADERS)'; test -n "$(rrpubincludedir)" || list=; \
+	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+	dir='$(DESTDIR)$(rrpubincludedir)'; $(am__uninstall_files_from_dir)
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+distdir: $(BUILT_SOURCES)
+	$(MAKE) $(AM_MAKEFLAGS) distdir-am
+
+distdir-am: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    $(am__make_dryrun) \
+	      || test -d "$(distdir)/$$subdir" \
+	      || $(MKDIR_P) "$(distdir)/$$subdir" \
+	      || exit 1; \
+	    dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+	    $(am__relativize); \
+	    new_distdir=$$reldir; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
+
+dist-zstd: distdir
+	tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst
+	$(am__post_remove_distdir)
+
+dist-tarZ: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+
+dist-shar: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_remove_distdir)
+
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	*.tar.zst*) \
+	  zstd -dc $(distdir).tar.zst | $(am__untar) ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build/sub \
+	  && ../../configure \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	    --srcdir=../.. --prefix="$$dc_install_base" \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__post_remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+	  sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+	@test -n '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: trying to run $@ with an empty' \
+	       '$$(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	$(am__cd) '$(distuninstallcheck_dir)' || { \
+	  echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+	  exit 1; \
+	}; \
+	test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
+	   || { echo "ERROR: files left after uninstall:" ; \
+	        if test -n "$(DESTDIR)"; then \
+	          echo "  (check DESTDIR support)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-recursive
+all-am: Makefile $(PROGRAMS) $(LTLIBRARIES) $(SCRIPTS) $(MANS) $(DATA) \
+		$(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+install-checkPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+	for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libexecdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(appsdir)" "$(DESTDIR)$(artwizboxed_themedir)" "$(DESTDIR)$(bear2_themedir)" "$(DESTDIR)$(clearlooks34_themedir)" "$(DESTDIR)$(clearlooks_themedir)" "$(DESTDIR)$(clearlooksolive_themedir)" "$(DESTDIR)$(docdir)" "$(DESTDIR)$(docxbmdir)" "$(DESTDIR)$(gnomesessiondir)" "$(DESTDIR)$(gnomewmfilesdir)" "$(DESTDIR)$(mikachu_themedir)" "$(DESTDIR)$(natura_themedir)" "$(DESTDIR)$(onyx_themedir)" "$(DESTDIR)$(onyxcitrus_themedir)" "$(DESTDIR)$(orang_themedir)" "$(DESTDIR)$(pixmapdir)" "$(DESTDIR)$(rcdir)" "$(DESTDIR)$(syscrash_themedir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(xsessionsdir)" "$(DESTDIR)$(obtpubincludedir)" "$(DESTDIR)$(rrpubincludedir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	if test -z '$(STRIP)'; then \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	      install; \
+	else \
+	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+	fi
+mostlyclean-generic:
+
+clean-generic:
+	-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-rm -f obrender/$(DEPDIR)/$(am__dirstamp)
+	-rm -f obrender/$(am__dirstamp)
+	-rm -f obt/$(DEPDIR)/$(am__dirstamp)
+	-rm -f obt/$(am__dirstamp)
+	-rm -f openbox/$(DEPDIR)/$(am__dirstamp)
+	-rm -f openbox/$(am__dirstamp)
+	-rm -f openbox/actions/$(DEPDIR)/$(am__dirstamp)
+	-rm -f openbox/actions/$(am__dirstamp)
+	-rm -f tools/gdm-control/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/gdm-control/$(am__dirstamp)
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/gnome-panel-control/$(am__dirstamp)
+	-rm -f tools/obxprop/$(DEPDIR)/$(am__dirstamp)
+	-rm -f tools/obxprop/$(am__dirstamp)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \
+	clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS \
+	mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+		-rm -f obrender/$(DEPDIR)/libobrender_la-button.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-color.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-font.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-image.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-instance.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-mask.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-render.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-theme.Plo
+	-rm -f obrender/$(DEPDIR)/rendertest-test.Po
+	-rm -f obt/$(DEPDIR)/libobt_la-ddparse.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-display.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-keyboard.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-link.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-paths.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-prop.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-signal.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xml.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xqueue.Plo
+	-rm -f obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+	-rm -f obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+	-rm -f openbox/$(DEPDIR)/openbox-actions.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-config.Po
+	-rm -f openbox/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/$(DEPDIR)/openbox-event.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-frame.Po
+	-rm -f openbox/$(DEPDIR)/openbox-framerender.Po
+	-rm -f openbox/$(DEPDIR)/openbox-grab.Po
+	-rm -f openbox/$(DEPDIR)/openbox-group.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keyboard.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keytree.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menuframe.Po
+	-rm -f openbox/$(DEPDIR)/openbox-mouse.Po
+	-rm -f openbox/$(DEPDIR)/openbox-moveresize.Po
+	-rm -f openbox/$(DEPDIR)/openbox-openbox.Po
+	-rm -f openbox/$(DEPDIR)/openbox-ping.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place_overlap.Po
+	-rm -f openbox/$(DEPDIR)/openbox-popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-prompt.Po
+	-rm -f openbox/$(DEPDIR)/openbox-resist.Po
+	-rm -f openbox/$(DEPDIR)/openbox-screen.Po
+	-rm -f openbox/$(DEPDIR)/openbox-session.Po
+	-rm -f openbox/$(DEPDIR)/openbox-stacking.Po
+	-rm -f openbox/$(DEPDIR)/openbox-startupnotify.Po
+	-rm -f openbox/$(DEPDIR)/openbox-translate.Po
+	-rm -f openbox/$(DEPDIR)/openbox-window.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-all.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-close.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-decorations.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-desktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-execute.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-exit.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-iconify.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-if.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-kill.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-layer.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-lower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-maximize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-move.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-restart.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shade.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+	-rm -f tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+	-rm -f tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-libtool distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_appsDATA \
+	install-dist_artwizboxed_themeDATA \
+	install-dist_bear2_themeDATA \
+	install-dist_clearlooks34_themeDATA \
+	install-dist_clearlooks_themeDATA \
+	install-dist_clearlooksolive_themeDATA install-dist_docDATA \
+	install-dist_docxbmDATA install-dist_gnomesessionDATA \
+	install-dist_gnomewmfilesDATA install-dist_mikachu_themeDATA \
+	install-dist_natura_themeDATA install-dist_onyx_themeDATA \
+	install-dist_onyxcitrus_themeDATA install-dist_orang_themeDATA \
+	install-dist_pixmapDATA install-dist_rcDATA \
+	install-dist_rcSCRIPTS install-dist_syscrash_themeDATA \
+	install-man install-nodist_pkgconfigDATA \
+	install-nodist_rcSCRIPTS install-nodist_xsessionsDATA \
+	install-obtpubincludeHEADERS install-rrpubincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-dist_libexecSCRIPTS \
+	install-libLTLIBRARIES install-nodist_binSCRIPTS \
+	install-nodist_libexecSCRIPTS
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man: install-man1
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+		-rm -f obrender/$(DEPDIR)/libobrender_la-button.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-color.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-font.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-gradient.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-image.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-imagecache.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-instance.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-mask.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-render.Plo
+	-rm -f obrender/$(DEPDIR)/libobrender_la-theme.Plo
+	-rm -f obrender/$(DEPDIR)/rendertest-test.Po
+	-rm -f obt/$(DEPDIR)/libobt_la-ddparse.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-display.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-keyboard.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-link.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-paths.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-prop.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-signal.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xml.Plo
+	-rm -f obt/$(DEPDIR)/libobt_la-xqueue.Plo
+	-rm -f obt/$(DEPDIR)/obt_unittests-bsearch_unittest.Po
+	-rm -f obt/$(DEPDIR)/obt_unittests-unittest_base.Po
+	-rm -f openbox/$(DEPDIR)/openbox-actions.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_combined_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_list_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-client_menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-config.Po
+	-rm -f openbox/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/$(DEPDIR)/openbox-event.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_indicator.Po
+	-rm -f openbox/$(DEPDIR)/openbox-focus_cycle_popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-frame.Po
+	-rm -f openbox/$(DEPDIR)/openbox-framerender.Po
+	-rm -f openbox/$(DEPDIR)/openbox-grab.Po
+	-rm -f openbox/$(DEPDIR)/openbox-group.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keyboard.Po
+	-rm -f openbox/$(DEPDIR)/openbox-keytree.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menu.Po
+	-rm -f openbox/$(DEPDIR)/openbox-menuframe.Po
+	-rm -f openbox/$(DEPDIR)/openbox-mouse.Po
+	-rm -f openbox/$(DEPDIR)/openbox-moveresize.Po
+	-rm -f openbox/$(DEPDIR)/openbox-openbox.Po
+	-rm -f openbox/$(DEPDIR)/openbox-ping.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place.Po
+	-rm -f openbox/$(DEPDIR)/openbox-place_overlap.Po
+	-rm -f openbox/$(DEPDIR)/openbox-popup.Po
+	-rm -f openbox/$(DEPDIR)/openbox-prompt.Po
+	-rm -f openbox/$(DEPDIR)/openbox-resist.Po
+	-rm -f openbox/$(DEPDIR)/openbox-screen.Po
+	-rm -f openbox/$(DEPDIR)/openbox-session.Po
+	-rm -f openbox/$(DEPDIR)/openbox-stacking.Po
+	-rm -f openbox/$(DEPDIR)/openbox-startupnotify.Po
+	-rm -f openbox/$(DEPDIR)/openbox-translate.Po
+	-rm -f openbox/$(DEPDIR)/openbox-window.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-addremovedesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-all.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-breakchroot.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-close.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-cyclewindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-debug.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-decorations.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-desktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-directionalwindows.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dock.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-dockautohide.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-execute.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-exit.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focus.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-focustobottom.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-fullscreen.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-growtoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-iconify.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-if.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-kill.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-layer.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-lower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-maximize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-move.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moverelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-moveresizeto.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-movetoedge.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-omnipresent.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-raiselower.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-reconfigure.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resize.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-resizerelative.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-restart.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shade.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-shadelowerraise.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showdesktop.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-showmenu.Po
+	-rm -f openbox/actions/$(DEPDIR)/openbox-unfocus.Po
+	-rm -f tools/gdm-control/$(DEPDIR)/gdm_control-gdm-control.Po
+	-rm -f tools/gnome-panel-control/$(DEPDIR)/gnome_panel_control-gnome-panel-control.Po
+	-rm -f tools/obxprop/$(DEPDIR)/obxprop-obxprop.Po
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_appsDATA \
+	uninstall-dist_artwizboxed_themeDATA \
+	uninstall-dist_bear2_themeDATA \
+	uninstall-dist_clearlooks34_themeDATA \
+	uninstall-dist_clearlooks_themeDATA \
+	uninstall-dist_clearlooksolive_themeDATA \
+	uninstall-dist_docDATA uninstall-dist_docxbmDATA \
+	uninstall-dist_gnomesessionDATA \
+	uninstall-dist_gnomewmfilesDATA uninstall-dist_libexecSCRIPTS \
+	uninstall-dist_mikachu_themeDATA \
+	uninstall-dist_natura_themeDATA uninstall-dist_onyx_themeDATA \
+	uninstall-dist_onyxcitrus_themeDATA \
+	uninstall-dist_orang_themeDATA uninstall-dist_pixmapDATA \
+	uninstall-dist_rcDATA uninstall-dist_rcSCRIPTS \
+	uninstall-dist_syscrash_themeDATA uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-nodist_binSCRIPTS \
+	uninstall-nodist_libexecSCRIPTS uninstall-nodist_pkgconfigDATA \
+	uninstall-nodist_rcSCRIPTS uninstall-nodist_xsessionsDATA \
+	uninstall-obtpubincludeHEADERS uninstall-rrpubincludeHEADERS
+
+uninstall-man: uninstall-man1
+
+.MAKE: $(am__recursive_targets) check-am install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--depfiles am--refresh check check-am clean \
+	clean-binPROGRAMS clean-checkPROGRAMS clean-cscope \
+	clean-generic clean-libLTLIBRARIES clean-libtool \
+	clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \
+	dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \
+	dist-xz dist-zip dist-zstd distcheck distclean \
+	distclean-compile distclean-generic distclean-libtool \
+	distclean-local distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am html html-am info info-am \
+	install install-am install-binPROGRAMS install-data \
+	install-data-am install-dist_appsDATA \
+	install-dist_artwizboxed_themeDATA \
+	install-dist_bear2_themeDATA \
+	install-dist_clearlooks34_themeDATA \
+	install-dist_clearlooks_themeDATA \
+	install-dist_clearlooksolive_themeDATA install-dist_docDATA \
+	install-dist_docxbmDATA install-dist_gnomesessionDATA \
+	install-dist_gnomewmfilesDATA install-dist_libexecSCRIPTS \
+	install-dist_mikachu_themeDATA install-dist_natura_themeDATA \
+	install-dist_onyx_themeDATA install-dist_onyxcitrus_themeDATA \
+	install-dist_orang_themeDATA install-dist_pixmapDATA \
+	install-dist_rcDATA install-dist_rcSCRIPTS \
+	install-dist_syscrash_themeDATA install-dvi install-dvi-am \
+	install-exec install-exec-am install-html install-html-am \
+	install-info install-info-am install-libLTLIBRARIES \
+	install-man install-man1 install-nodist_binSCRIPTS \
+	install-nodist_libexecSCRIPTS install-nodist_pkgconfigDATA \
+	install-nodist_rcSCRIPTS install-nodist_xsessionsDATA \
+	install-obtpubincludeHEADERS install-pdf install-pdf-am \
+	install-ps install-ps-am install-rrpubincludeHEADERS \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic \
+	mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \
+	uninstall-am uninstall-binPROGRAMS uninstall-dist_appsDATA \
+	uninstall-dist_artwizboxed_themeDATA \
+	uninstall-dist_bear2_themeDATA \
+	uninstall-dist_clearlooks34_themeDATA \
+	uninstall-dist_clearlooks_themeDATA \
+	uninstall-dist_clearlooksolive_themeDATA \
+	uninstall-dist_docDATA uninstall-dist_docxbmDATA \
+	uninstall-dist_gnomesessionDATA \
+	uninstall-dist_gnomewmfilesDATA uninstall-dist_libexecSCRIPTS \
+	uninstall-dist_mikachu_themeDATA \
+	uninstall-dist_natura_themeDATA uninstall-dist_onyx_themeDATA \
+	uninstall-dist_onyxcitrus_themeDATA \
+	uninstall-dist_orang_themeDATA uninstall-dist_pixmapDATA \
+	uninstall-dist_rcDATA uninstall-dist_rcSCRIPTS \
+	uninstall-dist_syscrash_themeDATA uninstall-libLTLIBRARIES \
+	uninstall-man uninstall-man1 uninstall-nodist_binSCRIPTS \
+	uninstall-nodist_libexecSCRIPTS uninstall-nodist_pkgconfigDATA \
+	uninstall-nodist_rcSCRIPTS uninstall-nodist_xsessionsDATA \
+	uninstall-obtpubincludeHEADERS uninstall-rrpubincludeHEADERS
+
+.PRECIOUS: Makefile
+
+
+data/autostart/autostart: $(top_srcdir)/data/autostart/autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir -p $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+data/autostart/openbox-autostart: $(top_srcdir)/data/autostart/openbox-autostart.in Makefile
+	@echo make: creating $@
+	@test -d $(shell dirname $(top_builddir)/$@) || \
+	  mkdir -p $(shell dirname $(top_builddir)/$@)
+	@$(edit) $< >$(top_builddir)/$@
+
+%.desktop: %.desktop.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%-session: %-session.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+%.1.in: %.1.sgml
+	@echo make: creating $@
+	@docbook-to-man $< >$@
+
+%.1: %.1.in Makefile
+	@echo make: creating $@
+	@$(edit) $< >$@	
+
+#doc:
+#       $(MAKE) -$(MAKEFLAGS) -C doc/doxygen doc
+
+distclean-local:
+	for d in . m4 po obrender parser obt openbox; do \
+		for p in core core.* gmon.out *\~ *.orig *.rej .\#*; do \
+			rm -f "$$d/$$p"; \
+		done \
+	done
+
+.PHONY: doc
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
Index: openexr/Makefile
===================================================================
--- openexr/Makefile	(nonexistent)
+++ openexr/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/openexr
+
+versions    = 3.2.1
+pkgname     = openexr
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: openexr
===================================================================
--- openexr	(nonexistent)
+++ openexr	(revision 385)

Property changes on: openexr
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: openjdk/Makefile
===================================================================
--- openjdk/Makefile	(nonexistent)
+++ openjdk/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/openjdk
+
+versions    = 21.35
+pkgname     = openjdk
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: openjdk
===================================================================
--- openjdk	(nonexistent)
+++ openjdk	(revision 385)

Property changes on: openjdk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: pcmanfm/Makefile
===================================================================
--- pcmanfm/Makefile	(nonexistent)
+++ pcmanfm/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: pcmanfm/libfm/Makefile
===================================================================
--- pcmanfm/libfm/Makefile	(nonexistent)
+++ pcmanfm/libfm/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/pcmanfm/libfm
+
+versions    = 1.3.2
+pkgname     = libfm
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: pcmanfm/libfm
===================================================================
--- pcmanfm/libfm	(nonexistent)
+++ pcmanfm/libfm	(revision 385)

Property changes on: pcmanfm/libfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: pcmanfm/pcmanfm/Makefile
===================================================================
--- pcmanfm/pcmanfm/Makefile	(nonexistent)
+++ pcmanfm/pcmanfm/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/pcmanfm/pcmanfm
+
+versions    = 1.3.2
+pkgname     = pcmanfm
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: pcmanfm/pcmanfm
===================================================================
--- pcmanfm/pcmanfm	(nonexistent)
+++ pcmanfm/pcmanfm	(revision 385)

Property changes on: pcmanfm/pcmanfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: pcmanfm
===================================================================
--- pcmanfm	(nonexistent)
+++ pcmanfm	(revision 385)

Property changes on: pcmanfm
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: php-imagick/Makefile
===================================================================
--- php-imagick/Makefile	(nonexistent)
+++ php-imagick/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/php-imagick
+
+versions    = 3.7.0
+pkgname     = php-imagick
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: php-imagick
===================================================================
--- php-imagick	(nonexistent)
+++ php-imagick	(revision 385)

Property changes on: php-imagick
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: pycairo/Makefile
===================================================================
--- pycairo/Makefile	(nonexistent)
+++ pycairo/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/pycairo
+
+versions    = 1.23.0
+pkgname     = pycairo
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/pycairo-1.23.0-sphinx6.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-1.23.0-sphinx6-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: pycairo/create-1.23.0-sphinx6-patch/create.patch.sh
===================================================================
--- pycairo/create-1.23.0-sphinx6-patch/create.patch.sh	(nonexistent)
+++ pycairo/create-1.23.0-sphinx6-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.23.0
+
+tar --files-from=file.list -xJvf ../pycairo-$VERSION.tar.xz
+mv pycairo-$VERSION pycairo-$VERSION-orig
+
+cp -rf ./pycairo-$VERSION-new ./pycairo-$VERSION
+
+diff --unified -Nr  pycairo-$VERSION-orig  pycairo-$VERSION > pycairo-$VERSION-sphinx6.patch
+
+mv pycairo-$VERSION-sphinx6.patch ../patches
+
+rm -rf ./pycairo-$VERSION
+rm -rf ./pycairo-$VERSION-orig

Property changes on: pycairo/create-1.23.0-sphinx6-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: pycairo/create-1.23.0-sphinx6-patch/file.list
===================================================================
--- pycairo/create-1.23.0-sphinx6-patch/file.list	(nonexistent)
+++ pycairo/create-1.23.0-sphinx6-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+pycairo-1.23.0/docs/conf.py
Index: pycairo/create-1.23.0-sphinx6-patch/pycairo-1.23.0-new/docs/conf.py
===================================================================
--- pycairo/create-1.23.0-sphinx6-patch/pycairo-1.23.0-new/docs/conf.py	(nonexistent)
+++ pycairo/create-1.23.0-sphinx6-patch/pycairo-1.23.0-new/docs/conf.py	(revision 385)
@@ -0,0 +1,67 @@
+# -*- coding: utf-8 -*-
+
+import os
+import sys
+
+from sphinx.util import logging
+
+# https://github.com/sphinx-doc/sphinx/issues/10112
+logging.getLogger('sphinx.ext.extlinks').setLevel(40)
+
+dir_ = os.path.dirname(os.path.realpath(__file__))
+
+
+def exec_module(path):
+    import importlib.machinery
+    loader = importlib.machinery.SourceFileLoader("cairo", path)
+    return loader.load_module()
+
+
+sys.modules["cairo"] = exec_module(os.path.join(dir_, "..", "cairo", "__init__.pyi"))
+
+extensions = [
+    'sphinx.ext.intersphinx',
+    'sphinx.ext.extlinks',
+    'sphinx.ext.autodoc',
+]
+intersphinx_mapping = {
+    'python3': ('https://docs.python.org/3', None),
+}
+source_suffix = '.rst'
+master_doc = 'index'
+project = u'Pycairo'
+html_show_copyright = False
+exclude_patterns = ['_build']
+pygments_style = 'sphinx'
+html_theme = "sphinx_rtd_theme"
+html_theme_options = {
+    "display_version": False,
+}
+html_context = {
+    'extra_css_files': [
+        '_static/extra.css',
+    ],
+}
+
+html_static_path = [
+    "extra.css",
+]
+
+extlinks = {
+    'fdobug': ('https://bugs.freedesktop.org/show_bug.cgi?id=%s', '#fdo-%s'),
+    'bug': ('https://github.com/pygobject/pycairo/issues/%s', '#%s'),
+    'pr': ('https://github.com/pygobject/pycairo/pull/%s', '#pr-%s'),
+    'user': ('https://github.com/%s', '%s'),
+}
+suppress_warnings = ["image.nonlocal_uri"]
+
+autoclass_content = 'class'
+
+autodoc_default_options = {
+    'member-order': 'bysource',
+}
+
+autodoc_type_aliases = {
+    '_PathLike': 'cairo._PathLike',
+    '_FileLike': 'cairo._FileLike',
+}
Index: pycairo/patches/README
===================================================================
--- pycairo/patches/README	(nonexistent)
+++ pycairo/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: pycairo/patches
===================================================================
--- pycairo/patches	(nonexistent)
+++ pycairo/patches	(revision 385)

Property changes on: pycairo/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: pycairo
===================================================================
--- pycairo	(nonexistent)
+++ pycairo	(revision 385)

Property changes on: pycairo
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: qt5/Makefile
===================================================================
--- qt5/Makefile	(revision 384)
+++ qt5/Makefile	(revision 385)
@@ -19,6 +19,7 @@
 patches    += $(CURDIR)/patches/qt5-5.15.8-breakpad.patch
 patches    += $(CURDIR)/patches/qt5-5.15.8-dav1d.patch
 patches    += $(CURDIR)/patches/qt5-5.15.8-ffmpeg.patch
+patches    += $(CURDIR)/patches/qt5-5.15.8-icu-permissive.patch
 patches    += $(CURDIR)/patches/qt5-5.15.8-libxml.patch
 patches    += $(CURDIR)/patches/qt5-5.15.8-module-version.patch
 patches    += $(CURDIR)/patches/qt5-5.15.8-mysql.patch
@@ -64,6 +65,7 @@
 	 ( cd create-5.15.8-breakpad-patch       ; ./create.patch.sh ) ; \
 	 ( cd create-5.15.8-dav1d-patch          ; ./create.patch.sh ) ; \
 	 ( cd create-5.15.8-ffmpeg-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-5.15.8-icu-permissive-patch ; ./create.patch.sh ) ; \
 	 ( cd create-5.15.8-libxml-patch         ; ./create.patch.sh ) ; \
 	 ( cd create-5.15.8-module-version-patch ; ./create.patch.sh ) ; \
 	 ( cd create-5.15.8-mysql-patch          ; ./create.patch.sh ) ; \
Index: qt5/create-5.15.8-icu-permissive-patch/create.patch.sh
===================================================================
--- qt5/create-5.15.8-icu-permissive-patch/create.patch.sh	(nonexistent)
+++ qt5/create-5.15.8-icu-permissive-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=5.15.8
+
+tar --files-from=file.list -xJvf ../qt-everywhere-src-$VERSION.tar.xz
+mv qt-everywhere-src-$VERSION qt-everywhere-src-$VERSION-orig
+
+cp -rf ./qt-everywhere-src-$VERSION-new ./qt-everywhere-src-$VERSION
+
+diff --unified -Nr  qt-everywhere-src-$VERSION-orig  qt-everywhere-src-$VERSION > qt5-$VERSION-icu-permissive.patch
+
+mv qt5-$VERSION-icu-permissive.patch ../patches
+
+rm -rf ./qt-everywhere-src-$VERSION
+rm -rf ./qt-everywhere-src-$VERSION-orig

Property changes on: qt5/create-5.15.8-icu-permissive-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: qt5/create-5.15.8-icu-permissive-patch/file.list
===================================================================
--- qt5/create-5.15.8-icu-permissive-patch/file.list	(nonexistent)
+++ qt5/create-5.15.8-icu-permissive-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+qt-everywhere-src-5.15.8/qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn
Index: qt5/create-5.15.8-icu-permissive-patch/qt-everywhere-src-5.15.8-new/qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn
===================================================================
--- qt5/create-5.15.8-icu-permissive-patch/qt-everywhere-src-5.15.8-new/qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn	(nonexistent)
+++ qt5/create-5.15.8-icu-permissive-patch/qt-everywhere-src-5.15.8-new/qtwebengine/src/3rdparty/chromium/build/config/compiler/BUILD.gn	(revision 385)
@@ -0,0 +1,2552 @@
+# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import("//build/config/android/config.gni")
+import("//build/config/c++/c++.gni")
+import("//build/config/chrome_build.gni")
+import("//build/config/chromecast_build.gni")
+import("//build/config/chromeos/args.gni")
+import("//build/config/clang/clang.gni")
+import("//build/config/compiler/compiler.gni")
+import("//build/config/coverage/coverage.gni")
+import("//build/config/dcheck_always_on.gni")
+import("//build/config/gclient_args.gni")
+import("//build/config/host_byteorder.gni")
+import("//build/config/sanitizers/sanitizers.gni")
+import("//build/config/ui.gni")
+import("//build/toolchain/cc_wrapper.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/toolchain.gni")
+import("//build_overrides/build.gni")
+
+# Import features.gni for the "use_qt" argument to be available.
+import("//build/config/features.gni")
+
+if (current_cpu == "arm" || current_cpu == "arm64") {
+  import("//build/config/arm.gni")
+}
+if (current_cpu == "mipsel" || current_cpu == "mips64el" ||
+    current_cpu == "mips" || current_cpu == "mips64") {
+  import("//build/config/mips.gni")
+}
+if (current_cpu == "x64") {
+  import("//build/config/x64.gni")
+}
+if (is_mac) {
+  import("//build/config/mac/symbols.gni")
+}
+if (is_ios) {
+  import("//build/config/ios/ios_sdk.gni")
+}
+if (is_nacl) {
+  # To keep NaCl variables out of builds that don't include NaCl, all
+  # variables defined in nacl/config.gni referenced here should be protected by
+  # is_nacl conditions.
+  import("//build/config/nacl/config.gni")
+}
+
+declare_args() {
+  # Normally, Android builds are lightly optimized, even for debug builds, to
+  # keep binary size down. Setting this flag to true disables such optimization
+  android_full_debug = false
+
+  # Compile in such a way as to make it possible for the profiler to unwind full
+  # stack frames. Setting this flag has a large effect on the performance of the
+  # generated code than just setting profiling, but gives the profiler more
+  # information to analyze.
+  # Requires profiling to be set to true.
+  enable_full_stack_frames_for_profiling = false
+
+  # When we are going to use gold we need to find it.
+  # This is initialized below, after use_gold might have been overridden.
+  gold_path = ""
+
+  # Enable fatal linker warnings. Building Chromium with certain versions
+  # of binutils can cause linker warning.
+  fatal_linker_warnings = true
+
+  # Build with C++ RTTI enabled. Chromium builds without RTTI by default,
+  # but some sanitizers are known to require it, like CFI diagnostics
+  # and UBsan variants.
+  use_rtti = use_cfi_diag || is_ubsan_vptr || is_ubsan_security
+
+  # AFDO (Automatic Feedback Directed Optimizer) is a form of profile-guided
+  # optimization that GCC supports. It used by ChromeOS in their official
+  # builds. To use it, set auto_profile_path to the path to a file containing
+  # the needed gcov profiling data.
+  auto_profile_path = ""
+
+  # Use stdlib=libc++
+  use_libcxx = is_mac
+
+  # Allow projects that wish to stay on C++11 to override Chromium's default.
+  use_cxx11 = false
+
+  # Path to an AFDO profile to use while building with clang, if any. Empty
+  # implies none.
+  clang_sample_profile_path = ""
+
+  # Some configurations have default sample profiles. If this is true and
+  # clang_sample_profile_path is empty, we'll fall back to the default.
+  #
+  # We currently only have default profiles for Chromium in-tree, so we disable
+  # this by default for all downstream projects, since these profiles are likely
+  # nonsensical for said projects.
+  clang_use_default_sample_profile =
+      chrome_pgo_phase == 0 && build_with_chromium && is_official_build &&
+      (is_android || chromeos_is_browser_only)
+
+  # This configuration is used to select a default profile in Chrome OS based on
+  # the microarchitectures we are using. This is only used if
+  # clang_use_default_sample_profile is true and clang_sample_profile_path is
+  # empty.
+  chromeos_afdo_platform = "silvermont"
+
+  # Emit debug information for profiling wile building with clang.
+  clang_emit_debug_info_for_profiling = false
+
+  # Turn this on to have the compiler output extra timing information.
+  compiler_timing = false
+
+  # Turn this on to use ghash feature of lld for faster debug link on Windows.
+  # http://blog.llvm.org/2018/01/improving-link-time-on-windows-with.html
+  use_ghash = true
+
+  # Whether to enable ThinLTO optimizations. Turning ThinLTO optimizations on
+  # can substantially increase link time and binary size, but they generally
+  # also make binaries a fair bit faster.
+  #
+  # TODO(gbiv): We disable optimizations by default on most platforms because
+  # the space overhead is too great. We should use some mixture of profiles and
+  # optimization settings to better tune the size increase.
+  thin_lto_enable_optimizations =
+      (is_chromeos || is_android || is_win) && is_official_build
+
+  # Initialize all local variables with a pattern. This flag will fill
+  # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the
+  # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent,
+  # recognizable in the debugger, and crashes on memory accesses through
+  # uninitialized pointers.
+  #
+  # TODO(crbug.com/1131993): Enabling this when 'is_android' is true breaks
+  # content_shell_test_apk on both ARM and x86.
+  #
+  # TODO(crbug.com/977230): Enabling this when 'use_xcode_clang' is true may
+  # call an old clang that doesn't support auto-init.
+  init_stack_vars = !is_android && !use_xcode_clang
+
+  # This argument is to control whether enabling text section splitting in the
+  # final binary. When enabled, the separated text sections with prefix
+  # '.text.hot', '.text.unlikely', '.text.startup' and '.text.exit' will not be
+  # merged to '.text' section. This allows us to identify the hot code section
+  # ('.text.hot') in the binary which may be mlocked or mapped to huge page to
+  # reduce TLB misses which gives performance improvement on cpu usage.
+  # The gold linker by default has text section splitting enabled.
+  use_text_section_splitting = false
+
+  # Token limits may not be accurate for build configs not covered by the CQ,
+  # so only enable them by default for mainstream build configs.
+  enable_wmax_tokens =
+      !is_official_build &&
+      ((is_mac && target_cpu == "x64" && !use_system_xcode &&
+        mac_xcode_version == "default") ||
+       (is_linux && !is_chromeos && target_cpu == "x64") ||
+       (is_win && target_cpu == "x86") || (is_win && target_cpu == "x64") ||
+       (is_android && target_cpu == "arm") ||
+       (is_android && target_cpu == "arm64"))
+
+  # Turn off the --call-graph-profile-sort flag for lld by default. Enable
+  # selectively for targets where it's beneficial.
+  enable_call_graph_profile_sort = false
+}
+
+declare_args() {
+  # C++11 may not be an option if Android test infrastructure is used.
+  use_cxx11_on_android = use_cxx11
+}
+
+declare_args() {
+  # Set to true to use icf, Identical Code Folding.
+  #
+  # icf=all is broken in older golds, see
+  # https://sourceware.org/bugzilla/show_bug.cgi?id=17704
+  # chromeos binutils has been patched with the fix, so always use icf there.
+  # The bug only affects x86 and x64, so we can still use ICF when targeting
+  # other architectures.
+  #
+  # lld doesn't have the bug.
+  use_icf = (is_posix || is_fuchsia) && !is_debug && !using_sanitizer &&
+            !use_clang_coverage && !(is_android && use_order_profiling) &&
+            (use_lld || (use_gold && (is_chromeos || !(current_cpu == "x86" ||
+                                                       current_cpu == "x64"))))
+}
+
+if (is_win || is_android || (is_chromeos && is_chromeos_device)) {
+  # Set the path to use orderfile for linking Chrome
+  # Note that this is for using only one orderfile for linking
+  # the Chrome binary/library.
+  declare_args() {
+    chrome_orderfile_path = ""
+
+    if (defined(default_chrome_orderfile)) {
+      # Allow downstream tools to set orderfile path with
+      # another variable.
+      chrome_orderfile_path = default_chrome_orderfile
+    } else if (is_win && is_clang && is_official_build) {
+      chrome_orderfile_path = "//chrome/build/chrome.$target_cpu.orderfile"
+    } else if (is_chromeos && is_chromeos_device) {
+      chrome_orderfile_path = "//chromeos/profiles/chromeos.orderfile.txt"
+    }
+  }
+}
+
+assert(!(llvm_force_head_revision && use_goma),
+       "can't use goma with trunk clang")
+
+# default_include_dirs ---------------------------------------------------------
+#
+# This is a separate config so that third_party code (which would not use the
+# source root and might have conflicting versions of some headers) can remove
+# this and specify their own include paths.
+config("default_include_dirs") {
+  include_dirs = [
+    root_gen_dir,
+    "//",
+  ]
+}
+
+# compiler ---------------------------------------------------------------------
+#
+# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discussion about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
+config("compiler") {
+  asmflags = []
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  cflags_objc = []
+  cflags_objcc = []
+  ldflags = []
+  defines = []
+  configs = []
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:compiler" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:compiler" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:compiler" ]
+    if (is_chromeos) {
+      configs += [ "//build/config/chromeos:compiler" ]
+    }
+  } else if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:compiler" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:compiler" ]
+  } else if (is_fuchsia) {
+    configs += [ "//build/config/fuchsia:compiler" ]
+  } else if (current_os == "aix") {
+    configs += [ "//build/config/aix:compiler" ]
+  }
+
+  configs += [
+    # See the definitions below.
+    ":clang_revision",
+    ":compiler_cpu_abi",
+    ":compiler_codegen",
+    ":compiler_deterministic",
+  ]
+
+  # In general, Windows is totally different, but all the other builds share
+  # some common GCC configuration.
+  if (!is_win) {
+    # Common POSIX compiler flags setup.
+    # --------------------------------
+    cflags += [ "-fno-strict-aliasing" ]  # See http://crbug.com/32204
+
+    # Stack protection.
+    if (is_mac) {
+      # The strong variant of the stack protector significantly increases
+      # binary size, so only enable it in debug mode.
+      if (is_debug) {
+        cflags += [ "-fstack-protector-strong" ]
+      } else {
+        cflags += [ "-fstack-protector" ]
+      }
+    } else if ((is_posix && !is_chromeos && !is_nacl) || is_fuchsia) {
+      # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it.
+      # See also https://crbug.com/533294
+      cflags += [ "--param=ssp-buffer-size=4" ]
+
+      # The x86 toolchain currently has problems with stack-protector.
+      if (is_android && current_cpu == "x86") {
+        cflags += [ "-fno-stack-protector" ]
+      } else if (current_os != "aix") {
+        # Not available on aix.
+        cflags += [ "-fstack-protector" ]
+      }
+    }
+
+    # Linker warnings.
+    if (fatal_linker_warnings && !is_apple && current_os != "aix") {
+      ldflags += [ "-Wl,--fatal-warnings" ]
+    }
+    if (fatal_linker_warnings && is_apple &&
+        # TODO(https://crbug.com/1107955): Enable in arm64 component builds.
+        !(is_mac && target_cpu == "arm64" && is_component_build)) {
+      ldflags += [ "-Wl,-fatal_warnings" ]
+    }
+  } else {
+  }
+
+  if (use_qt && is_clang) {
+    cflags += [
+      "-Wno-unknown-attributes",
+      "-Wno-unknown-pragmas",
+      "-Wno-unknown-warning-option"
+    ]
+    cflags_cc += [
+      "-Wno-parentheses-equality",
+      "-Wno-tautological-compare",
+      "-Wno-thread-safety-attributes",
+    ]
+  }
+
+  if (is_clang && (is_debug || use_qt)) {
+    # Allow comparing the address of references and 'this' against 0
+    # in debug builds. Technically, these can never be null in
+    # well-defined C/C++ and Clang can optimize such checks away in
+    # release builds, but they may be used in asserts in debug builds.
+    cflags_cc += [
+      "-Wno-undefined-bool-conversion",
+      "-Wno-tautological-undefined-compare",
+    ]
+  }
+
+  # Non-Mac Posix and Fuchsia compiler flags setup.
+  # -----------------------------------
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    if (enable_profiling) {
+      if (!is_debug) {
+        cflags += [ "-g" ]
+
+        if (enable_full_stack_frames_for_profiling) {
+          cflags += [
+            "-fno-inline",
+            "-fno-optimize-sibling-calls",
+          ]
+        }
+      }
+    }
+
+    # Explicitly pass --build-id to ld. Compilers used to always pass this
+    # implicitly but don't any more (in particular clang when built without
+    # ENABLE_LINKER_BUILD_ID=ON).
+    if (is_official_build) {
+      # The sha1 build id has lower risk of collision but is more expensive to
+      # compute, so only use it in the official build to avoid slowing down
+      # links.
+      ldflags += [ "-Wl,--build-id=sha1" ]
+    } else if (current_os != "aix") {
+      ldflags += [ "-Wl,--build-id" ]
+    }
+
+    if (!is_android) {
+      defines += [
+        # _FILE_OFFSET_BITS=64 should not be set on Android in order to maintain
+        # the behavior of the Android NDK from earlier versions.
+        # See https://android-developers.googleblog.com/2017/09/introducing-android-native-development.html
+        "_FILE_OFFSET_BITS=64",
+        "_LARGEFILE_SOURCE",
+        "_LARGEFILE64_SOURCE",
+      ]
+    }
+
+    if (!is_nacl) {
+      if (exclude_unwind_tables) {
+        cflags += [
+          "-fno-unwind-tables",
+          "-fno-asynchronous-unwind-tables",
+        ]
+        defines += [ "NO_UNWIND_TABLES" ]
+      } else {
+        cflags += [ "-funwind-tables" ]
+      }
+    }
+  }
+
+  # Linux/Android/Fuchsia common flags setup.
+  # ---------------------------------
+  if (is_linux || is_chromeos || is_android || is_fuchsia) {
+    asmflags += [ "-fPIC" ]
+    cflags += [ "-fPIC" ]
+    ldflags += [ "-fPIC" ]
+
+    if (!is_clang) {
+      # Use pipes for communicating between sub-processes. Faster.
+      # (This flag doesn't do anything with Clang.)
+      cflags += [ "-pipe" ]
+    }
+
+    ldflags += [
+      "-Wl,-z,noexecstack",
+      "-Wl,-z,relro",
+    ]
+
+    if (!is_component_build) {
+      ldflags += [ "-Wl,-z,now" ]
+    }
+
+    # Compiler instrumentation can introduce dependencies in DSOs to symbols in
+    # the executable they are loaded into, so they are unresolved at link-time.
+    if (!using_sanitizer) {
+      ldflags += [
+        "-Wl,-z,defs",
+        "-Wl,--as-needed",
+      ]
+    }
+  }
+
+  # Linux-specific compiler flags setup.
+  # ------------------------------------
+  if ((is_posix || is_fuchsia) && use_lld) {
+    ldflags += [ "-fuse-ld=lld" ]
+    if (current_cpu == "arm64") {
+      # Reduce the page size from 65536 in order to reduce binary size slightly
+      # by shrinking the alignment gap between segments. This also causes all
+      # segments to be mapped adjacently, which breakpad relies on.
+      ldflags += [ "-Wl,-z,max-page-size=4096" ]
+    }
+  } else if (use_gold) {
+    ldflags += [ "-fuse-ld=gold" ]
+    if (!is_android) {
+      # On Android, this isn't needed.  gcc in the NDK knows to look next to
+      # it with -fuse-ld=gold, and clang gets a --gcc-toolchain flag passed
+      # above.
+      if (gold_path != "") {
+        ldflags += [ "-B$gold_path" ]
+      }
+
+#      ldflags += [
+        # Experimentation found that using four linking threads
+        # saved ~20% of link time.
+        # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+        # Only apply this to the target linker, since the host
+        # linker might not be gold, but isn't used much anyway.
+#        "-Wl,--threads",
+#        "-Wl,--thread-count=4",
+#      ]
+    }
+
+    # TODO(thestig): Make this flag work with GN.
+    #if (!is_official_build && !is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) {
+    #  ldflags += [
+    #    "-Wl,--detect-odr-violations",
+    #  ]
+    #}
+  }
+
+  if (use_icf) {
+    ldflags += [ "-Wl,--icf=all" ]
+  }
+
+  if (is_linux || is_chromeos) {
+    cflags += [ "-pthread" ]
+    # Do not use the -pthread ldflag here since it becomes a no-op
+    # when using -nodefaultlibs, which would cause an unused argument
+    # error.  "-lpthread" is added in //build/config:default_libs.
+  }
+
+  # Clang-specific compiler flags setup.
+  # ------------------------------------
+  if (is_clang) {
+    cflags += [ "-fcolor-diagnostics" ]
+
+    # Enable -fmerge-all-constants. This used to be the default in clang
+    # for over a decade. It makes clang non-conforming, but is fairly safe
+    # in practice and saves some binary size. We might want to consider
+    # disabling this (https://bugs.llvm.org/show_bug.cgi?id=18538#c13),
+    # but for now it looks like our build might rely on it
+    # (https://crbug.com/829795).
+    cflags += [ "-fmerge-all-constants" ]
+  }
+
+  if (use_lld) {
+    # TODO(thakis): Make the driver pass --color-diagnostics to the linker
+    # if -fcolor-diagnostics is passed to it, and pass -fcolor-diagnostics
+    # in ldflags instead.
+    if (is_win) {
+      # On Windows, we call the linker directly, instead of calling it through
+      # the driver.
+      ldflags += [ "--color-diagnostics" ]
+    } else {
+      ldflags += [ "-Wl,--color-diagnostics" ]
+    }
+  }
+
+  # Enable text section splitting only on linux when using lld for now. Other
+  # platforms can be added later if needed.
+  if ((is_linux || is_chromeos) && use_lld && use_text_section_splitting) {
+    ldflags += [ "-Wl,-z,keep-text-section-prefix" ]
+  }
+
+  if (is_clang && !is_nacl && !use_xcode_clang && !use_qt) {
+    cflags += [ "-fcrash-diagnostics-dir=" + clang_diagnostic_dir ]
+
+    cflags += [
+      # TODO(hans): Remove this once Clang generates better optimized debug info
+      # by default. https://crbug.com/765793
+      "-mllvm",
+      "-instcombine-lower-dbg-declare=0",
+    ]
+
+    # Pinned clang has enable-dse-memoryssa enabled by default but it's broken,
+    # so we have to force it off.
+    # Trunk clang has it disabled by default but it might work, so we force it
+    # on so the ToT bots can check if it works now.
+    if (!llvm_force_head_revision) {
+      cflags += [
+        # TODO(https://crbug.com/1127713): Investigate, remove.
+        "-mllvm",
+        "-enable-dse-memoryssa=false",
+      ]
+    }
+    if (llvm_force_head_revision) {
+      cflags += [
+        # TODO(https://crbug.com/1127713): Investigate, remove.
+        "-mllvm",
+        "-enable-dse-memoryssa=true",
+      ]
+    }
+  }
+
+  # C11/C++11 compiler flags setup.
+  # ---------------------------
+  if (is_linux || is_chromeos || is_android || (is_nacl && is_clang) ||
+      current_os == "aix") {
+    if (target_os == "android") {
+      cxx11_override = use_cxx11_on_android
+    } else {
+      cxx11_override = use_cxx11
+    }
+
+    if (is_clang) {
+      standard_prefix = "c"
+
+      # Since we build with -std=c* and not -std=gnu*, _GNU_SOURCE will not be
+      # defined by the compiler.  However, lots of code relies on the
+      # non-standard features that _GNU_SOURCE enables, so define it manually.
+      defines += [ "_GNU_SOURCE" ]
+
+      if (is_nacl) {
+        # Undefine __STRICT_ANSI__ to get non-standard features which would
+        # otherwise not be enabled by NaCl's sysroots.
+        cflags += [ "-U__STRICT_ANSI__" ]
+      }
+    } else {
+      # Gcc does not support ##__VA_ARGS__ when in standards-conforming mode,
+      # but we use this feature in several places in Chromium.
+      # TODO(thomasanderson): Replace usages of ##__VA_ARGS__ with the
+      # standard-compliant __VA_OPT__ added by C++20, and switch the gcc build
+      # to -std=c*.
+      standard_prefix = "gnu"
+    }
+
+    cflags_c += [ "-std=${standard_prefix}11" ]
+    if (cxx11_override) {
+      # Override Chromium's default for projects that wish to stay on C++11.
+      cflags_cc += [ "-std=${standard_prefix}++11" ]
+    } else {
+      cflags_cc += [ "-std=${standard_prefix}++14" ]
+    }
+  } else if (!is_win && !is_nacl) {
+    if (target_os == "android") {
+      cxx11_override = use_cxx11_on_android
+    } else {
+      cxx11_override = use_cxx11
+    }
+
+    # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu11/gnu++11
+    # or c11/c++11; we technically don't need this toolchain any more, but there
+    # are still a few buildbots using it, so until those are turned off
+    # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above.
+    cflags_c += [ "-std=c11" ]
+    if (cxx11_override) {
+      cflags_cc += [ "-std=c++11" ]
+    } else {
+      cflags_cc += [ "-std=c++14" ]
+    }
+  }
+
+  # C++17 removes trigraph support, so preemptively disable trigraphs. This is
+  # especially useful given the collision with ecmascript's logical assignment
+  # operators: https://github.com/tc39/proposal-logical-assignment
+  if (is_clang) {
+    # clang-cl disables trigraphs by default
+    if (!is_win) {
+      # The gnu variants of C++11 and C++14 already disable trigraph support,
+      # but when building with clang, we use -std=c++11 / -std=c++14, which
+      # enables trigraph support: override that here.
+      cflags_cc += [ "-fno-trigraphs" ]
+    }
+
+    # Don't warn that trigraphs are ignored, since trigraphs are disabled
+    # anyway.
+    cflags_cc += [ "-Wno-trigraphs" ]
+  }
+
+  if (use_libcxx) {
+    if (is_mac) {
+      # The system libc++ on Mac doesn't have aligned allocation in C++17.
+      defines += [ "_LIBCPP_HAS_NO_ALIGNED_ALLOCATION" ]
+    }
+    cflags_cc += [ "-stdlib=libc++" ]
+    ldflags += [ "-stdlib=libc++" ]
+  }
+
+  # Add flags for link-time optimization. These flags enable
+  # optimizations/transformations that require whole-program visibility at link
+  # time, so they need to be applied to all translation units, and we may end up
+  # with miscompiles if only part of the program is compiled with LTO flags. For
+  # that reason, we cannot allow targets to enable or disable these flags, for
+  # example by disabling the optimize configuration.
+  # TODO(pcc): Make this conditional on is_official_build rather than on gn
+  # flags for specific features.
+  if (!is_debug && use_thin_lto && is_a_target_toolchain) {
+    assert(use_lld, "LTO is only supported with lld")
+
+    cflags += [
+      "-flto=thin",
+      "-fsplit-lto-unit",
+    ]
+
+    if (thin_lto_enable_optimizations) {
+      lto_opt_level = 2
+    } else {
+      lto_opt_level = 0
+    }
+
+    if (is_win) {
+      # This is a straight translation of the non-Windows flags below,
+      # except we do not use the ThinLTO cache, which leaks temporary
+      # files on Windows (https://crbug.com/871962).
+      ldflags += [
+        "/opt:lldlto=" + lto_opt_level,
+        "/opt:lldltojobs=" + max_jobs_per_link,
+
+        # Experimentally determined to yield a reasonable trade-off between
+        # build time, run-time performance, and binary size.
+        "-mllvm:-import-instr-limit=10",
+      ]
+    } else {
+      ldflags += [ "-flto=thin" ]
+
+      # Enabling ThinLTO on Chrome OS too, in an effort to reduce the memory
+      # usage in crbug.com/1038040. Note this will increase build time in
+      # Chrome OS.
+
+      # Limit the parallelism to avoid too aggressive competition between
+      # linker jobs. This is still suboptimal to a potential dynamic
+      # resource allocation scheme, but should be good enough.
+      ldflags += [ "-Wl,--thinlto-jobs=" + max_jobs_per_link ]
+
+      # Limit the size of the ThinLTO cache to the lesser of 10% of
+      # available disk space, 10GB and 100000 files.
+      cache_policy =
+          "cache_size=10%:cache_size_bytes=10g:cache_size_files=100000"
+      ldflags += [
+        "-Wl,--thinlto-cache-dir=" +
+            rebase_path("$root_out_dir/thinlto-cache", root_build_dir),
+        "-Wl,--thinlto-cache-policy,$cache_policy",
+      ]
+
+      ldflags += [ "-Wl,--lto-O" + lto_opt_level ]
+      if (thin_lto_enable_optimizations) {
+        if (is_android) {
+          # TODO(gbiv): We ideally shouldn't need to specify this; ThinLTO
+          # should be able to better manage binary size increases on its own.
+          ldflags += [ "-Wl,-mllvm,-import-instr-limit=5" ]
+        }
+      }
+    }
+
+    # TODO(pcc): Re-enable this flag on Android. This will require libc++ to be
+    # built with ThinLTO (see https://crbug.com/767901) as well as the GVR shim.
+    if (!is_android) {
+      cflags += [ "-fwhole-program-vtables" ]
+      if (!is_win) {
+        ldflags += [ "-fwhole-program-vtables" ]
+      }
+    }
+
+    # This flag causes LTO to create an .ARM.attributes section with the correct
+    # architecture. This is necessary because LLD will refuse to link a program
+    # unless the architecture revision in .ARM.attributes is sufficiently new.
+    # TODO(pcc): The contents of .ARM.attributes should be based on the
+    # -march flag passed at compile time (see llvm.org/pr36291).
+    if (current_cpu == "arm") {
+      ldflags += [ "-march=$arm_arch" ]
+    }
+  }
+
+  if (compiler_timing) {
+    if (is_clang && !is_nacl) {
+      if (is_win) {
+        cflags += [ "/clang:-ftime-trace" ]
+      } else {
+        cflags += [ "-ftime-trace" ]
+      }
+    } else if (is_win) {
+      cflags += [
+        # "Documented" here:
+        # http://aras-p.info/blog/2017/10/23/Best-unknown-MSVC-flag-d2cgsummary/
+        "/d2cgsummary",
+      ]
+    }
+  }
+
+  # Pass flag to LLD so Android builds can allow debuggerd to properly symbolize
+  # stack crashes (http://crbug.com/919499).
+  if (use_lld && is_android) {
+    ldflags += [ "-Wl,--no-rosegment" ]
+  }
+
+  # LLD does call-graph-sorted binary layout by default when profile data is
+  # present. On Android this increases binary size due to more thinks for long
+  # jumps. Turn it off by default and enable selectively for targets where it's
+  # beneficial.
+  if (use_lld && !enable_call_graph_profile_sort) {
+    if (is_win) {
+      ldflags += [ "/call-graph-profile-sort:no" ]
+    } else {
+      ldflags += [ "-Wl,--no-call-graph-profile-sort" ]
+    }
+  }
+
+  # This flag enforces that member pointer base types are complete. It helps
+  # prevent us from running into problems in the Microsoft C++ ABI (see
+  # https://crbug.com/847724).
+  if (is_clang && !is_nacl && target_os != "chromeos" && !use_xcode_clang &&
+      (is_win || use_custom_libcxx)) {
+    cflags += [ "-fcomplete-member-pointers" ]
+  }
+
+  # Pass the same C/C++ flags to the objective C/C++ compiler.
+  cflags_objc += cflags_c
+  cflags_objcc += cflags_cc
+
+  # Assign any flags set for the C compiler to asmflags so that they are sent
+  # to the assembler. The Windows assembler takes different types of flags
+  # so only do so for posix platforms.
+  if (is_posix || is_fuchsia) {
+    asmflags += cflags
+    asmflags += cflags_c
+  }
+}
+
+# This provides the basic options to select the target CPU and ABI.
+# It is factored out of "compiler" so that special cases can use this
+# without using everything that "compiler" brings in.  Options that
+# tweak code generation for a particular CPU do not belong here!
+# See "compiler_codegen", below.
+config("compiler_cpu_abi") {
+  cflags = []
+  ldflags = []
+  defines = []
+
+  if ((is_posix && !is_apple) || is_fuchsia) {
+    # CPU architecture. We may or may not be doing a cross compile now, so for
+    # simplicity we always explicitly set the architecture.
+    if (current_cpu == "x64") {
+      cflags += [
+        "-m64",
+      ]
+      ldflags += [ "-m64" ]
+    } else if (current_cpu == "x86") {
+      cflags += [ "-m32" ]
+      ldflags += [ "-m32" ]
+      if (!is_nacl) {
+        cflags += [
+          "-msse2",
+          "-mfpmath=sse",
+          "-mmmx",
+        ]
+      }
+    } else if (current_cpu == "arm") {
+      if (is_clang && !is_android && !is_nacl) {
+        cflags += [ "--target=arm-linux-gnueabihf" ]
+        ldflags += [ "--target=arm-linux-gnueabihf" ]
+      }
+      if (!is_nacl) {
+        cflags += [
+          "-march=$arm_arch",
+          "-mfloat-abi=$arm_float_abi",
+        ]
+      }
+      if (arm_tune != "") {
+        cflags += [ "-mtune=$arm_tune" ]
+      }
+    } else if (current_cpu == "arm64") {
+      if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
+        cflags += [ "--target=aarch64-linux-gnu" ]
+        ldflags += [ "--target=aarch64-linux-gnu" ]
+      }
+    } else if (current_cpu == "mipsel" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mipsel-linux-android" ]
+            ldflags += [ "--target=mipsel-linux-android" ]
+          } else {
+            cflags += [ "--target=mipsel-linux-gnu" ]
+            ldflags += [ "--target=mipsel-linux-gnu" ]
+          }
+        } else {
+          cflags += [ "-EL" ]
+          ldflags += [ "-EL" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [ "-mno-odd-spreg" ]
+        ldflags += [ "-mips32r6" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r6",
+          ]
+        } else {
+          cflags += [
+            "-mips32r6",
+            "-Wa,-mips32r6",
+          ]
+          if (is_android) {
+            ldflags += [ "-Wl,-melf32ltsmip" ]
+          }
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips32r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32r2",
+          ]
+        } else {
+          cflags += [
+            "-mips32r2",
+            "-Wa,-mips32r2",
+          ]
+          if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+            cflags += [ "-m$mips_fpu_mode" ]
+          }
+        }
+      } else if (mips_arch_variant == "r1") {
+        ldflags += [ "-mips32" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mipsel",
+            "-mcpu=mips32",
+          ]
+        } else {
+          cflags += [
+            "-mips32",
+            "-Wa,-mips32",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips" && !is_nacl) {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips-linux-gnu" ]
+          ldflags += [ "--target=mips-linux-gnu" ]
+        } else {
+          cflags += [ "-EB" ]
+          ldflags += [ "-EB" ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips32r6",
+          "-Wa,-mips32r6",
+        ]
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips32r2",
+          "-Wa,-mips32r2",
+        ]
+        if (mips_float_abi == "hard" && mips_fpu_mode != "") {
+          cflags += [ "-m$mips_fpu_mode" ]
+        }
+      } else if (mips_arch_variant == "r1") {
+        cflags += [
+          "-mips32",
+          "-Wa,-mips32",
+        ]
+      }
+
+      if (mips_dsp_rev == 1) {
+        cflags += [ "-mdsp" ]
+      } else if (mips_dsp_rev == 2) {
+        cflags += [ "-mdspr2" ]
+      }
+
+      cflags += [ "-m${mips_float_abi}-float" ]
+    } else if (current_cpu == "mips64el") {
+      cflags += [ "-D__SANE_USERSPACE_TYPES__" ]
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          if (is_android) {
+            cflags += [ "--target=mips64el-linux-android" ]
+            ldflags += [ "--target=mips64el-linux-android" ]
+          } else {
+            cflags += [ "--target=mips64el-linux-gnuabi64" ]
+            ldflags += [ "--target=mips64el-linux-gnuabi64" ]
+          }
+        } else {
+          cflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EL",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r6",
+          ]
+        } else {
+          cflags += [
+            "-mips64r6",
+            "-Wa,-mips64r6",
+          ]
+          ldflags += [ "-mips64r6" ]
+        }
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        ldflags += [ "-mips64r2" ]
+        if (is_clang) {
+          cflags += [
+            "-march=mips64el",
+            "-mcpu=mips64r2",
+          ]
+        } else {
+          cflags += [
+            "-mips64r2",
+            "-Wa,-mips64r2",
+          ]
+        }
+      } else if (mips_arch_variant == "loongson3") {
+        defines += [ "_MIPS_ARCH_LOONGSON" ]
+        cflags += [
+          "-march=loongson3a",
+          "-mno-branch-likely",
+          "-Wa,-march=loongson3a",
+        ]
+      }
+    } else if (current_cpu == "mips64") {
+      ldflags += [ "-Wl,--hash-style=sysv" ]
+      if (custom_toolchain == "") {
+        if (is_clang) {
+          cflags += [ "--target=mips64-linux-gnuabi64" ]
+          ldflags += [ "--target=mips64-linux-gnuabi64" ]
+        } else {
+          cflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+          ldflags += [
+            "-EB",
+            "-mabi=64",
+          ]
+        }
+      }
+
+      if (mips_arch_variant == "r6") {
+        cflags += [
+          "-mips64r6",
+          "-Wa,-mips64r6",
+        ]
+        ldflags += [ "-mips64r6" ]
+
+        if (mips_use_msa == true) {
+          cflags += [
+            "-mmsa",
+            "-mfp64",
+          ]
+        }
+      } else if (mips_arch_variant == "r2") {
+        cflags += [
+          "-mips64r2",
+          "-Wa,-mips64r2",
+        ]
+        ldflags += [ "-mips64r2" ]
+      }
+    } else if (current_cpu == "pnacl" && is_nacl_nonsfi) {
+      if (target_cpu == "x86" || target_cpu == "x64") {
+        cflags += [
+          "-arch",
+          "x86-32-nonsfi",
+          "--pnacl-bias=x86-32-nonsfi",
+          "--target=i686-unknown-nacl",
+        ]
+        ldflags += [
+          "-arch",
+          "x86-32-nonsfi",
+          "--target=i686-unknown-nacl",
+        ]
+      } else if (target_cpu == "arm") {
+        cflags += [
+          "-arch",
+          "arm-nonsfi",
+          "-mfloat-abi=hard",
+          "--pnacl-bias=arm-nonsfi",
+          "--target=armv7-unknown-nacl-gnueabihf",
+        ]
+        ldflags += [
+          "-arch",
+          "arm-nonsfi",
+          "--target=armv7-unknown-nacl-gnueabihf",
+        ]
+      }
+    } else if (current_cpu == "ppc64") {
+      if (current_os == "aix") {
+        cflags += [ "-maix64" ]
+        ldflags += [ "-maix64" ]
+      } else {
+        cflags += [ "-m64" ]
+        ldflags += [ "-m64" ]
+      }
+    } else if (current_cpu == "s390x") {
+      cflags += [ "-m64" ]
+      ldflags += [ "-m64" ]
+    }
+  }
+
+  asmflags = cflags
+}
+
+# This provides options to tweak code generation that are necessary
+# for particular Chromium code or for working around particular
+# compiler bugs (or the combination of the two).
+config("compiler_codegen") {
+  configs = []
+  cflags = []
+  ldflags = []
+
+  if (is_nacl) {
+    configs += [ "//build/config/nacl:compiler_codegen" ]
+  }
+
+  if (current_cpu == "arm64" && is_android) {
+    # On arm64 disable outlining for Android. See crbug.com/931297 for more
+    # information.
+    cflags += [ "-mno-outline" ]
+
+    # This can be removed once https://bugs.llvm.org/show_bug.cgi?id=40348
+    # has been resolved, and -mno-outline is obeyed by the linker during
+    # ThinLTO.
+    ldflags += [ "-Wl,-mllvm,-enable-machine-outliner=never" ]
+  }
+
+  # TODO(thakis): Remove `if (!is_win)` after next clang roll.
+  if (!is_win) {
+    asmflags = cflags
+  }
+}
+
+# This provides options that make the build deterministic, so that the same
+# revision produces the same output, independent of the name of the build
+# directory and of the computer the build is done on.
+# The relative path from build dir to source dir makes it into the build
+# outputs, so it's recommended that you use a build dir two levels deep
+# (e.g. "out/Release") so that you get the same "../.." path as all the bots
+# in your build outputs.
+config("compiler_deterministic") {
+  cflags = []
+  ldflags = []
+
+  # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
+  # deterministic build.  See https://crbug.com/314403
+  if (!is_official_build) {
+    if (is_win && !is_clang) {
+      cflags += [
+        "/wd4117",  # Trying to define or undefine a predefined macro.
+        "/D__DATE__=",
+        "/D__TIME__=",
+        "/D__TIMESTAMP__=",
+      ]
+    } else {
+      cflags += [
+        "-Wno-builtin-macro-redefined",
+        "-D__DATE__=",
+        "-D__TIME__=",
+        "-D__TIMESTAMP__=",
+      ]
+    }
+  }
+
+  # Makes builds independent of absolute file path.
+  if (is_clang && strip_absolute_paths_from_debug_symbols) {
+    # If debug option is given, clang includes $cwd in debug info by default.
+    # For such build, this flag generates reproducible obj files even we use
+    # different build directory like "out/feature_a" and "out/feature_b" if
+    # we build same files with same compile flag.
+    # Other paths are already given in relative, no need to normalize them.
+    cflags += [
+      "-Xclang",
+      "-fdebug-compilation-dir",
+      "-Xclang",
+      ".",
+    ]
+    if (!is_win) {
+      # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+      asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+    }
+
+    if (is_win && use_lld) {
+      if (symbol_level == 2 || (is_clang && using_sanitizer)) {
+        # Absolutize source file paths for PDB. Pass the real build directory
+        # if the pdb contains source-level debug information and if linker
+        # reproducibility is not critical.
+        ldflags += [ "/PDBSourcePath:" + rebase_path(root_build_dir) ]
+      } else {
+        # Use a fake fixed base directory for paths in the pdb to make the pdb
+        # output fully deterministic and independent of the build directory.
+        ldflags += [ "/PDBSourcePath:o:\fake\prefix" ]
+      }
+    }
+  }
+
+  # Tells the compiler not to use absolute paths when passing the default
+  # paths to the tools it invokes. We don't want this because we don't
+  # really need it and it can mess up the goma cache entries.
+  if (is_clang && !is_nacl && !(use_qt && use_libcxx)) {
+    cflags += [ "-no-canonical-prefixes" ]
+  }
+}
+
+config("clang_revision") {
+  if (is_clang && clang_base_path == default_clang_base_path) {
+    update_args = [
+      "--print-revision",
+      "--verify-version=$clang_version",
+    ]
+    if (llvm_force_head_revision) {
+      update_args += [ "--llvm-force-head-revision" ]
+    }
+    clang_revision = exec_script("//tools/clang/scripts/update.py",
+                                 update_args,
+                                 "trim string")
+
+    # This is here so that all files get recompiled after a clang roll and
+    # when turning clang on or off. (defines are passed via the command line,
+    # and build system rebuild things when their commandline changes). Nothing
+    # should ever read this define.
+    defines = [ "CR_CLANG_REVISION=\"$clang_revision\"" ]
+  }
+}
+
+config("compiler_arm_fpu") {
+  if (current_cpu == "arm" && !is_ios && !is_nacl) {
+    cflags = [ "-mfpu=$arm_fpu" ]
+    if (!arm_use_thumb) {
+      cflags += [ "-marm" ]
+    }
+    asmflags = cflags
+  }
+}
+
+config("compiler_arm_thumb") {
+  if (current_cpu == "arm" && arm_use_thumb && is_posix &&
+      !(is_apple || is_nacl)) {
+    cflags = [ "-mthumb" ]
+  }
+}
+
+config("compiler_arm") {
+  if (current_cpu == "arm" && is_chromeos) {
+    # arm is normally the default mode for clang, but on chromeos a wrapper
+    # is used to pass -mthumb, and therefor change the default.
+    cflags = [ "-marm" ]
+  }
+}
+
+# runtime_library -------------------------------------------------------------
+#
+# Sets the runtime library and associated options.
+#
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
+
+config("runtime_library") {
+  configs = []
+
+  # The order of this config is important: it must appear before
+  # android:runtime_library.  This is to ensure libc++ appears before
+  # libandroid_support in the -isystem include order.  Otherwise, there will be
+  # build errors related to symbols declared in math.h.
+  if (use_custom_libcxx) {
+    configs += [ "//build/config/c++:runtime_library" ]
+  }
+
+  # TODO(crbug.com/830987): Come up with a better name for is POSIX + Fuchsia
+  # configuration.
+  if (is_posix || is_fuchsia) {
+    configs += [ "//build/config/posix:runtime_library" ]
+  }
+
+  # System-specific flags. If your compiler flags apply to one of the
+  # categories here, add it to the associated file to keep this shared config
+  # smaller.
+  if (is_win) {
+    configs += [ "//build/config/win:runtime_library" ]
+  } else if (is_linux || is_chromeos) {
+    configs += [ "//build/config/linux:runtime_library" ]
+  } else if (is_ios) {
+    configs += [ "//build/config/ios:runtime_library" ]
+  } else if (is_mac) {
+    configs += [ "//build/config/mac:runtime_library" ]
+  } else if (is_android) {
+    configs += [ "//build/config/android:runtime_library" ]
+  }
+
+  if (is_component_build) {
+    defines = [ "COMPONENT_BUILD" ]
+  }
+}
+
+# default_warnings ------------------------------------------------------------
+#
+# Collects all warning flags that are used by default.  This is used as a
+# subconfig of both chromium_code and no_chromium_code.  This way these
+# flags are guaranteed to appear on the compile command line after -Wall.
+config("default_warnings") {
+  cflags = []
+  cflags_c = []
+  cflags_cc = []
+  ldflags = []
+
+  if (is_win) {
+    if (treat_warnings_as_errors) {
+      cflags += [ "/WX" ]
+    }
+    if (fatal_linker_warnings) {
+      ldflags = [ "/WX" ]
+    }
+
+    cflags += [
+      # Warnings permanently disabled:
+
+      # C4091: 'typedef ': ignored on left of 'X' when no variable is
+      #                    declared.
+      # This happens in a number of Windows headers. Dumb.
+      "/wd4091",
+
+      # C4127: conditional expression is constant
+      # This warning can in theory catch dead code and other problems, but
+      # triggers in far too many desirable cases where the conditional
+      # expression is either set by macros or corresponds some legitimate
+      # compile-time constant expression (due to constant template args,
+      # conditionals comparing the sizes of different types, etc.).  Some of
+      # these can be worked around, but it's not worth it.
+      "/wd4127",
+
+      # C4251: 'identifier' : class 'type' needs to have dll-interface to be
+      #        used by clients of class 'type2'
+      # This is necessary for the shared library build.
+      "/wd4251",
+
+      # C4275:  non dll-interface class used as base for dll-interface class
+      # This points out a potential (but rare) problem with referencing static
+      # fields of a non-exported base, through the base's non-exported inline
+      # functions, or directly. The warning is subtle enough that people just
+      # suppressed it when they saw it, so it's not worth it.
+      "/wd4275",
+
+      # C4312 is a VS 2015 64-bit warning for integer to larger pointer.
+      # TODO(brucedawson): fix warnings, crbug.com/554200
+      "/wd4312",
+
+      # C4324 warns when padding is added to fulfill alignas requirements,
+      # but can trigger in benign cases that are difficult to individually
+      # suppress.
+      "/wd4324",
+
+      # C4351: new behavior: elements of array 'array' will be default
+      #        initialized
+      # This is a silly "warning" that basically just alerts you that the
+      # compiler is going to actually follow the language spec like it's
+      # supposed to, instead of not following it like old buggy versions did.
+      # There's absolutely no reason to turn this on.
+      "/wd4351",
+
+      # C4355: 'this': used in base member initializer list
+      # It's commonly useful to pass |this| to objects in a class' initializer
+      # list.  While this warning can catch real bugs, most of the time the
+      # constructors in question don't attempt to call methods on the passed-in
+      # pointer (until later), and annotating every legit usage of this is
+      # simply more hassle than the warning is worth.
+      "/wd4355",
+
+      # C4503: 'identifier': decorated name length exceeded, name was
+      #        truncated
+      # This only means that some long error messages might have truncated
+      # identifiers in the presence of lots of templates.  It has no effect on
+      # program correctness and there's no real reason to waste time trying to
+      # prevent it.
+      "/wd4503",
+
+      # Warning C4589 says: "Constructor of abstract class ignores
+      # initializer for virtual base class." Disable this warning because it
+      # is flaky in VS 2015 RTM. It triggers on compiler generated
+      # copy-constructors in some cases.
+      "/wd4589",
+
+      # C4611: interaction between 'function' and C++ object destruction is
+      #        non-portable
+      # This warning is unavoidable when using e.g. setjmp/longjmp.  MSDN
+      # suggests using exceptions instead of setjmp/longjmp for C++, but
+      # Chromium code compiles without exception support.  We therefore have to
+      # use setjmp/longjmp for e.g. JPEG decode error handling, which means we
+      # have to turn off this warning (and be careful about how object
+      # destruction happens in such cases).
+      "/wd4611",
+
+      # Warnings to evaluate and possibly fix/reenable later:
+
+      "/wd4100",  # Unreferenced formal function parameter.
+      "/wd4121",  # Alignment of a member was sensitive to packing.
+      "/wd4244",  # Conversion: possible loss of data.
+      "/wd4505",  # Unreferenced local function has been removed.
+      "/wd4510",  # Default constructor could not be generated.
+      "/wd4512",  # Assignment operator could not be generated.
+      "/wd4610",  # Class can never be instantiated, constructor required.
+      "/wd4838",  # Narrowing conversion. Doesn't seem to be very useful.
+      "/wd4995",  # 'X': name was marked as #pragma deprecated
+      "/wd4996",  # Deprecated function warning.
+
+      # These are variable shadowing warnings that are new in VS2015. We
+      # should work through these at some point -- they may be removed from
+      # the RTM release in the /W4 set.
+      "/wd4456",
+      "/wd4457",
+      "/wd4458",
+      "/wd4459",
+
+      # All of our compilers support the extensions below.
+      "/wd4200",  # nonstandard extension used: zero-sized array in struct/union
+      "/wd4201",  # nonstandard extension used: nameless struct/union
+      "/wd4204",  # nonstandard extension used : non-constant aggregate
+                  # initializer
+
+      "/wd4221",  # nonstandard extension used : 'identifier' : cannot be
+                  # initialized using address of automatic variable
+
+      # http://crbug.com/588506 - Conversion suppressions waiting on Clang
+      # -Wconversion.
+      "/wd4245",  # 'conversion' : conversion from 'type1' to 'type2',
+                  # signed/unsigned mismatch
+
+      "/wd4267",  # 'var' : conversion from 'size_t' to 'type', possible loss of
+                  # data
+
+      "/wd4305",  # 'identifier' : truncation from 'type1' to 'type2'
+      "/wd4389",  # 'operator' : signed/unsigned mismatch
+
+      "/wd4702",  # unreachable code
+
+      # http://crbug.com/848979 - MSVC is more conservative than Clang with
+      # regards to variables initialized and consumed in different branches.
+      "/wd4701",  # Potentially uninitialized local variable 'name' used
+      "/wd4703",  # Potentially uninitialized local pointer variable 'name' used
+
+      # http://crbug.com/848979 - Remaining Clang permitted warnings.
+      "/wd4661",  # 'identifier' : no suitable definition provided for explicit
+                  # template instantiation request
+
+      "/wd4706",  # assignment within conditional expression
+                  # MSVC is stricter and requires a boolean expression.
+
+      "/wd4715",  # 'function' : not all control paths return a value'
+                  # MSVC does not analyze switch (enum) for completeness.
+      "/wd4003",  # not enough arguments for function macro
+    ]
+
+    cflags_cc += [
+      # Allow "noexcept" annotations even though we compile with exceptions
+      # disabled.
+      "/wd4577",
+    ]
+
+    if (current_cpu == "x86") {
+      cflags += [
+        # VC++ 2015 changes 32-bit size_t truncation warnings from 4244 to
+        # 4267. Example: short TruncTest(size_t x) { return x; }
+        # Since we disable 4244 we need to disable 4267 during migration.
+        # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+        "/wd4267",
+      ]
+    }
+  } else {
+    if (is_apple && !is_nacl) {
+      # When compiling Objective-C, warns if a method is used whose
+      # availability is newer than the deployment target.
+      cflags += [ "-Wunguarded-availability" ]
+    }
+
+    if (is_ios) {
+      # When compiling Objective-C, warns if a selector named via @selector has
+      # not been defined in any visible interface.
+      cflags += [ "-Wundeclared-selector" ]
+    }
+
+    # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+    # warning).
+    if (current_cpu == "arm" && !is_clang) {
+      cflags += [ "-Wno-psabi" ]
+    }
+
+    if (!is_clang) {
+      cflags_cc += [
+        # See comment for -Wno-c++11-narrowing.
+        "-Wno-narrowing",
+      ]
+
+      # -Wno-class-memaccess warns about hash table and vector in blink.
+      # But the violation is intentional.
+      if (!is_nacl) {
+        cflags_cc += [ "-Wno-class-memaccess" ]
+      }
+
+      # -Wunused-local-typedefs is broken in gcc,
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63872
+      cflags += [ "-Wno-unused-local-typedefs" ]
+
+      # Don't warn about "maybe" uninitialized. Clang doesn't include this
+      # in -Wall but gcc does, and it gives false positives.
+      cflags += [ "-Wno-maybe-uninitialized" ]
+      cflags += [ "-Wno-deprecated-declarations" ]
+
+      # GCC assumes 'this' is never nullptr and optimizes away code
+      # like "if (this == nullptr) ...": [1].  However, some Chromium
+      # code relies on these types of null pointer checks [2], so
+      # disable this optimization.
+      # [1] https://gcc.gnu.org/gcc-6/porting_to.html#this-cannot-be-null
+      # [2] https://crbug.com/784492#c13
+      cflags += [ "-fno-delete-null-pointer-checks" ]
+
+      # -Wcomment gives too many false positives in the case a
+      # backslash ended comment line is followed by a new line of
+      # comments
+      # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61638
+      cflags += [ "-Wno-comments" ]
+
+      # -Wpacked-not-aligned complains all generated mojom-shared-internal.h
+      # files.
+      cflags += [ "-Wno-packed-not-aligned" ]
+
+      # Disable a number of GCC warnings caused by a mix
+      # of Chromium and GCC bugs.
+      cflags += [ "-Wno-dangling-else" ]
+      cflags_cc += [ "-Wno-attributes" ]
+      cflags_cc += [ "-Wno-class-memaccess" ]
+      cflags_cc += [ "-Wno-subobject-linkage" ]
+      cflags_cc += [ "-Wno-invalid-offsetof" ]
+      cflags_cc += [ "-Wno-return-type" ]
+      cflags_cc += [ "-Wno-deprecated-copy" ]
+      cflags_cc += [ "-fpermissive" ]
+    }
+  }
+
+  # Common Clang and GCC warning setup.
+  if (!is_win || is_clang) {
+    cflags += [
+      # Disables.
+      "-Wno-missing-field-initializers",  # "struct foo f = {0};"
+      "-Wno-unused-parameter",  # Unused function parameters.
+    ]
+  }
+
+  if (is_clang) {
+    cflags += [
+      # TODO(thakis): Consider -Wloop-analysis (turns on
+      # -Wrange-loop-analysis too).
+
+      # This warns on using ints as initializers for floats in
+      # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
+      # which happens in several places in chrome code. Not sure if
+      # this is worth fixing.
+      "-Wno-c++11-narrowing",
+
+      # TODO(thakis): This used to be implied by -Wno-unused-function,
+      # which we no longer use. Check if it makes sense to remove
+      # this as well. http://crbug.com/316352
+      "-Wno-unneeded-internal-declaration",
+    ]
+
+    # use_xcode_clang only refers to the iOS toolchain, host binaries use
+    # chromium's clang always.
+    if (!is_nacl) {
+      cflags += [
+        # TODO(thakis): https://crbug.com/604888
+        "-Wno-undefined-var-template",
+      ]
+
+      if (is_win) {
+        # TODO(thakis): https://crbug.com/617318
+        # Currently goma can not handle case sensitiveness for windows well.
+        cflags += [ "-Wno-nonportable-include-path" ]
+      }
+
+      if (current_toolchain == host_toolchain || !use_xcode_clang) {
+        # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
+        # recognize.
+        cflags += [
+          # An ABI compat warning we don't care about, https://crbug.com/1102157
+          # TODO(thakis): Push this to the (few) targets that need it,
+          # instead of having a global flag.
+          "-Wno-psabi",
+
+          # Ignore warnings about MSVC optimization pragmas.
+          # TODO(thakis): Only for no_chromium_code? http://crbug.com/912662
+          "-Wno-ignored-pragma-optimize",
+
+          # TODO(https://crbug.com/989932): Evaluate and possibly enable.
+          "-Wno-implicit-int-float-conversion",
+
+          # TODO(https://crbug.com/999886): Clean up, enable.
+          "-Wno-final-dtor-non-final-class",
+
+          # TODO(https://crbug.com/1016945) Clean up, enable.
+          "-Wno-builtin-assume-aligned-alignment",
+
+          # TODO(https://crbug.com/1028110): Evaluate and possible enable.
+          "-Wno-deprecated-copy",
+
+          # TODO(https://crbug.com/1050281): Clean up, enable.
+          "-Wno-non-c-typedef-for-linkage",
+        ]
+
+        cflags_c += [
+          # TODO(https://crbug.com/995993): Clean up and enable.
+          "-Wno-implicit-fallthrough",
+        ]
+
+        if (enable_wmax_tokens) {
+          cflags += [ "-Wmax-tokens" ]
+        } else {
+          # TODO(https://crbug.com/1049569): Remove after Clang 87b235db.
+          cflags += [ "-Wno-max-tokens" ]
+        }
+      }
+    }
+  }
+}
+
+# chromium_code ---------------------------------------------------------------
+#
+# Toggles between higher and lower warnings for code that is (or isn't)
+# part of Chromium.
+
+config("chromium_code") {
+  if (is_win) {
+    cflags = [ "/W4" ]  # Warning level 4.
+
+    if (is_clang) {
+      # Opt in to additional [[nodiscard]] on standard library methods.
+      defines = [ "_HAS_NODISCARD" ]
+    }
+  } else {
+    cflags = [ "-Wall" ]
+    if (treat_warnings_as_errors) {
+      cflags += [ "-Werror" ]
+
+      # The compiler driver can sometimes (rarely) emit warnings before calling
+      # the actual linker.  Make sure these warnings are treated as errors as
+      # well.
+      ldflags = [ "-Werror" ]
+    }
+    if (is_clang) {
+      # Enable extra warnings for chromium_code when we control the compiler.
+      cflags += [ "-Wextra" ]
+    }
+
+    # In Chromium code, we define __STDC_foo_MACROS in order to get the
+    # C99 macros on Mac and Linux.
+    defines = [
+      "__STDC_CONSTANT_MACROS",
+      "__STDC_FORMAT_MACROS",
+    ]
+
+    if (!is_debug && !using_sanitizer && current_cpu != "s390x" &&
+        current_cpu != "s390" && current_cpu != "ppc64" &&
+        current_cpu != "mips" && current_cpu != "mips64") {
+      # Non-chromium code is not guaranteed to compile cleanly with
+      # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
+      # disabled, so only do that for Release build.
+      cflags += [ "-U_FORTIFY_SOURCE", "-D_FORTIFY_SOURCE=2" ]
+    }
+
+    if (is_mac) {
+      cflags_objc = [ "-Wobjc-missing-property-synthesis" ]
+      cflags_objcc = [ "-Wobjc-missing-property-synthesis" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Warn on missing break statements at the end of switch cases.
+      # For intentional fallthrough, use FALLTHROUGH; from
+      # base/compiler_specific.h
+      "-Wimplicit-fallthrough",
+    ]
+
+    # TODO(thakis): Enable this more often, https://crbug.com/346399
+    # use_libfuzzer: https://crbug.com/1063180
+    if (!is_nacl && !use_libfuzzer) {
+      cflags += [ "-Wunreachable-code" ]
+    }
+
+    # Thread safety analysis is broken under nacl: https://crbug.com/982423.
+    if (!is_nacl) {
+      cflags += [
+        # Thread safety analysis. See base/thread_annotations.h and
+        # https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+        "-Wthread-safety",
+      ]
+    }
+
+    # TODO(thakis): Enable this for more platforms, https://crbug.com/926235
+    # ChromeOS: http://crbug.com/940863
+    # Chromecast: http://crbug.com/942554
+    has_dchecks = is_debug || dcheck_always_on
+    if (!has_dchecks && is_ios && use_xcode_clang) {
+      # TODO(thakis): Remove this branch once Xcode's clang has clang r356148.
+      cflags_c = [ "-Wextra-semi" ]
+      cflags_cc = [ "-Wextra-semi" ]
+    } else if (!has_dchecks && is_chromeos && is_chrome_branded) {
+      # Temporarily disable -Wextra-semi for Chrome on Chrome OS.
+    } else if (is_chromecast && chromecast_branding != "public") {
+      # Temporarily disable -Wextra-semi for Chromecast.
+    } else {
+      cflags += [ "-Wextra-semi" ]
+    }
+  }
+
+  configs = [ ":default_warnings" ]
+}
+
+config("no_chromium_code") {
+  cflags = []
+  cflags_cc = []
+  defines = []
+
+  if (is_win) {
+    cflags += [
+      "/W3",  # Warning level 3.
+      "/wd4800",  # Disable warning when forcing value to bool.
+      "/wd4267",  # TODO(jschuh): size_t to int.
+      "/wd4996",  # Deprecated function warning.
+    ]
+    defines += [
+      "_CRT_NONSTDC_NO_WARNINGS",
+      "_CRT_NONSTDC_NO_DEPRECATE",
+    ]
+  } else {
+    # GCC may emit unsuppressible warnings so don't add -Werror for no chromium
+    # code. crbug.com/589724
+    if (treat_warnings_as_errors && is_clang) {
+      cflags += [ "-Werror" ]
+      ldflags = [ "-Werror" ]
+    }
+    if (is_clang && !is_nacl) {
+      # TODO(thakis): Remove !is_nacl once
+      # https://codereview.webrtc.org/1552863002/ made its way into chromium.
+      cflags += [ "-Wall" ]
+    }
+  }
+
+  if (is_clang) {
+    cflags += [
+      # Lots of third-party libraries have unused variables. Instead of
+      # suppressing them individually, we just blanket suppress them here.
+      "-Wno-unused-variable",
+    ]
+    if (!is_nacl && (current_toolchain == host_toolchain || !use_xcode_clang)) {
+      cflags += [
+        # TODO(https://crbug.com/1031169): Clean up and enable.
+        "-Wno-misleading-indentation",
+      ]
+    }
+  }
+
+  configs = [ ":default_warnings" ]
+}
+
+# noshadowing -----------------------------------------------------------------
+#
+# Allows turning -Wshadow on.
+
+config("noshadowing") {
+  # This flag has to be disabled for nacl because the nacl compiler is too
+  # strict about shadowing.
+  if (is_clang && !is_nacl) {
+    cflags = [ "-Wshadow" ]
+  }
+}
+
+# rtti ------------------------------------------------------------------------
+#
+# Allows turning Run-Time Type Identification on or off.
+
+config("rtti") {
+  if (is_win) {
+    cflags_cc = [ "/GR" ]
+  } else {
+    cflags_cc = [ "-frtti" ]
+  }
+}
+
+config("no_rtti") {
+  # Some sanitizer configs may require RTTI to be left enabled globally
+  if (!use_rtti) {
+    if (is_win) {
+      cflags_cc = [ "/GR-" ]
+    } else {
+      cflags_cc = [ "-fno-rtti" ]
+      cflags_objcc = cflags_cc
+    }
+  }
+}
+
+# export_dynamic ---------------------------------------------------------------
+#
+# Ensures all exported symbols are added to the dynamic symbol table.  This is
+# necessary to expose Chrome's custom operator new() and operator delete() (and
+# other memory-related symbols) to libraries.  Otherwise, they might
+# (de)allocate memory on a different heap, which would spell trouble if pointers
+# to heap-allocated memory are passed over shared library boundaries.
+config("export_dynamic") {
+  if (is_desktop_linux || export_libcxxabi_from_executables) {
+    ldflags = [ "-rdynamic" ]
+  }
+}
+
+# thin_archive -----------------------------------------------------------------
+#
+# Enables thin archives on posix, and on windows when the lld linker is used.
+# Regular archives directly include the object files used to generate it.
+# Thin archives merely reference the object files.
+# This makes building them faster since it requires less disk IO, but is
+# inappropriate if you wish to redistribute your static library.
+# This config is added to the global config, so thin archives should already be
+# enabled.  If you want to make a distributable static library, you need to do 2
+# things:
+# 1. Set complete_static_lib so that all dependencies of the library make it
+#    into the library. See `gn help complete_static_lib` for details.
+# 2. Remove the thin_archive config, so that the .a file actually contains all
+#    .o files, instead of just references to .o files in the build directoy
+config("thin_archive") {
+  # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
+  # have a "thin archive" mode (it does accept -T, but it means truncating
+  # archive names to 16 characters, which is not what we want).
+  if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
+    arflags = [ "-T" ]
+  } else if (is_win && use_lld) {
+    arflags = [ "/llvmlibthin" ]
+  }
+}
+
+# exceptions -------------------------------------------------------------------
+#
+# Allows turning Exceptions on or off.
+# Note: exceptions are disallowed in Google code.
+
+config("exceptions") {
+  if (is_win) {
+    # Enables exceptions in the STL.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=1" ]
+    }
+    cflags_cc = [ "/EHsc" ]
+  } else {
+    cflags_cc = [ "-fexceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+config("no_exceptions") {
+  if (is_win) {
+    # Disables exceptions in the STL.
+    # libc++ uses the __has_feature macro to control whether to use exceptions,
+    # so defining this macro is unnecessary. Defining _HAS_EXCEPTIONS to 0 also
+    # breaks libc++ because it depends on MSVC headers that only provide certain
+    # declarations if _HAS_EXCEPTIONS is 1. Those MSVC headers do not use
+    # exceptions, despite being conditional on _HAS_EXCEPTIONS.
+    if (!use_custom_libcxx) {
+      defines = [ "_HAS_EXCEPTIONS=0" ]
+    }
+  } else {
+    cflags_cc = [ "-fno-exceptions" ]
+    cflags_objcc = cflags_cc
+  }
+}
+
+# Warnings ---------------------------------------------------------------------
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+  if (is_clang) {
+    cflags = [ "-Wexit-time-destructors" ]
+  }
+}
+
+# On Windows compiling on x64, VC will issue a warning when converting
+# size_t to int because it will truncate the value. Our code should not have
+# these warnings and one should use a static_cast or a checked_cast for the
+# conversion depending on the case. However, a lot of code still needs to be
+# fixed. Apply this config to such targets to disable the warning.
+#
+# Note that this can be applied regardless of platform and architecture to
+# clean up the call sites. This will only apply the flag when necessary.
+#
+# This config is just an alias to no_shorten_64_warnings and will
+# suppress a superset of warning 4267 and any 64-bit -> 32-bit implicit
+# conversions. Having both for a time means not having to go through and
+# update all references to no_size_t_to_int_warning throughout the codebase
+# atomically.
+#
+# Any new warning suppressions should use the no_shorten_64_warnings
+# config below and not this.
+#
+# TODO(jschuh): crbug.com/167187 fix this and delete this config.
+config("no_size_t_to_int_warning") {
+  configs = [ ":no_shorten_64_warnings" ]
+}
+
+# As part of re-enabling -Wconversion (see issue 588506) some code
+# will continue to generate warnings.
+# The first warning to be enabled will be -Wshorten-64-to-32.
+#
+# Code that currently generates warnings for this can include this
+# config to disable them.
+config("no_shorten_64_warnings") {
+  if (current_cpu == "x64" || current_cpu == "arm64") {
+    if (is_clang) {
+      cflags = [ "-Wno-shorten-64-to-32" ]
+    } else {
+      if (is_win) {
+        # MSVC does not have an explicit warning equivalent to
+        # -Wshorten-64-to-32 but 4267 warns for size_t -> int
+        # on 64-bit builds, so is the closest.
+        cflags = [ "/wd4267" ]
+      }
+    }
+  }
+}
+
+# Some code presumes that pointers to structures/objects are compatible
+# regardless of whether what they point to is already known to be valid.
+# gcc 4.9 and earlier had no way of suppressing this warning without
+# suppressing the rest of them.  Here we centralize the identification of
+# the gcc 4.9 toolchains.
+config("no_incompatible_pointer_warnings") {
+  cflags = []
+  if (is_clang) {
+    cflags += [ "-Wno-incompatible-pointer-types" ]
+  } else if (current_cpu == "mipsel" || current_cpu == "mips64el") {
+    cflags += [ "-w" ]
+  } else if (is_chromeos && current_cpu == "arm") {
+    cflags += [ "-w" ]
+  }
+}
+
+# Optimization -----------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_optimization" config on targets by
+# default. It will be equivalent to either "optimize" (release) or
+# "no_optimize" (debug) optimization configs.
+#
+# You can override the optimization level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_optimization" ]
+#   configs += [ "//build/config/compiler:optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+# IMPORTANT: On Windows "/O1" and "/O2" must go before the common flags.
+if (is_win) {
+  common_optimize_on_cflags = [
+    "/Ob2",  # Both explicit and auto inlining.
+    "/Oy-",  # Disable omitting frame pointers, must be after /O2.
+    "/Zc:inline",  # Remove unreferenced COMDAT (faster links).
+  ]
+  if (!is_asan) {
+    common_optimize_on_cflags += [
+      # Put data in separate COMDATs. This allows the linker
+      # to put bit-identical constants at the same address even if
+      # they're unrelated constants, which saves binary size.
+      # This optimization can't be used when ASan is enabled because
+      # it is not compatible with the ASan ODR checker.
+      "/Gw",
+    ]
+  }
+  common_optimize_on_ldflags = []
+
+  # /OPT:ICF is not desirable in Debug builds, since code-folding can result in
+  # misleading symbols in stack traces.
+  if (!is_debug && !is_component_build) {
+    common_optimize_on_ldflags += [ "/OPT:ICF" ]  # Redundant COMDAT folding.
+  }
+
+  if (is_official_build) {
+    common_optimize_on_ldflags += [ "/OPT:REF" ]  # Remove unreferenced data.
+    # TODO(thakis): Add LTO/PGO clang flags eventually, https://crbug.com/598772
+  }
+} else {
+  common_optimize_on_cflags = []
+  common_optimize_on_ldflags = []
+
+  if (is_android) {
+    # TODO(jdduke) Re-enable on mips after resolving linking
+    # issues with libc++ (crbug.com/456380).
+    if (current_cpu != "mipsel" && current_cpu != "mips64el") {
+      common_optimize_on_ldflags += [
+        # Warn in case of text relocations.
+        "-Wl,--warn-shared-textrel",
+      ]
+    }
+  }
+
+  if (is_apple) {
+    if (symbol_level == 2) {
+      # Mac dead code stripping requires symbols.
+      common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
+    }
+
+    if (is_official_build) {
+      common_optimize_on_ldflags += [
+        "-Wl,-no_data_in_code_info",
+        "-Wl,-no_function_starts",
+      ]
+    }
+  } else if (current_os != "aix") {
+    # Non-Mac Posix flags.
+    # Aix does not support these.
+
+    common_optimize_on_cflags += [
+      # Don't emit the GCC version ident directives, they just end up in the
+      # .comment section taking up binary size.
+      "-fno-ident",
+
+      # Put data and code in their own sections, so that unused symbols
+      # can be removed at link time with --gc-sections.
+      "-fdata-sections",
+      "-ffunction-sections",
+    ]
+
+    common_optimize_on_ldflags += [
+      # Specifically tell the linker to perform optimizations.
+      # See http://lwn.net/Articles/192624/ .
+      # -O2 enables string tail merge optimization in gold and lld.
+      "-Wl,-O2",
+      "-Wl,--gc-sections",
+    ]
+  }
+}
+
+config("default_stack_frames") {
+  if (is_posix || is_fuchsia) {
+    if (enable_frame_pointers) {
+      cflags = [ "-fno-omit-frame-pointer" ]
+
+      # Omit frame pointers for leaf functions on x86, otherwise building libyuv
+      # gives clang's register allocator issues, see llvm.org/PR15798 /
+      # crbug.com/233709
+      if (is_clang && current_cpu == "x86" && !is_apple) {
+        cflags += [ "-momit-leaf-frame-pointer" ]
+      }
+    } else {
+      cflags = [ "-fomit-frame-pointer" ]
+    }
+  }
+  # On Windows, the flag to enable framepointers "/Oy-" must always come after
+  # the optimization flag [e.g. "/O2"]. The optimization flag is set by one of
+  # the "optimize" configs, see rest of this file. The ordering that cflags are
+  # applied is well-defined by the GN spec, and there is no way to ensure that
+  # cflags set by "default_stack_frames" is applied after those set by an
+  # "optimize" config. Similarly, there is no way to propagate state from this
+  # config into the "optimize" config. We always apply the "/Oy-" config in the
+  # definition for common_optimize_on_cflags definition, even though this may
+  # not be correct.
+}
+
+# Default "optimization on" config.
+config("optimize") {
+  if (is_win) {
+    if (chrome_pgo_phase != 2) {
+      # Favor size over speed, /O1 must be before the common flags.
+      # /O1 implies /Os and /GF.
+      cflags = [ "/O1" ] + common_optimize_on_cflags + [ "/Oi" ]
+    } else {
+      # PGO requires all translation units to be compiled with /O2. The actual
+      # optimization level will be decided based on the profiling data.
+      cflags = [ "/O2" ] + common_optimize_on_cflags + [ "/Oi" ]
+    }
+  } else if (optimize_for_size && !is_nacl) {
+    # Favor size over speed.
+    # TODO(crbug.com/718650): Fix -Os in PNaCl compiler and remove the is_nacl
+    # guard above.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+  } else if (is_chromeos) {
+    # TODO(gbiv): This is partially favoring size over speed. CrOS exclusively
+    # uses clang, and -Os in clang is more of a size-conscious -O2 than "size at
+    # any cost" (AKA -Oz). It'd be nice to:
+    # - Make `optimize_for_size` apply to all platforms where we're optimizing
+    #   for size by default (so, also Windows)
+    # - Investigate -Oz here, maybe just for ARM?
+    cflags = [ "-Os" ] + common_optimize_on_cflags
+  } else {
+    cflags = [ "-O2" ] + common_optimize_on_cflags
+  }
+  ldflags = common_optimize_on_ldflags
+}
+
+# Turn off optimizations.
+config("no_optimize") {
+  if (is_win) {
+    cflags = [
+      "/Od",  # Disable optimization.
+      "/Ob0",  # Disable all inlining (on by default).
+      "/GF",  # Enable string pooling (off by default).
+    ]
+
+    if (target_cpu == "arm64") {
+      # Disable omitting frame pointers for no_optimize build because stack
+      # traces on Windows ARM64 rely on it.
+      cflags += [ "/Oy-" ]
+    }
+  } else if (is_android && !android_full_debug) {
+    # On Android we kind of optimize some things that don't affect debugging
+    # much even when optimization is disabled to get the binary size down.
+    if (is_clang) {
+      cflags = [ "-Oz" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-Os" ] + common_optimize_on_cflags
+    }
+
+    if (!is_component_build) {
+      # Required for library partitions. Without this all symbols just end up
+      # in the base partition.
+      ldflags = [ "-Wl,--gc-sections" ]
+    }
+  } else if (is_fuchsia) {
+    # On Fuchsia, we optimize for size here to reduce the size of debug build
+    # packages so they can be run in a KVM. See crbug.com/910243 for details.
+    cflags = [ "-Og" ]
+  } else {
+    cflags = [ "-O0" ]
+    ldflags = []
+  }
+}
+
+config("optimize_size_only") {
+  if (is_win) {
+    cflags = [ "/O1" ]
+  } else {
+    cflags = [ "-Os" ]
+  }
+}
+
+# Turns up the optimization level. On Windows, this implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly.
+config("optimize_max") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O2" ] + common_optimize_on_cflags
+    }
+  }
+}
+
+# This config can be used to override the default settings for per-component
+# and whole-program optimization, optimizing the particular target for speed
+# instead of code size. This config is exactly the same as "optimize_max"
+# except that we use -O3 instead of -O2 on non-win, non-IRT platforms.
+#
+# TODO(crbug.com/621335) - rework how all of these configs are related
+# so that we don't need this disclaimer.
+config("optimize_speed") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # Various components do:
+    #   if (!is_debug) {
+    #     configs -= [ "//build/config/compiler:default_optimization" ]
+    #     configs += [ "//build/config/compiler:optimize_max" ]
+    #   }
+    # So this config has to have the selection logic just like
+    # "default_optimization", below.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else {
+    ldflags = common_optimize_on_ldflags
+    if (is_win) {
+      # Favor speed over size, /O2 must be before the common flags.
+      # /O2 implies /Ot, /Oi, and /GF.
+      cflags = [ "/O2" ] + common_optimize_on_cflags
+    } else if (optimize_for_fuzzing) {
+      cflags = [ "-O1" ] + common_optimize_on_cflags
+    } else {
+      cflags = [ "-O3" ] + common_optimize_on_cflags
+    }
+  }
+}
+
+config("optimize_fuzzing") {
+  cflags = [ "-O1" ] + common_optimize_on_cflags
+  ldflags = common_optimize_on_ldflags
+  visibility = [ ":default_optimization" ]
+}
+
+# The default optimization applied to all targets. This will be equivalent to
+# either "optimize" or "no_optimize", depending on the build flags.
+config("default_optimization") {
+  if (is_nacl && is_nacl_irt) {
+    # The NaCl IRT is a special case and always wants its own config.
+    # It gets optimized the same way regardless of the type of build.
+    configs = [ "//build/config/nacl:irt_optimize" ]
+  } else if (is_debug) {
+    configs = [ ":no_optimize" ]
+  } else if (optimize_for_fuzzing) {
+    assert(!is_win, "Fuzzing optimize level not supported on Windows")
+
+    # Coverage build is quite slow. Using "optimize_for_fuzzing" makes it even
+    # slower as it uses "-O1" instead of "-O3". Prevent that from happening.
+    assert(!use_clang_coverage,
+           "optimize_for_fuzzing=true should not be used with " +
+               "use_clang_coverage=true.")
+    configs = [ ":optimize_fuzzing" ]
+  } else {
+    configs = [ ":optimize" ]
+  }
+}
+
+_clang_sample_profile = ""
+if (is_clang && is_a_target_toolchain) {
+  if (clang_sample_profile_path != "") {
+    _clang_sample_profile = clang_sample_profile_path
+  } else if (clang_use_default_sample_profile) {
+    assert(build_with_chromium,
+           "Our default profiles currently only apply to Chromium")
+    assert(is_android || chromeos_is_browser_only || is_chromeos,
+           "The current platform has no default profile")
+    if (is_android) {
+      _clang_sample_profile = "//chrome/android/profiles/afdo.prof"
+    } else {
+      assert(
+          chromeos_afdo_platform == "silvermont" ||
+              chromeos_afdo_platform == "airmont" ||
+              chromeos_afdo_platform == "broadwell",
+          "Only silvermont, airmont and broadwell are valid Chrome OS profiles.")
+      _clang_sample_profile =
+          "//chromeos/profiles/${chromeos_afdo_platform}.afdo.prof"
+    }
+  }
+}
+
+# Clang offers a way to assert that AFDO profiles are accurate, which causes it
+# to optimize functions not represented in a profile more aggressively for size.
+# This config can be toggled in cases where shaving off binary size hurts
+# performance too much.
+config("afdo_optimize_size") {
+  if (_clang_sample_profile != "" && sample_profile_is_accurate) {
+    cflags = [ "-fprofile-sample-accurate" ]
+  }
+}
+
+# GCC and clang support a form of profile-guided optimization called AFDO.
+# There are some targeted places that AFDO regresses (and an icky interaction
+# between //base/allocator:tcmalloc and AFDO on GCC), so we provide a separate
+# config to allow AFDO to be disabled per-target.
+config("afdo") {
+  if (is_clang) {
+    cflags = []
+    if (clang_emit_debug_info_for_profiling) {
+      # Add the following flags to generate debug info for profiling.
+      cflags += [ "-gline-tables-only" ]
+      if (!is_nacl) {
+        cflags += [ "-fdebug-info-for-profiling" ]
+      }
+    }
+    if (_clang_sample_profile != "") {
+      assert(chrome_pgo_phase == 0, "AFDO can't be used in PGO builds")
+      rebased_clang_sample_profile =
+          rebase_path(_clang_sample_profile, root_build_dir)
+      cflags += [ "-fprofile-sample-use=${rebased_clang_sample_profile}" ]
+      inputs = [ _clang_sample_profile ]
+    }
+  } else if (auto_profile_path != "" && is_a_target_toolchain) {
+    cflags = [ "-fauto-profile=${auto_profile_path}" ]
+    inputs = [ auto_profile_path ]
+  }
+}
+
+# Symbols ----------------------------------------------------------------------
+
+# The BUILDCONFIG file sets the "default_symbols" config on targets by
+# default. It will be equivalent to one the three specific symbol levels.
+#
+# You can override the symbol level on a per-target basis by removing the
+# default config and then adding the named one you want:
+#
+#   configs -= [ "//build/config/compiler:default_symbols" ]
+#   configs += [ "//build/config/compiler:symbols" ]
+
+# A helper config that all configs passing /DEBUG to the linker should
+# include as sub-config.
+config("win_pdbaltpath") {
+  visibility = [
+    ":minimal_symbols",
+    ":symbols",
+  ]
+
+  # /DEBUG causes the linker to generate a pdb file, and to write the absolute
+  # path to it in the executable file it generates.  This flag turns that
+  # absolute path into just the basename of the pdb file, which helps with
+  # build reproducibility. Debuggers look for pdb files next to executables,
+  # so there's no downside to always using this.
+  ldflags = [ "/pdbaltpath:%_PDB%" ]
+}
+
+# Full symbols.
+config("symbols") {
+  if (is_win) {
+    if (is_clang) {
+      cflags = [ "/Z7" ]  # Debug information in the .obj files.
+    } else {
+      cflags = [ "/Zi" ]  # Produce PDB file, no edit and continue.
+    }
+
+    if (is_clang && use_lld && use_ghash) {
+      cflags += [ "-gcodeview-ghash" ]
+      ldflags = [ "/DEBUG:GHASH" ]
+    } else {
+      ldflags = [ "/DEBUG" ]
+    }
+
+    # All configs using /DEBUG should include this:
+#    configs = [ ":win_pdbaltpath" ]
+
+    if (is_clang && !use_qt) {
+      # Use constructor debug mode. This option reduces debug info more than
+      # -fno-standalone-debug by emitting class type information only when
+      # constructors are emitted.
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=constructor",
+      ]
+    }
+  } else {
+    cflags = []
+    if (is_mac && enable_dsyms) {
+      # If generating dSYMs, specify -fno-standalone-debug. This was
+      # originally specified for https://crbug.com/479841 because dsymutil
+      # could not handle a 4GB dSYM file. But dsymutil from Xcodes prior to
+      # version 7 also produces debug data that is incompatible with Breakpad
+      # dump_syms, so this is still required (https://crbug.com/622406).
+      cflags += [ "-fno-standalone-debug" ]
+    } else if (is_mac) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output. pnacl and nacl-clang do support that
+    # flag, so we can use use -g1 for pnacl and nacl-clang compiles.
+    # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
+    if (!is_nacl || is_clang) {
+      cflags += [ "-g2" ]
+    }
+
+    # TODO(https://crbug.com/1050118): Investigate missing debug info on mac.
+    if (is_clang && !is_nacl && !use_xcode_clang && !is_apple && !use_qt) {
+      cflags += [
+        "-Xclang",
+        "-debug-info-kind=constructor",
+      ]
+    }
+
+    if (is_apple && !use_qt) {
+      swiftflags = [ "-g" ]
+    }
+
+    if (use_debug_fission && !is_nacl &&
+        (!is_android || target_os == "android")) {
+      # NOTE: Some Chrome OS builds globally set |use_debug_fission| to true,
+      # but they also build some targets whose toolchains aren't
+      # compatible with it. In particular don't turn it on for Android
+      # toolchain if not building for Android OS.
+      #
+      # TODO(https://crbug.com/837032): See if we can clean this up by e.g. not
+      # setting use_debug_fission globally.
+      cflags += [ "-gsplit-dwarf" ]
+    }
+    asmflags = cflags
+    ldflags = []
+
+    if (use_debug_fission && is_android && target_os == "android") {
+      # NOTE: This flag is for use by the link wrapper scripts. They are also
+      # expected to remove it before sending the rest of ldflags to the actual
+      # linker. Only expect Android Chrome build on Android OS to need this.
+      ldflags += [ "-gsplit-dwarf" ]
+    }
+
+    # TODO(thakis): Figure out if there's a way to make this go for 32-bit,
+    # currently we get "warning:
+    # obj/native_client/src/trusted/service_runtime/sel_asm/nacl_switch_32.o:
+    # DWARF info may be corrupt; offsets in a range list entry are in different
+    # sections" there.  Maybe just a bug in nacl_switch_32.S.
+    if (!is_apple && !is_nacl && current_cpu != "x86" &&
+        (use_gold || use_lld)) {
+      if (is_clang) {
+        # This flag enables the GNU-format pubnames and pubtypes sections,
+        # which lld needs in order to generate a correct GDB index.
+        # TODO(pcc): Try to make lld understand non-GNU-format pubnames
+        # sections (llvm.org/PR34820).
+        cflags += [ "-ggnu-pubnames" ]
+      }
+      ldflags += [ "-Wl,--gdb-index" ]
+    }
+  }
+}
+
+# Minimal symbols.
+# This config guarantees to hold symbol for stack trace which are shown to user
+# when crash happens in unittests running on buildbot.
+config("minimal_symbols") {
+  if (is_win) {
+    # Functions, files, and line tables only.
+    cflags = []
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+
+    # Enable line tables for clang. MSVC doesn't have an equivalent option.
+    if (is_clang) {
+      # -gline-tables-only is the same as -g1, but clang-cl only exposes the
+      # former.
+      cflags += [ "-gline-tables-only" ]
+    }
+  } else {
+    cflags = []
+    if (is_mac) {
+      # clang defaults to DWARF2 on macOS unless mac_deployment_target is
+      # at least 10.11.
+      # TODO(thakis): Remove this once mac_deployment_target is 10.11.
+      cflags += [ "-gdwarf-4" ]
+    }
+
+    # The gcc-based nacl compilers don't support -fdebug-compilation-dir (see
+    # elsewhere in this file), so they can't have build-dir-independent output.
+    # Disable symbols for nacl object files to get deterministic,
+    # build-directory-independent output. pnacl and nacl-clang do support that
+    # flag, so we can use use -g1 for pnacl and nacl-clang compiles.
+    # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
+    if (!is_nacl || is_clang) {
+      cflags += [ "-g1" ]
+    }
+    ldflags = []
+    if (is_android && is_clang) {
+      # Android defaults to symbol_level=1 builds in production builds
+      # (https://crbug.com/648948), but clang, unlike gcc, doesn't emit
+      # DW_AT_linkage_name in -g1 builds. -fdebug-info-for-profiling enables
+      # that (and a bunch of other things we don't need), so that we get
+      # qualified names in stacks.
+      # TODO(thakis): Consider making clang emit DW_AT_linkage_name in -g1 mode;
+      #               failing that consider doing this on non-Android too.
+      cflags += [ "-fdebug-info-for-profiling" ]
+    }
+
+    # Note: -gsplit-dwarf implicitly turns on -g2 with clang, so don't pass it.
+    asmflags = cflags
+  }
+}
+
+# This configuration contains function names only. That is, the compiler is
+# told to not generate debug information and the linker then just puts function
+# names in the final debug information.
+config("no_symbols") {
+  if (is_win) {
+    ldflags = [ "/DEBUG" ]
+
+    # All configs using /DEBUG should include this:
+    configs = [ ":win_pdbaltpath" ]
+  } else {
+    cflags = [ "-g0" ]
+    asmflags = cflags
+  }
+}
+
+# Default symbols.
+config("default_symbols") {
+  if (symbol_level == 0) {
+    configs = [ ":no_symbols" ]
+  } else if (symbol_level == 1) {
+    configs = [ ":minimal_symbols" ]
+  } else if (symbol_level == 2) {
+    configs = [ ":symbols" ]
+  } else {
+    assert(false)
+  }
+
+  # This config is removed by base unittests apk.
+  if (is_android && is_clang && strip_debug_info) {
+    configs += [ ":strip_debug" ]
+  }
+}
+
+config("strip_debug") {
+  if (!defined(ldflags)) {
+    ldflags = []
+  }
+  ldflags += [ "-Wl,--strip-debug" ]
+}
+
+if (is_apple) {
+  # On Mac and iOS, this enables support for ARC (automatic ref-counting).
+  # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
+  config("enable_arc") {
+    common_flags = [ "-fobjc-arc" ]
+    cflags_objc = common_flags
+    cflags_objcc = common_flags
+  }
+}
+
+if (is_chromeos && is_chromeos_device) {
+  # This config is intended to be a temporary to facilitate
+  # the transition to use orderfile in Chrome OS. Once orderfile
+  # use becomes a default in Chrome OS, this config should not
+  # be needed.
+  config("use_orderfile_for_hugepage") {
+    if (chrome_orderfile_path != "") {
+      defines = [ "CHROMEOS_ORDERFILE_USE" ]
+    }
+  }
+}
+
+if (is_win || is_android || (is_chromeos && is_chromeos_device)) {
+  # Use orderfile for linking Chrome on win, android, and Chrome OS.
+  # This config enables using an orderfile for linking in LLD.
+  config("chrome_orderfile_config") {
+    if (chrome_orderfile_path != "") {
+      assert(use_lld)
+      _rebased_orderfile = rebase_path(chrome_orderfile_path, root_build_dir)
+      if (is_android || (is_chromeos && is_chromeos_device)) {
+        ldflags = [
+          "-Wl,--symbol-ordering-file",
+          "-Wl,$_rebased_orderfile",
+          "-Wl,--no-warn-symbol-ordering",
+        ]
+      } else {
+        ldflags = [
+          "/order:@$_rebased_orderfile",
+
+          # Ignore warnings about missing functions or functions not in their
+          # own section.
+          "/ignore:4037",
+          "/ignore:4065",
+        ]
+      }
+      inputs = [ chrome_orderfile_path ]
+    }
+  }
+}
+
+# Initialize all variables on the stack if needed.
+config("default_init_stack_vars") {
+  cflags = []
+  if (init_stack_vars && is_clang && !is_nacl && !using_sanitizer) {
+    cflags += [ "-ftrivial-auto-var-init=pattern" ]
+  }
+}
Index: qt5/patches/README
===================================================================
--- qt5/patches/README	(revision 384)
+++ qt5/patches/README	(revision 385)
@@ -1,6 +1,9 @@
 
 /* begin *
 
-   TODO: Leave some comment here.
+   Patch order:
+   -----------
+     qt5-5.15.8-icu-permissive.patch
+     qt5-5.15.8-mips32r5.patch
 
  * end */
Index: rdesktop/Makefile
===================================================================
--- rdesktop/Makefile	(nonexistent)
+++ rdesktop/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/rdesktop
+
+versions    = 1.9.0
+pkgname     = rdesktop
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: rdesktop
===================================================================
--- rdesktop	(nonexistent)
+++ rdesktop	(revision 385)

Property changes on: rdesktop
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: themes/GTK/Makefile
===================================================================
--- themes/GTK/Makefile	(nonexistent)
+++ themes/GTK/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/themes/GTK
+
+versions    = 0.0.1
+pkgname     = Silvery-GTK
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: themes/GTK
===================================================================
--- themes/GTK	(nonexistent)
+++ themes/GTK	(revision 385)

Property changes on: themes/GTK
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: themes/Makefile
===================================================================
--- themes/Makefile	(nonexistent)
+++ themes/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: themes
===================================================================
--- themes	(nonexistent)
+++ themes	(revision 385)

Property changes on: themes
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: transmission/Makefile
===================================================================
--- transmission/Makefile	(nonexistent)
+++ transmission/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/transmission
+
+versions    = 4.0.5
+pkgname     = transmission
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: transmission
===================================================================
--- transmission	(nonexistent)
+++ transmission	(revision 385)

Property changes on: transmission
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: vulkan/glslang/Makefile
===================================================================
--- vulkan/glslang/Makefile	(nonexistent)
+++ vulkan/glslang/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/Vulkan/glslang
+
+versions    = 1.3.239.0
+pkgname     = glslang
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: vulkan/glslang
===================================================================
--- vulkan/glslang	(nonexistent)
+++ vulkan/glslang	(revision 385)

Property changes on: vulkan/glslang
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: vulkan/spirv-headers-sdk/Makefile
===================================================================
--- vulkan/spirv-headers-sdk/Makefile	(nonexistent)
+++ vulkan/spirv-headers-sdk/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/Vulkan/SPIRV-Headers-sdk
+
+versions    = 1.3.239.0
+pkgname     = spirv-headers-sdk
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: vulkan/spirv-headers-sdk
===================================================================
--- vulkan/spirv-headers-sdk	(nonexistent)
+++ vulkan/spirv-headers-sdk	(revision 385)

Property changes on: vulkan/spirv-headers-sdk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: vulkan/spirv-llvm-translator/Makefile
===================================================================
--- vulkan/spirv-llvm-translator/Makefile	(nonexistent)
+++ vulkan/spirv-llvm-translator/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/Vulkan/SPIRV-LLVM-Translator
+
+versions    = 16.0.0
+pkgname     = spirv-llvm-translator
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: vulkan/spirv-llvm-translator
===================================================================
--- vulkan/spirv-llvm-translator	(nonexistent)
+++ vulkan/spirv-llvm-translator	(revision 385)

Property changes on: vulkan/spirv-llvm-translator
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: vulkan/spirv-tools-sdk/Makefile
===================================================================
--- vulkan/spirv-tools-sdk/Makefile	(nonexistent)
+++ vulkan/spirv-tools-sdk/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/Vulkan/SPIRV-Tools-sdk
+
+versions    = 1.3.239.0
+pkgname     = spirv-tools-sdk
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: vulkan/spirv-tools-sdk
===================================================================
--- vulkan/spirv-tools-sdk	(nonexistent)
+++ vulkan/spirv-tools-sdk	(revision 385)

Property changes on: vulkan/spirv-tools-sdk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: webkitgtk/Makefile
===================================================================
--- webkitgtk/Makefile	(nonexistent)
+++ webkitgtk/Makefile	(revision 385)
@@ -0,0 +1,67 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/webkitgtk
+
+versions    = 2.40.2
+pkgname     = webkitgtk
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+patches     = $(CURDIR)/patches/webkitgtk-2.40.2-arm-neon.patch
+patches    += $(CURDIR)/patches/webkitgtk-2.40.2-i386-sse.patch
+patches    += $(CURDIR)/patches/webkitgtk-2.40.2-mips-atomic.patch
+patches    += $(CURDIR)/patches/webkitgtk-2.40.2-bwrap-cross.patch
+patches    += $(CURDIR)/patches/webkitgtk-2.40.2-ui-process-crash.patch
+patches    += $(CURDIR)/patches/webkitgtk-2.40.2-suppress-cast-align.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-2.40.2-arm-neon-patch            ; ./create.patch.sh ) ; \
+	 ( cd create-2.40.2-i386-sse-patch            ; ./create.patch.sh ) ; \
+	 ( cd create-2.40.2-mips-atomic-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-2.40.2-bwrap-cross-patch         ; ./create.patch.sh ) ; \
+	 ( cd create-2.40.2-ui-process-crash-patch    ; ./create.patch.sh ) ; \
+	 ( cd create-2.40.2-suppress-cast-align-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: webkitgtk/create-2.40.2-arm-neon-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-arm-neon-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-arm-neon-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-arm-neon.patch
+
+mv webkitgtk-$VERSION-arm-neon.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-arm-neon-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-arm-neon-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-arm-neon-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-arm-neon-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+webkitgtk-2.40.2/Source/WTF/wtf/PlatformCPU.h
Index: webkitgtk/create-2.40.2-arm-neon-patch/webkitgtk-2.40.2-new/Source/WTF/wtf/PlatformCPU.h
===================================================================
--- webkitgtk/create-2.40.2-arm-neon-patch/webkitgtk-2.40.2-new/Source/WTF/wtf/PlatformCPU.h	(nonexistent)
+++ webkitgtk/create-2.40.2-arm-neon-patch/webkitgtk-2.40.2-new/Source/WTF/wtf/PlatformCPU.h	(revision 385)
@@ -0,0 +1,385 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#ifndef WTF_PLATFORM_GUARD_AGAINST_INDIRECT_INCLUSION
+#error "Please #include <wtf/Platform.h> instead of this file directly."
+#endif
+
+/* CPU() - the target CPU architecture */
+#define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE  && WTF_CPU_##WTF_FEATURE)
+
+/* ==== CPU() - the target CPU architecture ==== */
+/* CPU(KNOWN) becomes true if we explicitly support a target CPU. */
+
+/* CPU(MIPS) - MIPS 32-bit and 64-bit */
+#if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_) || defined(__mips64))
+#if defined(_ABI64) && (_MIPS_SIM == _ABI64)
+#define WTF_CPU_MIPS64 1
+#define WTF_MIPS_ARCH __mips64
+#else
+#define WTF_CPU_MIPS 1
+#define WTF_MIPS_ARCH __mips
+#endif
+#define WTF_CPU_KNOWN 1
+#define WTF_MIPS_PIC (defined __PIC__)
+#define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
+#define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
+#define WTF_MIPS_ARCH_REV __mips_isa_rev
+#define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
+#define WTF_MIPS_ISA_REV_AT_LEAST(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV >= v)
+#define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
+#define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
+#endif
+
+/* CPU(LOONGARCH64) - LOONGARCH64 */
+#if defined(__loongarch64)
+#define WTF_CPU_LOONGARCH64 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(PPC64) - PowerPC 64-bit Big Endian */
+#if (  defined(__ppc64__)      \
+    || defined(__PPC64__))     \
+    && defined(__BYTE_ORDER__) \
+    && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#define WTF_CPU_PPC64 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(PPC64LE) - PowerPC 64-bit Little Endian */
+#if (   defined(__ppc64__)     \
+    || defined(__PPC64__)      \
+    || defined(__ppc64le__)    \
+    || defined(__PPC64LE__))   \
+    && defined(__BYTE_ORDER__) \
+    && (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+#define WTF_CPU_PPC64LE 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(PPC) - PowerPC 32-bit */
+#if (  defined(__ppc__)        \
+    || defined(__PPC__)        \
+    || defined(__powerpc__)    \
+    || defined(__powerpc)      \
+    || defined(__POWERPC__)    \
+    || defined(_M_PPC)         \
+    || defined(__PPC))         \
+    && !CPU(PPC64)             \
+    && CPU(BIG_ENDIAN)
+#define WTF_CPU_PPC 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(X86) - i386 / x86 32-bit */
+#if   defined(__i386__) \
+    || defined(i386)     \
+    || defined(_M_IX86)  \
+    || defined(_X86_)    \
+    || defined(__THW_INTEL)
+#define WTF_CPU_X86 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__SSE2__) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2)
+#define WTF_CPU_X86_SSE2 1
+#endif
+
+#endif
+
+/* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
+#if   defined(__x86_64__) \
+    || defined(_M_X64)
+#define WTF_CPU_X86_64 1
+#define WTF_CPU_X86_SSE2 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+/* CPU(ARM64) */
+#if defined(__arm64__) || defined(__aarch64__)
+#define WTF_CPU_ARM64 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__arm64e__)
+#define WTF_CPU_ARM64E 1
+#endif
+#endif
+
+/* CPU(ARM) - ARM, any version*/
+#define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
+
+#if   defined(arm) \
+    || defined(__arm__) \
+    || defined(ARM) \
+    || defined(_ARM_)
+#define WTF_CPU_ARM 1
+#define WTF_CPU_KNOWN 1
+
+#if defined(__ARM_PCS_VFP)
+#define WTF_CPU_ARM_HARDFP 1
+#endif
+
+/* Set WTF_ARM_ARCH_VERSION */
+#if   defined(__ARM_ARCH_4__) \
+    || defined(__ARM_ARCH_4T__) \
+    || defined(__MARM_ARMV4__)
+#define WTF_ARM_ARCH_VERSION 4
+
+#elif defined(__ARM_ARCH_5__) \
+    || defined(__ARM_ARCH_5T__) \
+    || defined(__MARM_ARMV5__)
+#define WTF_ARM_ARCH_VERSION 5
+
+#elif defined(__ARM_ARCH_5E__) \
+    || defined(__ARM_ARCH_5TE__) \
+    || defined(__ARM_ARCH_5TEJ__)
+#define WTF_ARM_ARCH_VERSION 5
+
+#elif defined(__ARM_ARCH_6__) \
+    || defined(__ARM_ARCH_6J__) \
+    || defined(__ARM_ARCH_6K__) \
+    || defined(__ARM_ARCH_6Z__) \
+    || defined(__ARM_ARCH_6ZK__) \
+    || defined(__ARM_ARCH_6T2__) \
+    || defined(__ARMV6__)
+#define WTF_ARM_ARCH_VERSION 6
+
+#elif defined(__ARM_ARCH_7A__) \
+    || defined(__ARM_ARCH_7K__) \
+    || defined(__ARM_ARCH_7R__) \
+    || defined(__ARM_ARCH_7S__)
+#define WTF_ARM_ARCH_VERSION 7
+
+#elif defined(__ARM_ARCH_8__) \
+    || defined(__ARM_ARCH_8A__)
+#define WTF_ARM_ARCH_VERSION 8
+
+/* MSVC sets _M_ARM */
+#elif defined(_M_ARM)
+#define WTF_ARM_ARCH_VERSION _M_ARM
+
+/* RVCT sets _TARGET_ARCH_ARM */
+#elif defined(__TARGET_ARCH_ARM)
+#define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
+
+#else
+#define WTF_ARM_ARCH_VERSION 0
+
+#endif
+
+/* FIXME: WTF_THUMB_ARCH_VERSION seems unused. Remove. */
+/* Set WTF_THUMB_ARCH_VERSION */
+#if   defined(__ARM_ARCH_4T__)
+#define WTF_THUMB_ARCH_VERSION 1
+
+#elif defined(__ARM_ARCH_5T__) \
+    || defined(__ARM_ARCH_5TE__) \
+    || defined(__ARM_ARCH_5TEJ__)
+#define WTF_THUMB_ARCH_VERSION 2
+
+#elif defined(__ARM_ARCH_6J__) \
+    || defined(__ARM_ARCH_6K__) \
+    || defined(__ARM_ARCH_6Z__) \
+    || defined(__ARM_ARCH_6ZK__) \
+    || defined(__ARM_ARCH_6M__)
+#define WTF_THUMB_ARCH_VERSION 3
+
+#elif defined(__ARM_ARCH_6T2__) \
+    || defined(__ARM_ARCH_7__) \
+    || defined(__ARM_ARCH_7A__) \
+    || defined(__ARM_ARCH_7K__) \
+    || defined(__ARM_ARCH_7M__) \
+    || defined(__ARM_ARCH_7R__) \
+    || defined(__ARM_ARCH_7S__) \
+    || defined(__ARM_ARCH_8__) \
+    || defined(__ARM_ARCH_8A__)
+#define WTF_THUMB_ARCH_VERSION 4
+
+/* RVCT sets __TARGET_ARCH_THUMB */
+#elif defined(__TARGET_ARCH_THUMB)
+#define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
+
+#else
+#define WTF_THUMB_ARCH_VERSION 0
+#endif
+
+
+/* FIXME: CPU(ARMV5_OR_LOWER) seems unused. Remove. */
+/* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
+/* On ARMv5 and below the natural alignment is required. 
+   And there are some other differences for v5 or earlier. */
+#if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
+#define WTF_CPU_ARMV5_OR_LOWER 1
+#endif
+
+
+/* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
+/* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
+/* Only one of these will be defined. */
+#if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
+#  if defined(thumb2) || defined(__thumb2__) \
+    || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
+#    define WTF_CPU_ARM_TRADITIONAL 0
+#    define WTF_CPU_ARM_THUMB2 1
+#  elif WTF_ARM_ARCH_AT_LEAST(4)
+#    define WTF_CPU_ARM_TRADITIONAL 1
+#    define WTF_CPU_ARM_THUMB2 0
+#  else
+#    error "Not supported ARM architecture"
+#  endif
+#elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
+#  error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
+#endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
+
+#if (defined(__VFP_FP__) && !defined(__SOFTFP__))
+#define WTF_CPU_ARM_VFP 1
+#endif
+
+/* If CPU(ARM_NEON) is not enabled, we'll conservatively assume only VFP2 or VFPv3D16
+   support is available. Hence, only the first 16 64-bit floating point registers
+   are available. See:
+   NEON registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJACABEJ.html
+   VFP2 and VFP3 registers: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CIHDIBDG.html
+   NEON to VFP register mapping: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0473c/CJAIJHFC.html
+*/
+#if CPU(ARM_NEON)
+#define WTF_CPU_ARM_VFP_V3_D32 1
+#else
+#define WTF_CPU_ARM_VFP_V2 1
+#endif
+
+#if defined(__ARM_ARCH_7K__)
+#define WTF_CPU_APPLE_ARMV7K 1
+#endif
+
+#if defined(__ARM_ARCH_7S__)
+#define WTF_CPU_APPLE_ARMV7S 1
+#endif
+
+#endif /* ARM */
+
+/* CPU(RISCV64) - RISC-V 64-bit */
+#if    defined(__riscv) \
+    && defined(__riscv_xlen) \
+    && (__riscv_xlen == 64)
+#define WTF_CPU_RISCV64 1
+#define WTF_CPU_KNOWN 1
+#endif
+
+#if !CPU(KNOWN)
+#define WTF_CPU_UNKNOWN 1
+#endif
+
+#if CPU(ARM) || CPU(MIPS) || CPU(RISCV64) || CPU(UNKNOWN)
+#define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
+#endif
+
+#if COMPILER(GCC_COMPATIBLE)
+/* __LP64__ is not defined on 64bit Windows since it uses LLP64. Using __SIZEOF_POINTER__ is simpler. */
+#if __SIZEOF_POINTER__ == 8
+#define WTF_CPU_ADDRESS64 1
+#elif __SIZEOF_POINTER__ == 4
+#define WTF_CPU_ADDRESS32 1
+#else
+#error "Unsupported pointer width"
+#endif
+#elif COMPILER(MSVC)
+#if defined(_WIN64)
+#define WTF_CPU_ADDRESS64 1
+#else
+#define WTF_CPU_ADDRESS32 1
+#endif
+#else
+/* This is the most generic way. But in OS(DARWIN), Platform.h can be included by sandbox definition file (.sb).
+ * At that time, we cannot include "stdint.h" header. So in the case of known compilers, we use predefined constants instead. */
+#include <stdint.h>
+#if UINTPTR_MAX > UINT32_MAX
+#define WTF_CPU_ADDRESS64 1
+#else
+#define WTF_CPU_ADDRESS32 1
+#endif
+#endif
+
+/* CPU general purpose register width. */
+#if !defined(WTF_CPU_REGISTER64) && !defined(WTF_CPU_REGISTER32)
+#if CPU(ADDRESS64) || CPU(ARM64)
+#define WTF_CPU_REGISTER64 1
+#else
+#define WTF_CPU_REGISTER32 1
+#endif
+#endif
+
+/* CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
+
+#if COMPILER(GCC_COMPATIBLE)
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define WTF_CPU_BIG_ENDIAN 1
+#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#else
+#if defined(WIN32) || defined(_WIN32)
+/* Windows only have little endian architecture. */
+#define WTF_CPU_LITTLE_ENDIAN 1
+#else
+#include <sys/types.h>
+#if __has_include(<endian.h>)
+#include <endian.h>
+#if __BYTE_ORDER == __BIG_ENDIAN
+#define WTF_CPU_BIG_ENDIAN 1
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif __BYTE_ORDER == __PDP_ENDIAN
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#else
+#if __has_include(<machine/endian.h>)
+#include <machine/endian.h>
+#else
+#include <sys/endian.h>
+#endif
+#if BYTE_ORDER == BIG_ENDIAN
+#define WTF_CPU_BIG_ENDIAN 1
+#elif BYTE_ORDER == LITTLE_ENDIAN
+#define WTF_CPU_LITTLE_ENDIAN 1
+#elif BYTE_ORDER == PDP_ENDIAN
+#define WTF_CPU_MIDDLE_ENDIAN 1
+#else
+#error "Unknown endian"
+#endif
+#endif
+#endif
+#endif
+
+#if !CPU(LITTLE_ENDIAN) && !CPU(BIG_ENDIAN)
+#error "Unsupported endian"
+#endif
Index: webkitgtk/create-2.40.2-bwrap-cross-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-bwrap-cross-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-bwrap-cross-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-bwrap-cross.patch
+
+mv webkitgtk-$VERSION-bwrap-cross.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-bwrap-cross-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-bwrap-cross-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-bwrap-cross-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-bwrap-cross-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+webkitgtk-2.40.2/Source/cmake/BubblewrapSandboxChecks.cmake
Index: webkitgtk/create-2.40.2-bwrap-cross-patch/webkitgtk-2.40.2-new/Source/cmake/BubblewrapSandboxChecks.cmake
===================================================================
--- webkitgtk/create-2.40.2-bwrap-cross-patch/webkitgtk-2.40.2-new/Source/cmake/BubblewrapSandboxChecks.cmake	(nonexistent)
+++ webkitgtk/create-2.40.2-bwrap-cross-patch/webkitgtk-2.40.2-new/Source/cmake/BubblewrapSandboxChecks.cmake	(revision 385)
@@ -0,0 +1,43 @@
+if (ENABLE_BUBBLEWRAP_SANDBOX)
+    find_package(Libseccomp)
+    if (NOT Libseccomp_FOUND)
+        message(FATAL_ERROR "libseccomp is needed for ENABLE_BUBBLEWRAP_SANDBOX")
+    endif ()
+
+    if (NOT DEFINED BWRAP_EXECUTABLE)
+        if (CMAKE_CROSSCOMPILING)
+            message(FATAL_ERROR "bwrap executable version 0.3.1 or newer is needed for ENABLE_BUBBLEWRAP_SANDBOX. Unable to autodetect the path when cross-compiling. "
+                                "Please define define the CMake variable BWRAP_EXECUTABLE with the run-time full-path to the 'bwrap' program.")
+        else ()
+            find_program(BWRAP_EXECUTABLE bwrap)
+            if (NOT BWRAP_EXECUTABLE)
+                message(FATAL_ERROR "bwrap executable is needed for ENABLE_BUBBLEWRAP_SANDBOX. "
+                       "Either install it or use the CMake variable BWRAP_EXECUTABLE to define the runtime path.")
+            endif ()
+        endif ()
+    endif ()
+
+    if (NOT DEFINED DBUS_PROXY_EXECUTABLE)
+        if (CMAKE_CROSSCOMPILING)
+            message(FATAL_ERROR "xdg-dbus-proxy executable is needed for ENABLE_BUBBLEWRAP_SANDBOX.  Unable to autodetect the path when cross-compiling. "
+                                "Please define define the CMake variable DBUS_PROXY_EXECUTABLE with the run-time full-path to the 'xdg-dbus-proxy' program.")
+        else ()
+            find_program(DBUS_PROXY_EXECUTABLE xdg-dbus-proxy)
+            if (NOT DBUS_PROXY_EXECUTABLE)
+                message(FATAL_ERROR "xdg-dbus-proxy executable not found and is needed for ENABLE_BUBBLEWRAP_SANDBOX. "
+                       "Either install it or use the CMake variable DBUS_PROXY_EXECUTABLE to define the runtime path.")
+            endif ()
+        endif ()
+    endif ()
+
+    # Do some extra sanity checks
+    if (NOT IS_ABSOLUTE "${BWRAP_EXECUTABLE}")
+        message(FATAL_ERROR "The value for BWRAP_EXECUTABLE should be a full path.")
+    endif ()
+    if (NOT IS_ABSOLUTE "${DBUS_PROXY_EXECUTABLE}")
+        message(FATAL_ERROR "The value for DBUS_PROXY_EXECUTABLE should be a full path.")
+    endif ()
+
+    add_definitions(-DBWRAP_EXECUTABLE="${BWRAP_EXECUTABLE}")
+    add_definitions(-DDBUS_PROXY_EXECUTABLE="${DBUS_PROXY_EXECUTABLE}")
+endif ()
Index: webkitgtk/create-2.40.2-i386-sse-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-i386-sse-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-i386-sse-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-i386-sse.patch
+
+mv webkitgtk-$VERSION-i386-sse.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-i386-sse-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-i386-sse-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-i386-sse-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-i386-sse-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+webkitgtk-2.40.2/Source/ThirdParty/ANGLE/src/common/platform.h
Index: webkitgtk/create-2.40.2-i386-sse-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/common/platform.h
===================================================================
--- webkitgtk/create-2.40.2-i386-sse-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/common/platform.h	(nonexistent)
+++ webkitgtk/create-2.40.2-i386-sse-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/common/platform.h	(revision 385)
@@ -0,0 +1,209 @@
+//
+// Copyright 2014 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+
+// platform.h: Operating system specific includes and defines.
+
+#ifndef COMMON_PLATFORM_H_
+#define COMMON_PLATFORM_H_
+
+#if defined(_WIN32)
+#    define ANGLE_PLATFORM_WINDOWS 1
+#elif defined(__Fuchsia__)
+#    define ANGLE_PLATFORM_FUCHSIA 1
+#    define ANGLE_PLATFORM_POSIX 1
+#elif defined(__APPLE__)
+#    define ANGLE_PLATFORM_APPLE 1
+#    define ANGLE_PLATFORM_POSIX 1
+#elif defined(ANDROID)
+#    define ANGLE_PLATFORM_ANDROID 1
+#    define ANGLE_PLATFORM_POSIX 1
+#elif defined(__ggp__)
+#    define ANGLE_PLATFORM_GGP 1
+#    define ANGLE_PLATFORM_POSIX 1
+#elif defined(__linux__) || defined(EMSCRIPTEN)
+#    define ANGLE_PLATFORM_LINUX 1
+#    define ANGLE_PLATFORM_POSIX 1
+#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) ||              \
+    defined(__DragonFly__) || defined(__sun) || defined(__GLIBC__) || defined(__GNU__) || \
+    defined(__QNX__) || defined(__Fuchsia__) || defined(__HAIKU__)
+#    define ANGLE_PLATFORM_POSIX 1
+#else
+#    error Unsupported platform.
+#endif
+
+#ifdef ANGLE_PLATFORM_WINDOWS
+#    ifndef STRICT
+#        define STRICT 1
+#    endif
+#    ifndef WIN32_LEAN_AND_MEAN
+#        define WIN32_LEAN_AND_MEAN 1
+#    endif
+#    ifndef NOMINMAX
+#        define NOMINMAX 1
+#    endif
+
+#    include <intrin.h>
+
+#    if defined(WINAPI_FAMILY) && (WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP)
+#        define ANGLE_ENABLE_WINDOWS_UWP 1
+#    endif
+
+#    if defined(ANGLE_ENABLE_D3D9)
+#        include <d3d9.h>
+#        include <d3dcompiler.h>
+#    endif
+
+// Include D3D11 headers when OpenGL is enabled on Windows for interop extensions.
+#    if defined(ANGLE_ENABLE_D3D11) || defined(ANGLE_ENABLE_OPENGL)
+#        include <d3d10_1.h>
+#        include <d3d11.h>
+#        include <d3d11_3.h>
+#        include <d3d11on12.h>
+#        include <d3d12.h>
+#        include <d3dcompiler.h>
+#        include <dxgi.h>
+#        include <dxgi1_2.h>
+#        include <dxgi1_4.h>
+#    endif
+
+#    if defined(ANGLE_ENABLE_D3D9) || defined(ANGLE_ENABLE_D3D11)
+#        include <wrl.h>
+#    endif
+
+#    if defined(ANGLE_ENABLE_WINDOWS_UWP)
+#        include <dxgi1_3.h>
+#        if defined(_DEBUG)
+#            include <DXProgrammableCapture.h>
+#            include <dxgidebug.h>
+#        endif
+#    endif
+
+// Include <windows.h> to ensure tests related files can be built when building
+// vulkan only backend ANGLE on windows.
+#    if defined(ANGLE_ENABLE_VULKAN)
+#        include <windows.h>
+#    endif
+
+// Macros 'near', 'far', 'NEAR' and 'FAR' are defined by 'shared/minwindef.h' in the Windows SDK.
+// Macros 'near' and 'far' are empty. They are not used by other Windows headers and are undefined
+// here to avoid identifier conflicts. Macros 'NEAR' and 'FAR' contain 'near' and 'far'. They are
+// used by other Windows headers and are cleared here to avoid compilation errors.
+#    undef near
+#    undef far
+#    undef NEAR
+#    undef FAR
+#    define NEAR
+#    define FAR
+#endif
+
+#if defined(_MSC_VER) && !defined(_M_ARM) && !defined(_M_ARM64)
+#    include <intrin.h>
+#    define ANGLE_USE_SSE
+#elif defined(__GNUC__) && defined(__x86_64__)
+#    include <x86intrin.h>
+#    define ANGLE_USE_SSE
+#endif
+
+// Mips and arm devices need to include stddef for size_t.
+#if defined(__mips__) || defined(__arm__) || defined(__aarch64__)
+#    include <stddef.h>
+#endif
+
+// The MemoryBarrier function name collides with a macro under Windows
+// We will undef the macro so that the function name does not get replaced
+#undef MemoryBarrier
+
+// Macro for hinting that an expression is likely to be true/false.
+#if !defined(ANGLE_LIKELY) || !defined(ANGLE_UNLIKELY)
+#    if defined(__GNUC__) || defined(__clang__)
+#        define ANGLE_LIKELY(x) __builtin_expect(!!(x), 1)
+#        define ANGLE_UNLIKELY(x) __builtin_expect(!!(x), 0)
+#    else
+#        define ANGLE_LIKELY(x) (x)
+#        define ANGLE_UNLIKELY(x) (x)
+#    endif  // defined(__GNUC__) || defined(__clang__)
+#endif      // !defined(ANGLE_LIKELY) || !defined(ANGLE_UNLIKELY)
+
+#ifdef ANGLE_PLATFORM_APPLE
+#    include <TargetConditionals.h>
+#    if TARGET_OS_OSX
+#        define ANGLE_PLATFORM_MACOS 1
+#    elif TARGET_OS_IPHONE
+#        define ANGLE_PLATFORM_IOS 1
+#        if TARGET_OS_SIMULATOR
+#            define ANGLE_PLATFORM_IOS_SIMULATOR 1
+#        endif
+#        if TARGET_OS_MACCATALYST
+#            define ANGLE_PLATFORM_MACCATALYST 1
+#        endif
+#    elif TARGET_OS_WATCH
+#        define ANGLE_PLATFORM_WATCHOS 1
+#        if TARGET_OS_SIMULATOR
+#            define ANGLE_PLATFORM_IOS_SIMULATOR 1
+#        endif
+#    elif TARGET_OS_TV
+#        define ANGLE_PLATFORM_APPLETV 1
+#        if TARGET_OS_SIMULATOR
+#            define ANGLE_PLATFORM_IOS_SIMULATOR 1
+#        endif
+#    endif
+#    // This might be useful globally. At the moment it is used
+#    // to differentiate MacCatalyst on Intel and Apple Silicon.
+#    if defined(__arm64__) || defined(__aarch64__)
+#        define ANGLE_CPU_ARM64 1
+#    endif
+#    // EAGL should be enabled on iOS, but not Mac Catalyst unless it is running on Apple Silicon.
+#    if (defined(ANGLE_PLATFORM_IOS) && !defined(ANGLE_PLATFORM_MACCATALYST)) || \
+        (defined(ANGLE_PLATFORM_MACCATALYST) && defined(ANGLE_CPU_ARM64))
+#        define ANGLE_ENABLE_EAGL
+#    endif
+#    // Identify Metal API >= what shipped on macOS Catalina.
+#    if (defined(ANGLE_PLATFORM_MACOS) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101500) || \
+        (defined(ANGLE_PLATFORM_IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130000)
+#        define ANGLE_WITH_MODERN_METAL_API 1
+#    endif
+#endif
+
+// Define ANGLE_WITH_ASAN macro.
+#if defined(__has_feature)
+#    if __has_feature(address_sanitizer)
+#        define ANGLE_WITH_ASAN 1
+#    endif
+#endif
+
+// Define ANGLE_WITH_MSAN macro.
+#if defined(__has_feature)
+#    if __has_feature(memory_sanitizer)
+#        define ANGLE_WITH_MSAN 1
+#    endif
+#endif
+
+// Define ANGLE_WITH_TSAN macro.
+#if defined(__has_feature)
+#    if __has_feature(thread_sanitizer)
+#        define ANGLE_WITH_TSAN 1
+#    endif
+#endif
+
+// Define ANGLE_WITH_UBSAN macro.
+#if defined(__has_feature)
+#    if __has_feature(undefined_behavior_sanitizer)
+#        define ANGLE_WITH_UBSAN 1
+#    endif
+#endif
+
+#if defined(ANGLE_WITH_ASAN) || defined(ANGLE_WITH_TSAN) || defined(ANGLE_WITH_UBSAN)
+#    define ANGLE_WITH_SANITIZER 1
+#endif  // defined(ANGLE_WITH_ASAN) || defined(ANGLE_WITH_TSAN) || defined(ANGLE_WITH_UBSAN)
+
+#include <stdint.h>
+#if INTPTR_MAX == INT64_MAX
+#    define ANGLE_IS_64_BIT_CPU 1
+#else
+#    define ANGLE_IS_32_BIT_CPU 1
+#endif
+
+#endif  // COMMON_PLATFORM_H_
Index: webkitgtk/create-2.40.2-mips-atomic-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-mips-atomic-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-mips-atomic-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-mips-atomic.patch
+
+mv webkitgtk-$VERSION-mips-atomic.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-mips-atomic-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-mips-atomic-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-mips-atomic-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-mips-atomic-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+webkitgtk-2.40.2/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
Index: webkitgtk/create-2.40.2-mips-atomic-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h
===================================================================
--- webkitgtk/create-2.40.2-mips-atomic-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h	(nonexistent)
+++ webkitgtk/create-2.40.2-mips-atomic-patch/webkitgtk-2.40.2-new/Source/ThirdParty/ANGLE/src/libANGLE/renderer/serial_utils.h	(revision 385)
@@ -0,0 +1,297 @@
+//
+// Copyright 2019 The ANGLE Project Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+//
+// serial_utils:
+//   Utilities for generating unique IDs for resources in ANGLE.
+//
+
+#ifndef LIBANGLE_RENDERER_SERIAL_UTILS_H_
+#define LIBANGLE_RENDERER_SERIAL_UTILS_H_
+
+#include <array>
+#include <atomic>
+#include <limits>
+
+#include "common/angleutils.h"
+#include "common/debug.h"
+
+namespace rx
+{
+class ResourceSerial
+{
+  public:
+    constexpr ResourceSerial() : mValue(kDirty) {}
+    explicit constexpr ResourceSerial(uintptr_t value) : mValue(value) {}
+    constexpr bool operator==(ResourceSerial other) const { return mValue == other.mValue; }
+    constexpr bool operator!=(ResourceSerial other) const { return mValue != other.mValue; }
+
+    void dirty() { mValue = kDirty; }
+    void clear() { mValue = kEmpty; }
+
+    constexpr bool valid() const { return mValue != kEmpty && mValue != kDirty; }
+    constexpr bool empty() const { return mValue == kEmpty; }
+
+  private:
+    constexpr static uintptr_t kDirty = std::numeric_limits<uintptr_t>::max();
+    constexpr static uintptr_t kEmpty = 0;
+
+    uintptr_t mValue;
+};
+
+// Class UniqueSerial defines unique serial number for object identification. It has only
+// equal/unequal comparison but no greater/smaller comparison. The default constructor creates an
+// invalid value.
+class UniqueSerial final
+{
+  public:
+    constexpr UniqueSerial() : mValue(kInvalid) {}
+    constexpr UniqueSerial(const UniqueSerial &other)  = default;
+    UniqueSerial &operator=(const UniqueSerial &other) = default;
+
+    constexpr bool operator==(const UniqueSerial &other) const
+    {
+        return mValue != kInvalid && mValue == other.mValue;
+    }
+    constexpr bool operator!=(const UniqueSerial &other) const
+    {
+        return mValue == kInvalid || mValue != other.mValue;
+    }
+
+    // Useful for serialization.
+    constexpr uint64_t getValue() const { return mValue; }
+    constexpr bool valid() const { return mValue != kInvalid; }
+
+  private:
+    friend class UniqueSerialFactory;
+    constexpr explicit UniqueSerial(uint64_t value) : mValue(value) {}
+    uint64_t mValue;
+    static constexpr uint64_t kInvalid = 0;
+};
+
+class UniqueSerialFactory final : angle::NonCopyable
+{
+  public:
+    UniqueSerialFactory() : mSerial(1) {}
+
+    UniqueSerial generate()
+    {
+        uint64_t current = mSerial++;
+        ASSERT(mSerial > current);  // Integer overflow
+        return UniqueSerial(current);
+    }
+
+  private:
+    uint64_t mSerial;
+};
+
+// Class Serial defines a monotonically increasing serial number that indicates the timeline of
+// execution.
+class Serial final
+{
+  public:
+    constexpr Serial() : mValue(0) {}
+    constexpr Serial(const Serial &other)  = default;
+    Serial &operator=(const Serial &other) = default;
+
+    static constexpr Serial Infinite() { return Serial(std::numeric_limits<uint64_t>::max()); }
+
+    constexpr bool operator==(const Serial &other) const { return mValue == other.mValue; }
+    constexpr bool operator!=(const Serial &other) const { return mValue != other.mValue; }
+    constexpr bool operator>(const Serial &other) const { return mValue > other.mValue; }
+    constexpr bool operator>=(const Serial &other) const { return mValue >= other.mValue; }
+    constexpr bool operator<(const Serial &other) const { return mValue < other.mValue; }
+    constexpr bool operator<=(const Serial &other) const { return mValue <= other.mValue; }
+
+    // Useful for serialization.
+    constexpr uint64_t getValue() const { return mValue; }
+
+  private:
+    friend class AtomicSerialFactory;
+    friend class RangedSerialFactory;
+    friend class AtomicQueueSerial;
+    constexpr explicit Serial(uint64_t value) : mValue(value) {}
+    uint64_t mValue;
+};
+
+// Defines class to track the queue serial that can be load/store from multiple threads atomically.
+class AtomicQueueSerial final
+{
+  public:
+    AtomicQueueSerial &operator=(const Serial &other)
+    {
+        mValue.store(other.mValue, std::memory_order_release);
+        return *this;
+    }
+    Serial getSerial() const { return Serial(mValue.load(std::memory_order_consume)); }
+
+  private:
+    static constexpr uint64_t kInvalid = 0;
+    std::atomic<uint64_t> mValue       = kInvalid;
+};
+
+// Used as default/initial serial
+static constexpr Serial kZeroSerial = Serial();
+
+// The factory to generate a serial number within the range [mSerial, mSerial+mCount}
+class RangedSerialFactory final : angle::NonCopyable
+{
+  public:
+    RangedSerialFactory() : mSerial(0), mCount(0) {}
+
+    void reset() { mCount = 0; }
+    bool empty() const { return mCount == 0; }
+    bool generate(Serial *serialOut)
+    {
+        if (mCount > 0)
+        {
+            uint64_t current = mSerial++;
+            ASSERT(mSerial > current);  // Integer overflow
+            *serialOut = Serial(current);
+            mCount--;
+            return true;
+        }
+        return false;
+    }
+
+  private:
+    friend class AtomicSerialFactory;
+    void initialize(uint64_t initialSerial, size_t count)
+    {
+        mSerial = initialSerial;
+        mCount  = count;
+    }
+    uint64_t mSerial;
+    size_t mCount;
+};
+
+class AtomicSerialFactory final : angle::NonCopyable
+{
+  public:
+    AtomicSerialFactory() : mSerial(1) {}
+
+    Serial generate()
+    {
+        uint64_t current = mSerial++;
+        ASSERT(mSerial > current);  // Integer overflow
+        return Serial(current);
+    }
+
+    void reserve(RangedSerialFactory *rangeFactory, size_t count)
+    {
+        uint64_t current = mSerial;
+        mSerial += count;
+        ASSERT(mSerial > current);  // Integer overflow
+        rangeFactory->initialize(current, count);
+    }
+
+  private:
+    std::atomic<uint64_t> mSerial;
+};
+
+// For backend that supports multiple queue serials, QueueSerial includes a Serial and an index.
+using SerialIndex                                     = uint32_t;
+static constexpr SerialIndex kInvalidQueueSerialIndex = SerialIndex(-1);
+
+class QueueSerial;
+// Because we release queue index when context becomes non-current, in order to use up all index
+// count, you will need to have 256 threads each has a context current. This is not a reasonable
+// usage case.
+constexpr size_t kMaxQueueSerialIndexCount = 256;
+// Fixed array of queue serials
+class AtomicQueueSerialFixedArray final
+{
+  public:
+    AtomicQueueSerialFixedArray()  = default;
+    ~AtomicQueueSerialFixedArray() = default;
+
+    void setQueueSerial(SerialIndex index, Serial serial);
+    void setQueueSerial(const QueueSerial &queueSerial);
+    void fill(Serial serial) { std::fill(mSerials.begin(), mSerials.end(), serial); }
+    Serial operator[](SerialIndex index) const { return mSerials[index].getSerial(); }
+    size_t size() const { return mSerials.size(); }
+
+  private:
+    std::array<AtomicQueueSerial, kMaxQueueSerialIndexCount> mSerials;
+};
+
+class QueueSerial final
+{
+  public:
+    QueueSerial() : mIndex(kInvalidQueueSerialIndex) {}
+    QueueSerial(SerialIndex index, Serial serial) : mIndex(index), mSerial(serial)
+    {
+        ASSERT(index != kInvalidQueueSerialIndex);
+    }
+    constexpr QueueSerial(const QueueSerial &other)  = default;
+    QueueSerial &operator=(const QueueSerial &other) = default;
+
+    constexpr bool operator==(const QueueSerial &other) const
+    {
+        return mIndex == other.mIndex && mSerial == other.mSerial;
+    }
+    constexpr bool operator!=(const QueueSerial &other) const
+    {
+        return mIndex != other.mIndex || mSerial != other.mSerial;
+    }
+    constexpr bool operator<(const QueueSerial &other) const
+    {
+        ASSERT(mIndex != kInvalidQueueSerialIndex);
+        ASSERT(mIndex == other.mIndex);
+        return mSerial < other.mSerial;
+    }
+    constexpr bool operator<=(const QueueSerial &other) const
+    {
+        ASSERT(mIndex != kInvalidQueueSerialIndex);
+        ASSERT(mIndex == other.mIndex);
+        return mSerial <= other.mSerial;
+    }
+    constexpr bool operator>(const QueueSerial &other) const
+    {
+        ASSERT(mIndex != kInvalidQueueSerialIndex);
+        ASSERT(mIndex == other.mIndex);
+        return mSerial > other.mSerial;
+    }
+    constexpr bool operator>=(const QueueSerial &other) const
+    {
+        ASSERT(mIndex != kInvalidQueueSerialIndex);
+        ASSERT(mIndex == other.mIndex);
+        return mSerial >= other.mSerial;
+    }
+
+    bool operator>(const AtomicQueueSerialFixedArray &serials) const
+    {
+        return mSerial > serials[mIndex];
+    }
+    bool operator<=(const AtomicQueueSerialFixedArray &serials) const
+    {
+        return mSerial <= serials[mIndex];
+    }
+
+    constexpr bool valid() const { return mIndex != kInvalidQueueSerialIndex; }
+
+    SerialIndex getIndex() const { return mIndex; }
+    Serial getSerial() const { return mSerial; }
+
+  private:
+    SerialIndex mIndex;
+    Serial mSerial;
+};
+
+ANGLE_INLINE void AtomicQueueSerialFixedArray::setQueueSerial(SerialIndex index, Serial serial)
+{
+    ASSERT(index != kInvalidQueueSerialIndex);
+    ASSERT(index < mSerials.size());
+    // Serial can only increase
+    ASSERT(serial > mSerials[index].getSerial());
+    mSerials[index] = serial;
+}
+
+ANGLE_INLINE void AtomicQueueSerialFixedArray::setQueueSerial(const QueueSerial &queueSerial)
+{
+    setQueueSerial(queueSerial.getIndex(), queueSerial.getSerial());
+}
+}  // namespace rx
+
+#endif  // LIBANGLE_RENDERER_SERIAL_UTILS_H_
Index: webkitgtk/create-2.40.2-suppress-cast-align-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-suppress-cast-align-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-suppress-cast-align-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-suppress-cast-align.patch
+
+mv webkitgtk-$VERSION-suppress-cast-align.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-suppress-cast-align-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-suppress-cast-align-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-suppress-cast-align-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-suppress-cast-align-patch/file.list	(revision 385)
@@ -0,0 +1,2 @@
+webkitgtk-2.40.2/Source/ThirdParty/gtest/cmake/internal_utils.cmake
+webkitgtk-2.40.2/Source/cmake/WebKitCompilerFlags.cmake
Index: webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/ThirdParty/gtest/cmake/internal_utils.cmake
===================================================================
--- webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/ThirdParty/gtest/cmake/internal_utils.cmake	(nonexistent)
+++ webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/ThirdParty/gtest/cmake/internal_utils.cmake	(revision 385)
@@ -0,0 +1,343 @@
+# Defines functions and macros useful for building Google Test and
+# Google Mock.
+#
+# Note:
+#
+# - This file will be run twice when building Google Mock (once via
+#   Google Test's CMakeLists.txt, and once via Google Mock's).
+#   Therefore it shouldn't have any side effects other than defining
+#   the functions and macros.
+#
+# - The functions/macros defined in this file may depend on Google
+#   Test and Google Mock's option() definitions, and thus must be
+#   called *after* the options have been defined.
+
+if (POLICY CMP0054)
+  cmake_policy(SET CMP0054 NEW)
+endif (POLICY CMP0054)
+
+# Tweaks CMake's default compiler/linker settings to suit Google Test's needs.
+#
+# This must be a macro(), as inside a function string() can only
+# update variables in the function scope.
+macro(fix_default_compiler_settings_)
+  if (MSVC)
+    # For MSVC, CMake sets certain flags to defaults we want to override.
+    # This replacement code is taken from sample in the CMake Wiki at
+    # https://gitlab.kitware.com/cmake/community/wikis/FAQ#dynamic-replace.
+    foreach (flag_var
+             CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+             CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+             CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+             CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+      if (NOT BUILD_SHARED_LIBS AND NOT gtest_force_shared_crt)
+        # When Google Test is built as a shared library, it should also use
+        # shared runtime libraries.  Otherwise, it may end up with multiple
+        # copies of runtime library data in different modules, resulting in
+        # hard-to-find crashes. When it is built as a static library, it is
+        # preferable to use CRT as static libraries, as we don't have to rely
+        # on CRT DLLs being available. CMake always defaults to using shared
+        # CRT libraries, so we override that default here.
+        string(REPLACE "/MD" "-MT" ${flag_var} "${${flag_var}}")
+      endif()
+
+      # We prefer more strict warning checking for building Google Test.
+      # Replaces /W3 with /W4 in defaults.
+      string(REPLACE "/W3" "/W4" ${flag_var} "${${flag_var}}")
+
+      # Prevent D9025 warning for targets that have exception handling
+      # turned off (/EHs-c- flag). Where required, exceptions are explicitly
+      # re-enabled using the cxx_exception_flags variable.
+      string(REPLACE "/EHsc" "" ${flag_var} "${${flag_var}}")
+    endforeach()
+  endif()
+endmacro()
+
+# Defines the compiler/linker flags used to build Google Test and
+# Google Mock.  You can tweak these definitions to suit your need.  A
+# variable's value is empty before it's explicitly assigned to.
+macro(config_compiler_and_linker)
+  # Note: pthreads on MinGW is not supported, even if available
+  # instead, we use windows threading primitives
+  unset(GTEST_HAS_PTHREAD)
+  if (NOT gtest_disable_pthreads AND NOT MINGW)
+    # Defines CMAKE_USE_PTHREADS_INIT and CMAKE_THREAD_LIBS_INIT.
+    find_package(Threads)
+    if (CMAKE_USE_PTHREADS_INIT)
+      set(GTEST_HAS_PTHREAD ON)
+    endif()
+  endif()
+
+  fix_default_compiler_settings_()
+  if (MSVC)
+    # Newlines inside flags variables break CMake's NMake generator.
+    # TODO(vladl@google.com): Add -RTCs and -RTCu to debug builds.
+    set(cxx_base_flags "-GS -W4 -WX -wd4251 -wd4275 -nologo -J")
+    set(cxx_base_flags "${cxx_base_flags} -D_UNICODE -DUNICODE -DWIN32 -D_WIN32")
+    set(cxx_base_flags "${cxx_base_flags} -DSTRICT -DWIN32_LEAN_AND_MEAN")
+    set(cxx_exception_flags "-EHsc -D_HAS_EXCEPTIONS=1")
+    set(cxx_no_exception_flags "-EHs-c- -D_HAS_EXCEPTIONS=0")
+    set(cxx_no_rtti_flags "-GR-")
+    # Suppress "unreachable code" warning
+    # http://stackoverflow.com/questions/3232669 explains the issue.
+    set(cxx_base_flags "${cxx_base_flags} -wd4702")
+    # Ensure MSVC treats source files as UTF-8 encoded.
+    set(cxx_base_flags "${cxx_base_flags} -utf-8")
+  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+    set(cxx_base_flags "-Wall -Wshadow -Werror -Wconversion")
+    set(cxx_exception_flags "-fexceptions")
+    set(cxx_no_exception_flags "-fno-exceptions")
+    set(cxx_strict_flags "-W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wchar-subscripts -Winline -Wredundant-decls")
+    set(cxx_no_rtti_flags "-fno-rtti")
+  elseif (CMAKE_COMPILER_IS_GNUCXX)
+    set(cxx_base_flags "-Wall -Wshadow -Werror")
+    if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 7.0.0)
+      set(cxx_base_flags "${cxx_base_flags} -Wno-error=dangling-else")
+    endif()
+    set(cxx_exception_flags "-fexceptions")
+    set(cxx_no_exception_flags "-fno-exceptions")
+    # Until version 4.3.2, GCC doesn't define a macro to indicate
+    # whether RTTI is enabled.  Therefore we define GTEST_HAS_RTTI
+    # explicitly.
+    set(cxx_no_rtti_flags "-fno-rtti -DGTEST_HAS_RTTI=0")
+    set(cxx_strict_flags
+      "-Wextra -Wno-unused-parameter -Wno-missing-field-initializers")
+  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
+    set(cxx_exception_flags "-features=except")
+    # Sun Pro doesn't provide macros to indicate whether exceptions and
+    # RTTI are enabled, so we define GTEST_HAS_* explicitly.
+    set(cxx_no_exception_flags "-features=no%except -DGTEST_HAS_EXCEPTIONS=0")
+    set(cxx_no_rtti_flags "-features=no%rtti -DGTEST_HAS_RTTI=0")
+  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "VisualAge" OR
+      CMAKE_CXX_COMPILER_ID STREQUAL "XL")
+    # CMake 2.8 changes Visual Age's compiler ID to "XL".
+    set(cxx_exception_flags "-qeh")
+    set(cxx_no_exception_flags "-qnoeh")
+    # Until version 9.0, Visual Age doesn't define a macro to indicate
+    # whether RTTI is enabled.  Therefore we define GTEST_HAS_RTTI
+    # explicitly.
+    set(cxx_no_rtti_flags "-qnortti -DGTEST_HAS_RTTI=0")
+  elseif (CMAKE_CXX_COMPILER_ID STREQUAL "HP")
+    set(cxx_base_flags "-AA -mt")
+    set(cxx_exception_flags "-DGTEST_HAS_EXCEPTIONS=1")
+    set(cxx_no_exception_flags "+noeh -DGTEST_HAS_EXCEPTIONS=0")
+    # RTTI can not be disabled in HP aCC compiler.
+    set(cxx_no_rtti_flags "")
+  endif()
+
+  # The pthreads library is available and allowed?
+  if (DEFINED GTEST_HAS_PTHREAD)
+    set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=1")
+  else()
+    set(GTEST_HAS_PTHREAD_MACRO "-DGTEST_HAS_PTHREAD=0")
+  endif()
+  set(cxx_base_flags "${cxx_base_flags} ${GTEST_HAS_PTHREAD_MACRO}")
+
+  # For building gtest's own tests and samples.
+  set(cxx_exception "${cxx_base_flags} ${cxx_exception_flags}")
+  set(cxx_no_exception
+    "${CMAKE_CXX_FLAGS} ${cxx_base_flags} ${cxx_no_exception_flags}")
+  set(cxx_default "${cxx_exception}")
+  set(cxx_no_rtti "${cxx_default} ${cxx_no_rtti_flags}")
+
+  # For building the gtest libraries.
+  set(cxx_strict "${cxx_default} ${cxx_strict_flags}")
+endmacro()
+
+# Defines the gtest & gtest_main libraries.  User tests should link
+# with one of them.
+function(cxx_library_with_type name type cxx_flags)
+  # type can be either STATIC or SHARED to denote a static or shared library.
+  # ARGN refers to additional arguments after 'cxx_flags'.
+  add_library(${name} ${type} ${ARGN})
+  set_target_properties(${name}
+    PROPERTIES
+    COMPILE_FLAGS "${cxx_flags}")
+  # Generate debug library name with a postfix.
+  set_target_properties(${name}
+    PROPERTIES
+    DEBUG_POSTFIX "d")
+  # Set the output directory for build artifacts
+  set_target_properties(${name}
+    PROPERTIES
+    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
+    LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
+    PDB_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+  # make PDBs match library name
+  get_target_property(pdb_debug_postfix ${name} DEBUG_POSTFIX)
+  set_target_properties(${name}
+    PROPERTIES
+    PDB_NAME "${name}"
+    PDB_NAME_DEBUG "${name}${pdb_debug_postfix}"
+    COMPILE_PDB_NAME "${name}"
+    COMPILE_PDB_NAME_DEBUG "${name}${pdb_debug_postfix}")
+
+  if (BUILD_SHARED_LIBS OR type STREQUAL "SHARED")
+    set_target_properties(${name}
+      PROPERTIES
+      COMPILE_DEFINITIONS "GTEST_CREATE_SHARED_LIBRARY=1")
+    if (NOT "${CMAKE_VERSION}" VERSION_LESS "2.8.11")
+      target_compile_definitions(${name} INTERFACE
+        $<INSTALL_INTERFACE:GTEST_LINKED_AS_SHARED_LIBRARY=1>)
+    endif()
+  endif()
+  if (DEFINED GTEST_HAS_PTHREAD)
+    if ("${CMAKE_VERSION}" VERSION_LESS "3.1.0")
+      set(threads_spec ${CMAKE_THREAD_LIBS_INIT})
+    else()
+      set(threads_spec Threads::Threads)
+    endif()
+    target_link_libraries(${name} PUBLIC ${threads_spec})
+  endif()
+
+  if (NOT "${CMAKE_VERSION}" VERSION_LESS "3.8")
+    target_compile_features(${name} PUBLIC cxx_std_11)
+  endif()
+endfunction()
+
+########################################################################
+#
+# Helper functions for creating build targets.
+
+function(cxx_shared_library name cxx_flags)
+  cxx_library_with_type(${name} SHARED "${cxx_flags}" ${ARGN})
+endfunction()
+
+function(cxx_library name cxx_flags)
+  cxx_library_with_type(${name} "" "${cxx_flags}" ${ARGN})
+endfunction()
+
+# cxx_executable_with_flags(name cxx_flags libs srcs...)
+#
+# creates a named C++ executable that depends on the given libraries and
+# is built from the given source files with the given compiler flags.
+function(cxx_executable_with_flags name cxx_flags libs)
+  add_executable(${name} ${ARGN})
+  if (MSVC)
+    # BigObj required for tests.
+    set(cxx_flags "${cxx_flags} -bigobj")
+  endif()
+  if (cxx_flags)
+    set_target_properties(${name}
+      PROPERTIES
+      COMPILE_FLAGS "${cxx_flags}")
+  endif()
+  if (BUILD_SHARED_LIBS)
+    set_target_properties(${name}
+      PROPERTIES
+      COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
+  endif()
+  # To support mixing linking in static and dynamic libraries, link each
+  # library in with an extra call to target_link_libraries.
+  foreach (lib "${libs}")
+    target_link_libraries(${name} ${lib})
+  endforeach()
+endfunction()
+
+# cxx_executable(name dir lib srcs...)
+#
+# creates a named target that depends on the given libs and is built
+# from the given source files.  dir/name.cc is implicitly included in
+# the source file list.
+function(cxx_executable name dir libs)
+  cxx_executable_with_flags(
+    ${name} "${cxx_default}" "${libs}" "${dir}/${name}.cc" ${ARGN})
+endfunction()
+
+# Sets PYTHONINTERP_FOUND and PYTHON_EXECUTABLE.
+if ("${CMAKE_VERSION}" VERSION_LESS "3.12.0")
+  find_package(PythonInterp)
+else()
+  find_package(Python COMPONENTS Interpreter)
+  set(PYTHONINTERP_FOUND ${Python_Interpreter_FOUND})
+  set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+endif()
+
+# cxx_test_with_flags(name cxx_flags libs srcs...)
+#
+# creates a named C++ test that depends on the given libs and is built
+# from the given source files with the given compiler flags.
+function(cxx_test_with_flags name cxx_flags libs)
+  cxx_executable_with_flags(${name} "${cxx_flags}" "${libs}" ${ARGN})
+    add_test(NAME ${name} COMMAND "$<TARGET_FILE:${name}>")
+endfunction()
+
+# cxx_test(name libs srcs...)
+#
+# creates a named test target that depends on the given libs and is
+# built from the given source files.  Unlike cxx_test_with_flags,
+# test/name.cc is already implicitly included in the source file list.
+function(cxx_test name libs)
+  cxx_test_with_flags("${name}" "${cxx_default}" "${libs}"
+    "test/${name}.cc" ${ARGN})
+endfunction()
+
+# py_test(name)
+#
+# creates a Python test with the given name whose main module is in
+# test/name.py.  It does nothing if Python is not installed.
+function(py_test name)
+  if (PYTHONINTERP_FOUND)
+    if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 3.1)
+      if (CMAKE_CONFIGURATION_TYPES)
+        # Multi-configuration build generators as for Visual Studio save
+        # output in a subdirectory of CMAKE_CURRENT_BINARY_DIR (Debug,
+        # Release etc.), so we have to provide it here.
+        add_test(NAME ${name}
+          COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+              --build_dir=${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG> ${ARGN})
+      else (CMAKE_CONFIGURATION_TYPES)
+        # Single-configuration build generators like Makefile generators
+        # don't have subdirs below CMAKE_CURRENT_BINARY_DIR.
+        add_test(NAME ${name}
+          COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+            --build_dir=${CMAKE_CURRENT_BINARY_DIR} ${ARGN})
+      endif (CMAKE_CONFIGURATION_TYPES)
+    else()
+      # ${CMAKE_CURRENT_BINARY_DIR} is known at configuration time, so we can
+      # directly bind it from cmake. ${CTEST_CONFIGURATION_TYPE} is known
+      # only at ctest runtime (by calling ctest -c <Configuration>), so
+      # we have to escape $ to delay variable substitution here.
+      add_test(NAME ${name}
+        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/test/${name}.py
+          --build_dir=${CMAKE_CURRENT_BINARY_DIR}/\${CTEST_CONFIGURATION_TYPE} ${ARGN})
+    endif()
+  endif(PYTHONINTERP_FOUND)
+endfunction()
+
+# install_project(targets...)
+#
+# Installs the specified targets and configures the associated pkgconfig files.
+function(install_project)
+  if(INSTALL_GTEST)
+    install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/"
+      DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+    # Install the project targets.
+    install(TARGETS ${ARGN}
+      EXPORT ${targets_export_name}
+      RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+      ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+      LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}")
+    if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
+      # Install PDBs
+      foreach(t ${ARGN})
+        get_target_property(t_pdb_name ${t} COMPILE_PDB_NAME)
+        get_target_property(t_pdb_name_debug ${t} COMPILE_PDB_NAME_DEBUG)
+        get_target_property(t_pdb_output_directory ${t} PDB_OUTPUT_DIRECTORY)
+        install(FILES
+          "${t_pdb_output_directory}/\${CMAKE_INSTALL_CONFIG_NAME}/$<$<CONFIG:Debug>:${t_pdb_name_debug}>$<$<NOT:$<CONFIG:Debug>>:${t_pdb_name}>.pdb"
+          DESTINATION ${CMAKE_INSTALL_LIBDIR}
+          OPTIONAL)
+      endforeach()
+    endif()
+    # Configure and install pkgconfig files.
+    foreach(t ${ARGN})
+      set(configured_pc "${generated_dir}/${t}.pc")
+      configure_file("${PROJECT_SOURCE_DIR}/cmake/${t}.pc.in"
+        "${configured_pc}" @ONLY)
+      install(FILES "${configured_pc}"
+        DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+    endforeach()
+  endif()
+endfunction()
Index: webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/cmake/WebKitCompilerFlags.cmake
===================================================================
--- webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/cmake/WebKitCompilerFlags.cmake	(nonexistent)
+++ webkitgtk/create-2.40.2-suppress-cast-align-patch/webkitgtk-2.40.2-new/Source/cmake/WebKitCompilerFlags.cmake	(revision 385)
@@ -0,0 +1,452 @@
+# Prepends flags to CMAKE_C_FLAGS if supported by the C compiler. Almost all
+# flags should be prepended to allow the user to override them.
+macro(WEBKIT_PREPEND_GLOBAL_C_FLAGS)
+    foreach (_flag ${ARGN})
+        check_c_compiler_flag("${_flag}" C_COMPILER_SUPPORTS_${_flag})
+        if (C_COMPILER_SUPPORTS_${_flag})
+            set(CMAKE_C_FLAGS "${_flag} ${CMAKE_C_FLAGS}")
+        endif ()
+    endforeach ()
+endmacro()
+
+# Appends flags to CMAKE_C_FLAGS if supported by the C compiler. This macro
+# should be used sparingly. Only append flags if the user must not be allowed to
+# override them.
+macro(WEBKIT_APPEND_GLOBAL_C_FLAGS)
+    foreach (_flag ${ARGN})
+        check_c_compiler_flag("${_flag}" C_COMPILER_SUPPORTS_${_flag})
+        if (C_COMPILER_SUPPORTS_${_flag})
+            set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${_flag}")
+        endif ()
+    endforeach ()
+endmacro()
+
+# Prepends flags to CMAKE_CXX_FLAGS if supported by the C++ compiler. Almost all
+# flags should be prepended to allow the user to override them.
+macro(WEBKIT_PREPEND_GLOBAL_CXX_FLAGS)
+    foreach (_flag ${ARGN})
+        check_cxx_compiler_flag("${_flag}" CXX_COMPILER_SUPPORTS_${_flag})
+        if (CXX_COMPILER_SUPPORTS_${_flag})
+            set(CMAKE_CXX_FLAGS "${_flag} ${CMAKE_CXX_FLAGS}")
+        endif ()
+    endforeach ()
+endmacro()
+
+# Appends flags to CMAKE_CXX_FLAGS if supported by the C++ compiler. This macro
+# should be used sparingly. Only append flags if the user must not be allowed to
+# override them.
+macro(WEBKIT_APPEND_GLOBAL_CXX_FLAGS)
+    foreach (_flag ${ARGN})
+        check_cxx_compiler_flag("${_flag}" CXX_COMPILER_SUPPORTS_${_flag})
+        if (CXX_COMPILER_SUPPORTS_${_flag})
+            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_flag}")
+        endif ()
+    endforeach ()
+endmacro()
+
+# Prepends flags to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS if supported by the C
+# or C++ compiler, respectively. Almost all flags should be prepended to allow
+# the user to override them.
+macro(WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS)
+    WEBKIT_PREPEND_GLOBAL_C_FLAGS(${ARGN})
+    WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(${ARGN})
+endmacro()
+
+# Appends flags to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS if supported by the C or
+# C++ compiler, respectively. This macro should be used sparingly. Only append
+# flags if the user must not be allowed to override them.
+macro(WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS)
+    WEBKIT_APPEND_GLOBAL_C_FLAGS(${ARGN})
+    WEBKIT_APPEND_GLOBAL_CXX_FLAGS(${ARGN})
+endmacro()
+
+# Appends flags to COMPILE_FLAGS of _target if supported by the C compiler.
+# Note that it is simply not possible to pass different C and C++ flags, unless
+# we drop support for the Visual Studio backend and use the COMPILE_LANGUAGE
+# generator expression. This is a very serious limitation.
+macro(WEBKIT_ADD_TARGET_C_FLAGS _target)
+    foreach (_flag ${ARGN})
+        check_c_compiler_flag("${_flag}" C_COMPILER_SUPPORTS_${_flag})
+        if (C_COMPILER_SUPPORTS_${_flag})
+            target_compile_options(${_target} PRIVATE ${_flag})
+        endif ()
+    endforeach ()
+endmacro()
+
+# Appends flags to COMPILE_FLAGS of _target if supported by the C++ compiler.
+# Note that it is simply not possible to pass different C and C++ flags, unless
+# we drop support for the Visual Studio backend and use the COMPILE_LANGUAGE
+# generator expression. This is a very serious limitation.
+macro(WEBKIT_ADD_TARGET_CXX_FLAGS _target)
+    foreach (_flag ${ARGN})
+        check_cxx_compiler_flag("${_flag}" CXX_COMPILER_SUPPORTS_${_flag})
+        if (CXX_COMPILER_SUPPORTS_${_flag})
+            target_compile_options(${_target} PRIVATE ${_flag})
+        endif ()
+    endforeach ()
+endmacro()
+
+
+option(DEVELOPER_MODE_FATAL_WARNINGS "Build with warnings as errors if DEVELOPER_MODE is also enabled" ON)
+if (DEVELOPER_MODE AND DEVELOPER_MODE_FATAL_WARNINGS)
+    if (MSVC)
+        set(FATAL_WARNINGS_FLAG /WX)
+    else ()
+        set(FATAL_WARNINGS_FLAG -Werror)
+    endif ()
+
+    check_cxx_compiler_flag(${FATAL_WARNINGS_FLAG} CXX_COMPILER_SUPPORTS_WERROR)
+    if (CXX_COMPILER_SUPPORTS_WERROR)
+        set(DEVELOPER_MODE_CXX_FLAGS ${FATAL_WARNINGS_FLAG})
+    endif ()
+endif ()
+
+if (COMPILER_IS_GCC_OR_CLANG)
+    WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-strict-aliasing)
+
+    # clang-cl.exe impersonates cl.exe so some clang arguments like -fno-rtti are
+    # represented using cl.exe's options and should not be passed as flags, so
+    # we do not add -fno-rtti or -fno-exceptions for clang-cl
+    if (COMPILER_IS_CLANG_CL)
+        # FIXME: These warnings should be addressed
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-undef
+                                             -Wno-macro-redefined
+                                             -Wno-unknown-pragmas
+                                             -Wno-nonportable-include-path
+                                             -Wno-unknown-argument)
+    else ()
+        WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-fno-exceptions)
+        WEBKIT_APPEND_GLOBAL_CXX_FLAGS(-fno-rtti)
+
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-tautological-compare)
+
+        if (WIN32)
+            WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS(-mno-ms-bitfields)
+            WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-unknown-pragmas)
+            add_definitions(-D__USE_MINGW_ANSI_STDIO=1)
+        endif ()
+    endif ()
+
+    # Warnings to be enabled
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wformat-security
+                                         -Wmissing-format-attribute
+                                         -Wpointer-arith
+                                         -Wundef)
+
+    # Warnings to be disabled
+    # FIXME: We should probably not be disabling -Wno-maybe-uninitialized?
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Qunused-arguments
+                                         -Wno-maybe-uninitialized
+                                         -Wno-parentheses-equality
+                                         -Wno-misleading-indentation
+                                         -Wno-psabi)
+
+    # GCC < 12.0 gives false warnings for mismatched-new-delete <https://webkit.org/b/241516>
+    if ((CMAKE_CXX_COMPILER_ID MATCHES "GNU") AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "12.0.0"))
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-mismatched-new-delete)
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-uninitialized)
+    endif ()
+
+    WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-noexcept-type)
+
+    # These GCC warnings produce too many false positives to be useful. We'll
+    # rely on developers who build with Clang to notice these warnings.
+    if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+        # https://bugs.webkit.org/show_bug.cgi?id=167643#c13
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
+
+        # https://bugs.webkit.org/show_bug.cgi?id=228601
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-array-bounds)
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-nonnull)
+
+        # https://bugs.webkit.org/show_bug.cgi?id=240596
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-stringop-overflow)
+
+        # This triggers warnings in wtf/Packed.h, a header that is included in many places. It does not
+        # respect ignore warning pragmas and we cannot easily suppress it for all affected files.
+        # https://bugs.webkit.org/show_bug.cgi?id=226557
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-stringop-overread)
+
+        # -Wodr trips over our bindings integrity feature when LTO is enabled.
+        # https://bugs.webkit.org/show_bug.cgi?id=229867
+        WEBKIT_PREPEND_GLOBAL_CXX_FLAGS(-Wno-odr)
+
+        # Match Clang's behavor and exit after emitting 20 errors.
+        # https://bugs.webkit.org/show_bug.cgi?id=244621
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-fmax-errors=20)
+    endif ()
+
+    # Force SSE2 fp on x86 builds.
+    if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
+        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
+        include(DetectSSE2)
+        if (NOT SSE2_SUPPORT_FOUND)
+            message(FATAL_ERROR "SSE2 support is required to compile WebKit")
+        endif ()
+    endif ()
+
+    # Makes builds faster. The GCC manual warns about the possibility that the assembler being
+    # used may not support input from a pipe, but in practice the toolchains we support all do.
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-pipe)
+endif ()
+
+if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC)
+    # Don't give -Wall to clang-cl because clang-cl treats /Wall and -Wall as -Weverything.
+    # -Wall and -Wextra should be specified before -Wno-* for Clang.
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wall -Wextra)
+endif ()
+
+# Ninja tricks compilers into turning off color support.
+if (CMAKE_GENERATOR STREQUAL "Ninja")
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-fcolor-diagnostics
+                                         -fdiagnostics-color=always)
+endif ()
+
+
+string(TOLOWER ${CMAKE_HOST_SYSTEM_PROCESSOR} LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR)
+if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" AND NOT "${LOWERCASE_CMAKE_HOST_SYSTEM_PROCESSOR}" MATCHES "x86_64")
+    # To avoid out of memory when building with debug option in 32bit system.
+    # See https://bugs.webkit.org/show_bug.cgi?id=77327
+    set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "-Wl,--no-keep-memory ${CMAKE_SHARED_LINKER_FLAGS_DEBUG}")
+endif ()
+
+if (LTO_MODE AND COMPILER_IS_CLANG)
+    set(CMAKE_C_FLAGS "-flto=${LTO_MODE} ${CMAKE_C_FLAGS}")
+    set(CMAKE_CXX_FLAGS "-flto=${LTO_MODE} ${CMAKE_CXX_FLAGS}")
+    set(CMAKE_EXE_LINKER_FLAGS "-flto=${LTO_MODE} ${CMAKE_EXE_LINKER_FLAGS}")
+    set(CMAKE_SHARED_LINKER_FLAGS "-flto=${LTO_MODE} ${CMAKE_SHARED_LINKER_FLAGS}")
+    set(CMAKE_MODULE_LINKER_FLAGS "-flto=${LTO_MODE} ${CMAKE_MODULE_LINKER_FLAGS}")
+endif ()
+
+if (COMPILER_IS_GCC_OR_CLANG)
+    # Careful: this needs to be above where ENABLED_COMPILER_SANITIZERS is set.
+    # Also, it's not possible to use the normal prepend/append macros for
+    # -fsanitize=* flags, because check_cxx_compiler_flag will report it's
+    # unsupported, because it causes the build to fail if not used when linking.
+    if (ENABLE_SANITIZERS)
+        if (MSVC AND WTF_CPU_X86_64)
+            find_library(CLANG_ASAN_LIBRARY clang_rt.asan_dynamic_runtime_thunk-x86_64 ${CLANG_LIB_PATH})
+            find_library(CLANG_ASAN_RT_LIBRARY clang_rt.asan_dynamic-x86_64 PATHS ${CLANG_LIB_PATH})
+            set(SANITIZER_LINK_FLAGS "\"${CLANG_ASAN_LIBRARY}\" \"${CLANG_ASAN_RT_LIBRARY}\"")
+        else ()
+            set(SANITIZER_LINK_FLAGS "-lpthread")
+        endif ()
+
+        foreach (SANITIZER ${ENABLE_SANITIZERS})
+            if (${SANITIZER} MATCHES "address")
+                WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS("-fno-omit-frame-pointer -fno-optimize-sibling-calls")
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=address ${SANITIZER_COMPILER_FLAGS}")
+                set(SANITIZER_LINK_FLAGS "-fsanitize=address ${SANITIZER_LINK_FLAGS}")
+
+            elseif (${SANITIZER} MATCHES "undefined")
+                # Please keep these options synchronized with Tools/sanitizer/ubsan.xcconfig
+                WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS("-fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-optimize-sibling-calls")
+                # -fsanitize=vptr is disabled because incompatible with -fno-rtti
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=undefined -fno-sanitize=vptr ${SANITIZER_COMPILER_FLAGS}")
+                set(SANITIZER_LINK_FLAGS "-fsanitize=undefined ${SANITIZER_LINK_FLAGS}")
+
+            elseif (${SANITIZER} MATCHES "thread" AND NOT MSVC)
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=thread ${SANITIZER_COMPILER_FLAGS}")
+                set(SANITIZER_LINK_FLAGS "-fsanitize=thread ${SANITIZER_LINK_FLAGS}")
+
+            elseif (${SANITIZER} MATCHES "memory" AND COMPILER_IS_CLANG AND NOT MSVC)
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=memory ${SANITIZER_COMPILER_FLAGS}")
+                set(SANITIZER_LINK_FLAGS "-fsanitize=memory ${SANITIZER_LINK_FLAGS}")
+
+            elseif (${SANITIZER} MATCHES "leak" AND NOT MSVC)
+                set(SANITIZER_COMPILER_FLAGS "-fsanitize=leak ${SANITIZER_COMPILER_FLAGS}")
+                set(SANITIZER_LINK_FLAGS "-fsanitize=leak ${SANITIZER_LINK_FLAGS}")
+
+            else ()
+                message(FATAL_ERROR "Unsupported sanitizer: ${SANITIZER}")
+            endif ()
+        endforeach ()
+
+        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${SANITIZER_COMPILER_FLAGS}")
+        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SANITIZER_COMPILER_FLAGS}")
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${SANITIZER_LINK_FLAGS}")
+        set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${SANITIZER_LINK_FLAGS}")
+        set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${SANITIZER_LINK_FLAGS}")
+    endif ()
+endif ()
+
+if (NOT MSVC)
+    string(REGEX MATCHALL "-fsanitize=[^ ]*" ENABLED_COMPILER_SANITIZERS ${CMAKE_CXX_FLAGS})
+endif ()
+
+if (UNIX AND NOT APPLE AND NOT ENABLED_COMPILER_SANITIZERS)
+    set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+endif ()
+
+
+if (MSVC)
+    set(CODE_GENERATOR_PREPROCESSOR "\"${CMAKE_CXX_COMPILER}\" /nologo /EP /TP")
+else ()
+    set(CODE_GENERATOR_PREPROCESSOR "\"${CMAKE_CXX_COMPILER}\" -E -P -x c++")
+endif ()
+
+
+# Ensure that the default include system directories are added to the list of CMake implicit includes.
+# This workarounds an issue that happens when using GCC 6 and using system includes (-isystem).
+# For more details check: https://bugs.webkit.org/show_bug.cgi?id=161697
+macro(DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _compiler _flags _result)
+    file(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n")
+    separate_arguments(_buildFlags UNIX_COMMAND "${_flags}")
+    execute_process(COMMAND ${CMAKE_COMMAND} -E env LANG=C ${_compiler} ${_buildFlags} -v -E -x ${_lang} -dD dummy
+                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles OUTPUT_QUIET
+                    ERROR_VARIABLE _gccOutput)
+    file(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
+    if ("${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list")
+        set(${_result} ${CMAKE_MATCH_1})
+        string(REPLACE "\n" " " ${_result} "${${_result}}")
+        separate_arguments(${_result})
+    endif ()
+endmacro()
+
+if (COMPILER_IS_GCC_OR_CLANG)
+   DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c" "${CMAKE_C_COMPILER}" "${CMAKE_C_FLAGS}" SYSTEM_INCLUDE_DIRS)
+   set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
+   DETERMINE_GCC_SYSTEM_INCLUDE_DIRS("c++" "${CMAKE_CXX_COMPILER}" "${CMAKE_CXX_FLAGS}" SYSTEM_INCLUDE_DIRS)
+   set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES} ${SYSTEM_INCLUDE_DIRS})
+endif ()
+
+if (COMPILER_IS_GCC_OR_CLANG)
+    set(ATOMIC_TEST_SOURCE "
+#include <stdbool.h>
+#include <stdint.h>
+
+#define COMPILER(FEATURE) (defined COMPILER_##FEATURE  && COMPILER_##FEATURE)
+
+#if defined(__clang__)
+#define COMPILER_CLANG 1
+#endif
+
+#if defined(__GNUC__)
+#define COMPILER_GCC_COMPATIBLE 1
+#endif
+
+#if COMPILER(GCC_COMPATIBLE) && !COMPILER(CLANG)
+#define COMPILER_GCC 1
+#endif
+
+#if defined(_MSC_VER)
+#define COMPILER_MSVC 1
+#endif
+
+#define CPU(_FEATURE) (defined CPU_##_FEATURE && CPU_##_FEATURE)
+
+
+#if COMPILER(GCC_COMPATIBLE)
+/* __LP64__ is not defined on 64bit Windows since it uses LLP64. Using __SIZEOF_POINTER__ is simpler. */
+#if __SIZEOF_POINTER__ == 8
+#define CPU_ADDRESS64 1
+#elif __SIZEOF_POINTER__ == 4
+#define CPU_ADDRESS32 1
+#endif
+#endif
+
+static inline bool compare_and_swap_bool_weak(bool* ptr, bool old_value, bool new_value)
+{
+#if COMPILER(CLANG)
+    return __c11_atomic_compare_exchange_weak((_Atomic bool*)ptr, &old_value, new_value, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#else
+    return __atomic_compare_exchange_n((bool*)ptr, &old_value, new_value, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#endif
+}
+
+#if CPU(ADDRESS64)
+
+typedef __uint128_t pair;
+
+static inline bool compare_and_swap_pair_weak(void* raw_ptr, pair old_value, pair new_value)
+{
+#if COMPILER(CLANG)
+    return __c11_atomic_compare_exchange_weak((_Atomic pair*)raw_ptr, &old_value, new_value, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#else
+    return __atomic_compare_exchange_n((pair*)raw_ptr, &old_value, new_value, true, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#endif
+}
+#endif
+
+static inline bool compare_and_swap_uint64_weak(uint64_t* ptr, uint64_t old_value, uint64_t new_value)
+{
+#if COMPILER(CLANG)
+    return __c11_atomic_compare_exchange_weak((_Atomic uint64_t*)ptr, &old_value, new_value, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#else
+    return __atomic_compare_exchange_n((uint64_t*)ptr, &old_value, new_value, true, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST);
+#endif
+}
+
+int main() {
+    bool y = false;
+    bool expected = true;
+    bool j = compare_and_swap_bool_weak(&y, expected, false);
+#if CPU(ADDRESS64)
+    pair x = 42;
+    bool k = compare_and_swap_pair_weak(&x, 42, 55);
+#endif
+    uint64_t z = 42;
+    bool l = compare_and_swap_uint64_weak(&z, 42, 56);
+    int result = (j ||
+#if CPU(ADDRESS64)
+                  k ||
+#endif
+                  l) ? 0 : 1;
+    return result;
+}
+    ")
+    check_c_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_ARE_BUILTIN)
+    if (NOT ATOMICS_ARE_BUILTIN)
+        set(CMAKE_REQUIRED_LIBRARIES atomic)
+        check_c_source_compiles("${ATOMIC_TEST_SOURCE}" ATOMICS_REQUIRE_LIBATOMIC)
+        unset(CMAKE_REQUIRED_LIBRARIES)
+    endif ()
+
+    # <filesystem> vs <experimental/filesystem>
+    set(FILESYSTEM_TEST_SOURCE "
+        #include <filesystem>
+        int main() { std::filesystem::path p1(\"\"); std::filesystem::status(p1); }
+    ")
+    set(CMAKE_REQUIRED_FLAGS "--std=c++2a")
+    check_cxx_source_compiles("${FILESYSTEM_TEST_SOURCE}" STD_FILESYSTEM_IS_AVAILABLE)
+    if (NOT STD_FILESYSTEM_IS_AVAILABLE)
+        set(EXPERIMENTAL_FILESYSTEM_TEST_SOURCE "
+            #include <experimental/filesystem>
+            int main() {
+                std::experimental::filesystem::path p1(\"//home\");
+                std::experimental::filesystem::status(p1);
+            }
+        ")
+        set(CMAKE_REQUIRED_LIBRARIES stdc++fs)
+        check_cxx_source_compiles("${EXPERIMENTAL_FILESYSTEM_TEST_SOURCE}" STD_EXPERIMENTAL_FILESYSTEM_IS_AVAILABLE)
+        unset(CMAKE_REQUIRED_LIBRARIES)
+    endif ()
+    unset(CMAKE_REQUIRED_FLAGS)
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND WTF_CPU_MIPS)
+    # Work around https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78176.
+    # This only manifests when executing 32-bit code on a 64-bit
+    # processor. This is a workaround and does not cover all cases
+    # (see comment #28 in the link above).
+    WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-mno-lxc1-sxc1)
+endif ()
+
+if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+    set(CMAKE_REQUIRED_FLAGS "--std=c++2a")
+    set(REMOVE_CVREF_TEST_SOURCE "
+        #include <type_traits>
+        int main() {
+            using type = std::remove_cvref_t<int&>;
+        }
+    ")
+    check_cxx_source_compiles("${REMOVE_CVREF_TEST_SOURCE}" STD_REMOVE_CVREF_IS_AVAILABLE)
+    unset(CMAKE_REQUIRED_FLAGS)
+endif ()
+
+if (COMPILER_IS_GCC_OR_CLANG)
+    set(COMPILE_C_AS_CXX "-xc++;-std=c++2a")
+endif ()
+
+# FIXME: Enable pre-compiled headers for all ports <https://webkit.org/b/139438>
+set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
Index: webkitgtk/create-2.40.2-ui-process-crash-patch/create.patch.sh
===================================================================
--- webkitgtk/create-2.40.2-ui-process-crash-patch/create.patch.sh	(nonexistent)
+++ webkitgtk/create-2.40.2-ui-process-crash-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=2.40.2
+
+tar --files-from=file.list -xJvf ../webkitgtk-$VERSION.tar.xz
+mv webkitgtk-$VERSION webkitgtk-$VERSION-orig
+
+cp -rf ./webkitgtk-$VERSION-new ./webkitgtk-$VERSION
+
+diff --unified -Nr  webkitgtk-$VERSION-orig  webkitgtk-$VERSION > webkitgtk-$VERSION-ui-process-crash.patch
+
+mv webkitgtk-$VERSION-ui-process-crash.patch ../patches
+
+rm -rf ./webkitgtk-$VERSION
+rm -rf ./webkitgtk-$VERSION-orig

Property changes on: webkitgtk/create-2.40.2-ui-process-crash-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: webkitgtk/create-2.40.2-ui-process-crash-patch/file.list
===================================================================
--- webkitgtk/create-2.40.2-ui-process-crash-patch/file.list	(nonexistent)
+++ webkitgtk/create-2.40.2-ui-process-crash-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+webkitgtk-2.40.2/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
Index: webkitgtk/create-2.40.2-ui-process-crash-patch/webkitgtk-2.40.2-new/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp
===================================================================
--- webkitgtk/create-2.40.2-ui-process-crash-patch/webkitgtk-2.40.2-new/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp	(nonexistent)
+++ webkitgtk/create-2.40.2-ui-process-crash-patch/webkitgtk-2.40.2-new/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp	(revision 385)
@@ -0,0 +1,3335 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
+ * Copyright (C) 2013 Gustavo Noronha Silva <gns@gnome.org>.
+ * Copyright (C) 2011, 2020 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebKitWebViewBase.h"
+
+#include "APIPageConfiguration.h"
+#include "AcceleratedBackingStore.h"
+#include "DragSource.h"
+#include "DrawingAreaProxyCoordinatedGraphics.h"
+#include "DropTarget.h"
+#include "InputMethodFilter.h"
+#include "KeyAutoRepeatHandler.h"
+#include "KeyBindingTranslator.h"
+#include "NativeWebKeyboardEvent.h"
+#include "NativeWebMouseEvent.h"
+#include "NativeWebWheelEvent.h"
+#include "PageClientImpl.h"
+#include "PointerLockManager.h"
+#include "ViewGestureController.h"
+#include "WebEventFactory.h"
+#include "WebInspectorUIProxy.h"
+#include "WebKit2Initialize.h"
+#include "WebKitEmojiChooser.h"
+#include "WebKitInitialize.h"
+#include "WebKitInputMethodContextImplGtk.h"
+#include "WebKitWebViewAccessible.h"
+#include "WebKitWebViewBaseInternal.h"
+#include "WebKitWebViewBasePrivate.h"
+#include "WebPageGroup.h"
+#include "WebPageProxy.h"
+#include "WebPopupMenuProxyGtk.h"
+#include "WebPreferences.h"
+#include "WebProcessPool.h"
+#include "WebUserContentControllerProxy.h"
+#include <WebCore/ActivityState.h>
+#include <WebCore/CairoUtilities.h>
+#include <WebCore/GRefPtrGtk.h>
+#include <WebCore/GUniquePtrGtk.h>
+#include <WebCore/GtkUtilities.h>
+#include <WebCore/GtkVersioning.h>
+#include <WebCore/NotImplemented.h>
+#include <WebCore/PlatformDisplay.h>
+#include <WebCore/PlatformKeyboardEvent.h>
+#include <WebCore/PlatformMouseEvent.h>
+#include <WebCore/PointerEvent.h>
+#include <WebCore/RefPtrCairo.h>
+#include <WebCore/Region.h>
+#include <cmath>
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib-object.h>
+#include <glib/gi18n-lib.h>
+#include <memory>
+#include <pal/system/SleepDisabler.h>
+#include <utility>
+#include <wtf/Compiler.h>
+#include <wtf/HashMap.h>
+#include <wtf/MathExtras.h>
+#include <wtf/NotFound.h>
+#include <wtf/glib/GRefPtr.h>
+#include <wtf/glib/RunLoopSourcePriority.h>
+#include <wtf/glib/WTFGType.h>
+#include <wtf/text/CString.h>
+
+#if ENABLE(FULLSCREEN_API)
+#include "WebFullScreenManagerProxy.h"
+#endif
+
+using namespace WebKit;
+using namespace WebCore;
+
+#if !USE(GTK4)
+struct ClickCounter {
+public:
+    void reset()
+    {
+        currentClickCount = 0;
+        previousClickPoint = IntPoint();
+        previousClickTime = 0;
+        previousClickButton = 0;
+    }
+
+    int currentClickCountForGdkButtonEvent(GdkEvent* event)
+    {
+        int doubleClickDistance = 250;
+        int doubleClickTime = 5;
+        g_object_get(gtk_settings_get_for_screen(gdk_event_get_screen(event)),
+            "gtk-double-click-distance", &doubleClickDistance, "gtk-double-click-time", &doubleClickTime, nullptr);
+
+        // GTK+ only counts up to triple clicks, but WebCore wants to know about
+        // quadruple clicks, quintuple clicks, ad infinitum. Here, we replicate the
+        // GDK logic for counting clicks.
+        guint32 eventTime = gdk_event_get_time(event);
+        if (!eventTime) {
+            // Real events always have a non-zero time, but events synthesized
+            // by the WTR do not and we must calculate a time manually. This time
+            // is not calculated in the WTR, because GTK+ does not work well with
+            // anything other than GDK_CURRENT_TIME on synthesized events.
+            eventTime = g_get_monotonic_time() / 1000;
+        }
+
+        GdkEventType type;
+        guint button;
+        double x, y;
+        gdk_event_get_coords(event, &x, &y);
+        gdk_event_get_button(event, &button);
+        type = gdk_event_get_event_type(event);
+
+        if ((type == GDK_2BUTTON_PRESS || type == GDK_3BUTTON_PRESS)
+            || ((std::abs(x - previousClickPoint.x()) < doubleClickDistance)
+                && (std::abs(y - previousClickPoint.y()) < doubleClickDistance)
+                && (eventTime - previousClickTime < static_cast<unsigned>(doubleClickTime))
+                && (button == previousClickButton)))
+            currentClickCount++;
+        else
+            currentClickCount = 1;
+
+        previousClickPoint = IntPoint(x, y);
+        previousClickButton = button;
+        previousClickTime = eventTime;
+
+        return currentClickCount;
+    }
+
+private:
+    int currentClickCount;
+    IntPoint previousClickPoint;
+    unsigned previousClickButton;
+    int previousClickTime;
+};
+#endif
+
+struct MotionEvent {
+    MotionEvent(const FloatPoint& position, const FloatPoint& globalPosition, WebMouseEventButton button, unsigned short buttons, OptionSet<WebEventModifier> modifiers)
+        : position(position)
+        , globalPosition(globalPosition)
+        , button(button)
+        , buttons(buttons)
+        , modifiers(modifiers)
+    {
+    }
+
+    MotionEvent(GtkWidget* widget, GdkEvent* event)
+    {
+        double x, y, xRoot, yRoot;
+        GdkModifierType state;
+        if (event) {
+            gdk_event_get_coords(event, &x, &y);
+            gdk_event_get_root_coords(event, &xRoot, &yRoot);
+            gdk_event_get_state(event, &state);
+        } else {
+            auto* device = gdk_seat_get_pointer(gdk_display_get_default_seat(gtk_widget_get_display(widget)));
+            widgetDevicePosition(widget, device, &x, &y, &state);
+            auto rootPoint = widgetRootCoords(widget, x, y);
+            xRoot = rootPoint.x();
+            yRoot = rootPoint.y();
+        }
+
+        MotionEvent(FloatPoint(x, y), FloatPoint(xRoot, yRoot), state);
+    }
+
+    MotionEvent(FloatPoint&& position, FloatPoint&& globalPosition, GdkModifierType state)
+        : position(WTFMove(position))
+        , globalPosition(WTFMove(globalPosition))
+    {
+        if (state & GDK_CONTROL_MASK)
+            modifiers.add(WebEventModifier::ControlKey);
+        if (state & GDK_SHIFT_MASK)
+            modifiers.add(WebEventModifier::ShiftKey);
+        if (state & GDK_MOD1_MASK)
+            modifiers.add(WebEventModifier::AltKey);
+        if (state & GDK_META_MASK)
+            modifiers.add(WebEventModifier::MetaKey);
+
+        if (state & GDK_BUTTON1_MASK) {
+            button = WebMouseEventButton::LeftButton;
+            buttons |= 1;
+        }
+        if (state & GDK_BUTTON2_MASK) {
+            button = WebMouseEventButton::MiddleButton;
+            buttons |= 4;
+        }
+        if (state & GDK_BUTTON3_MASK) {
+            button = WebMouseEventButton::RightButton;
+            buttons |= 2;
+        }
+    }
+
+    FloatSize delta(GdkEvent* event)
+    {
+        double x, y;
+        gdk_event_get_root_coords(event, &x, &y);
+        return FloatPoint(x, y) - globalPosition;
+    }
+
+    FloatPoint position;
+    FloatPoint globalPosition;
+    WebMouseEventButton button { WebMouseEventButton::NoButton };
+    unsigned short buttons { 0 };
+    OptionSet<WebEventModifier> modifiers;
+};
+
+#if !USE(GTK4)
+typedef HashMap<GtkWidget*, IntRect> WebKitWebViewChildrenMap;
+typedef HashMap<uint32_t, GUniquePtr<GdkEvent>> TouchEventsMap;
+#else
+typedef HashMap<uint32_t, GRefPtr<GdkEvent>> TouchEventsMap;
+#endif
+
+struct _WebKitWebViewBasePrivate {
+    _WebKitWebViewBasePrivate()
+        : updateActivityStateTimer(RunLoop::main(), this, &_WebKitWebViewBasePrivate::updateActivityStateTimerFired)
+#if GTK_CHECK_VERSION(3, 24, 0)
+        , releaseEmojiChooserTimer(RunLoop::main(), this, &_WebKitWebViewBasePrivate::releaseEmojiChooserTimerFired)
+#endif
+    {
+#if GTK_CHECK_VERSION(3, 24, 0)
+        releaseEmojiChooserTimer.setPriority(RunLoopSourcePriority::ReleaseUnusedResourcesTimer);
+#endif
+    }
+
+    void updateActivityStateTimerFired()
+    {
+        if (!pageProxy)
+            return;
+        pageProxy->activityStateDidChange(activityStateFlagsToUpdate);
+        activityStateFlagsToUpdate = { };
+    }
+
+#if GTK_CHECK_VERSION(3, 24, 0)
+    void releaseEmojiChooserTimerFired()
+    {
+#if USE(GTK4)
+        g_clear_pointer(&emojiChooser, gtk_widget_unparent);
+#else
+        if (emojiChooser) {
+            gtk_widget_destroy(emojiChooser);
+            emojiChooser = nullptr;
+        }
+#endif
+    }
+#endif
+
+#if !USE(GTK4)
+    WebKitWebViewChildrenMap children;
+#endif
+    std::unique_ptr<PageClientImpl> pageClient;
+    RefPtr<WebPageProxy> pageProxy;
+    IntSize viewSize { };
+#if USE(GTK4)
+    Vector<GRefPtr<GdkEvent>> keyEventsToPropagate;
+    Vector<GRefPtr<GdkEvent>> wheelEventsToPropagate;
+#else
+    bool shouldForwardNextKeyEvent { false };
+    bool shouldForwardNextWheelEvent { false };
+#endif
+#if !USE(GTK4)
+    ClickCounter clickCounter;
+#endif
+    CString tooltipText;
+    IntRect tooltipArea;
+    WebHitTestResultData::IsScrollbar mouseIsOverScrollbar;
+#if !USE(GTK4)
+    GRefPtr<AtkObject> accessible;
+#endif
+    GtkWidget* dialog { nullptr };
+    GtkWidget* inspectorView { nullptr };
+    AttachmentSide inspectorAttachmentSide { AttachmentSide::Bottom };
+    unsigned inspectorViewSize { 0 };
+#if USE(GTK4)
+    GRefPtr<GdkEvent> contextMenuEvent;
+#else
+    GUniquePtr<GdkEvent> contextMenuEvent;
+#endif
+    WebContextMenuProxyGtk* activeContextMenuProxy { nullptr };
+    InputMethodFilter inputMethodFilter;
+    KeyAutoRepeatHandler keyAutoRepeatHandler;
+    KeyBindingTranslator keyBindingTranslator;
+    TouchEventsMap touchEvents;
+    IntSize contentsSize;
+    std::optional<MotionEvent> lastMotionEvent;
+    bool isBlank;
+    bool shouldNotifyFocusEvents { true };
+
+    GtkWindow* toplevelOnScreenWindow { nullptr };
+#if USE(GTK4)
+    unsigned long toplevelIsActiveID { 0 };
+    unsigned long toplevelWindowStateChangedID { 0 };
+    unsigned long toplevelWindowUnrealizedID { 0 };
+#else
+    unsigned long toplevelFocusInEventID { 0 };
+    unsigned long toplevelFocusOutEventID { 0 };
+    unsigned long toplevelWindowStateEventID { 0 };
+#endif
+    unsigned long toplevelWindowRealizedID { 0 };
+
+    // View State.
+    OptionSet<ActivityState::Flag> activityState;
+    OptionSet<ActivityState::Flag> activityStateFlagsToUpdate;
+    RunLoop::Timer updateActivityStateTimer;
+
+#if ENABLE(FULLSCREEN_API)
+    bool fullScreenModeActive { false };
+    std::unique_ptr<PAL::SleepDisabler> sleepDisabler;
+#endif
+
+    std::unique_ptr<AcceleratedBackingStore> acceleratedBackingStore;
+
+#if ENABLE(DRAG_SUPPORT)
+    std::unique_ptr<DragSource> dragSource;
+    std::unique_ptr<DropTarget> dropTarget;
+#endif
+
+    GtkGesture* touchGestureGroup;
+    std::unique_ptr<ViewGestureController> viewGestureController;
+    bool isBackForwardNavigationGestureEnabled { false };
+
+#if GTK_CHECK_VERSION(3, 24, 0)
+    GtkWidget* emojiChooser;
+    CompletionHandler<void(String)> emojiChooserCompletionHandler;
+    RunLoop::Timer releaseEmojiChooserTimer;
+#endif
+
+    // Touch gestures state
+    FloatPoint dragOffset;
+    bool isLongPressed;
+    bool isBeingDragged;
+    bool pageGrabbedTouch;
+
+    std::unique_ptr<PointerLockManager> pointerLockManager;
+};
+
+/**
+ * WebKitWebViewBase:
+ *
+ * Internal base class.
+ */
+
+#if USE(GTK4)
+WEBKIT_DEFINE_TYPE(WebKitWebViewBase, webkit_web_view_base, GTK_TYPE_WIDGET)
+#else
+WEBKIT_DEFINE_TYPE(WebKitWebViewBase, webkit_web_view_base, GTK_TYPE_CONTAINER)
+#endif
+
+static void webkitWebViewBaseScheduleUpdateActivityState(WebKitWebViewBase* webViewBase, OptionSet<ActivityState::Flag> flagsToUpdate)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->activityStateFlagsToUpdate.add(flagsToUpdate);
+    if (priv->updateActivityStateTimer.isActive())
+        return;
+
+    priv->updateActivityStateTimer.startOneShot(0_s);
+}
+
+#if !USE(GTK4)
+static gboolean toplevelWindowFocusInEvent(GtkWidget* widget, GdkEventFocus*, WebKitWebViewBase* webViewBase)
+{
+    // Spurious focus in events can occur when the window is hidden.
+    if (!gtk_widget_get_visible(widget))
+        return FALSE;
+
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->activityState & ActivityState::WindowIsActive)
+        return FALSE;
+
+    priv->activityState.add(ActivityState::WindowIsActive);
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::WindowIsActive);
+
+    return FALSE;
+}
+
+static gboolean toplevelWindowFocusOutEvent(GtkWidget*, GdkEventFocus*, WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!(priv->activityState & ActivityState::WindowIsActive))
+        return FALSE;
+
+    priv->activityState.remove(ActivityState::WindowIsActive);
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::WindowIsActive);
+
+    return FALSE;
+}
+
+static gboolean toplevelWindowStateEvent(GtkWidget*, GdkEventWindowState* event, WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!(event->changed_mask & GDK_WINDOW_STATE_ICONIFIED))
+        return FALSE;
+
+    bool visible = !(event->new_window_state & GDK_WINDOW_STATE_ICONIFIED);
+    if ((visible && priv->activityState & ActivityState::IsVisible) || (!visible && !(priv->activityState & ActivityState::IsVisible)))
+        return FALSE;
+
+    if (visible)
+        priv->activityState.add(ActivityState::IsVisible);
+    else
+        priv->activityState.remove(ActivityState::IsVisible);
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::IsVisible);
+
+    return FALSE;
+}
+
+static void toplevelWindowRealized(WebKitWebViewBase* webViewBase)
+{
+    gtk_widget_realize(GTK_WIDGET(webViewBase));
+
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->toplevelWindowRealizedID) {
+        g_signal_handler_disconnect(priv->toplevelOnScreenWindow, priv->toplevelWindowRealizedID);
+        priv->toplevelWindowRealizedID = 0;
+    }
+}
+
+static void webkitWebViewBaseSetToplevelOnScreenWindow(WebKitWebViewBase* webViewBase, GtkWindow* window)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->toplevelOnScreenWindow == window)
+        return;
+
+    if (priv->toplevelFocusInEventID) {
+        g_signal_handler_disconnect(priv->toplevelOnScreenWindow, priv->toplevelFocusInEventID);
+        priv->toplevelFocusInEventID = 0;
+    }
+    if (priv->toplevelFocusOutEventID) {
+        g_signal_handler_disconnect(priv->toplevelOnScreenWindow, priv->toplevelFocusOutEventID);
+        priv->toplevelFocusOutEventID = 0;
+    }
+    if (priv->toplevelWindowStateEventID) {
+        g_signal_handler_disconnect(priv->toplevelOnScreenWindow, priv->toplevelWindowStateEventID);
+        priv->toplevelWindowStateEventID = 0;
+    }
+    if (priv->toplevelWindowRealizedID) {
+        g_signal_handler_disconnect(priv->toplevelOnScreenWindow, priv->toplevelWindowRealizedID);
+        priv->toplevelWindowRealizedID = 0;
+    }
+
+    priv->toplevelOnScreenWindow = window;
+
+    if (!priv->toplevelOnScreenWindow) {
+        OptionSet<ActivityState::Flag> flagsToUpdate;
+        if (priv->activityState & ActivityState::IsInWindow) {
+            priv->activityState.remove(ActivityState::IsInWindow);
+            flagsToUpdate.add(ActivityState::IsInWindow);
+        }
+        if (priv->activityState & ActivityState::WindowIsActive) {
+            priv->activityState.remove(ActivityState::WindowIsActive);
+            flagsToUpdate.add(ActivityState::IsInWindow);
+        }
+        if (flagsToUpdate)
+            webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate);
+
+        return;
+    }
+
+    priv->toplevelFocusInEventID =
+        g_signal_connect(priv->toplevelOnScreenWindow, "focus-in-event",
+                         G_CALLBACK(toplevelWindowFocusInEvent), webViewBase);
+    priv->toplevelFocusOutEventID =
+        g_signal_connect(priv->toplevelOnScreenWindow, "focus-out-event",
+                         G_CALLBACK(toplevelWindowFocusOutEvent), webViewBase);
+    priv->toplevelWindowStateEventID =
+        g_signal_connect(priv->toplevelOnScreenWindow, "window-state-event", G_CALLBACK(toplevelWindowStateEvent), webViewBase);
+
+    if (gtk_widget_get_realized(GTK_WIDGET(window)))
+        gtk_widget_realize(GTK_WIDGET(webViewBase));
+    else
+        priv->toplevelWindowRealizedID = g_signal_connect_swapped(window, "realize", G_CALLBACK(toplevelWindowRealized), webViewBase);
+}
+#endif
+
+static void webkitWebViewBaseRealize(GtkWidget* widget)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webView->priv;
+
+#if USE(GTK4)
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->realize(widget);
+#else
+    gtk_widget_set_realized(widget, TRUE);
+
+    GtkAllocation allocation;
+    gtk_widget_get_allocation(widget, &allocation);
+
+    GdkWindowAttr attributes;
+    attributes.window_type = GDK_WINDOW_CHILD;
+    attributes.x = allocation.x;
+    attributes.y = allocation.y;
+    attributes.width = allocation.width;
+    attributes.height = allocation.height;
+    attributes.wclass = GDK_INPUT_OUTPUT;
+    attributes.visual = gtk_widget_get_visual(widget);
+    attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK
+        | GDK_EXPOSURE_MASK
+        | GDK_BUTTON_PRESS_MASK
+        | GDK_BUTTON_RELEASE_MASK
+        | GDK_SCROLL_MASK
+        | GDK_SMOOTH_SCROLL_MASK
+        | GDK_POINTER_MOTION_MASK
+        | GDK_ENTER_NOTIFY_MASK
+        | GDK_LEAVE_NOTIFY_MASK
+        | GDK_KEY_PRESS_MASK
+        | GDK_KEY_RELEASE_MASK
+        | GDK_BUTTON_MOTION_MASK
+        | GDK_BUTTON1_MOTION_MASK
+        | GDK_BUTTON2_MOTION_MASK
+        | GDK_BUTTON3_MOTION_MASK
+        | GDK_TOUCH_MASK;
+    attributes.event_mask |= GDK_TOUCHPAD_GESTURE_MASK;
+
+    gint attributesMask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+
+    GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributesMask);
+    gtk_widget_set_window(widget, window);
+    gdk_window_set_user_data(window, widget);
+#endif
+
+    auto* imContext = priv->inputMethodFilter.context();
+    if (WEBKIT_IS_INPUT_METHOD_CONTEXT_IMPL_GTK(imContext))
+        webkitInputMethodContextImplGtkSetClientWidget(WEBKIT_INPUT_METHOD_CONTEXT_IMPL_GTK(imContext), widget);
+
+    if (priv->acceleratedBackingStore)
+        priv->acceleratedBackingStore->realize();
+}
+
+static void webkitWebViewBaseUnrealize(GtkWidget* widget)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(widget);
+
+    auto* imContext = webView->priv->inputMethodFilter.context();
+    if (WEBKIT_IS_INPUT_METHOD_CONTEXT_IMPL_GTK(imContext))
+        webkitInputMethodContextImplGtkSetClientWidget(WEBKIT_INPUT_METHOD_CONTEXT_IMPL_GTK(imContext), nullptr);
+
+    if (webView->priv->acceleratedBackingStore)
+        webView->priv->acceleratedBackingStore->unrealize();
+
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->unrealize(widget);
+}
+
+#if !USE(GTK4)
+static bool webkitWebViewChildIsInternalWidget(WebKitWebViewBase* webViewBase, GtkWidget* widget)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    return widget == priv->inspectorView || widget == priv->dialog || widget == priv->keyBindingTranslator.widget();
+}
+
+static void webkitWebViewBaseContainerAdd(GtkContainer* container, GtkWidget* widget)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(container);
+    WebKitWebViewBasePrivate* priv = webView->priv;
+
+    // Internal widgets like the web inspector and authentication dialog have custom
+    // allocations so we don't need to add them to our list of children.
+    if (!webkitWebViewChildIsInternalWidget(webView, widget)) {
+        GtkAllocation childAllocation;
+        gtk_widget_get_allocation(widget, &childAllocation);
+        priv->children.set(widget, childAllocation);
+    }
+
+    gtk_widget_set_parent(widget, GTK_WIDGET(container));
+}
+#endif
+
+void webkitWebViewBaseAddDialog(WebKitWebViewBase* webViewBase, GtkWidget* dialog)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->dialog = dialog;
+#if USE(GTK4)
+    g_object_add_weak_pointer(G_OBJECT(dialog), reinterpret_cast<void**>(&priv->dialog));
+#endif
+    gtk_widget_set_parent(dialog, GTK_WIDGET(webViewBase));
+    gtk_widget_show(dialog);
+
+    // We need to draw the shadow over the widget.
+    gtk_widget_queue_draw(GTK_WIDGET(webViewBase));
+}
+
+#if USE(GTK4)
+static void webkitWebViewBaseRemoveDialog(WebKitWebViewBase* webViewBase, GtkWidget* dialog)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!priv->dialog)
+        return;
+
+    g_object_remove_weak_pointer(G_OBJECT(dialog), reinterpret_cast<void**>(&priv->dialog));
+    g_clear_pointer(&priv->dialog, gtk_widget_unparent);
+}
+#endif
+
+#if !USE(GTK4)
+static void webkitWebViewBaseContainerRemove(GtkContainer* container, GtkWidget* widget)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(container);
+    WebKitWebViewBasePrivate* priv = webView->priv;
+    GtkWidget* widgetContainer = GTK_WIDGET(container);
+
+    gboolean wasVisible = gtk_widget_get_visible(widget);
+    gtk_widget_unparent(widget);
+
+    if (priv->inspectorView == widget) {
+        priv->inspectorView = 0;
+        priv->inspectorViewSize = 0;
+    } else if (priv->dialog == widget) {
+        priv->dialog = nullptr;
+        if (gtk_widget_get_visible(widgetContainer))
+            gtk_widget_grab_focus(widgetContainer);
+    } else if (priv->keyBindingTranslator.widget() == widget)
+        priv->keyBindingTranslator.invalidate();
+    else {
+        ASSERT(priv->children.contains(widget));
+        priv->children.remove(widget);
+    }
+    if (wasVisible && gtk_widget_get_visible(widgetContainer))
+        gtk_widget_queue_resize(widgetContainer);
+}
+
+static void webkitWebViewBaseContainerForall(GtkContainer* container, gboolean includeInternals, GtkCallback callback, gpointer callbackData)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(container);
+    WebKitWebViewBasePrivate* priv = webView->priv;
+
+    for (const auto& child : copyToVector(priv->children.keys())) {
+        if (priv->children.contains(child))
+            (*callback)(child, callbackData);
+    }
+
+    if (includeInternals && priv->keyBindingTranslator.widget())
+        (*callback)(priv->keyBindingTranslator.widget(), callbackData);
+
+    if (includeInternals && priv->inspectorView)
+        (*callback)(priv->inspectorView, callbackData);
+
+    if (includeInternals && priv->dialog)
+        (*callback)(priv->dialog, callbackData);
+}
+
+void webkitWebViewBaseChildMoveResize(WebKitWebViewBase* webView, GtkWidget* child, const IntRect& childRect)
+{
+    const IntRect& geometry = webView->priv->children.get(child);
+    if (geometry == childRect)
+        return;
+
+    webView->priv->children.set(child, childRect);
+    gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webView));
+}
+#endif
+
+void webkitWebViewBaseAddWebInspector(WebKitWebViewBase* webViewBase, GtkWidget* inspector, AttachmentSide attachmentSide)
+{
+    if (webViewBase->priv->inspectorView == inspector && webViewBase->priv->inspectorAttachmentSide == attachmentSide)
+        return;
+
+    webViewBase->priv->inspectorAttachmentSide = attachmentSide;
+
+    if (webViewBase->priv->inspectorView == inspector) {
+        gtk_widget_queue_resize(GTK_WIDGET(webViewBase));
+        return;
+    }
+
+    webViewBase->priv->inspectorView = inspector;
+    gtk_widget_set_parent(inspector, GTK_WIDGET(webViewBase));
+}
+
+void webkitWebViewBaseRemoveWebInspector(WebKitWebViewBase* webViewBase, GtkWidget* inspector)
+{
+    if (webViewBase->priv->inspectorView != inspector)
+        return;
+
+#if USE(GTK4)
+    g_clear_pointer(&webViewBase->priv->inspectorView, gtk_widget_unparent);
+#else
+    gtk_container_remove(GTK_CONTAINER(webViewBase), inspector);
+#endif
+}
+
+#if GTK_CHECK_VERSION(3, 24, 0)
+static void webkitWebViewBaseCompleteEmojiChooserRequest(WebKitWebViewBase* webView, const String& text)
+{
+    if (auto completionHandler = std::exchange(webView->priv->emojiChooserCompletionHandler, nullptr))
+        completionHandler(text);
+}
+#endif
+
+static void webkitWebViewBaseDispose(GObject* gobject)
+{
+    WebKitWebViewBase* webView = WEBKIT_WEB_VIEW_BASE(gobject);
+#if USE(GTK4)
+    webkitWebViewBaseRemoveDialog(webView, webView->priv->dialog);
+    webkitWebViewBaseRemoveWebInspector(webView, webView->priv->inspectorView);
+    if (auto* widget = webView->priv->keyBindingTranslator.widget())
+        gtk_widget_unparent(widget);
+    g_clear_pointer(&webView->priv->emojiChooser, gtk_widget_unparent);
+#else
+    g_clear_pointer(&webView->priv->dialog, gtk_widget_destroy);
+    webkitWebViewBaseSetToplevelOnScreenWindow(webView, nullptr);
+#if ENABLE(ACCESSIBILITY)
+    if (webView->priv->accessible)
+        webkitWebViewAccessibleSetWebView(WEBKIT_WEB_VIEW_ACCESSIBLE(webView->priv->accessible.get()), nullptr);
+#endif // ENABLE(ACCESSIBILITY)
+#endif
+#if GTK_CHECK_VERSION(3, 24, 0)
+    webkitWebViewBaseCompleteEmojiChooserRequest(webView, emptyString());
+#endif
+    if (webView->priv->pointerLockManager) {
+        webView->priv->pointerLockManager->unlock();
+        webView->priv->pointerLockManager = nullptr;
+    }
+    webView->priv->inputMethodFilter.setContext(nullptr);
+    webView->priv->pageProxy->close();
+    webView->priv->acceleratedBackingStore = nullptr;
+#if ENABLE(FULLSCREEN_API)
+    webView->priv->sleepDisabler = nullptr;
+#endif
+    webView->priv->keyBindingTranslator.invalidate();
+    G_OBJECT_CLASS(webkit_web_view_base_parent_class)->dispose(gobject);
+}
+
+#if USE(GTK4)
+static void webkitWebViewBaseSnapshot(GtkWidget* widget, GtkSnapshot* snapshot)
+{
+    FloatSize widgetSize(gtk_widget_get_width(widget), gtk_widget_get_height(widget));
+    if (widgetSize.isEmpty())
+        return;
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(webViewBase->priv->pageProxy->drawingArea());
+    if (!drawingArea)
+        return;
+
+    auto* pageSnapshot = gtk_snapshot_new();
+    if (!webViewBase->priv->isBlank) {
+        if (drawingArea->isInAcceleratedCompositingMode())
+            webViewBase->priv->acceleratedBackingStore->snapshot(pageSnapshot);
+        else {
+            graphene_rect_t bounds = GRAPHENE_RECT_INIT(0, 0, widgetSize.width(), widgetSize.height());
+            RefPtr<cairo_t> cr = adoptRef(gtk_snapshot_append_cairo(pageSnapshot, &bounds));
+            WebCore::Region unpaintedRegion; // This is simply unused.
+            drawingArea->paint(cr.get(), IntRect { { 0, 0 }, drawingArea->size() }, unpaintedRegion);
+        }
+    }
+
+    if (auto* pageRenderNode = gtk_snapshot_free_to_node(pageSnapshot)) {
+        bool showingNavigationSnapshot = webViewBase->priv->pageProxy->isShowingNavigationGestureSnapshot();
+        auto* controller = webkitWebViewBaseViewGestureController(webViewBase);
+        if (showingNavigationSnapshot && controller)
+            controller->snapshot(snapshot, pageRenderNode);
+        else
+            gtk_snapshot_append_node(snapshot, pageRenderNode);
+
+        gsk_render_node_unref(pageRenderNode);
+    }
+
+    if (webViewBase->priv->inspectorView)
+        gtk_widget_snapshot_child(widget, webViewBase->priv->inspectorView, snapshot);
+
+    if (webViewBase->priv->dialog)
+        gtk_widget_snapshot_child(widget, webViewBase->priv->dialog, snapshot);
+}
+#else
+static gboolean webkitWebViewBaseDraw(GtkWidget* widget, cairo_t* cr)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(webViewBase->priv->pageProxy->drawingArea());
+    if (!drawingArea)
+        return FALSE;
+
+    GdkRectangle clipRect;
+    if (!gdk_cairo_get_clip_rectangle(cr, &clipRect))
+        return FALSE;
+
+    if (!webViewBase->priv->isBlank) {
+        bool showingNavigationSnapshot = webViewBase->priv->pageProxy->isShowingNavigationGestureSnapshot();
+        if (showingNavigationSnapshot)
+            cairo_push_group(cr);
+
+        if (drawingArea->isInAcceleratedCompositingMode()) {
+            ASSERT(webViewBase->priv->acceleratedBackingStore);
+            webViewBase->priv->acceleratedBackingStore->paint(cr, clipRect);
+        } else {
+            WebCore::Region unpaintedRegion; // This is simply unused.
+            drawingArea->paint(cr, clipRect, unpaintedRegion);
+        }
+
+        if (showingNavigationSnapshot) {
+            RefPtr<cairo_pattern_t> group = adoptRef(cairo_pop_group(cr));
+            if (auto* controller = webkitWebViewBaseViewGestureController(webViewBase))
+                controller->draw(cr, group.get());
+        }
+    }
+
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->draw(widget, cr);
+
+    return FALSE;
+}
+#endif
+
+#if !USE(GTK4)
+static void webkitWebViewBaseChildAllocate(GtkWidget* child, gpointer userData)
+{
+    if (!gtk_widget_get_visible(child))
+        return;
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(userData);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    const IntRect& geometry = priv->children.get(child);
+    if (geometry.isEmpty())
+        return;
+
+    GtkAllocation childAllocation = geometry;
+    gtk_widget_size_allocate(child, &childAllocation);
+    priv->children.set(child, IntRect());
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseSizeAllocate(GtkWidget* widget, int width, int height, int baseline)
+#else
+static void webkitWebViewBaseSizeAllocate(GtkWidget* widget, GtkAllocation* allocation)
+#endif
+{
+#if USE(GTK4)
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->size_allocate(widget, width, height, baseline);
+    GtkAllocation allocationStack = { 0, 0, width, height };
+    GtkAllocation* allocation = &allocationStack;
+#else
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->size_allocate(widget, allocation);
+#endif
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+#if !USE(GTK4)
+    gtk_container_foreach(GTK_CONTAINER(webViewBase), webkitWebViewBaseChildAllocate, webViewBase);
+#endif
+
+    IntRect viewRect(allocation->x, allocation->y, allocation->width, allocation->height);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->inspectorView) {
+        GtkAllocation childAllocation = viewRect;
+
+        if (priv->inspectorAttachmentSide == AttachmentSide::Bottom) {
+            int inspectorViewHeight = std::min(static_cast<int>(priv->inspectorViewSize), allocation->height);
+            childAllocation.x = 0;
+            childAllocation.y = allocation->height - inspectorViewHeight;
+            childAllocation.height = inspectorViewHeight;
+            viewRect.setHeight(std::max(allocation->height - inspectorViewHeight, 1));
+        } else {
+            int inspectorViewWidth = std::min(static_cast<int>(priv->inspectorViewSize), allocation->width);
+            childAllocation.y = 0;
+            childAllocation.x = allocation->width - inspectorViewWidth;
+            childAllocation.width = inspectorViewWidth;
+            viewRect.setWidth(std::max(allocation->width - inspectorViewWidth, 1));
+        }
+
+        gtk_widget_size_allocate(priv->inspectorView, &childAllocation);
+    }
+
+    // The dialogs are centered in the view rect, which means that it
+    // never overlaps the web inspector. Thus, we need to calculate the allocation here
+    // after calculating the inspector allocation.
+    if (priv->dialog) {
+        GtkRequisition minimumSize;
+        gtk_widget_get_preferred_size(priv->dialog, &minimumSize, nullptr);
+
+        GtkAllocation childAllocation = { 0, 0, std::max(minimumSize.width, viewRect.width()), std::max(minimumSize.height, viewRect.height()) };
+        gtk_widget_size_allocate(priv->dialog, &childAllocation);
+    }
+
+#if USE(GTK4)
+    for (auto* child = gtk_widget_get_first_child(widget); child; child = gtk_widget_get_next_sibling(child)) {
+        if (GTK_IS_POPOVER(child))
+            gtk_popover_present(GTK_POPOVER(child));
+    }
+#endif
+
+    priv->viewSize = viewRect.size();
+
+    if (auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea()))
+        drawingArea->setSize(priv->viewSize);
+}
+
+#if USE(GTK4)
+static void webkitWebViewBaseMeasure(GtkWidget* widget, GtkOrientation orientation, int, int* minimumSize, int* naturalSize, int*, int*)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    switch (orientation) {
+    case GTK_ORIENTATION_HORIZONTAL:
+        *naturalSize = priv->contentsSize.width();
+        break;
+    case GTK_ORIENTATION_VERTICAL:
+        *naturalSize = priv->contentsSize.height();
+        break;
+    }
+
+    *minimumSize = 0;
+}
+#else
+static void webkitWebViewBaseGetPreferredWidth(GtkWidget* widget, gint* minimumSize, gint* naturalSize)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    *minimumSize = 0;
+    *naturalSize = priv->contentsSize.width();
+}
+
+static void webkitWebViewBaseGetPreferredHeight(GtkWidget* widget, gint* minimumSize, gint* naturalSize)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    *minimumSize = 0;
+    *naturalSize = priv->contentsSize.height();
+}
+#endif
+
+static void webkitWebViewBaseMap(GtkWidget* widget)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->map(widget);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    OptionSet<ActivityState::Flag> flagsToUpdate;
+    if (!(priv->activityState & ActivityState::IsVisible))
+        flagsToUpdate.add(ActivityState::IsVisible);
+    if (priv->toplevelOnScreenWindow) {
+        if (!(priv->activityState & ActivityState::IsInWindow))
+            flagsToUpdate.add(ActivityState::IsInWindow);
+
+#if ENABLE(DEVELOPER_MODE)
+        // Xvfb doesn't support toplevel focus, so gtk_window_is_active() always returns false. We consider
+        // toplevel window to be always active since it's the only one.
+        if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) {
+            if (!g_strcmp0(g_getenv("UNDER_XVFB"), "yes"))
+                flagsToUpdate.add(ActivityState::WindowIsActive);
+        }
+#endif
+
+        if (gtk_window_is_active(GTK_WINDOW(priv->toplevelOnScreenWindow)) && !(priv->activityState & ActivityState::WindowIsActive))
+            flagsToUpdate.add(ActivityState::WindowIsActive);
+    }
+    if (!flagsToUpdate)
+        return;
+
+    priv->activityState.add(flagsToUpdate);
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate);
+}
+
+static void webkitWebViewBaseUnmap(GtkWidget* widget)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->unmap(widget);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!(priv->activityState & ActivityState::IsVisible))
+        return;
+
+    priv->activityState.remove(ActivityState::IsVisible);
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::IsVisible);
+}
+
+static bool shouldForwardKeyEvent(WebKitWebViewBase* webViewBase, GdkEvent* event)
+{
+#if USE(GTK4)
+    return event && webViewBase->priv->keyEventsToPropagate.removeFirst(event);
+#else
+    return std::exchange(webViewBase->priv->shouldForwardNextKeyEvent, false);
+#endif
+}
+
+static bool shouldForwardWheelEvent(WebKitWebViewBase* webViewBase, GdkEvent* event)
+{
+#if USE(GTK4)
+    if (!event || webViewBase->priv->wheelEventsToPropagate.isEmpty())
+        return false;
+    if (gdk_event_get_event_type(event) != GDK_TOUCHPAD_HOLD) {
+        // Some events that were meant for delayed propagation may have been coalesced/compressed by GDK into the current event:
+        // https://docs.gtk.org/gtk4/migrating-3to4.html#adapt-to-gdkevent-api-changes
+        // There's no way to both propagate and stop the current event, so just clear out these obsolete events from the to-be-propagated vector.
+        unsigned length = 0;
+        GUniquePtr<GdkTimeCoord, GFreeDeleter<GdkTimeCoord>> history(gdk_event_get_history(event, &length));
+        if (history.get()) {
+            // The last entry in the history is the current event time, so ignore that.
+            if (length > 0)
+                length--;
+            for (unsigned i = 0; i < length; i++) {
+                auto oldTime = history.get()[i].time;
+                webViewBase->priv->wheelEventsToPropagate.removeAllMatching([&oldTime] (GRefPtr<GdkEvent>& current) {
+                    return gdk_event_get_time(current.get()) == oldTime;
+                });
+            }
+        }
+    }
+    return webViewBase->priv->wheelEventsToPropagate.removeFirst(event);
+#else
+    return std::exchange(webViewBase->priv->shouldForwardNextWheelEvent, false);
+#endif
+}
+
+#if !USE(GTK4)
+static gboolean webkitWebViewBaseFocusInEvent(GtkWidget* widget, GdkEventFocus* event)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    webkitWebViewBaseSetFocus(webViewBase, true);
+    webViewBase->priv->inputMethodFilter.notifyFocusedIn();
+
+    return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->focus_in_event(widget, event);
+}
+
+static gboolean webkitWebViewBaseFocusOutEvent(GtkWidget* widget, GdkEventFocus* event)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    webkitWebViewBaseSetFocus(webViewBase, false);
+    webViewBase->priv->inputMethodFilter.notifyFocusedOut();
+
+    return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->focus_out_event(widget, event);
+}
+
+static gboolean webkitWebViewBaseKeyPressEvent(GtkWidget* widget, GdkEventKey* keyEvent)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    // Since WebProcess key event handling is not synchronous, handle the event in two passes.
+    // When WebProcess processes the input event, it will call PageClientImpl::doneWithKeyEvent
+    // with event handled status which determines whether to pass the input event to parent or not
+    // using webkitWebViewBasePropagateKeyEvent().
+    if (shouldForwardKeyEvent(webViewBase, reinterpret_cast<GdkEvent*>(keyEvent)))
+        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->key_press_event(widget, keyEvent);
+
+    guint16 keyCode;
+    gdk_event_get_keycode(reinterpret_cast<GdkEvent*>(keyEvent), &keyCode);
+    bool isAutoRepeat = priv->keyAutoRepeatHandler.keyPress(keyCode);
+
+    GdkModifierType state;
+    guint keyval;
+    gdk_event_get_state(reinterpret_cast<GdkEvent*>(keyEvent), &state);
+    gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(keyEvent), &keyval);
+
+#if ENABLE(DEVELOPER_MODE) && OS(LINUX)
+    if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK) && keyval == GDK_KEY_G) {
+        auto& preferences = priv->pageProxy->preferences();
+        preferences.setResourceUsageOverlayVisible(!preferences.resourceUsageOverlayVisible());
+        return GDK_EVENT_STOP;
+    }
+#endif
+
+    if (priv->dialog)
+        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->key_press_event(widget, keyEvent);
+
+#if ENABLE(FULLSCREEN_API)
+    if (priv->fullScreenModeActive) {
+        switch (keyval) {
+        case GDK_KEY_Escape:
+        case GDK_KEY_f:
+        case GDK_KEY_F:
+            priv->pageProxy->fullScreenManager()->requestExitFullScreen();
+            return GDK_EVENT_STOP;
+        default:
+            break;
+        }
+    }
+#endif
+
+    auto filterResult = priv->inputMethodFilter.filterKeyEvent(reinterpret_cast<GdkEvent*>(keyEvent));
+    if (!filterResult.handled) {
+        priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(reinterpret_cast<GdkEvent*>(keyEvent), filterResult.keyText, isAutoRepeat,
+            priv->keyBindingTranslator.commandsForKeyEvent(keyEvent)));
+    }
+
+    return GDK_EVENT_STOP;
+}
+
+static gboolean webkitWebViewBaseKeyReleaseEvent(GtkWidget* widget, GdkEventKey* keyEvent)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    priv->keyAutoRepeatHandler.keyRelease();
+
+    if (!priv->inputMethodFilter.filterKeyEvent(reinterpret_cast<GdkEvent*>(keyEvent)).handled)
+        priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(reinterpret_cast<GdkEvent*>(keyEvent), { }, false, { }));
+
+    return GDK_EVENT_STOP;
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseFocusEnter(WebKitWebViewBase* webViewBase, GtkEventController*)
+{
+    webkitWebViewBaseSetFocus(webViewBase, true);
+    webViewBase->priv->inputMethodFilter.notifyFocusedIn();
+}
+
+static void webkitWebViewBaseFocusLeave(WebKitWebViewBase* webViewBase, GtkEventController*)
+{
+    webkitWebViewBaseSetFocus(webViewBase, false);
+    webViewBase->priv->inputMethodFilter.notifyFocusedOut();
+}
+
+static gboolean webkitWebViewBaseKeyPressed(WebKitWebViewBase* webViewBase, unsigned keyval, unsigned, GdkModifierType state, GtkEventController* controller)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    auto* event = gtk_event_controller_get_current_event(controller);
+
+    // Since WebProcess key event handling is not synchronous, handle the event in two passes.
+    // When WebProcess processes the input event, it will call PageClientImpl::doneWithKeyEvent
+    // with event handled status which determines whether to pass the input event to parent or not
+    // using gdk_display_put_event().
+    if (shouldForwardKeyEvent(webViewBase, event))
+        return GDK_EVENT_PROPAGATE;
+
+    bool isAutoRepeat = priv->keyAutoRepeatHandler.keyPress(gdk_key_event_get_keycode(event));
+
+#if ENABLE(DEVELOPER_MODE) && OS(LINUX)
+    if ((state & GDK_CONTROL_MASK) && (state & GDK_SHIFT_MASK) && keyval == GDK_KEY_G) {
+        auto& preferences = priv->pageProxy->preferences();
+        preferences.setResourceUsageOverlayVisible(!preferences.resourceUsageOverlayVisible());
+        return GDK_EVENT_STOP;
+    }
+#endif
+
+    if (priv->dialog)
+        return gtk_event_controller_key_forward(GTK_EVENT_CONTROLLER_KEY(controller), priv->dialog);
+
+#if ENABLE(FULLSCREEN_API)
+    if (priv->fullScreenModeActive) {
+        switch (keyval) {
+        case GDK_KEY_Escape:
+        case GDK_KEY_f:
+        case GDK_KEY_F:
+            priv->pageProxy->fullScreenManager()->requestExitFullScreen();
+            return GDK_EVENT_STOP;
+        default:
+            break;
+        }
+    }
+#endif
+
+    auto filterResult = priv->inputMethodFilter.filterKeyEvent(event);
+    if (!filterResult.handled) {
+        priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(event, filterResult.keyText, isAutoRepeat,
+            priv->keyBindingTranslator.commandsForKeyEvent(GTK_EVENT_CONTROLLER_KEY(controller))));
+    }
+
+    return GDK_EVENT_STOP;
+}
+
+static void webkitWebViewBaseKeyReleased(WebKitWebViewBase* webViewBase, unsigned, unsigned, GdkModifierType, GtkEventController* controller)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    priv->keyAutoRepeatHandler.keyRelease();
+
+    auto* event = gtk_event_controller_get_current_event(controller);
+    if (!priv->inputMethodFilter.filterKeyEvent(event).handled)
+        priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(event, { }, false, { }));
+}
+#endif
+
+#if !USE(GTK4)
+static void webkitWebViewBaseHandleMouseEvent(WebKitWebViewBase* webViewBase, GdkEvent* event)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    ASSERT(!priv->dialog);
+
+    int clickCount = 0;
+    std::optional<FloatSize> movementDelta;
+    GdkEventType eventType = gdk_event_get_event_type(event);
+    switch (eventType) {
+    case GDK_BUTTON_PRESS:
+    case GDK_2BUTTON_PRESS:
+    case GDK_3BUTTON_PRESS: {
+        // For double and triple clicks GDK sends both a normal button press event
+        // and a specific type (like GDK_2BUTTON_PRESS). If we detect a special press
+        // coming up, ignore this event as it certainly generated the double or triple
+        // click. The consequence of not eating this event is two DOM button press events
+        // are generated.
+        GUniquePtr<GdkEvent> nextEvent(gdk_event_peek());
+        if (nextEvent && (nextEvent->any.type == GDK_2BUTTON_PRESS || nextEvent->any.type == GDK_3BUTTON_PRESS))
+            return;
+
+        priv->inputMethodFilter.cancelComposition();
+
+        guint button;
+        gdk_event_get_button(event, &button);
+        // If it's a right click event save it as a possible context menu event.
+        if (button == GDK_BUTTON_SECONDARY)
+            priv->contextMenuEvent.reset(gdk_event_copy(event));
+
+        clickCount = priv->clickCounter.currentClickCountForGdkButtonEvent(event);
+    }
+        FALLTHROUGH;
+    case GDK_BUTTON_RELEASE:
+        gtk_widget_grab_focus(GTK_WIDGET(webViewBase));
+        break;
+    case GDK_MOTION_NOTIFY:
+        // Pointer Lock. 7.1 Attributes: movementX/Y must be updated regardless of pointer lock state.
+        if (priv->lastMotionEvent)
+            movementDelta = priv->lastMotionEvent->delta(event);
+        priv->lastMotionEvent = MotionEvent(GTK_WIDGET(webViewBase), event);
+        break;
+    case GDK_ENTER_NOTIFY:
+    case GDK_LEAVE_NOTIFY:
+        break;
+    default:
+        ASSERT_NOT_REACHED();
+    }
+
+    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(event, clickCount, movementDelta));
+}
+
+static gboolean webkitWebViewBaseButtonPressEvent(GtkWidget* widget, GdkEventButton* event)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    if (priv->dialog)
+        return GDK_EVENT_STOP;
+
+    if (gdk_device_get_source(gdk_event_get_source_device(reinterpret_cast<GdkEvent*>(event))) == GDK_SOURCE_TOUCHSCREEN)
+        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->button_press_event(widget, event);
+
+    webkitWebViewBaseHandleMouseEvent(webViewBase, reinterpret_cast<GdkEvent*>(event));
+
+    return GDK_EVENT_STOP;
+}
+
+static gboolean webkitWebViewBaseButtonReleaseEvent(GtkWidget* widget, GdkEventButton* event)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    if (priv->dialog)
+        return GDK_EVENT_STOP;
+    if (gdk_device_get_source(gdk_event_get_source_device(reinterpret_cast<GdkEvent*>(event))) == GDK_SOURCE_TOUCHSCREEN)
+        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->button_release_event(widget, event);
+
+    webkitWebViewBaseHandleMouseEvent(webViewBase, reinterpret_cast<GdkEvent*>(event));
+
+    return GDK_EVENT_STOP;
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseButtonPressed(WebKitWebViewBase* webViewBase, int clickCount, double x, double y, GtkGesture* gesture)
+{
+    if (gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)))
+        return;
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+    if (clickCount == 1)
+        priv->inputMethodFilter.cancelComposition();
+    gtk_widget_grab_focus(GTK_WIDGET(webViewBase));
+
+    auto* sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+    gtk_gesture_set_sequence_state(gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
+
+    auto button = gtk_gesture_single_get_current_button(GTK_GESTURE_SINGLE(gesture));
+    auto* event = gtk_gesture_get_last_event(gesture, sequence);
+
+    // If it's a right click event save it as a possible context menu event.
+    if (button == GDK_BUTTON_SECONDARY)
+        priv->contextMenuEvent = event;
+
+    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(event, { clampToInteger(x), clampToInteger(y) }, clickCount, std::nullopt));
+}
+
+static void webkitWebViewBaseButtonReleased(WebKitWebViewBase* webViewBase, int clickCount, double x, double y, GtkGesture* gesture)
+{
+    if (gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)))
+        return;
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+    gtk_widget_grab_focus(GTK_WIDGET(webViewBase));
+
+    auto* sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+    gtk_gesture_set_sequence_state(gesture, sequence, GTK_EVENT_SEQUENCE_CLAIMED);
+
+    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(gtk_gesture_get_last_event(gesture, sequence), { clampToInteger(x), clampToInteger(y) }, clickCount, std::nullopt));
+}
+#endif
+
+static bool shouldInvertDirectionForScrollEvent(WebHitTestResultData::IsScrollbar isScrollbar, bool isShiftPressed)
+{
+    // Shift+Wheel scrolls in the perpendicular direction, unless we are over a scrollbar
+    // in which case we always want to follow the scrollbar direction.
+    switch (isScrollbar) {
+    case WebHitTestResultData::IsScrollbar::No:
+        return isShiftPressed;
+    case WebHitTestResultData::IsScrollbar::Horizontal:
+        return true;
+    case WebHitTestResultData::IsScrollbar::Vertical:
+        return false;
+    }
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+#if !USE(GTK4)
+static gboolean webkitWebViewBaseScrollEvent(GtkWidget* widget, GdkEventScroll* eventScroll)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    auto* event = reinterpret_cast<GdkEvent*>(eventScroll);
+    if (shouldForwardWheelEvent(webViewBase, event))
+        return GDK_EVENT_PROPAGATE;
+
+    if (priv->dialog)
+        return GDK_EVENT_PROPAGATE;
+
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+    if (controller && controller->isSwipeGestureEnabled()) {
+        double deltaX, deltaY;
+        gdk_event_get_scroll_deltas(event, &deltaX, &deltaY);
+        FloatSize delta(deltaX, deltaY);
+
+        int32_t eventTime = static_cast<int32_t>(gdk_event_get_time(event));
+
+        GdkDevice* device = gdk_event_get_source_device(event);
+        GdkInputSource source = gdk_device_get_source(device);
+
+        bool isEnd = gdk_event_is_scroll_stop_event(event) ? true : false;
+
+        PlatformGtkScrollData scrollData = { .delta = delta, .eventTime = eventTime, .source = source, .isEnd = isEnd };
+        if (controller->handleScrollWheelEvent(&scrollData))
+            return GDK_EVENT_STOP;
+    }
+
+    auto phase = gdk_event_is_scroll_stop_event(event) ? WebWheelEvent::Phase::PhaseEnded : WebWheelEvent::Phase::PhaseChanged;
+    double x, y;
+    gdk_event_get_coords(event, &x, &y);
+    IntPoint position(clampToInteger(x), clampToInteger(y));
+    double xRoot, yRoot;
+    gdk_event_get_root_coords(event, &xRoot, &yRoot);
+    IntPoint globalPosition(clampToInteger(xRoot), clampToInteger(yRoot));
+
+    bool hasPreciseScrollingDeltas = false;
+    FloatSize wheelTicks;
+    GdkScrollDirection direction;
+    if (!gdk_event_get_scroll_direction(event, &direction)) {
+        direction = GDK_SCROLL_SMOOTH;
+        double deltaX, deltaY;
+        if (gdk_event_get_scroll_deltas(event, &deltaX, &deltaY)) {
+            wheelTicks = FloatSize(-deltaX, -deltaY);
+            if (auto* device = gdk_event_get_source_device(event))
+                hasPreciseScrollingDeltas = gdk_device_get_source(device) != GDK_SOURCE_MOUSE;
+        }
+    }
+
+    switch (direction) {
+    case GDK_SCROLL_UP:
+        wheelTicks = FloatSize(0, 1);
+        break;
+    case GDK_SCROLL_LEFT:
+        wheelTicks = FloatSize(1, 0);
+        break;
+    case GDK_SCROLL_DOWN:
+        wheelTicks = FloatSize(0, -1);
+        break;
+    case GDK_SCROLL_RIGHT:
+        wheelTicks = FloatSize(-1, 0);
+        break;
+    case GDK_SCROLL_SMOOTH:
+        break;
+    }
+
+    float stepX, stepY;
+    if (hasPreciseScrollingDeltas)
+        stepX = stepY = static_cast<float>(Scrollbar::pixelsPerLineStep());
+    else {
+        stepX = wheelTicks.width() ? static_cast<float>(Scrollbar::pixelsPerLineStep(priv->viewSize.width())) : 0;
+        stepY = wheelTicks.height() ? static_cast<float>(Scrollbar::pixelsPerLineStep(priv->viewSize.height())) : 0;
+    }
+
+    if (shouldInvertDirectionForScrollEvent(priv->mouseIsOverScrollbar, eventScroll->state & GDK_SHIFT_MASK)) {
+        wheelTicks = wheelTicks.transposedSize();
+        std::swap(stepX, stepY);
+    }
+
+    FloatSize delta = wheelTicks.scaled(stepX, stepY);
+
+    priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(event, position, globalPosition, delta, wheelTicks, phase, WebWheelEvent::Phase::PhaseNone, hasPreciseScrollingDeltas));
+
+    return GDK_EVENT_STOP;
+}
+#endif
+
+#if USE(GTK4)
+static gboolean handleScroll(WebKitWebViewBase* webViewBase, double deltaX, double deltaY, bool isEnd, GtkEventController* eventController)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return GDK_EVENT_PROPAGATE;
+
+    // With old versions of libinput, event can be null for synthesized scroll-end events.
+    auto* event = gtk_event_controller_get_current_event(eventController);
+    if (shouldForwardWheelEvent(webViewBase, event)) {
+        // If we're not handling a scroll-end event, but it is a stop-scroll-event, we're going to see the event again.
+        if (!isEnd && gdk_event_is_scroll_stop_event(event))
+            priv->wheelEventsToPropagate.append(event);
+        return GDK_EVENT_PROPAGATE;
+    }
+
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+    if (controller && controller->isSwipeGestureEnabled()) {
+        FloatSize delta(deltaX, deltaY);
+
+        int32_t eventTime = static_cast<int32_t>(gtk_event_controller_get_current_event_time(eventController));
+
+        GdkDevice* device = gtk_event_controller_get_current_event_device(eventController);
+        // We only have hold events on touchpads, so assume one if we get no event.
+        GdkInputSource source = device ? gdk_device_get_source(device) : GDK_SOURCE_TOUCHPAD;
+
+        PlatformGtkScrollData scrollData = { .delta = delta, .eventTime = eventTime, .source = source, .isEnd = isEnd };
+        if (controller->handleScrollWheelEvent(&scrollData))
+            return GDK_EVENT_STOP;
+    }
+
+    if (!event)
+        return GDK_EVENT_PROPAGATE;
+
+    auto phase = gdk_event_get_event_type(event) != GDK_SCROLL || gdk_scroll_event_is_stop(event) ? WebWheelEvent::Phase::PhaseEnded : WebWheelEvent::Phase::PhaseChanged;
+    IntPoint position;
+    if (priv->lastMotionEvent)
+        position = IntPoint(priv->lastMotionEvent->position);
+
+    bool hasPreciseScrollingDeltas = false;
+#if GTK_CHECK_VERSION(4, 7, 0)
+    hasPreciseScrollingDeltas = gdk_event_get_event_type(event) != GDK_SCROLL || gdk_scroll_event_get_unit(event) != GDK_SCROLL_UNIT_WHEEL;
+#else
+    if (gdk_scroll_event_get_direction(event) == GDK_SCROLL_SMOOTH) {
+        if (auto* device = gdk_event_get_source_device(event))
+            hasPreciseScrollingDeltas = gdk_device_get_source(device) != GDK_SOURCE_MOUSE;
+    }
+#endif
+
+    FloatSize wheelTicks(-deltaX, -deltaY);
+    float stepX = wheelTicks.width() ? static_cast<float>(Scrollbar::pixelsPerLineStep(priv->viewSize.width())) : 0;
+    float stepY = wheelTicks.height() ? static_cast<float>(Scrollbar::pixelsPerLineStep(priv->viewSize.height())) : 0;
+
+    if (!isEnd && shouldInvertDirectionForScrollEvent(priv->mouseIsOverScrollbar, gdk_event_get_modifier_state(event) & GDK_SHIFT_MASK)) {
+        wheelTicks = wheelTicks.transposedSize();
+        std::swap(stepX, stepY);
+    }
+
+    FloatSize delta;
+#if GTK_CHECK_VERSION(4, 7, 0)
+    // Keep in sync with https://gitlab.gnome.org/GNOME/gtk/-/blob/493660a296af3b8a140714988ddece4199818a04/gtk/gtkscrolledwindow.c#L204
+    static const double gtkScrollDeltaMultiplier = 2.5;
+    if (hasPreciseScrollingDeltas)
+        delta = wheelTicks.scaled(gtkScrollDeltaMultiplier);
+    else
+        delta = wheelTicks.scaled(stepX, stepY);
+#else
+    delta = wheelTicks.scaled(stepX, stepY);
+#endif
+
+    priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(event, position, position, delta, wheelTicks, phase, WebWheelEvent::Phase::PhaseNone, hasPreciseScrollingDeltas));
+
+    return GDK_EVENT_STOP;
+}
+
+static void webkitWebViewBaseScrollBegin(WebKitWebViewBase* webViewBase, GtkEventController* controller)
+{
+    handleScroll(webViewBase, 0, 0, false, controller);
+}
+
+static gboolean webkitWebViewBaseScroll(WebKitWebViewBase* webViewBase, double deltaX, double deltaY, GtkEventController* eventController)
+{
+    return handleScroll(webViewBase, deltaX, deltaY, false, eventController);
+}
+
+static void webkitWebViewBaseScrollEnd(WebKitWebViewBase* webViewBase, GtkEventController* controller)
+{
+    handleScroll(webViewBase, 0, 0, true, controller);
+}
+#endif
+
+#if !USE(GTK4)
+static gboolean webkitWebViewBasePopupMenu(GtkWidget* widget)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    GdkEvent* currentEvent = gtk_get_current_event();
+    if (!currentEvent)
+        currentEvent = gdk_event_new(GDK_NOTHING);
+    priv->contextMenuEvent.reset(currentEvent);
+    priv->pageProxy->handleContextMenuKeyEvent();
+
+    return TRUE;
+}
+
+static gboolean webkitWebViewBaseMotionNotifyEvent(GtkWidget* widget, GdkEventMotion* event)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    if (priv->dialog) {
+        auto* widgetClass = GTK_WIDGET_CLASS(webkit_web_view_base_parent_class);
+        return widgetClass->motion_notify_event ? widgetClass->motion_notify_event(widget, event) : GDK_EVENT_PROPAGATE;
+    }
+
+    if (gdk_device_get_source(gdk_event_get_source_device(reinterpret_cast<GdkEvent*>(event))) == GDK_SOURCE_TOUCHSCREEN)
+        return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->motion_notify_event(widget, event);
+
+    if (priv->pointerLockManager) {
+        double x, y;
+        gdk_event_get_root_coords(reinterpret_cast<GdkEvent*>(event), &x, &y);
+        priv->pointerLockManager->didReceiveMotionEvent(FloatPoint(x, y));
+        return GDK_EVENT_STOP;
+    }
+
+    webkitWebViewBaseHandleMouseEvent(webViewBase, reinterpret_cast<GdkEvent*>(event));
+
+    return GDK_EVENT_PROPAGATE;
+}
+
+static gboolean webkitWebViewBaseCrossingNotifyEvent(GtkWidget* widget, GdkEventCrossing* crossingEvent)
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    if (priv->dialog)
+        return GDK_EVENT_PROPAGATE;
+
+#if ENABLE(DEVELOPER_MODE)
+    // Do not send mouse move events to the WebProcess for crossing events during testing.
+    // WTR never generates crossing events and they can confuse tests.
+    // https://bugs.webkit.org/show_bug.cgi?id=185072.
+    if (UNLIKELY(priv->pageProxy->process().processPool().configuration().fullySynchronousModeIsAllowedForTesting()))
+        return GDK_EVENT_PROPAGATE;
+#endif
+
+    // In the case of crossing events, it's very important the actual coordinates the WebProcess receives, because once the mouse leaves
+    // the web view, the WebProcess won't receive more events until the mouse enters again in the web view. So, if the coordinates of the leave
+    // event are not accurate, the WebProcess might not know the mouse left the view. This can happen because of double to integer conversion,
+    // if the coordinates of the leave event are for example (25.2, -0.9), the WebProcess will receive (25, 0) and any hit test will succeed
+    // because those coordinates are inside the web view.
+    GtkAllocation allocation;
+    gtk_widget_get_allocation(widget, &allocation);
+    double xEvent, yEvent;
+    gdk_event_get_coords(reinterpret_cast<GdkEvent*>(crossingEvent), &xEvent, &yEvent);
+    double width = allocation.width;
+    double height = allocation.height;
+    double x = xEvent;
+    double y = yEvent;
+    if (x < 0 && x > -1)
+        x = -1;
+    else if (x >= width && x < width + 1)
+        x = width + 1;
+    if (y < 0 && y > -1)
+        y = -1;
+    else if (y >= height && y < height + 1)
+        y = height + 1;
+
+    GdkEvent* event = reinterpret_cast<GdkEvent*>(crossingEvent);
+    GUniquePtr<GdkEvent> copiedEvent;
+    if (x != xEvent || y != yEvent) {
+        copiedEvent.reset(gdk_event_copy(event));
+        copiedEvent->crossing.x = x;
+        copiedEvent->crossing.y = y;
+    }
+
+    webkitWebViewBaseHandleMouseEvent(webViewBase, copiedEvent ? copiedEvent.get() : event);
+
+    return GDK_EVENT_PROPAGATE;
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseEnter(WebKitWebViewBase* webViewBase, double x, double y, GdkCrossingMode, GtkEventController*)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+#if ENABLE(DEVELOPER_MODE)
+    // Do not send mouse move events to the WebProcess for crossing events during testing.
+    // WTR never generates crossing events and they can confuse tests.
+    // https://bugs.webkit.org/show_bug.cgi?id=185072.
+    if (UNLIKELY(priv->pageProxy->process().processPool().configuration().fullySynchronousModeIsAllowedForTesting()))
+        return;
+#endif
+
+    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ clampToInteger(x), clampToInteger(y) }));
+}
+
+static gboolean webkitWebViewBaseMotion(WebKitWebViewBase* webViewBase, double x, double y, GtkEventController* controller)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return GDK_EVENT_PROPAGATE;
+
+    if (priv->pointerLockManager) {
+        priv->pointerLockManager->didReceiveMotionEvent(FloatPoint(x, y));
+        return GDK_EVENT_STOP;
+    }
+
+    auto* event = gtk_event_controller_get_current_event(controller);
+    std::optional<FloatSize> movementDelta;
+    MotionEvent motionEvent(FloatPoint(x, y), FloatPoint(x, y), gdk_event_get_modifier_state(event));
+    if (priv->lastMotionEvent)
+        movementDelta = motionEvent.position - priv->lastMotionEvent->position;
+    priv->lastMotionEvent = WTFMove(motionEvent);
+
+    webViewBase->priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(event, { clampToInteger(x), clampToInteger(y) }, 0, movementDelta));
+
+    return GDK_EVENT_PROPAGATE;
+}
+
+static void webkitWebViewBaseLeave(WebKitWebViewBase* webViewBase, GdkCrossingMode, GtkEventController*)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+#if ENABLE(DEVELOPER_MODE)
+    // Do not send mouse move events to the WebProcess for crossing events during testing.
+    // WTR never generates crossing events and they can confuse tests.
+    // https://bugs.webkit.org/show_bug.cgi?id=185072.
+    if (UNLIKELY(priv->pageProxy->process().processPool().configuration().fullySynchronousModeIsAllowedForTesting()))
+        return;
+#endif
+
+    if (!priv->lastMotionEvent)
+        return;
+
+    // We need to synthesize a fake mouse event here to let WebCore know that the mouse has left the
+    // web view. Let's compute a point outside the web view that is close to the previous
+    // coordinates of the pointer before it left the web view. First we'll figure out which
+    // coordinate is closest to an edge of the web view, then we'll adjust the coordinate to be one
+    // pixel outside the view. This is not necessarily the closest point outside the web view, but
+    // it's simple to calculate and surely good enough.
+
+    int previousX = std::round(priv->lastMotionEvent->position.x());
+    int previousY = std::round(priv->lastMotionEvent->position.y());
+    int width = gtk_widget_get_width(GTK_WIDGET(webViewBase));
+    int height = gtk_widget_get_height(GTK_WIDGET(webViewBase));
+    int xDistanceFromRightEdge = width - previousX;
+    int yDistanceFromBottomEdge = height - previousY;
+
+    if (previousX <= xDistanceFromRightEdge && previousX <= previousY && previousX <= yDistanceFromBottomEdge)
+        priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ -1, previousY }));
+    else if (xDistanceFromRightEdge <= previousX && xDistanceFromRightEdge <= previousY && xDistanceFromRightEdge <= yDistanceFromBottomEdge)
+        priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ width, previousY }));
+    else if (previousY <= previousX && previousY <= xDistanceFromRightEdge && previousY <= yDistanceFromBottomEdge)
+        priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ previousX, -1 }));
+    else {
+        ASSERT(yDistanceFromBottomEdge <= previousX);
+        ASSERT(yDistanceFromBottomEdge <= previousY);
+        ASSERT(yDistanceFromBottomEdge <= xDistanceFromRightEdge);
+        priv->pageProxy->handleMouseEvent(NativeWebMouseEvent({ previousX, height }));
+    }
+}
+#endif
+
+#if ENABLE(TOUCH_EVENTS)
+static void appendTouchEvent(GtkWidget* webViewBase, Vector<WebPlatformTouchPoint>& touchPoints, GdkEvent* event, WebPlatformTouchPoint::TouchPointState state)
+{
+    gdouble x, y;
+    gdk_event_get_coords(event, &x, &y);
+#if USE(GTK4)
+    // Events in GTK4 are given in native surface coordinates
+    gtk_widget_translate_coordinates(GTK_WIDGET(gtk_widget_get_native(webViewBase)),
+        webViewBase, x, y, &x, &y);
+#endif
+
+    gdouble xRoot, yRoot;
+    gdk_event_get_root_coords(event, &xRoot, &yRoot);
+
+    uint32_t identifier = GPOINTER_TO_UINT(gdk_event_get_event_sequence(event));
+    touchPoints.uncheckedAppend(WebPlatformTouchPoint(identifier, state, IntPoint(xRoot, yRoot), IntPoint(x, y)));
+}
+
+static inline WebPlatformTouchPoint::TouchPointState touchPointStateForEvents(GdkEvent* current, GdkEvent* event)
+{
+    if (gdk_event_get_event_sequence(current) != gdk_event_get_event_sequence(event))
+        return WebPlatformTouchPoint::TouchStationary;
+
+    switch (gdk_event_get_event_type(event)) {
+    case GDK_TOUCH_UPDATE:
+        return WebPlatformTouchPoint::TouchMoved;
+    case GDK_TOUCH_BEGIN:
+        return WebPlatformTouchPoint::TouchPressed;
+    case GDK_TOUCH_END:
+        return WebPlatformTouchPoint::TouchReleased;
+    case GDK_TOUCH_CANCEL:
+        return WebPlatformTouchPoint::TouchCancelled;
+    default:
+        return WebPlatformTouchPoint::TouchStationary;
+    }
+}
+
+static void webkitWebViewBaseGetTouchPointsForEvent(WebKitWebViewBase* webViewBase, GdkEvent* event, Vector<WebPlatformTouchPoint>& touchPoints)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    GdkEventType type = gdk_event_get_event_type(event);
+    bool touchEnd = (type == GDK_TOUCH_END) || (type == GDK_TOUCH_CANCEL);
+    touchPoints.reserveInitialCapacity(touchEnd ? priv->touchEvents.size() + 1 : priv->touchEvents.size());
+
+    GtkWidget* widget = GTK_WIDGET(webViewBase);
+    for (const auto& it : priv->touchEvents)
+        appendTouchEvent(widget, touchPoints, it.value.get(), touchPointStateForEvents(it.value.get(), event));
+
+    // Touch was already removed from the TouchEventsMap, add it here.
+    if (touchEnd)
+        appendTouchEvent(widget, touchPoints, event, WebPlatformTouchPoint::TouchReleased);
+}
+
+#if USE(GTK4)
+static gboolean webkitWebViewBaseTouchEvent(GtkWidget* widget, GdkEvent* event)
+#else
+static gboolean webkitWebViewBaseTouchEvent(GtkWidget* widget, GdkEventTouch* event)
+#endif
+{
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+
+    if (priv->dialog)
+        return GDK_EVENT_STOP;
+
+    GdkEvent* touchEvent = reinterpret_cast<GdkEvent*>(event);
+    uint32_t sequence = GPOINTER_TO_UINT(gdk_event_get_event_sequence(touchEvent));
+
+    GdkEventType type = gdk_event_get_event_type(touchEvent);
+    switch (type) {
+    case GDK_TOUCH_BEGIN: {
+        if (priv->touchEvents.isEmpty())
+            priv->pageGrabbedTouch = false;
+        ASSERT(!priv->touchEvents.contains(sequence));
+#if USE(GTK4)
+        GRefPtr<GdkEvent> event = touchEvent;
+#else
+        GUniquePtr<GdkEvent> event(gdk_event_copy(touchEvent));
+#endif
+        priv->touchEvents.add(sequence, WTFMove(event));
+        break;
+    }
+    case GDK_TOUCH_UPDATE: {
+        auto it = priv->touchEvents.find(sequence);
+        ASSERT(it != priv->touchEvents.end());
+#if USE(GTK4)
+        it->value = touchEvent;
+#else
+        it->value.reset(gdk_event_copy(touchEvent));
+#endif
+        break;
+    }
+    case GDK_TOUCH_CANCEL:
+        FALLTHROUGH;
+    case GDK_TOUCH_END:
+        ASSERT(priv->touchEvents.contains(sequence));
+        priv->touchEvents.remove(sequence);
+        break;
+    default:
+#if !USE(GTK4)
+        ASSERT_NOT_REACHED();
+#endif
+        return GDK_EVENT_PROPAGATE;
+    }
+
+    Vector<WebPlatformTouchPoint> touchPoints;
+    webkitWebViewBaseGetTouchPointsForEvent(webViewBase, touchEvent, touchPoints);
+    priv->pageProxy->handleTouchEvent(NativeWebTouchEvent(reinterpret_cast<GdkEvent*>(event), WTFMove(touchPoints)));
+
+#if USE(GTK4)
+    return GDK_EVENT_PROPAGATE;
+#else
+    return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->touch_event(widget, event);
+#endif
+}
+#endif // ENABLE(TOUCH_EVENTS)
+
+void webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase* webViewBase, bool enabled)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->isBackForwardNavigationGestureEnabled = enabled;
+
+    if (auto* controller = webkitWebViewBaseViewGestureController(webViewBase))
+        controller->setSwipeGestureEnabled(enabled);
+
+    priv->pageProxy->setShouldRecordNavigationSnapshots(enabled);
+}
+
+ViewGestureController* webkitWebViewBaseViewGestureController(WebKitWebViewBase* webViewBase)
+{
+    return webViewBase->priv->viewGestureController.get();
+}
+
+bool webkitWebViewBaseBeginBackSwipeForTesting(WebKitWebViewBase* webViewBase)
+{
+    if (auto* gestureController = webkitWebViewBaseViewGestureController(webViewBase))
+        return gestureController->beginSimulatedSwipeInDirectionForTesting(ViewGestureController::SwipeDirection::Back);
+
+    return FALSE;
+}
+
+bool webkitWebViewBaseCompleteBackSwipeForTesting(WebKitWebViewBase* webViewBase)
+{
+    if (auto* gestureController = webkitWebViewBaseViewGestureController(webViewBase))
+        return gestureController->completeSimulatedSwipeInDirectionForTesting(ViewGestureController::SwipeDirection::Back);
+
+    return FALSE;
+}
+
+GVariant* webkitWebViewBaseContentsOfUserInterfaceItem(WebKitWebViewBase* webViewBase, const char* userInterfaceItem)
+{
+    if (g_strcmp0(userInterfaceItem, "validationBubble"))
+        return nullptr;
+
+    WebPageProxy* page = webViewBase->priv->pageProxy.get();
+    auto* validationBubble = page->validationBubble();
+    String message = validationBubble ? validationBubble->message() : emptyString();
+    double fontSize = validationBubble ? validationBubble->fontSize() : 0;
+
+    GVariantBuilder subBuilder;
+    g_variant_builder_init(&subBuilder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&subBuilder, "{sv}", "message", g_variant_new_string(message.utf8().data()));
+    g_variant_builder_add(&subBuilder, "{sv}", "fontSize", g_variant_new_double(fontSize));
+
+    GVariantBuilder builder;
+    g_variant_builder_init(&builder, G_VARIANT_TYPE_VARDICT);
+    g_variant_builder_add(&builder, "{sv}", userInterfaceItem, g_variant_builder_end(&subBuilder));
+
+    return g_variant_builder_end(&builder);
+}
+
+static gboolean webkitWebViewBaseQueryTooltip(GtkWidget* widget, gint /* x */, gint /* y */, gboolean keyboardMode, GtkTooltip* tooltip)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+
+    if (keyboardMode) {
+        // TODO: https://bugs.webkit.org/show_bug.cgi?id=61732.
+        notImplemented();
+        return FALSE;
+    }
+
+    if (priv->tooltipText.length() <= 0)
+        return FALSE;
+
+    if (!priv->tooltipArea.isEmpty()) {
+        GdkRectangle area = priv->tooltipArea;
+        gtk_tooltip_set_tip_area(tooltip, &area);
+    } else
+        gtk_tooltip_set_tip_area(tooltip, 0);
+    gtk_tooltip_set_text(tooltip, priv->tooltipText.data());
+
+    return TRUE;
+}
+
+#if !USE(GTK4) && ENABLE(ACCESSIBILITY)
+static AtkObject* webkitWebViewBaseGetAccessible(GtkWidget* widget)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    if (!priv->accessible) {
+        // Create the accessible object and associate it to the widget.
+        priv->accessible = adoptGRef(ATK_OBJECT(webkitWebViewAccessibleNew(widget)));
+
+        // Set the parent to not break bottom-up navigation.
+        if (auto* parentWidget = gtk_widget_get_parent(widget)) {
+            if (auto* axParent = gtk_widget_get_accessible(parentWidget))
+                atk_object_set_parent(priv->accessible.get(), axParent);
+        }
+    }
+
+    return priv->accessible.get();
+}
+#endif
+
+#if USE(GTK4)
+static void toplevelWindowIsActiveChanged(GtkWindow* window, GParamSpec*, WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (gtk_window_is_active(window)) {
+        if (priv->activityState & ActivityState::WindowIsActive)
+            return;
+        priv->activityState.add(ActivityState::WindowIsActive);
+        if (priv->activityState & ActivityState::IsFocused)
+            priv->inputMethodFilter.notifyFocusedIn();
+    } else {
+        if (!(priv->activityState & ActivityState::WindowIsActive))
+            return;
+        priv->activityState.remove(ActivityState::WindowIsActive);
+        if (priv->activityState & ActivityState::IsFocused)
+            priv->inputMethodFilter.notifyFocusedOut();
+    }
+
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::WindowIsActive);
+}
+
+static void toplevelWindowStateChanged(GdkSurface* surface, GParamSpec*, WebKitWebViewBase* webViewBase)
+{
+    auto state = gdk_toplevel_get_state(GDK_TOPLEVEL(surface));
+    bool visible = !(state & GDK_TOPLEVEL_STATE_MINIMIZED);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (visible) {
+        if (priv->activityState & ActivityState::IsVisible)
+            return;
+        priv->activityState.add(ActivityState::IsVisible);
+    } else {
+        if (!(priv->activityState & ActivityState::IsVisible))
+            return;
+        priv->activityState.remove(ActivityState::IsVisible);
+    }
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, ActivityState::IsVisible);
+}
+
+static void toplevelWindowRealized(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    g_clear_signal_handler(&priv->toplevelWindowRealizedID, priv->toplevelOnScreenWindow);
+    priv->toplevelWindowStateChangedID =
+        g_signal_connect(gtk_native_get_surface(GTK_NATIVE(priv->toplevelOnScreenWindow)), "notify::state", G_CALLBACK(toplevelWindowStateChanged), webViewBase);
+}
+
+static void toplevelWindowUnrealized(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    g_clear_signal_handler(&priv->toplevelWindowUnrealizedID, priv->toplevelOnScreenWindow);
+    g_clear_signal_handler(&priv->toplevelWindowStateChangedID, gtk_native_get_surface(GTK_NATIVE(priv->toplevelOnScreenWindow)));
+}
+
+static void webkitWebViewBaseRoot(GtkWidget* widget)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->root(widget);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->toplevelOnScreenWindow = GTK_WINDOW(gtk_widget_get_root(widget));
+
+    OptionSet<ActivityState::Flag> flagsToUpdate;
+    if (!(priv->activityState & ActivityState::IsInWindow)) {
+        priv->activityState.add(ActivityState::IsInWindow);
+        flagsToUpdate.add(ActivityState::IsInWindow);
+    }
+    if (gtk_widget_get_visible(GTK_WIDGET(priv->toplevelOnScreenWindow)) && gtk_window_is_active(priv->toplevelOnScreenWindow)) {
+        priv->activityState.add(ActivityState::WindowIsActive);
+        flagsToUpdate.add(ActivityState::IsInWindow);
+    }
+    if (flagsToUpdate)
+        webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate);
+
+    priv->toplevelIsActiveID =
+        g_signal_connect(priv->toplevelOnScreenWindow, "notify::is-active", G_CALLBACK(toplevelWindowIsActiveChanged), widget);
+    if (gtk_widget_get_realized(GTK_WIDGET(priv->toplevelOnScreenWindow))) {
+        priv->toplevelWindowStateChangedID =
+            g_signal_connect(gtk_native_get_surface(GTK_NATIVE(priv->toplevelOnScreenWindow)), "notify::state", G_CALLBACK(toplevelWindowStateChanged), widget);
+    } else {
+        priv->toplevelWindowRealizedID =
+            g_signal_connect_swapped(priv->toplevelOnScreenWindow, "realize", G_CALLBACK(toplevelWindowRealized), widget);
+    }
+    priv->toplevelWindowUnrealizedID =
+        g_signal_connect_swapped(priv->toplevelOnScreenWindow, "unrealize", G_CALLBACK(toplevelWindowUnrealized), widget);
+}
+
+static void webkitWebViewBaseUnroot(GtkWidget* widget)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->unroot(widget);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    g_clear_signal_handler(&priv->toplevelIsActiveID, priv->toplevelOnScreenWindow);
+    g_clear_signal_handler(&priv->toplevelWindowRealizedID, priv->toplevelOnScreenWindow);
+    g_clear_signal_handler(&priv->toplevelWindowUnrealizedID, priv->toplevelOnScreenWindow);
+    if (gtk_widget_get_realized(GTK_WIDGET(priv->toplevelOnScreenWindow)))
+        g_clear_signal_handler(&priv->toplevelWindowStateChangedID, gtk_native_get_surface(GTK_NATIVE(priv->toplevelOnScreenWindow)));
+    priv->toplevelOnScreenWindow = nullptr;
+
+    OptionSet<ActivityState::Flag> flagsToUpdate;
+    if (priv->activityState & ActivityState::IsInWindow) {
+        priv->activityState.remove(ActivityState::IsInWindow);
+        flagsToUpdate.add(ActivityState::IsInWindow);
+    }
+    if (priv->activityState & ActivityState::WindowIsActive) {
+        priv->activityState.remove(ActivityState::WindowIsActive);
+        flagsToUpdate.add(ActivityState::IsInWindow);
+    }
+    if (flagsToUpdate)
+        webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate);
+}
+#else
+static void webkitWebViewBaseHierarchyChanged(GtkWidget* widget, GtkWidget* oldToplevel)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    if (widgetIsOnscreenToplevelWindow(oldToplevel) && GTK_WINDOW(oldToplevel) == priv->toplevelOnScreenWindow) {
+        webkitWebViewBaseSetToplevelOnScreenWindow(WEBKIT_WEB_VIEW_BASE(widget), nullptr);
+        return;
+    }
+
+    if (!oldToplevel) {
+        GtkWidget* toplevel = gtk_widget_get_toplevel(widget);
+        if (widgetIsOnscreenToplevelWindow(toplevel))
+            webkitWebViewBaseSetToplevelOnScreenWindow(WEBKIT_WEB_VIEW_BASE(widget), GTK_WINDOW(toplevel));
+    }
+}
+#endif
+
+#if USE(GTK4)
+static gboolean webkitWebViewBaseGrabFocus(GtkWidget* widget)
+{
+    gtk_root_set_focus(gtk_widget_get_root(widget), widget);
+    return TRUE;
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseMoveFocus(GtkWidget* widget, GtkDirectionType direction)
+{
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    if (priv->dialog)
+        g_signal_emit_by_name(priv->dialog, "move-focus", direction);
+
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->move_focus(widget, direction);
+}
+#else
+static gboolean webkitWebViewBaseFocus(GtkWidget* widget, GtkDirectionType direction)
+{
+    // If a dialog is active, we need to forward focus events there. This
+    // ensures that you can tab between elements in the box.
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(widget)->priv;
+    if (priv->dialog) {
+        gboolean returnValue;
+        g_signal_emit_by_name(priv->dialog, "focus", direction, &returnValue);
+        return returnValue;
+    }
+
+    return GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->focus(widget, direction);
+}
+#endif
+
+#if USE(GTK4)
+static void webkitWebViewBaseCssChanged(GtkWidget* widget, GtkCssStyleChange* change)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->css_changed(widget, change);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->pageProxy->accentColorDidChange();
+}
+#else
+static void webkitWebViewBaseStyleUpdated(GtkWidget* widget)
+{
+    GTK_WIDGET_CLASS(webkit_web_view_base_parent_class)->style_updated(widget);
+
+    WebKitWebViewBase* webViewBase = WEBKIT_WEB_VIEW_BASE(widget);
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->pageProxy->accentColorDidChange();
+}
+#endif
+
+static void webkitWebViewBaseZoomBegin(WebKitWebViewBase* webViewBase, GdkEventSequence* sequence, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+
+    double x, y;
+    gtk_gesture_get_bounding_box_center(gesture, &x, &y);
+
+    auto* event = gtk_gesture_get_last_event(gesture, sequence);
+
+    webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, 0, 0, x, y, WheelEventPhase::Began, WheelEventPhase::NoPhase, true);
+
+#if !USE(GTK4)
+    GtkGesture* click = GTK_GESTURE(g_object_get_data(G_OBJECT(webViewBase), "wk-view-multi-press-gesture"));
+    gtk_gesture_set_state(click, GTK_EVENT_SEQUENCE_DENIED);
+#endif
+}
+
+static void webkitWebViewBaseZoomChanged(WebKitWebViewBase* webViewBase, gdouble scale, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+
+    gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED);
+
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+    if (!controller)
+        return;
+
+    double x, y;
+    gtk_gesture_get_bounding_box_center(gesture, &x, &y);
+    FloatPoint origin = FloatPoint(x, y);
+
+    controller->setMagnification(scale, origin);
+}
+
+static void webkitWebViewBaseZoomEnd(WebKitWebViewBase* webViewBase, GdkEventSequence* sequence, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+
+    gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED);
+
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+    if (!controller)
+        return;
+
+    controller->endMagnification();
+}
+
+static void webkitWebViewBaseTouchLongPress(WebKitWebViewBase* webViewBase, gdouble x, gdouble y, GtkGesture*)
+{
+    webViewBase->priv->isLongPressed = true;
+}
+
+static void webkitWebViewBaseTouchPress(WebKitWebViewBase* webViewBase, int nPress, double x, double y, GtkGesture*)
+{
+    webViewBase->priv->isLongPressed = false;
+}
+
+static void webkitWebViewBaseTouchRelease(WebKitWebViewBase* webViewBase, int nPress, double x, double y, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+    if (priv->isBeingDragged)
+        return;
+
+    unsigned button;
+    unsigned buttons;
+    if (priv->isLongPressed) {
+        button = GDK_BUTTON_SECONDARY;
+        buttons = GDK_BUTTON3_MASK;
+    } else {
+        button = GDK_BUTTON_PRIMARY;
+        buttons = GDK_BUTTON1_MASK;
+    }
+
+    unsigned modifiers = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(gesture));
+    webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Motion, 0, 0, x, y, modifiers, nPress, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+    webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Press, button, 0, x, y, modifiers, nPress, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+    webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Release, button, buttons, x, y, modifiers, nPress, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+}
+
+static void webkitWebViewBaseTouchDragBegin(WebKitWebViewBase* webViewBase, gdouble startX, gdouble startY, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->dragOffset.set(0, 0);
+    priv->isBeingDragged = false;
+
+    auto* sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+    auto* event = gtk_gesture_get_last_event(gesture, sequence);
+
+    webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, 0, 0, startX, startY, WheelEventPhase::Began, WheelEventPhase::NoPhase, true);
+}
+
+static void webkitWebViewBaseTouchDragUpdate(WebKitWebViewBase* webViewBase, double offsetX, double offsetY, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+
+    double x, y;
+    gtk_gesture_drag_get_start_point(GTK_GESTURE_DRAG(gesture), &x, &y);
+
+    auto* sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+    auto* event = gtk_gesture_get_last_event(gesture, sequence);
+
+    unsigned modifiers = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(gesture));
+    if (!priv->isBeingDragged) {
+        if (!gtk_drag_check_threshold(GTK_WIDGET(webViewBase), 0, 0, static_cast<int>(offsetX), static_cast<int>(offsetY)))
+            return;
+        priv->isBeingDragged = true;
+        gtk_gesture_set_state(gesture, GTK_EVENT_SEQUENCE_CLAIMED);
+
+        if (priv->isLongPressed) {
+            // Drag after long press forwards emulated mouse events (for e.g. text selection)
+            webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Motion, 0, 0, x, y, modifiers, 1, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+            webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Press, GDK_BUTTON_PRIMARY, 0, x, y, modifiers, 0, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+        } else
+            webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, 0, 0, x, y, WheelEventPhase::Began, WheelEventPhase::NoPhase, true);
+    }
+
+    if (priv->isLongPressed)
+        webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Motion, GDK_BUTTON_PRIMARY, GDK_BUTTON1_MASK, x + offsetX, y + offsetY, modifiers, 0, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+    else {
+        double deltaX = priv->dragOffset.x() - offsetX;
+        double deltaY = priv->dragOffset.y() - offsetY;
+        priv->dragOffset.set(offsetX, offsetY);
+
+        ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+        if (controller && controller->isSwipeGestureEnabled()) {
+            FloatSize delta(deltaX / Scrollbar::pixelsPerLineStep(), deltaY / Scrollbar::pixelsPerLineStep());
+            int32_t eventTime = static_cast<int32_t>(gtk_event_controller_get_current_event_time(GTK_EVENT_CONTROLLER(gesture)));
+            PlatformGtkScrollData scrollData = { .delta = delta, .eventTime = eventTime, .source = GDK_SOURCE_TOUCHSCREEN, .isEnd = false };
+            if (controller->handleScrollWheelEvent(&scrollData))
+                return;
+        }
+
+        webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, -deltaX, -deltaY, x, y, WheelEventPhase::Changed, WheelEventPhase::NoPhase, true);
+    }
+}
+
+static void webkitWebViewBaseTouchDragEnd(WebKitWebViewBase* webViewBase, gdouble offsetX, gdouble offsetY, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch)
+        return;
+
+    if (priv->isLongPressed) {
+        double x, y;
+        gtk_gesture_drag_get_start_point(GTK_GESTURE_DRAG(gesture), &x, &y);
+        unsigned modifiers = gtk_event_controller_get_current_event_state(GTK_EVENT_CONTROLLER(gesture));
+        webkitWebViewBaseSynthesizeMouseEvent(webViewBase, MouseEventType::Release, GDK_BUTTON_PRIMARY, GDK_BUTTON1_MASK, x + offsetX, y + offsetY, modifiers, 0, mousePointerEventType(), PlatformMouseEvent::IsTouch::Yes);
+    }
+}
+
+static void webkitWebViewBaseTouchDragCancel(WebKitWebViewBase* webViewBase, GdkEventSequence*, GtkGesture*)
+{
+    if (auto* controller = webkitWebViewBaseViewGestureController(webViewBase))
+        controller->cancelSwipe();
+}
+
+static void webkitWebViewBaseTouchSwipe(WebKitWebViewBase* webViewBase, gdouble velocityX, gdouble velocityY, GtkGesture* gesture)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->pageGrabbedTouch || !priv->isBeingDragged || priv->isLongPressed)
+        return;
+
+    double x, y;
+    if (gtk_gesture_get_point(gesture, gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture)), &x, &y)) {
+        auto* sequence = gtk_gesture_single_get_current_sequence(GTK_GESTURE_SINGLE(gesture));
+        auto* event = gtk_gesture_get_last_event(gesture, sequence);
+
+        ViewGestureController* controller = webkitWebViewBaseViewGestureController(webViewBase);
+        if (controller && controller->isSwipeGestureEnabled()) {
+            int32_t eventTime = static_cast<int32_t>(gtk_event_controller_get_current_event_time(GTK_EVENT_CONTROLLER(gesture)));
+            PlatformGtkScrollData scrollData = { .delta = FloatSize(), .eventTime = eventTime, .source = GDK_SOURCE_TOUCHSCREEN, .isEnd = true };
+            if (controller->handleScrollWheelEvent(&scrollData))
+                return;
+        }
+
+        webkitWebViewBaseSynthesizeWheelEvent(webViewBase, event, -velocityX, -velocityY, x, y, WheelEventPhase::NoPhase, WheelEventPhase::Began, true);
+    }
+}
+
+static void webkitWebViewBaseConstructed(GObject* object)
+{
+    G_OBJECT_CLASS(webkit_web_view_base_parent_class)->constructed(object);
+
+    GtkWidget* viewWidget = GTK_WIDGET(object);
+    gtk_widget_set_can_focus(viewWidget, TRUE);
+
+    WebKitWebViewBasePrivate* priv = WEBKIT_WEB_VIEW_BASE(object)->priv;
+    priv->pageClient = makeUnique<PageClientImpl>(viewWidget);
+    gtk_widget_set_parent(priv->keyBindingTranslator.widget(), viewWidget);
+
+#if ENABLE(DRAG_SUPPORT)
+    priv->dropTarget = makeUnique<DropTarget>(viewWidget);
+#endif
+
+#if USE(GTK4)
+    auto* controller = gtk_event_controller_scroll_new(GTK_EVENT_CONTROLLER_SCROLL_BOTH_AXES);
+    g_signal_connect_object(controller, "scroll-begin", G_CALLBACK(webkitWebViewBaseScrollBegin), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "scroll", G_CALLBACK(webkitWebViewBaseScroll), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "scroll-end", G_CALLBACK(webkitWebViewBaseScrollEnd), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, controller);
+
+    controller = gtk_event_controller_motion_new();
+    g_signal_connect_object(controller, "enter", G_CALLBACK(webkitWebViewBaseEnter), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "motion", G_CALLBACK(webkitWebViewBaseMotion), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "leave", G_CALLBACK(webkitWebViewBaseLeave), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, controller);
+
+    controller = gtk_event_controller_focus_new();
+    g_signal_connect_object(controller, "enter", G_CALLBACK(webkitWebViewBaseFocusEnter), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "leave", G_CALLBACK(webkitWebViewBaseFocusLeave), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, controller);
+
+    controller = gtk_event_controller_key_new();
+    g_signal_connect_object(controller, "key-pressed", G_CALLBACK(webkitWebViewBaseKeyPressed), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(controller, "key-released", G_CALLBACK(webkitWebViewBaseKeyReleased), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, controller);
+
+    controller = gtk_event_controller_legacy_new();
+    gtk_event_controller_set_propagation_phase(GTK_EVENT_CONTROLLER(controller), GTK_PHASE_TARGET);
+    g_signal_connect_object(controller, "event", G_CALLBACK(webkitWebViewBaseTouchEvent), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(controller));
+
+    auto* gesture = gtk_gesture_click_new();
+    gtk_gesture_single_set_button(GTK_GESTURE_SINGLE(gesture), 0);
+    gtk_gesture_single_set_exclusive(GTK_GESTURE_SINGLE(gesture), TRUE);
+    g_signal_connect_object(gesture, "pressed", G_CALLBACK(webkitWebViewBaseButtonPressed), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(gesture, "released", G_CALLBACK(webkitWebViewBaseButtonReleased), viewWidget, G_CONNECT_SWAPPED);
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(gesture));
+#endif
+
+#if USE(GTK4)
+    gesture = gtk_gesture_click_new();
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(gesture));
+#else
+    auto* gesture = gtk_gesture_multi_press_new(viewWidget);
+    g_object_set_data_full(G_OBJECT(viewWidget), "wk-view-multi-press-gesture", gesture, g_object_unref);
+#endif
+    gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(gesture), TRUE);
+    g_signal_connect_object(gesture, "pressed", G_CALLBACK(webkitWebViewBaseTouchPress), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(gesture, "released", G_CALLBACK(webkitWebViewBaseTouchRelease), viewWidget, G_CONNECT_SWAPPED);
+
+    // Touch gestures
+#if USE(GTK4)
+    priv->touchGestureGroup = gtk_gesture_zoom_new();
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(priv->touchGestureGroup));
+#else
+    priv->touchGestureGroup = gtk_gesture_zoom_new(viewWidget);
+    g_object_set_data_full(G_OBJECT(viewWidget), "wk-view-zoom-gesture", priv->touchGestureGroup, g_object_unref);
+#endif
+    g_signal_connect_object(priv->touchGestureGroup, "begin", G_CALLBACK(webkitWebViewBaseZoomBegin), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(priv->touchGestureGroup, "scale-changed", G_CALLBACK(webkitWebViewBaseZoomChanged), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(priv->touchGestureGroup, "end", G_CALLBACK(webkitWebViewBaseZoomEnd), viewWidget, G_CONNECT_SWAPPED);
+
+#if USE(GTK4)
+    gesture = gtk_gesture_long_press_new();
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(gesture));
+#else
+    gesture = gtk_gesture_long_press_new(viewWidget);
+    g_object_set_data_full(G_OBJECT(viewWidget), "wk-view-long-press-gesture", gesture, g_object_unref);
+#endif
+    gtk_gesture_group(gesture, priv->touchGestureGroup);
+    gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(gesture), TRUE);
+    g_signal_connect_object(gesture, "pressed", G_CALLBACK(webkitWebViewBaseTouchLongPress), viewWidget, G_CONNECT_SWAPPED);
+
+#if USE(GTK4)
+    gesture = gtk_gesture_drag_new();
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(gesture));
+#else
+    gesture = gtk_gesture_drag_new(viewWidget);
+    g_object_set_data_full(G_OBJECT(viewWidget), "wk-view-drag-gesture", gesture, g_object_unref);
+#endif
+    gtk_gesture_group(gesture, priv->touchGestureGroup);
+    gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(gesture), TRUE);
+    g_signal_connect_object(gesture, "drag-begin", G_CALLBACK(webkitWebViewBaseTouchDragBegin), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(gesture, "drag-update", G_CALLBACK(webkitWebViewBaseTouchDragUpdate), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(gesture, "drag-end", G_CALLBACK(webkitWebViewBaseTouchDragEnd), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(gesture, "cancel", G_CALLBACK(webkitWebViewBaseTouchDragCancel), viewWidget, G_CONNECT_SWAPPED);
+
+#if USE(GTK4)
+    gesture = gtk_gesture_swipe_new();
+    gtk_widget_add_controller(viewWidget, GTK_EVENT_CONTROLLER(gesture));
+#else
+    gesture = gtk_gesture_swipe_new(viewWidget);
+    g_object_set_data_full(G_OBJECT(viewWidget), "wk-view-swipe-gesture", gesture, g_object_unref);
+#endif
+    gtk_gesture_group(gesture, priv->touchGestureGroup);
+    gtk_gesture_single_set_touch_only(GTK_GESTURE_SINGLE(gesture), TRUE);
+    g_signal_connect_object(gesture, "swipe", G_CALLBACK(webkitWebViewBaseTouchSwipe), viewWidget, G_CONNECT_SWAPPED);
+
+    auto* settings = gtk_settings_get_default();
+    auto callback = +[](WebKitWebViewBase* webViewBase) {
+        webViewBase->priv->pageProxy->effectiveAppearanceDidChange();
+    };
+    g_signal_connect_object(settings, "notify::gtk-theme-name", G_CALLBACK(callback), viewWidget, G_CONNECT_SWAPPED);
+    g_signal_connect_object(settings, "notify::gtk-application-prefer-dark-theme", G_CALLBACK(callback), viewWidget, G_CONNECT_SWAPPED);
+}
+
+static void webkit_web_view_base_class_init(WebKitWebViewBaseClass* webkitWebViewBaseClass)
+{
+    GtkWidgetClass* widgetClass = GTK_WIDGET_CLASS(webkitWebViewBaseClass);
+    widgetClass->realize = webkitWebViewBaseRealize;
+    widgetClass->unrealize = webkitWebViewBaseUnrealize;
+#if USE(GTK4)
+    widgetClass->snapshot = webkitWebViewBaseSnapshot;
+#else
+    widgetClass->draw = webkitWebViewBaseDraw;
+#endif
+    widgetClass->size_allocate = webkitWebViewBaseSizeAllocate;
+#if USE(GTK4)
+    widgetClass->measure = webkitWebViewBaseMeasure;
+#else
+    widgetClass->get_preferred_width = webkitWebViewBaseGetPreferredWidth;
+    widgetClass->get_preferred_height = webkitWebViewBaseGetPreferredHeight;
+#endif
+    widgetClass->map = webkitWebViewBaseMap;
+    widgetClass->unmap = webkitWebViewBaseUnmap;
+#if USE(GTK4)
+    widgetClass->move_focus = webkitWebViewBaseMoveFocus;
+#else
+    widgetClass->focus = webkitWebViewBaseFocus;
+#endif
+#if USE(GTK4)
+    widgetClass->grab_focus = webkitWebViewBaseGrabFocus;
+#else
+    widgetClass->focus_in_event = webkitWebViewBaseFocusInEvent;
+    widgetClass->focus_out_event = webkitWebViewBaseFocusOutEvent;
+    widgetClass->key_press_event = webkitWebViewBaseKeyPressEvent;
+    widgetClass->key_release_event = webkitWebViewBaseKeyReleaseEvent;
+    widgetClass->button_press_event = webkitWebViewBaseButtonPressEvent;
+    widgetClass->button_release_event = webkitWebViewBaseButtonReleaseEvent;
+    widgetClass->scroll_event = webkitWebViewBaseScrollEvent;
+    widgetClass->popup_menu = webkitWebViewBasePopupMenu;
+    widgetClass->motion_notify_event = webkitWebViewBaseMotionNotifyEvent;
+    widgetClass->enter_notify_event = webkitWebViewBaseCrossingNotifyEvent;
+    widgetClass->leave_notify_event = webkitWebViewBaseCrossingNotifyEvent;
+#endif
+#if ENABLE(TOUCH_EVENTS) && !USE(GTK4)
+    widgetClass->touch_event = webkitWebViewBaseTouchEvent;
+#endif
+    widgetClass->query_tooltip = webkitWebViewBaseQueryTooltip;
+#if !USE(GTK4) && ENABLE(ACCESSIBILITY)
+    widgetClass->get_accessible = webkitWebViewBaseGetAccessible;
+#endif
+#if USE(GTK4)
+    widgetClass->root = webkitWebViewBaseRoot;
+    widgetClass->unroot = webkitWebViewBaseUnroot;
+#else
+    widgetClass->hierarchy_changed = webkitWebViewBaseHierarchyChanged;
+#endif
+#if USE(GTK4)
+    widgetClass->css_changed = webkitWebViewBaseCssChanged;
+#else
+    widgetClass->style_updated = webkitWebViewBaseStyleUpdated;
+#endif
+
+    GObjectClass* gobjectClass = G_OBJECT_CLASS(webkitWebViewBaseClass);
+    gobjectClass->constructed = webkitWebViewBaseConstructed;
+    gobjectClass->dispose = webkitWebViewBaseDispose;
+
+#if !USE(GTK4)
+    GtkContainerClass* containerClass = GTK_CONTAINER_CLASS(webkitWebViewBaseClass);
+    containerClass->add = webkitWebViewBaseContainerAdd;
+    containerClass->remove = webkitWebViewBaseContainerRemove;
+    containerClass->forall = webkitWebViewBaseContainerForall;
+#endif
+
+    // Before creating a WebKitWebViewBasePriv we need to be sure that WebKit is started.
+    // Usually starting a context triggers webkitInitialize, but in case
+    // we create a view without asking before for a default_context we get a crash.
+    WebKit::webkitInitialize();
+
+    gtk_widget_class_set_css_name(widgetClass, "webkitwebview");
+}
+
+WebKitWebViewBase* webkitWebViewBaseCreate(const API::PageConfiguration& configuration)
+{
+    WebKitWebViewBase* webkitWebViewBase = WEBKIT_WEB_VIEW_BASE(g_object_new(WEBKIT_TYPE_WEB_VIEW_BASE, nullptr));
+    webkitWebViewBaseCreateWebPage(webkitWebViewBase, configuration.copy());
+    return webkitWebViewBase;
+}
+
+WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase* webkitWebViewBase)
+{
+    return webkitWebViewBase->priv->pageProxy.get();
+}
+
+static void deviceScaleFactorChanged(WebKitWebViewBase* webkitWebViewBase)
+{
+    webkitWebViewBase->priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase)));
+}
+
+void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, Ref<API::PageConfiguration>&& configuration)
+{
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    WebProcessPool* processPool = configuration->processPool();
+    priv->pageProxy = processPool->createWebPage(*priv->pageClient, WTFMove(configuration));
+    priv->acceleratedBackingStore = AcceleratedBackingStore::create(*priv->pageProxy);
+    priv->pageProxy->initializeWebPage();
+
+    // We attach this here, because changes in scale factor are passed directly to the page proxy.
+    priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase)));
+    g_signal_connect(webkitWebViewBase, "notify::scale-factor", G_CALLBACK(deviceScaleFactorChanged), nullptr);
+}
+
+void webkitWebViewBaseSetTooltipText(WebKitWebViewBase* webViewBase, const char* tooltip)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (tooltip && tooltip[0] != '\0') {
+        priv->tooltipText = tooltip;
+        gtk_widget_set_has_tooltip(GTK_WIDGET(webViewBase), TRUE);
+    } else {
+        priv->tooltipText = "";
+        gtk_widget_set_has_tooltip(GTK_WIDGET(webViewBase), FALSE);
+    }
+
+    gtk_widget_trigger_tooltip_query(GTK_WIDGET(webViewBase));
+}
+
+void webkitWebViewBaseSetTooltipArea(WebKitWebViewBase* webViewBase, const IntRect& tooltipArea)
+{
+    webViewBase->priv->tooltipArea = tooltipArea;
+}
+
+void webkitWebViewBaseSetMouseIsOverScrollbar(WebKitWebViewBase* webViewBase, WebHitTestResultData::IsScrollbar isScrollbar)
+{
+    webViewBase->priv->mouseIsOverScrollbar = isScrollbar;
+}
+
+#if ENABLE(DRAG_SUPPORT)
+void webkitWebViewBaseStartDrag(WebKitWebViewBase* webViewBase, SelectionData&& selectionData, OptionSet<DragOperation> dragOperationMask, RefPtr<ShareableBitmap>&& image, IntPoint&& dragImageHotspot)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!priv->dragSource)
+        priv->dragSource = makeUnique<DragSource>(GTK_WIDGET(webViewBase));
+
+    priv->dragSource->begin(WTFMove(selectionData), dragOperationMask, WTFMove(image), WTFMove(dragImageHotspot));
+
+#if !USE(GTK4)
+    // A drag starting should prevent a double-click from happening. This might
+    // happen if a drag is followed very quickly by another click (like in the WTR).
+    priv->clickCounter.reset();
+#endif
+}
+
+void webkitWebViewBaseDidPerformDragControllerAction(WebKitWebViewBase* webViewBase)
+{
+    webViewBase->priv->dropTarget->didPerformAction();
+}
+#endif // ENABLE(DRAG_SUPPORT)
+
+void webkitWebViewBasePropagateKeyEvent(WebKitWebViewBase* webkitWebViewBase, GdkEvent* event)
+{
+#if USE(GTK4)
+    webkitWebViewBase->priv->keyEventsToPropagate.append(event);
+    // Note: the docs for gdk_display_put_event lie - this adds to the end of the queue, not the front.
+    gdk_display_put_event(gtk_widget_get_display(GTK_WIDGET(webkitWebViewBase)), event);
+#else
+    webkitWebViewBase->priv->shouldForwardNextKeyEvent = true;
+    gtk_main_do_event(event);
+#endif
+}
+
+void webkitWebViewBasePropagateWheelEvent(WebKitWebViewBase* webkitWebViewBase, GdkEvent* event)
+{
+#if USE(GTK4)
+    webkitWebViewBase->priv->wheelEventsToPropagate.append(event);
+    // Note: the docs for gdk_display_put_event lie - this adds to the end of the queue, not the front.
+    gdk_display_put_event(gtk_widget_get_display(GTK_WIDGET(webkitWebViewBase)), event);
+#else
+    webkitWebViewBase->priv->shouldForwardNextWheelEvent = true;
+    gtk_main_do_event(event);
+#endif
+}
+
+void webkitWebViewBaseEnterFullScreen(WebKitWebViewBase* webkitWebViewBase)
+{
+#if ENABLE(FULLSCREEN_API)
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    ASSERT(!priv->fullScreenModeActive);
+
+    WebFullScreenManagerProxy* fullScreenManagerProxy = priv->pageProxy->fullScreenManager();
+    fullScreenManagerProxy->willEnterFullScreen();
+
+    GtkWidget* topLevelWindow = gtk_widget_get_toplevel(GTK_WIDGET(webkitWebViewBase));
+    if (gtk_widget_is_toplevel(topLevelWindow))
+        gtk_window_fullscreen(GTK_WINDOW(topLevelWindow));
+    fullScreenManagerProxy->didEnterFullScreen();
+    priv->fullScreenModeActive = true;
+    priv->sleepDisabler = PAL::SleepDisabler::create(String::fromUTF8(_("Website running in fullscreen mode")), PAL::SleepDisabler::Type::Display);
+#endif
+}
+
+void webkitWebViewBaseExitFullScreen(WebKitWebViewBase* webkitWebViewBase)
+{
+#if ENABLE(FULLSCREEN_API)
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    ASSERT(priv->fullScreenModeActive);
+
+    WebFullScreenManagerProxy* fullScreenManagerProxy = priv->pageProxy->fullScreenManager();
+    fullScreenManagerProxy->willExitFullScreen();
+
+    GtkWidget* topLevelWindow = gtk_widget_get_toplevel(GTK_WIDGET(webkitWebViewBase));
+    if (gtk_widget_is_toplevel(topLevelWindow))
+        gtk_window_unfullscreen(GTK_WINDOW(topLevelWindow));
+    fullScreenManagerProxy->didExitFullScreen();
+    priv->fullScreenModeActive = false;
+    priv->sleepDisabler = nullptr;
+#endif
+}
+
+bool webkitWebViewBaseIsFullScreen(WebKitWebViewBase* webkitWebViewBase)
+{
+#if ENABLE(FULLSCREEN_API)
+    return webkitWebViewBase->priv->fullScreenModeActive;
+#else
+    return false;
+#endif
+}
+
+void webkitWebViewBaseSetInspectorViewSize(WebKitWebViewBase* webkitWebViewBase, unsigned size)
+{
+    if (webkitWebViewBase->priv->inspectorViewSize == size)
+        return;
+    webkitWebViewBase->priv->inspectorViewSize = size;
+    if (webkitWebViewBase->priv->inspectorView)
+        gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
+}
+
+void webkitWebViewBaseSetActiveContextMenuProxy(WebKitWebViewBase* webkitWebViewBase, WebContextMenuProxyGtk* contextMenuProxy)
+{
+    webkitWebViewBase->priv->activeContextMenuProxy = contextMenuProxy;
+    g_signal_connect(contextMenuProxy->gtkWidget(), WebContextMenuProxyGtk::widgetDismissedSignal, G_CALLBACK(+[](GtkWidget* widget, WebKitWebViewBase* webViewBase) {
+        if (webViewBase->priv->activeContextMenuProxy && webViewBase->priv->activeContextMenuProxy->gtkWidget() == widget)
+            webViewBase->priv->activeContextMenuProxy = nullptr;
+    }), webkitWebViewBase);
+}
+
+WebContextMenuProxyGtk* webkitWebViewBaseGetActiveContextMenuProxy(WebKitWebViewBase* webkitWebViewBase)
+{
+    return webkitWebViewBase->priv->activeContextMenuProxy;
+}
+
+#if USE(GTK4)
+GRefPtr<GdkEvent> webkitWebViewBaseTakeContextMenuEvent(WebKitWebViewBase* webkitWebViewBase)
+{
+    return std::exchange(webkitWebViewBase->priv->contextMenuEvent, nullptr);
+}
+#else
+GUniquePtr<GdkEvent> webkitWebViewBaseTakeContextMenuEvent(WebKitWebViewBase* webkitWebViewBase)
+{
+    return WTFMove(webkitWebViewBase->priv->contextMenuEvent);
+}
+#endif
+
+void webkitWebViewBaseSetFocus(WebKitWebViewBase* webViewBase, bool focused)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!priv->shouldNotifyFocusEvents)
+        return;
+    if ((focused && priv->activityState & ActivityState::IsFocused) || (!focused && !(priv->activityState & ActivityState::IsFocused)))
+        return;
+
+    OptionSet<ActivityState::Flag> flagsToUpdate { ActivityState::IsFocused };
+    if (focused) {
+        priv->activityState.add(ActivityState::IsFocused);
+
+        // If the view has received the focus and the window is not active
+        // mark the current window as active now. This can happen if the
+        // toplevel window is a GTK_WINDOW_POPUP and the focus has been
+        // set programatically like WebKitTestRunner does, because POPUP
+        // can't be focused.
+        if (!(priv->activityState & ActivityState::WindowIsActive)) {
+            priv->activityState.add(ActivityState::WindowIsActive);
+            flagsToUpdate.add(ActivityState::WindowIsActive);
+        }
+    } else
+        priv->activityState.remove(ActivityState::IsFocused);
+
+    webkitWebViewBaseScheduleUpdateActivityState(webViewBase, flagsToUpdate);
+}
+
+void webkitWebViewBaseSetEditable(WebKitWebViewBase* webViewBase, bool editable)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->pageProxy->setEditable(editable);
+}
+
+IntSize webkitWebViewBaseGetViewSize(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    int width = priv->viewSize.width();
+    int height = priv->viewSize.height();
+
+    // First try the widget's own size. If it's already allocated,
+    // everything is fine and we'll just use that.
+    if (width > 0 || height > 0)
+        return IntSize(width, height);
+
+    GtkWidget* parent = gtk_widget_get_parent(GTK_WIDGET(webViewBase));
+
+    // If it's not allocated, then its size will be 0. This can be a problem
+    // if the web view is loaded in background and the container doesn't
+    // allocate non-visible children: e.g. GtkNotebook in GTK3 does allocate
+    // them, but GtkStack, and so GtkNotebook in GTK4 and HdyTabView don't.
+    // See https://gitlab.gnome.org/GNOME/epiphany/-/issues/1532
+    // In that case we go up through the hierarchy and try to find a parent
+    // with non-0 size.
+    while (parent) {
+#if USE(GTK4)
+        width = gtk_widget_get_width(parent);
+        height = gtk_widget_get_height(parent);
+
+        if (width > 0 || height > 0)
+#else
+        width = gtk_widget_get_allocated_width(parent);
+        height = gtk_widget_get_allocated_height(parent);
+
+        // The default widget size in GTK3 is 1x1, not 0x0.
+        if (width > 1 || height > 1)
+#endif
+            return IntSize(width, height);
+
+        parent = gtk_widget_get_parent(parent);
+    }
+
+    // If there was no such a parent, it's likely the widget widget isn't
+    // in a window, or the whole window isn't mapped. No point in trying
+    // in this case.
+
+    return IntSize();
+}
+
+bool webkitWebViewBaseIsInWindowActive(WebKitWebViewBase* webViewBase)
+{
+    return webViewBase->priv->activityState.contains(ActivityState::WindowIsActive);
+}
+
+bool webkitWebViewBaseIsFocused(WebKitWebViewBase* webViewBase)
+{
+#if ENABLE(DEVELOPER_MODE)
+    // Xvfb doesn't support toplevel focus, so the view is never focused. We consider it to tbe focused when
+    // its window is marked as active.
+    if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) {
+        if (!g_strcmp0(g_getenv("UNDER_XVFB"), "yes") && webViewBase->priv->activityState.contains(ActivityState::WindowIsActive))
+            return true;
+    }
+#endif
+    return webViewBase->priv->activityState.contains(ActivityState::IsFocused);
+}
+
+bool webkitWebViewBaseIsVisible(WebKitWebViewBase* webViewBase)
+{
+    return webViewBase->priv->activityState.contains(ActivityState::IsVisible);
+}
+
+bool webkitWebViewBaseIsInWindow(WebKitWebViewBase* webViewBase)
+{
+    return webViewBase->priv->activityState.contains(ActivityState::IsInWindow);
+}
+
+void webkitWebViewBaseSetInputMethodState(WebKitWebViewBase* webkitWebViewBase, std::optional<InputMethodState>&& state)
+{
+    webkitWebViewBase->priv->inputMethodFilter.setState(WTFMove(state));
+}
+
+void webkitWebViewBaseUpdateTextInputState(WebKitWebViewBase* webkitWebViewBase)
+{
+    const auto& editorState = webkitWebViewBase->priv->pageProxy->editorState();
+    if (editorState.hasPostLayoutAndVisualData()) {
+        webkitWebViewBase->priv->inputMethodFilter.notifyCursorRect(editorState.visualData->caretRectAtStart);
+        webkitWebViewBase->priv->inputMethodFilter.notifySurrounding(editorState.postLayoutData->surroundingContext, editorState.postLayoutData->surroundingContextCursorPosition,
+            editorState.postLayoutData->surroundingContextSelectionPosition);
+    }
+}
+
+void webkitWebViewBaseSetContentsSize(WebKitWebViewBase* webkitWebViewBase, const IntSize& contentsSize)
+{
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    if (priv->contentsSize == contentsSize)
+        return;
+    priv->contentsSize = contentsSize;
+}
+
+void webkitWebViewBaseResetClickCounter(WebKitWebViewBase* webkitWebViewBase)
+{
+#if !USE(GTK4)
+    webkitWebViewBase->priv->clickCounter.reset();
+#endif
+}
+
+void webkitWebViewBaseEnterAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext)
+{
+    ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
+    webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
+}
+
+void webkitWebViewBaseUpdateAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase, const LayerTreeContext& layerTreeContext)
+{
+    ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
+    webkitWebViewBase->priv->acceleratedBackingStore->update(layerTreeContext);
+}
+
+void webkitWebViewBaseExitAcceleratedCompositingMode(WebKitWebViewBase* webkitWebViewBase)
+{
+    ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
+    webkitWebViewBase->priv->acceleratedBackingStore->update(LayerTreeContext());
+}
+
+bool webkitWebViewBaseMakeGLContextCurrent(WebKitWebViewBase* webkitWebViewBase)
+{
+    ASSERT(webkitWebViewBase->priv->acceleratedBackingStore);
+    return webkitWebViewBase->priv->acceleratedBackingStore->makeContextCurrent();
+}
+
+void webkitWebViewBaseWillSwapWebProcess(WebKitWebViewBase* webkitWebViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    if (priv->viewGestureController)
+        priv->viewGestureController->disconnectFromProcess();
+}
+
+void webkitWebViewBaseDidExitWebProcess(WebKitWebViewBase* webkitWebViewBase)
+{
+    webkitWebViewBase->priv->viewGestureController = nullptr;
+}
+
+void webkitWebViewBaseDidRelaunchWebProcess(WebKitWebViewBase* webkitWebViewBase)
+{
+    // Queue a resize to ensure the new DrawingAreaProxy is resized.
+    gtk_widget_queue_resize_no_redraw(GTK_WIDGET(webkitWebViewBase));
+
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    if (priv->acceleratedBackingStore) {
+        auto* drawingArea = static_cast<DrawingAreaProxyCoordinatedGraphics*>(priv->pageProxy->drawingArea());
+        priv->acceleratedBackingStore->update(drawingArea->layerTreeContext());
+    }
+    if (priv->viewGestureController)
+        priv->viewGestureController->connectToProcess();
+    else {
+        priv->viewGestureController = makeUnique<WebKit::ViewGestureController>(*priv->pageProxy);
+        priv->viewGestureController->setSwipeGestureEnabled(priv->isBackForwardNavigationGestureEnabled);
+    }
+}
+
+void webkitWebViewBasePageClosed(WebKitWebViewBase* webkitWebViewBase)
+{
+    if (webkitWebViewBase->priv->acceleratedBackingStore)
+        webkitWebViewBase->priv->acceleratedBackingStore->update({ });
+}
+
+RefPtr<WebKit::ViewSnapshot> webkitWebViewBaseTakeViewSnapshot(WebKitWebViewBase* webkitWebViewBase, std::optional<IntRect>&& clipRect)
+{
+    WebPageProxy* page = webkitWebViewBase->priv->pageProxy.get();
+
+    IntSize size = clipRect ? clipRect->size() : page->viewSize();
+    float deviceScale = page->deviceScaleFactor();
+    size.scale(deviceScale);
+
+#if !USE(GTK4)
+    RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_RGB24, size.width(), size.height()));
+    cairo_surface_set_device_scale(surface.get(), deviceScale, deviceScale);
+
+    RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get()));
+    if (clipRect) {
+        cairo_translate(cr.get(), -clipRect->x(), -clipRect->y());
+        cairo_rectangle(cr.get(), clipRect->x(), clipRect->y(), clipRect->width(), clipRect->height());
+        cairo_clip(cr.get());
+    }
+    webkitWebViewBaseDraw(GTK_WIDGET(webkitWebViewBase), cr.get());
+
+    return ViewSnapshot::create(WTFMove(surface));
+#else
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    auto* renderer = gtk_native_get_renderer(GTK_NATIVE(priv->toplevelOnScreenWindow));
+
+    GRefPtr<GtkSnapshot> snapshot = adoptGRef(gtk_snapshot_new());
+
+    if (clipRect) {
+        graphene_point_t point = { -static_cast<float>(clipRect->x()), -static_cast<float>(clipRect->y()) };
+        graphene_rect_t rect = {
+            { static_cast<float>(clipRect->x()), static_cast<float>(clipRect->y()) },
+            { static_cast<float>(clipRect->width()), static_cast<float>(clipRect->height()) }
+        };
+
+        gtk_snapshot_translate(snapshot.get(), &point);
+        gtk_snapshot_push_clip(snapshot.get(), &rect);
+    }
+
+    gtk_snapshot_scale(snapshot.get(), deviceScale, deviceScale);
+    webkitWebViewBaseSnapshot(GTK_WIDGET(webkitWebViewBase), snapshot.get());
+
+    if (clipRect)
+        gtk_snapshot_pop(snapshot.get());
+
+    GRefPtr<GskRenderNode> renderNode = adoptGRef(gtk_snapshot_to_node(snapshot.get()));
+    if (!renderNode)
+        return nullptr;
+
+    graphene_rect_t viewport = { { 0, 0 }, { static_cast<float>(size.width()), static_cast<float>(size.height()) } };
+    GdkTexture* texture = gsk_renderer_render_texture(renderer, renderNode.get(), &viewport);
+
+    return ViewSnapshot::create(WTFMove(texture));
+#endif
+}
+
+void webkitWebViewBaseDidStartProvisionalLoadForMainFrame(WebKitWebViewBase* webkitWebViewBase)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        controller->didStartProvisionalLoadForMainFrame();
+}
+
+void webkitWebViewBaseDidFirstVisuallyNonEmptyLayoutForMainFrame(WebKitWebViewBase* webkitWebViewBase)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        controller->didFirstVisuallyNonEmptyLayoutForMainFrame();
+}
+
+void webkitWebViewBaseDidFinishNavigation(WebKitWebViewBase* webkitWebViewBase, API::Navigation* navigation)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        controller->didFinishNavigation(navigation);
+}
+
+void webkitWebViewBaseDidFailNavigation(WebKitWebViewBase* webkitWebViewBase, API::Navigation* navigation)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        controller->didFailNavigation(navigation);
+}
+
+void webkitWebViewBaseDidSameDocumentNavigationForMainFrame(WebKitWebViewBase* webkitWebViewBase, SameDocumentNavigationType type)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        controller->didSameDocumentNavigationForMainFrame(type);
+}
+
+void webkitWebViewBaseDidRestoreScrollPosition(WebKitWebViewBase* webkitWebViewBase)
+{
+    ViewGestureController* controller = webkitWebViewBaseViewGestureController(webkitWebViewBase);
+    if (controller && controller->isSwipeGestureEnabled())
+        webkitWebViewBase->priv->viewGestureController->didRestoreScrollPosition();
+}
+
+#if GTK_CHECK_VERSION(3, 24, 0)
+static void emojiChooserEmojiPicked(WebKitWebViewBase* webkitWebViewBase, const char* text)
+{
+    webkitWebViewBaseCompleteEmojiChooserRequest(webkitWebViewBase, String::fromUTF8(text));
+}
+
+static void emojiChooserClosed(WebKitWebViewBase* webkitWebViewBase)
+{
+    // The emoji chooser first closes the popover and then emits emoji-picked signal, so complete
+    // the request if the emoji isn't picked before the next run loop iteration.
+    RunLoop::main().dispatch([webViewBase = GRefPtr<WebKitWebViewBase>(webkitWebViewBase)] {
+        webkitWebViewBaseCompleteEmojiChooserRequest(webViewBase.get(), emptyString());
+    });
+    webkitWebViewBase->priv->releaseEmojiChooserTimer.startOneShot(2_min);
+}
+#endif
+
+void webkitWebViewBaseShowEmojiChooser(WebKitWebViewBase* webkitWebViewBase, const IntRect& caretRect, CompletionHandler<void(String)>&& completionHandler)
+{
+#if GTK_CHECK_VERSION(3, 24, 0)
+    WebKitWebViewBasePrivate* priv = webkitWebViewBase->priv;
+    priv->releaseEmojiChooserTimer.stop();
+
+    if (!priv->emojiChooser) {
+#if USE(GTK4)
+        priv->emojiChooser = gtk_emoji_chooser_new();
+        gtk_widget_set_parent(priv->emojiChooser, GTK_WIDGET(webkitWebViewBase));
+#else
+        priv->emojiChooser = webkitEmojiChooserNew();
+        gtk_popover_set_relative_to(GTK_POPOVER(priv->emojiChooser), GTK_WIDGET(webkitWebViewBase));
+#endif
+        g_signal_connect_swapped(priv->emojiChooser, "emoji-picked", G_CALLBACK(emojiChooserEmojiPicked), webkitWebViewBase);
+        g_signal_connect_swapped(priv->emojiChooser, "closed", G_CALLBACK(emojiChooserClosed), webkitWebViewBase);
+    }
+
+    priv->emojiChooserCompletionHandler = WTFMove(completionHandler);
+
+    GdkRectangle gdkCaretRect = caretRect;
+    gtk_popover_set_pointing_to(GTK_POPOVER(priv->emojiChooser), &gdkCaretRect);
+    gtk_popover_popup(GTK_POPOVER(priv->emojiChooser));
+#else
+    UNUSED_PARAM(webkitWebViewBase);
+    UNUSED_PARAM(caretRect);
+    completionHandler(emptyString());
+#endif
+}
+
+#if USE(WPE_RENDERER)
+int webkitWebViewBaseRenderHostFileDescriptor(WebKitWebViewBase* webkitWebViewBase)
+{
+    if (!webkitWebViewBase->priv->acceleratedBackingStore)
+        return -1;
+    return webkitWebViewBase->priv->acceleratedBackingStore->renderHostFileDescriptor();
+}
+#endif
+
+void webkitWebViewBaseRequestPointerLock(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    ASSERT(!priv->pointerLockManager);
+    if (!priv->lastMotionEvent)
+        priv->lastMotionEvent = MotionEvent(GTK_WIDGET(webViewBase), nullptr);
+    priv->pointerLockManager = PointerLockManager::create(*priv->pageProxy, priv->lastMotionEvent->position, priv->lastMotionEvent->globalPosition,
+        priv->lastMotionEvent->button, priv->lastMotionEvent->buttons, priv->lastMotionEvent->modifiers);
+    if (priv->pointerLockManager->lock()) {
+        priv->pageProxy->didAllowPointerLock();
+        return;
+    }
+
+    priv->pointerLockManager = nullptr;
+    priv->pageProxy->didDenyPointerLock();
+}
+
+void webkitWebViewBaseDidLosePointerLock(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (!priv->pointerLockManager)
+        return;
+
+    priv->pointerLockManager->unlock();
+    priv->pointerLockManager = nullptr;
+}
+
+void webkitWebViewBaseSetInputMethodContext(WebKitWebViewBase* webViewBase, WebKitInputMethodContext* context)
+{
+    webViewBase->priv->inputMethodFilter.setContext(context);
+}
+
+WebKitInputMethodContext* webkitWebViewBaseGetInputMethodContext(WebKitWebViewBase* webViewBase)
+{
+    return webViewBase->priv->inputMethodFilter.context();
+}
+
+void webkitWebViewBaseSynthesizeCompositionKeyPress(WebKitWebViewBase* webViewBase, const String& text, std::optional<Vector<CompositionUnderline>>&& underlines, std::optional<EditingRange>&& selectionRange)
+{
+    webViewBase->priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(text, WTFMove(underlines), WTFMove(selectionRange)));
+}
+
+static inline OptionSet<WebEventModifier> toWebKitModifiers(unsigned modifiers)
+{
+    OptionSet<WebEventModifier> webEventModifiers;
+    if (modifiers & GDK_CONTROL_MASK)
+        webEventModifiers.add(WebEventModifier::ControlKey);
+    if (modifiers & GDK_SHIFT_MASK)
+        webEventModifiers.add(WebEventModifier::ShiftKey);
+    if (modifiers & GDK_MOD1_MASK)
+        webEventModifiers.add(WebEventModifier::AltKey);
+    if (modifiers & GDK_META_MASK)
+        webEventModifiers.add(WebEventModifier::MetaKey);
+    if (PlatformKeyboardEvent::modifiersContainCapsLock(modifiers))
+        webEventModifiers.add(WebEventModifier::CapsLockKey);
+    return webEventModifiers;
+}
+
+static inline PointerID primaryPointerForType(const String& pointerType)
+{
+    if (pointerType == mousePointerEventType())
+        return mousePointerID;
+
+    if (pointerType == penPointerEventType())
+        return 2;
+
+    return mousePointerID;
+}
+
+void webkitWebViewBaseSynthesizeMouseEvent(WebKitWebViewBase* webViewBase, MouseEventType type, unsigned button, unsigned short buttons, int x, int y, unsigned modifiers, int clickCount, const String& pointerType, PlatformMouseEvent::IsTouch isTouchEvent)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+    if (priv->pointerLockManager) {
+        priv->pointerLockManager->didReceiveMotionEvent(FloatPoint(x, y));
+        return;
+    }
+
+    WebMouseEventButton webEventButton = WebMouseEventButton::NoButton;
+    switch (button) {
+    case 0:
+        webEventButton = WebMouseEventButton::NoButton;
+        break;
+    case 1:
+        webEventButton = WebMouseEventButton::LeftButton;
+        break;
+    case 2:
+        webEventButton = WebMouseEventButton::MiddleButton;
+        break;
+    case 3:
+        webEventButton = WebMouseEventButton::RightButton;
+        break;
+    }
+
+    unsigned short webEventButtons = 0;
+    if (buttons & GDK_BUTTON1_MASK)
+        webEventButtons |= 1;
+    if (buttons & GDK_BUTTON2_MASK)
+        webEventButtons |= 4;
+    if (buttons & GDK_BUTTON3_MASK)
+        webEventButtons |= 2;
+
+    std::optional<FloatSize> movementDelta;
+    WebEventType webEventType;
+    switch (type) {
+    case MouseEventType::Press:
+        webEventType = WebEventType::MouseDown;
+        priv->inputMethodFilter.cancelComposition();
+#if !USE(GTK4)
+        if (webEventButton == WebMouseEventButton::RightButton) {
+            GUniquePtr<GdkEvent> event(gdk_event_new(GDK_BUTTON_PRESS));
+            event->button.window = gtk_widget_get_window(GTK_WIDGET(webViewBase));
+            g_object_ref(event->button.window);
+            event->button.time = GDK_CURRENT_TIME;
+            event->button.x = x;
+            event->button.y = y;
+            event->button.axes = 0;
+            event->button.state = modifiers;
+            event->button.button = button;
+            event->button.device = gdk_seat_get_pointer(gdk_display_get_default_seat(gtk_widget_get_display(GTK_WIDGET(webViewBase))));
+            int xRoot, yRoot;
+            gdk_window_get_root_coords(event->button.window, x, y, &xRoot, &yRoot);
+            event->button.x_root = xRoot;
+            event->button.y_root = yRoot;
+            priv->contextMenuEvent = WTFMove(event);
+        }
+#endif
+        if (!gtk_widget_has_focus(GTK_WIDGET(webViewBase)) && gtk_widget_is_focus(GTK_WIDGET(webViewBase)))
+            gtk_widget_grab_focus(GTK_WIDGET(webViewBase));
+        break;
+    case MouseEventType::Release:
+        webEventType = WebEventType::MouseUp;
+        if (!gtk_widget_has_focus(GTK_WIDGET(webViewBase)) && gtk_widget_is_focus(GTK_WIDGET(webViewBase)))
+            gtk_widget_grab_focus(GTK_WIDGET(webViewBase));
+        break;
+    case MouseEventType::Motion:
+        webEventType = WebEventType::MouseMove;
+        if (buttons & GDK_BUTTON1_MASK)
+            webEventButton = WebMouseEventButton::LeftButton;
+        else if (buttons & GDK_BUTTON2_MASK)
+            webEventButton = WebMouseEventButton::MiddleButton;
+        else if (buttons & GDK_BUTTON3_MASK)
+            webEventButton = WebMouseEventButton::RightButton;
+
+        if (priv->lastMotionEvent)
+            movementDelta = FloatPoint(x, y) - priv->lastMotionEvent->globalPosition;
+        priv->lastMotionEvent = MotionEvent(FloatPoint(x, y), widgetRootCoords(GTK_WIDGET(webViewBase), x, y), webEventButton, webEventButtons, toWebKitModifiers(modifiers));
+        break;
+    }
+
+    priv->pageProxy->handleMouseEvent(NativeWebMouseEvent(webEventType, webEventButton, webEventButtons, { x, y },
+        widgetRootCoords(GTK_WIDGET(webViewBase), x, y), clickCount, toWebKitModifiers(modifiers), movementDelta,
+        primaryPointerForType(pointerType), pointerType.isNull() ? mousePointerEventType() : pointerType, isTouchEvent));
+}
+
+void webkitWebViewBaseSynthesizeKeyEvent(WebKitWebViewBase* webViewBase, KeyEventType type, unsigned keyval, unsigned modifiers, ShouldTranslateKeyboardState shouldTranslate)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+    auto keycode = widgetKeyvalToKeycode(GTK_WIDGET(webViewBase), keyval);
+    bool isAutoRepeat = type == KeyEventType::Press && priv->keyAutoRepeatHandler.keyPress(keycode);
+
+    if (type != KeyEventType::Release) {
+        if (auto* popupMenu = priv->pageProxy->activePopupMenu()) {
+            auto* gtkPopupMenu = static_cast<WebPopupMenuProxyGtk*>(popupMenu);
+            if (gtkPopupMenu->handleKeyPress(keyval, GDK_CURRENT_TIME))
+                return;
+
+            if (keyval == GDK_KEY_Return) {
+                gtkPopupMenu->activateSelectedItem();
+                return;
+            }
+        }
+
+#if ENABLE(FULLSCREEN_API)
+        if (priv->fullScreenModeActive) {
+            switch (keyval) {
+            case GDK_KEY_Escape:
+            case GDK_KEY_f:
+            case GDK_KEY_F:
+                priv->pageProxy->fullScreenManager()->requestExitFullScreen();
+                return;
+            default:
+                break;
+            }
+        }
+#endif
+
+#if !USE(GTK4)
+        if (priv->activeContextMenuProxy && keyval == GDK_KEY_Escape) {
+            gtk_menu_shell_deactivate(GTK_MENU_SHELL(priv->activeContextMenuProxy->gtkWidget()));
+            return;
+        }
+
+        if (keyval == GDK_KEY_Menu) {
+            GUniquePtr<GdkEvent> event(gdk_event_new(GDK_KEY_PRESS));
+            event->key.window = gtk_widget_get_window(GTK_WIDGET(webViewBase));
+            g_object_ref(event->key.window);
+            event->key.time = GDK_CURRENT_TIME;
+            event->key.keyval = keyval;
+            event->key.state = modifiers;
+            gdk_event_set_device(event.get(), gdk_seat_get_keyboard(gdk_display_get_default_seat(gtk_widget_get_display(GTK_WIDGET(webViewBase)))));
+            priv->contextMenuEvent = WTFMove(event);
+            priv->pageProxy->handleContextMenuKeyEvent();
+            return;
+        }
+#endif
+    }
+
+    if (modifiers && shouldTranslate == ShouldTranslateKeyboardState::Yes) {
+        auto* display = gtk_widget_get_display(GTK_WIDGET(webViewBase));
+#if USE(GTK4)
+        gdk_display_translate_key(display, keycode, static_cast<GdkModifierType>(modifiers), 0, &keyval, nullptr, nullptr, nullptr);
+#else
+        gdk_keymap_translate_keyboard_state(gdk_keymap_get_for_display(display), keycode, static_cast<GdkModifierType>(modifiers), 0, &keyval, nullptr, nullptr, nullptr);
+#endif
+    }
+    auto webEventModifiers = toWebKitModifiers(modifiers);
+
+    if (type != KeyEventType::Release) {
+        // Modifier masks are set different in X than other platforms. This code makes WebKitGTK
+        // to behave similar to other platforms and other browsers under X (see http://crbug.com/127142#c8).
+        switch (keyval) {
+        case GDK_KEY_Control_L:
+        case GDK_KEY_Control_R:
+            webEventModifiers.add(WebEventModifier::ControlKey);
+            break;
+        case GDK_KEY_Shift_L:
+        case GDK_KEY_Shift_R:
+            webEventModifiers.add(WebEventModifier::ShiftKey);
+            break;
+        case GDK_KEY_Alt_L:
+        case GDK_KEY_Alt_R:
+            webEventModifiers.add(WebEventModifier::AltKey);
+            break;
+        case GDK_KEY_Meta_L:
+        case GDK_KEY_Meta_R:
+            webEventModifiers.add(WebEventModifier::MetaKey);
+            break;
+        case GDK_KEY_Caps_Lock:
+            webEventModifiers.add(WebEventModifier::CapsLockKey);
+            break;
+        }
+
+        auto filterResult = priv->inputMethodFilter.filterKeyEvent(GDK_KEY_PRESS, keyval, keycode, modifiers);
+        if (!filterResult.handled) {
+            priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(
+                WebEventType::KeyDown,
+                filterResult.keyText.isNull() ? PlatformKeyboardEvent::singleCharacterString(keyval) : filterResult.keyText,
+                PlatformKeyboardEvent::keyValueForGdkKeyCode(keyval),
+                PlatformKeyboardEvent::keyCodeForHardwareKeyCode(keycode),
+                PlatformKeyboardEvent::keyIdentifierForGdkKeyCode(keyval),
+                PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(keyval),
+                static_cast<int>(keyval),
+                priv->keyBindingTranslator.commandsForKeyval(keyval, modifiers),
+                isAutoRepeat,
+                keyval >= GDK_KEY_KP_Space && keyval <= GDK_KEY_KP_9,
+                webEventModifiers));
+        }
+    }
+
+    if (type != KeyEventType::Press) {
+        if (!priv->inputMethodFilter.filterKeyEvent(GDK_KEY_RELEASE, keyval, keycode, modifiers).handled) {
+            priv->pageProxy->handleKeyboardEvent(NativeWebKeyboardEvent(
+                WebEventType::KeyUp,
+                PlatformKeyboardEvent::singleCharacterString(keyval),
+                PlatformKeyboardEvent::keyValueForGdkKeyCode(keyval),
+                PlatformKeyboardEvent::keyCodeForHardwareKeyCode(keycode),
+                PlatformKeyboardEvent::keyIdentifierForGdkKeyCode(keyval),
+                PlatformKeyboardEvent::windowsKeyCodeForGdkKeyCode(keyval),
+                static_cast<int>(keyval),
+                { },
+                false,
+                keyval >= GDK_KEY_KP_Space && keyval <= GDK_KEY_KP_9,
+                webEventModifiers));
+        }
+    }
+
+    if (type == KeyEventType::Release)
+        priv->keyAutoRepeatHandler.keyRelease();
+}
+
+static inline WebWheelEvent::Phase toWebKitWheelEventPhase(WheelEventPhase phase)
+{
+    switch (phase) {
+    case WheelEventPhase::NoPhase:
+        return WebWheelEvent::Phase::PhaseNone;
+    case WheelEventPhase::Began:
+        return WebWheelEvent::Phase::PhaseBegan;
+    case WheelEventPhase::Changed:
+        return WebWheelEvent::Phase::PhaseChanged;
+    case WheelEventPhase::Ended:
+        return WebWheelEvent::Phase::PhaseEnded;
+    case WheelEventPhase::Cancelled:
+        return WebWheelEvent::Phase::PhaseCancelled;
+    case WheelEventPhase::MayBegin:
+        return WebWheelEvent::Phase::PhaseMayBegin;
+    }
+
+    RELEASE_ASSERT_NOT_REACHED();
+}
+
+void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase* webViewBase, double deltaX, double deltaY, int x, int y, WheelEventPhase phase, WheelEventPhase momentumPhase, bool hasPreciseDeltas)
+{
+    webkitWebViewBaseSynthesizeWheelEvent(webViewBase, nullptr, deltaX, deltaY, x, y, phase, momentumPhase, hasPreciseDeltas);
+}
+
+void webkitWebViewBaseSynthesizeWheelEvent(WebKitWebViewBase* webViewBase, const GdkEvent* event, double deltaX, double deltaY, int x, int y, WheelEventPhase phase, WheelEventPhase momentumPhase, bool hasPreciseDeltas)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->dialog)
+        return;
+
+    FloatSize wheelTicks(deltaX, deltaY);
+    FloatSize delta(wheelTicks);
+    if (!hasPreciseDeltas)
+        delta.scale(static_cast<float>(Scrollbar::pixelsPerLineStep()));
+
+    priv->pageProxy->handleWheelEvent(NativeWebWheelEvent(const_cast<GdkEvent*>(event), { x, y }, widgetRootCoords(GTK_WIDGET(webViewBase), x, y),
+        delta, wheelTicks, toWebKitWheelEventPhase(phase), toWebKitWheelEventPhase(momentumPhase), true));
+}
+
+void webkitWebViewBaseMakeBlank(WebKitWebViewBase* webViewBase, bool makeBlank)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    if (priv->isBlank == makeBlank)
+        return;
+
+    priv->isBlank = makeBlank;
+    gtk_widget_queue_draw(GTK_WIDGET(webViewBase));
+}
+
+void webkitWebViewBasePageGrabbedTouch(WebKitWebViewBase* webViewBase)
+{
+    WebKitWebViewBasePrivate* priv = webViewBase->priv;
+    priv->pageGrabbedTouch = true;
+    gtk_gesture_set_state(priv->touchGestureGroup, GTK_EVENT_SEQUENCE_DENIED);
+}
+
+void webkitWebViewBaseSetShouldNotifyFocusEvents(WebKitWebViewBase* webViewBase, bool shouldNotifyFocusEvents)
+{
+    webViewBase->priv->shouldNotifyFocusEvents = shouldNotifyFocusEvents;
+}
Index: webkitgtk/patches/README
===================================================================
--- webkitgtk/patches/README	(nonexistent)
+++ webkitgtk/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: webkitgtk/patches
===================================================================
--- webkitgtk/patches	(nonexistent)
+++ webkitgtk/patches	(revision 385)

Property changes on: webkitgtk/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: webkitgtk
===================================================================
--- webkitgtk	(nonexistent)
+++ webkitgtk	(revision 385)

Property changes on: webkitgtk
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: wpebackend-fdo/Makefile
===================================================================
--- wpebackend-fdo/Makefile	(nonexistent)
+++ wpebackend-fdo/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/wpebackend-fdo
+
+versions    = 1.14.2
+pkgname     = wpebackend-fdo
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: wpebackend-fdo
===================================================================
--- wpebackend-fdo	(nonexistent)
+++ wpebackend-fdo	(revision 385)

Property changes on: wpebackend-fdo
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xdg-dbus-proxy/Makefile
===================================================================
--- xdg-dbus-proxy/Makefile	(nonexistent)
+++ xdg-dbus-proxy/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xdg-dbus-proxy
+
+versions    = 0.1.4
+pkgname     = xdg-dbus-proxy
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: xdg-dbus-proxy
===================================================================
--- xdg-dbus-proxy	(nonexistent)
+++ xdg-dbus-proxy	(revision 385)

Property changes on: xdg-dbus-proxy
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xdg-desktop-portal/Makefile
===================================================================
--- xdg-desktop-portal/Makefile	(nonexistent)
+++ xdg-desktop-portal/Makefile	(revision 385)
@@ -0,0 +1,56 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xdg-desktop-portal
+
+versions    = 1.18.2
+pkgname     = xdg-desktop-portal
+suffix      = tar.xz
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+patches     = $(CURDIR)/patches/xdg-desktop-portal-1.18.2-bwrap-cross.patch
+
+.NOTPARALLEL: $(patches)
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s) $(patches)
+
+
+include ../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+$(patches): $(sha1s)
+	@echo -e "\n======= Create Patches =======\n" ; \
+	 ( cd create-1.18.2-bwrap-cross-patch ; ./create.patch.sh ) ; \
+	 echo -e "\n"
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s) $(patches)
Index: xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/create.patch.sh
===================================================================
--- xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/create.patch.sh	(nonexistent)
+++ xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/create.patch.sh	(revision 385)
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+VERSION=1.18.2
+
+tar --files-from=file.list -xJvf ../xdg-desktop-portal-$VERSION.tar.xz
+mv xdg-desktop-portal-$VERSION xdg-desktop-portal-$VERSION-orig
+
+cp -rf ./xdg-desktop-portal-$VERSION-new ./xdg-desktop-portal-$VERSION
+
+diff --unified -Nr  xdg-desktop-portal-$VERSION-orig  xdg-desktop-portal-$VERSION > xdg-desktop-portal-$VERSION-bwrap-cross.patch
+
+mv xdg-desktop-portal-$VERSION-bwrap-cross.patch ../patches
+
+rm -rf ./xdg-desktop-portal-$VERSION
+rm -rf ./xdg-desktop-portal-$VERSION-orig

Property changes on: xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/create.patch.sh
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/file.list
===================================================================
--- xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/file.list	(nonexistent)
+++ xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/file.list	(revision 385)
@@ -0,0 +1 @@
+xdg-desktop-portal-1.18.2/meson.build
Index: xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/xdg-desktop-portal-1.18.2-new/meson.build
===================================================================
--- xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/xdg-desktop-portal-1.18.2-new/meson.build	(nonexistent)
+++ xdg-desktop-portal/create-1.18.2-bwrap-cross-patch/xdg-desktop-portal-1.18.2-new/meson.build	(revision 385)
@@ -0,0 +1,208 @@
+project(
+  'xdg-desktop-portal',
+  'c',
+  version: '1.18.2',
+  meson_version: '>= 0.58',
+  license: 'LGPL-2.0-or-later',
+  default_options: ['warning_level=2'])
+
+###### various directories we'll use later
+# foodir are built-in ones, foo_dir are our options
+
+prefix = get_option('prefix')
+datadir = prefix / get_option('datadir')
+libexecdir = prefix / get_option('libexecdir')
+sysconfdir = prefix / get_option('sysconfdir')
+localedir = prefix / get_option('localedir')
+dbus_service_dir = get_option('dbus-service-dir')
+if dbus_service_dir == ''
+    dbus_service_dir = prefix /  datadir / 'dbus-1' / 'services'
+endif
+
+flatpak_intf_dir = get_option('flatpak-interfaces-dir')
+if flatpak_intf_dir == ''
+    flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required: get_option('flatpak-interfaces'))
+    if flatpak_dep.found()
+      flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
+    endif
+endif
+
+systemd_userunit_dir = get_option('systemd-user-unit-dir')
+if systemd_userunit_dir == ''
+    # This is deliberately not ${libdir}: systemd units always go in
+    # .../lib, never .../lib64 or .../lib/x86_64-linux-gnu
+    systemd_userunit_dir = prefix / 'lib' / 'systemd' / 'user'
+endif
+
+dataroot_dir = get_option('datarootdir')
+if dataroot_dir == ''
+    dataroot_dir = datadir
+endif
+
+installed_tests_dir = prefix / libexecdir / 'installed-tests' / meson.project_name()
+installed_tests_data_dir = prefix / datadir / 'installed-tests' / meson.project_name()
+docs_dir = datadir / 'doc' / meson.project_name()
+
+summary({
+	'DBus service dir': dbus_service_dir,
+	'Flatpak interfaces dir': flatpak_intf_dir,
+	'systemd user unit dir': systemd_userunit_dir,
+	'Installed tests dir': installed_tests_dir,
+	},
+	section: 'Directories',
+)
+
+###### various include directories we'll use later
+# These are set here so meson handles the relative paths correctly,
+# makes life easier for us
+
+common_includes = include_directories('.')  # config.h
+src_includes = include_directories('src')
+
+###### plugins, dependencies, compiler setup
+
+i18n = import('i18n')
+gnome = import('gnome')
+pkgconfig = import('pkgconfig')
+
+cc = meson.get_compiler('c')
+cflags = [
+    '-Wno-unused-parameter',
+    '-Wno-sign-compare',
+    '-Wno-missing-field-initializers',
+]
+add_project_arguments(cc.get_supported_arguments(cflags), language : 'c')
+
+config_h = configuration_data()
+config_h.set('_GNU_SOURCE', 1)
+config_h.set_quoted('G_LOG_DOMAIN', 'xdg-desktop-portal')
+config_h.set_quoted('DATADIR', datadir)
+config_h.set_quoted('LIBEXECDIR', libexecdir)
+config_h.set_quoted('LOCALEDIR', localedir)
+config_h.set_quoted('SYSCONFDIR', sysconfdir)
+config_h.set_quoted('GETTEXT_PACKAGE', 'xdg-desktop-portal')
+config_h.set_quoted('PACKAGE_STRING', 'xdg-desktop-portal @0@'.format(meson.project_version()))
+if cc.has_function('renameat2')
+  config_h.set('HAVE_RENAMEAT2', 1)
+endif
+
+check_headers = [
+  ['sys/vfs.h', 'HAVE_SYS_VFS_H'],
+  ['sys/mount.h', 'HAVE_SYS_MOUNT_H'],
+  ['sys/statfs.h', 'HAVE_SYS_STATFS_H'],
+  ['sys/xattr.h', 'HAVE_SYS_XATTR_H'],
+  ['sys/extattr.h', 'HAVE_SYS_EXTATTR_H'],
+]
+
+foreach h : check_headers
+  config_h.set(h.get(1), cc.has_header(h.get(0)))
+endforeach
+
+glib_dep = dependency('glib-2.0', version: '>= 2.66')
+gio_dep = dependency('gio-2.0')
+gio_unix_dep = dependency('gio-unix-2.0')
+json_glib_dep = dependency('json-glib-1.0')
+fuse3_dep = dependency('fuse3', version: '>= 3.10.0')
+gdk_pixbuf_dep = dependency('gdk-pixbuf-2.0')
+geoclue_dep = dependency('libgeoclue-2.0',
+                         version: '>= 2.5.2',
+                         required: get_option('geoclue'))
+libportal_dep = dependency('libportal',
+                           required: get_option('libportal'))
+pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.2.90')
+libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
+
+
+use_bwrap = get_option('sandboxed-image-validation')
+bwrap = find_program('bwrap', required: false)
+
+if not use_bwrap
+  warning('''
+    Sandboxed image validation with Bubblewrap is DISABLED.
+    If your system can run Bubblewrap, it's **hightly** recommended that you enable this
+    option. Bitmap validation and processing is a common attack vector.
+    By proceeding with sandboxed image validation disabled, you acknowledge that you
+    are lowering your system's security, and are subject to known or unknown exploits.
+    ''')
+endif
+
+have_libportal = libportal_dep.found()
+if have_libportal
+  config_h.set('HAVE_LIBPORTAL', 1)
+endif
+
+have_geoclue = geoclue_dep.found()
+if have_geoclue
+  config_h.set('HAVE_GEOCLUE', 1)
+endif
+
+have_libsystemd = libsystemd_dep.found()
+if have_libsystemd
+  config_h.set('HAVE_LIBSYSTEMD', 1)
+endif
+
+add_project_arguments(['-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_66'], language: 'c')
+
+build_docbook = false
+xmlto = find_program('xmlto', required: get_option('docbook-docs'))
+if xmlto.found()
+    fs = import('fs')
+    # we're going to copy this file in to our build tree
+    if fs.is_file(flatpak_intf_dir / 'org.freedesktop.portal.Flatpak.xml')
+        build_docbook = true
+    elif get_option('docbook-docs').enabled()
+        error('Flatpak development files are required to build DocBook docs')
+    endif
+endif
+
+rst2man = find_program('rst2man', 'rst2man.py', required: get_option('man-pages'))
+
+enable_installed_tests = get_option('installed-tests')
+
+###### systemd units, dbus service files, pkgconfig
+
+base_config = configuration_data()
+base_config.set('prefix', prefix)
+base_config.set('datadir', datadir)
+base_config.set('datarootdir', dataroot_dir)
+base_config.set('libexecdir', libexecdir)
+base_config.set('VERSION', meson.project_version())
+base_config.set('extraargs', '')
+
+pkgconfig = import('pkgconfig')
+pkgconfig.generate(
+  name: 'xdg-desktop-portal',
+  description: 'Desktop integration portal',
+  dataonly: true,
+  variables: {
+    'prefix': get_option('prefix'),
+    'datarootdir': dataroot_dir,
+    'datadir': '${prefix}/@0@'.format(get_option('datadir')),
+    'interfaces_dir': '${datadir}/dbus-1/interfaces/',
+  },
+)
+
+subdir('data')
+subdir('src')
+subdir('document-portal')
+subdir('tests')
+subdir('po')
+subdir('doc')
+
+###### generate config.h
+configure_file(output: 'config.h', configuration: config_h)
+
+summary({
+    'Enable docbook documentation': build_docbook,
+    'Enable libsystemd support': have_libsystemd,
+    'Enable geoclue support': have_geoclue,
+    'Enable libportal support': have_libportal,
+    'Enable installed tests:': enable_installed_tests,
+    'Enable python test suite': enable_pytest,
+    'Build man pages': rst2man.found(),
+    'Build flatpak interfaces': flatpak_intf_dir != '',
+    'Sandboxed image validation': use_bwrap,
+  },
+  section: 'Optional builds',
+  bool_yn: true,
+)
Index: xdg-desktop-portal/patches/README
===================================================================
--- xdg-desktop-portal/patches/README	(nonexistent)
+++ xdg-desktop-portal/patches/README	(revision 385)
@@ -0,0 +1,6 @@
+
+/* begin *
+
+   TODO: Leave some comment here.
+
+ * end */
Index: xdg-desktop-portal/patches
===================================================================
--- xdg-desktop-portal/patches	(nonexistent)
+++ xdg-desktop-portal/patches	(revision 385)

Property changes on: xdg-desktop-portal/patches
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xdg-desktop-portal
===================================================================
--- xdg-desktop-portal	(nonexistent)
+++ xdg-desktop-portal	(revision 385)

Property changes on: xdg-desktop-portal
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xfce/Makefile
===================================================================
--- xfce/Makefile	(nonexistent)
+++ xfce/Makefile	(revision 385)
@@ -0,0 +1,13 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+SOURCE_REQUIRES += ALL_DIRS
+
+
+include ../../../../build-system/core.mk
+
+
+download_clean:
+	@true
+
+.PHONY: download_clean
Index: xfce/Xfconf/Makefile
===================================================================
--- xfce/Xfconf/Makefile	(nonexistent)
+++ xfce/Xfconf/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xfce/Xfconf
+
+versions    = 4.18.3
+pkgname     = xfconf
+suffix      = tar.bz2
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: xfce/Xfconf
===================================================================
--- xfce/Xfconf	(nonexistent)
+++ xfce/Xfconf	(revision 385)

Property changes on: xfce/Xfconf
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xfce/exo/Makefile
===================================================================
--- xfce/exo/Makefile	(nonexistent)
+++ xfce/exo/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xfce/exo
+
+versions    = 4.18.0
+pkgname     = exo
+suffix      = tar.bz2
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: xfce/exo
===================================================================
--- xfce/exo	(nonexistent)
+++ xfce/exo	(revision 385)

Property changes on: xfce/exo
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xfce/libxfce4ui/Makefile
===================================================================
--- xfce/libxfce4ui/Makefile	(nonexistent)
+++ xfce/libxfce4ui/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xfce/libxfce4ui
+
+versions    = 4.18.4
+pkgname     = libxfce4ui
+suffix      = tar.bz2
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: xfce/libxfce4ui
===================================================================
--- xfce/libxfce4ui	(nonexistent)
+++ xfce/libxfce4ui	(revision 385)

Property changes on: xfce/libxfce4ui
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xfce/libxfce4util/Makefile
===================================================================
--- xfce/libxfce4util/Makefile	(nonexistent)
+++ xfce/libxfce4util/Makefile	(revision 385)
@@ -0,0 +1,47 @@
+
+COMPONENT_TARGETS = $(HARDWARE_NOARCH)
+
+
+include ../../../../../build-system/constants.mk
+
+
+url         = $(DOWNLOAD_SERVER)/sources/packages/x/xfce/libxfce4util
+
+versions    = 4.18.1
+pkgname     = libxfce4util
+suffix      = tar.bz2
+
+tarballs    = $(addsuffix .$(suffix), $(addprefix $(pkgname)-, $(versions)))
+sha1s       = $(addsuffix .sha1sum, $(tarballs))
+
+
+BUILD_TARGETS = $(tarballs) $(sha1s)
+
+
+include ../../../../../build-system/core.mk
+
+
+.PHONY: download_clean
+
+
+$(tarballs):
+	@echo -e "\n======= Downloading source tarballs =======" ; \
+	 for tarball in $(tarballs) ; do \
+	   echo "$(url)/$$tarball" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & \
+	 done ; wait
+
+$(sha1s): $(tarballs)
+	@for sha in $@ ; do \
+	   echo -e "\n======= Downloading '$$sha' signature =======\n" ; \
+	   echo "$(url)/$$sha" | xargs -n 1 -P 100 wget $(WGET_OPTIONS) - & wait %1 ; \
+	   touch $$sha ; \
+	   echo -e "\n======= Check the '$$sha' sha1sum =======\n" ; \
+	   sha1sum --check $$sha ; ret="$$?" ; \
+	   if [ "$$ret" == "1" ]; then \
+	     echo -e "\n======= ERROR: Bad '$$sha' sha1sum =======\n" ; \
+	     exit 1 ; \
+	   fi ; \
+	 done
+
+download_clean:
+	@rm -f $(tarballs) $(sha1s)
Index: xfce/libxfce4util
===================================================================
--- xfce/libxfce4util	(nonexistent)
+++ xfce/libxfce4util	(revision 385)

Property changes on: xfce/libxfce4util
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~
Index: xfce
===================================================================
--- xfce	(nonexistent)
+++ xfce	(revision 385)

Property changes on: xfce
___________________________________________________________________
Added: svn:ignore
## -0,0 +1,74 ##
+
+# install dir
+dist
+
+# Target build dirs
+.a1x-newlib
+.a2x-newlib
+.at91sam7s-newlib
+
+.build-machine
+
+.a1x-glibc
+.a2x-glibc
+.h3-glibc
+.h5-glibc
+.i586-glibc
+.i686-glibc
+.imx6-glibc
+.jz47xx-glibc
+.makefile
+.am335x-glibc
+.omap543x-glibc
+.p5600-glibc
+.power8-glibc
+.power8le-glibc
+.power9-glibc
+.power9le-glibc
+.m1000-glibc
+.riscv64-glibc
+.rk328x-glibc
+.rk33xx-glibc
+.rk339x-glibc
+.rk358x-glibc
+.s8xx-glibc
+.s9xx-glibc
+.x86_64-glibc
+
+# Hidden files (each file)
+.makefile
+.dist
+.rootfs
+
+# src & hw requires
+.src_requires
+.src_requires_depend
+.requires
+.requires_depend
+
+# Tarballs
+*.gz
+*.bz2
+*.lz
+*.xz
+*.tgz
+*.txz
+
+# Signatures
+*.asc
+*.sig
+*.sign
+*.sha1sum
+
+# Patches
+*.patch
+
+# Descriptions
+*.dsc
+*.txt
+
+# Default linux config files
+*.defconfig
+
+# backup copies
+*~