summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-11-23 13:57:26 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-11-23 14:03:23 +0200
commit1781da99f62454df0fc04da1f4013528ea9fff96 (patch)
tree921c2262912fa63af0bc3a1bd216c8e590b308eb /configure.ac
parentb3edb2410387e0ad63ee663cd3b706076bea3edb (diff)
Add experimental --disable-export configure option
Even for an Android (or iOS, presumably) app with just viewer functionality, some export code gets included in the single .so or executable. For now, when we know that we are producing only viewer apps for Android and iOS anyway, it might be a good idea to be able to carefully bypass some particularly pathological places in the code that generate large amounts of code and/or data that is useless in a viewer app. Change-Id: I59b97024ff2855e7bbe53d6ec8782797705f61d8
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac27
1 files changed, 27 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 74d9ca101f26..b8bff37e3ff2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -549,6 +549,12 @@ AC_ARG_ENABLE(ext-barcode,
[Enable the Barcode extension.])
)
+AC_ARG_ENABLE(export,
+ AS_HELP_STRING([--disable-export],
+ [Disable (some) code for document format export. Useful when building *viewer* apps to avoid
+ having export-related code and data linked in. Work in progress, use only if you are hacking on it.])
+)
+
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.])
@@ -2300,6 +2306,27 @@ if test $_os != iOS -a $_os != Android; then
BUILD_TYPE="$BUILD_TYPE DESKTOP"
fi
+# Currently we build only viewer apps for Android (and for iOS not even that yet), so to avoid getting
+# some pathological export-related code and data linked in, we will add some judicious #ifndef
+# DISABLE_EXPORT in the code in places where the linker map shows it has a big impact. Places that
+# generate large amounts of code or data related to export only but still gets linked in. At least
+# that is the theory, let's see...
+
+if test -z "$enable_export"; then
+ if test $_os != Android -a $_os != iOS; then
+ enable_export=yes
+ fi
+fi
+
+DISABLE_EXPORT=''
+if test "$enable_export" = yes; then
+ BUILD_TYPE="$BUILD_TYPE EXPORT"
+else
+ DISABLE_EXPORT='TRUE'
+ SCPDEFS="$SCPDES -DDISABLE_EXPORT"
+fi
+AC_SUBST(DISABLE_EXPORT)
+
dnl Decide whether to build database connectivity stuff (including
dnl Base) or not. We probably don't want to on non-desktop OSes.