diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 631466f0001a..b105e1d755d0 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -4298,6 +4298,14 @@ endif # ENABLE_ZXING endif # SYSTEM_ZXING +ifneq ($(SYSTEM_FROZEN),) +define gb_LinkTarget__use_frozen +$(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + $(FROZEN_CFLAGS) +) +endef +else define gb_LinkTarget__use_frozen $(call gb_LinkTarget_use_unpacked,$(1),frozen) $(call gb_LinkTarget_set_include,$(1),\ @@ -4305,6 +4313,6 @@ $(call gb_LinkTarget_set_include,$(1),\ $$(INCLUDE) \ ) endef - +endif # vim: set noet sw=4 ts=4: diff --git a/config_host.mk.in b/config_host.mk.in index 6a120c2098cc..eb5e751e100b 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -134,6 +134,7 @@ export DOCDIR=@DOCDIR@ export DOXYGEN=@DOXYGEN@ export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@ export DRAGONBOX_CFLAGS=@DRAGONBOX_CFLAGS@ +export FROZEN_CFLAGS=@FROZEN_CFLAGS@ export DPKG=@DPKG@ export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@ export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@ @@ -158,6 +159,7 @@ export ENABLE_DBUS=@ENABLE_DBUS@ export ENABLE_DCONF=@ENABLE_DCONF@ export ENABLE_DEBUG=@ENABLE_DEBUG@ SYSTEM_DRAGONBOX=@SYSTEM_DRAGONBOX@ +SYSTEM_FROZEN=@SYSTEM_FROZEN@ export ENABLE_EPOXY=@ENABLE_EPOXY@ export ENABLE_EOT=@ENABLE_EOT@ export ENABLE_EVOAB2=@ENABLE_EVOAB2@ diff --git a/configure.ac b/configure.ac index 4c1efff0799e..af24f1c4fdb5 100644 --- a/configure.ac +++ b/configure.ac @@ -2452,6 +2452,11 @@ AC_ARG_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.]),, @@ -10542,6 +10547,27 @@ 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 =================================================================== diff --git a/external/Module_external.mk b/external/Module_external.mk index cd9c5924d71d..9feb4e21addf 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -41,7 +41,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,FONTCONFIG,fontconfig) \ $(call gb_Helper_optional,FREEHAND,libfreehand) \ $(call gb_Helper_optional,FREETYPE,freetype) \ - frozen \ + $(call gb_Helper_optional,FROZEN,frozen) \ $(call gb_Helper_optional,GLM,glm) \ $(call gb_Helper_optional,GPGMEPP,gpgmepp) \ $(call gb_Helper_optional,GRAPHITE,graphite) \