diff options
-rw-r--r-- | Makefile.fetch | 2 | ||||
-rw-r--r-- | RepositoryExternal.mk | 14 | ||||
-rw-r--r-- | config_host.mk.in | 2 | ||||
-rw-r--r-- | configure.ac | 30 | ||||
-rw-r--r-- | external/Module_external.mk | 2 |
5 files changed, 47 insertions, 3 deletions
diff --git a/Makefile.fetch b/Makefile.fetch index af6f0ce7aa5f..8fc0ab397da4 100644 --- a/Makefile.fetch +++ b/Makefile.fetch @@ -110,7 +110,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_$(gb_Side).mk $(SRCDIR)/download.lst $(S $(call fetch_Optional,CAIRO,PIXMAN_TARBALL) \ $(call fetch_Optional,CDR,CDR_TARBALL) \ $(call fetch_Optional,CLUCENE,CLUCENE_TARBALL) \ - DRAGONBOX_TARBALL \ + $(call fetch_Optional,DRAGONBOX,DRAGONBOX_TARBALL) \ DTOA_TARBALL \ $(call fetch_Optional,LIBCMIS,LIBCMIS_TARBALL) \ $(call fetch_Optional,COINMP,COINMP_TARBALL) \ diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 779e318ebc49..f63c95c142ea 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -4132,15 +4132,27 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo,\ )) endif +ifneq ($(SYSTEM_DRAGONBOX),) + +define gb_LinkTarget__use_dragonbox +$(call gb_LinkTarget_set_include,$(1),\ + $$(INCLUDE) \ + $$(DRAGONBOX_CFLAGS) \ +) +endef + +else + define gb_LinkTarget__use_dragonbox $(call gb_LinkTarget_use_unpacked,$(1),dragonbox) $(call gb_LinkTarget_set_include,$(1),\ -I$(call gb_UnpackedTarball_get_dir,dragonbox/include/)\ $$(INCLUDE) \ ) - endef +endif + define gb_LinkTarget__use_dtoa $(call gb_LinkTarget_use_unpacked,$(1),dtoa) $(call gb_LinkTarget_set_include,$(1),\ diff --git a/config_host.mk.in b/config_host.mk.in index dee4375023fc..0cb682c4862c 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -130,6 +130,7 @@ export DISABLE_PYTHON=@DISABLE_PYTHON@ export DOCDIR=@DOCDIR@ export DOXYGEN=@DOXYGEN@ export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@ +export DRAGONBOX_CFLAGS=@DRAGONBOX_CFLAGS@ export DPKG=@DPKG@ export EBOOK_CFLAGS=$(gb_SPACE)@EBOOK_CFLAGS@ export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@ @@ -154,6 +155,7 @@ export ENABLE_DBGUTIL=@ENABLE_DBGUTIL@ export ENABLE_DBUS=@ENABLE_DBUS@ export ENABLE_DCONF=@ENABLE_DCONF@ export ENABLE_DEBUG=@ENABLE_DEBUG@ +export SYSTEM_DRAGONBOX=@SYSTEM_DRAGONBOX@ export ENABLE_EPOXY=@ENABLE_EPOXY@ export ENABLE_EVOAB2=@ENABLE_EVOAB2@ export ENABLE_FIREBIRD_SDBC=@ENABLE_FIREBIRD_SDBC@ diff --git a/configure.ac b/configure.ac index b22d8e17c6da..1b5303125466 100644 --- a/configure.ac +++ b/configure.ac @@ -2438,6 +2438,11 @@ AC_ARG_WITH(system-cuckoo, [Use libcuckoo already on system.]),, [with_system_cuckoo="$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-glm, AS_HELP_STRING([--with-system-glm], [Use glm already on system.]),, @@ -5712,6 +5717,7 @@ if test "$cross_compiling" = "yes"; then CURL DBCONNECTIVITY DESKTOP + DRAGONBOX DYNLOADING EPOXY EXPAT @@ -10525,6 +10531,30 @@ fi AC_SUBST([SYSTEM_CUCKOO]) 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.0.0 + 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 glm dnl =================================================================== AC_MSG_CHECKING([which glm to use]) diff --git a/external/Module_external.mk b/external/Module_external.mk index 5420092797a1..dd7ecafa74b9 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -30,7 +30,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,CPPUNIT,cppunit) \ $(call gb_Helper_optional,CT2N,ct2n) \ $(call gb_Helper_optional,CURL,curl) \ - dragonbox \ + $(call gb_Helper_optional,DRAGONBOX,dragonbox) \ dtoa \ $(call gb_Helper_optional,EBOOK,libebook) \ $(call gb_Helper_optional,EPM,epm) \ |