summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2011-06-16 00:24:10 +0300
committerTor Lillqvist <tml@iki.fi>2011-06-16 21:47:11 +0300
commit903c6b395c40afe0d02a88a75b60f6fd5a112952 (patch)
treeb3b297a258267c174ba2117bd9604e0456d487c7 /configure.in
parent8fe135c7b936e21da514dd93917d07d2fa97c4ca (diff)
Add BUILD_TYPE keywords NATIVE and DESKTOP
NATIVE indicates that the BUILD and HOST platforms are the same, i.e. a "normal" not cross-compiling build. DESKTOP indicates a "normal" desktop/server OS, like Linux, Windows, BSD or Mac OS X. (Non-desktop ones would be "mobile" ones like iOS and Android.) (All traditional, and so far only actually working, builds of OOo/LO is both NATIVE and DESKTOP. The non-NATIVE and non-DESKTOP cases belong in the experimental cross-compilation work.) All non-DESKTOP cases are also non-NATIVE, at least so far. In other words, when building for a mobile OS we always cross-compile. Note that the reverse is not true: We eventually would want to cross-compile to Windows, rarer Linux architectures, and PowerPC Mac OS X. DESKTOP is used in build.lst files to indicate modules that it makes no sense to build for mobile platforms. Nobody is going to run LibreOffice SDK tools on a tablet. NATIVE is used in build.lst files to indicate modules that produce just build-time executables (which can't be run on the BUILD system when cross-compiling), and which are not part of the SDK either. (Sadly the use of BUILD_TYPE keywords in the build.lst files is a bit tedious: you have to mark a module in the build.lst files of all its "parents", modules that depend on it, not in that of the module itself.) It does make sense to build SDK tools in the other cross-compilation cases. There is no reason why we wouldn't want to cross-compile also the executables that go into the SDK when cross-compiling to Windows, for instance.
Diffstat (limited to 'configure.in')
-rwxr-xr-xconfigure.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index ad041424f5bc..5177e4e68914 100755
--- a/configure.in
+++ b/configure.in
@@ -1292,6 +1292,7 @@ if test "$cross_compiling" = "yes"; then
CROSS_COMPILING=YES
else
CROSS_COMPILING=
+ BUILD_TYPE="$BUILD_TYPE NATIVE"
fi
AC_SUBST(CROSS_COMPILING)
@@ -1530,6 +1531,20 @@ AC_SUBST(OSVERSION)
AC_SUBST(PTHREAD_CFLAGS)
AC_SUBST(PTHREAD_LIBS)
+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; then
+ BUILD_TYPE="$BUILD_TYPE DESKTOP"
+fi
+
if test $build_os = "cygwin"; then
dnl ===================================================================
dnl If $CC is set to a MinGW compiler, set WITH_MINGW