diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk index 8a8d06c8080c..a0315f5c088e 100644 --- a/RepositoryExternal.mk +++ b/RepositoryExternal.mk @@ -2475,6 +2475,8 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\ endif # SYSTEM_PYTHON # ORCUS +ifeq ($(ENABLE_ORCUS),TRUE) + ifeq ($(SYSTEM_LIBORCUS),YES) define gb_LinkTarget__use_orcus @@ -2515,6 +2517,12 @@ endef endif # SYSTEM_LIBORCUS +else # ENABLE_ORCUS != TRUE + +gb_LinkTarget__use_orcus := +gb_LinkTarget__use_orcus-parser := + +endif ### X11 stuff ### diff --git a/config_host.mk.in b/config_host.mk.in index 6b9768fe5c05..9699d58ff798 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -120,6 +120,7 @@ export ENABLE_GCONF=@ENABLE_GCONF@ export ENABLE_GIO=@ENABLE_GIO@ export ENABLE_GNOMEVFS=@ENABLE_GNOMEVFS@ export ENABLE_GRAPHITE=@ENABLE_GRAPHITE@ +export ENABLE_ORCUS=@ENABLE_ORCUS@ export ENABLE_HARFBUZZ=@ENABLE_HARFBUZZ@ export ENABLE_GSTREAMER=@ENABLE_GSTREAMER@ export ENABLE_GSTREAMER_0_10=@ENABLE_GSTREAMER_0_10@ diff --git a/config_host/config_orcus.h.in b/config_host/config_orcus.h.in new file mode 100644 index 000000000000..68e3757d5821 --- /dev/null +++ b/config_host/config_orcus.h.in @@ -0,0 +1,6 @@ +#ifndef CONFIG_ORCUS_H +#define CONFIG_ORCUS_H + +#define ENABLE_ORCUS 0 + +#endif diff --git a/configure.ac b/configure.ac index fda58df807cd..141d0e18d86b 100644 --- a/configure.ac +++ b/configure.ac @@ -729,6 +729,11 @@ AC_ARG_ENABLE(graphite, [Enables the compilation of Graphite smart font rendering.]) ) +AC_ARG_ENABLE(orcus, + AS_HELP_STRING([--enable-orcus], + [Enables orcus for extra file import filters for Calc.]) +) + AC_ARG_ENABLE(fetch-external, AS_HELP_STRING([--disable-fetch-external], [Disables fetching external tarballs from web sources.]) @@ -8940,6 +8945,52 @@ else fi AC_SUBST(ENABLE_GRAPHITE) +dnl =================================================================== +dnl Orcus +dnl =================================================================== + +AC_MSG_CHECKING([whether to enable orcus]) +if test $_os != Darwin -a $_os != Android -a $_os != iOS -a \( -z "$enable_orcus" -o "$enable_orcus" != no \); then + AC_MSG_RESULT([yes]) + ENABLE_ORCUS="TRUE" + AC_DEFINE(ENABLE_ORCUS) + + libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.6 >= 0.5.0]) + if test "$with_system_orcus" != "yes"; then + if test "$SYSTEM_BOOST" = "YES"; then + # =========================================================== + # Determine if we are going to need to 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. + AC_MSG_CHECKING([if we need to link with Boost.System]) + AC_LANG_PUSH([C++]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + ]],[[ + #if BOOST_VERSION >= 105000 + # error yes, we need to link with Boost.System + #endif + ]])],[ + AC_MSG_RESULT([no]) + ],[ + AC_MSG_RESULT([yes]) + AX_BOOST_SYSTEM + ]) + AC_LANG_POP([C++]) + 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) + +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_ORCUS) + dnl =================================================================== dnl HarfBuzz dnl =================================================================== @@ -9209,40 +9260,6 @@ AC_SUBST(RAPTOR_MAJOR) AC_SUBST(RASQAL_MAJOR) AC_SUBST(REDLAND_MAJOR) -dnl =================================================================== -dnl Check for system orcus -dnl =================================================================== -libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.6 >= 0.5.0]) -if test "$with_system_orcus" != "yes"; then - if test "$SYSTEM_BOOST" = "YES"; then - # =========================================================== - # Determine if we are going to need to 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. - AC_MSG_CHECKING([if we need to link with Boost.System]) - AC_LANG_PUSH([C++]) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - @%:@include - ]],[[ - #if BOOST_VERSION >= 105000 - # error yes, we need to link with Boost.System - #endif - ]])],[ - AC_MSG_RESULT([no]) - ],[ - AC_MSG_RESULT([yes]) - AX_BOOST_SYSTEM - ]) - AC_LANG_POP([C++]) - 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 Check for system hunspell dnl =================================================================== @@ -12571,6 +12588,7 @@ AC_CONFIG_HEADERS([config_host/config_global.h]) AC_CONFIG_HEADERS([config_host/config_graphite.h]) AC_CONFIG_HEADERS([config_host/config_lgpl.h]) AC_CONFIG_HEADERS([config_host/config_mpl.h]) +AC_CONFIG_HEADERS([config_host/config_orcus.h]) AC_CONFIG_HEADERS([config_host/config_kde4.h]) AC_CONFIG_HEADERS([config_host/config_mingw.h]) AC_CONFIG_HEADERS([config_host/config_oox.h]) diff --git a/liborcus/Module_liborcus.mk b/liborcus/Module_liborcus.mk index 78e90d98ca07..d290e86bc219 100644 --- a/liborcus/Module_liborcus.mk +++ b/liborcus/Module_liborcus.mk @@ -9,7 +9,7 @@ $(eval $(call gb_Module_Module,liborcus)) -ifeq ($(SYSTEM_LIBORCUS),NO) +ifeq ($(ENABLE_ORCUS)-$(SYSTEM_LIBORCUS),TRUE-NO) $(eval $(call gb_Module_add_targets,liborcus,\ ExternalProject_liborcus \