[Libreoffice-commits] core.git: configure.ac distro-configs/LibreOfficeiOS.conf distro-configs/README

Tor Lillqvist tml at iki.fi
Wed May 1 00:07:20 PDT 2013


 configure.ac                       |   59 +++++++++++++++++++++++++++++++++++--
 distro-configs/LibreOfficeiOS.conf |   24 ---------------
 distro-configs/README              |   10 +++---
 3 files changed, 62 insertions(+), 31 deletions(-)

New commits:
commit 35583e02020326eae206c16c89e9e5eaf5f580b5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Wed May 1 09:44:28 2013 +0300

    Make configury work as well as possible for iOS without options
    
    Change-Id: If28fbe59f55626aeca05fa93446a0e5034ea2b91

diff --git a/configure.ac b/configure.ac
index cd03950..0f19e1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1145,6 +1145,11 @@ AC_ARG_WITH(macosx-bundle-identifier,
          org.libreoffice.script ("script", huh?).]),
 ,with_macosx_bundle_identifier=org.libreoffice.script)
 
+AC_ARG_ENABLE(ios-simulator,
+    AS_HELP_STRING([--enable-ios-simulator],
+        [Build for the iOS Simulator, not iOS device.]),
+,)
+
 AC_ARG_ENABLE(readonly-installset,
     AS_HELP_STRING([--enable-readonly-installset],
         [Prevents any attempts by LibreOffice to write into its installation. That means
@@ -2640,6 +2645,42 @@ AC_SUBST(MACOSX_CODESIGNING_IDENTITY)
 AC_SUBST(ENABLE_MACOSX_SANDBOX)
 AC_SUBST(MACOSX_BUNDLE_IDENTIFIER)
 
+dnl ===================================================================
+dnl Check / find iOS SDK and compiler, version checks
+dnl ===================================================================
+if test $_os = iOS; then
+
+    AC_MSG_CHECKING([what iOS SDK to use])
+
+    if test "$enable_ios_simulator" = yes; then
+        platform=iPhoneSimulator
+        versionmin=-mmacosx-version-min=10.7
+        arch=i386
+    else
+        platform=iPhoneOS
+        versionmin=-miphoneos-version-min=5.0
+        arch=armv7
+    fi
+
+    pref_sdk_ver=6.1
+    for I in 6.1 6.0; do
+        t=/Applications/Xcode.app/Contents/Developer/Platforms/$platform.platform/Developer/SDKs/$platform$I.sdk
+        if test -d $t; then
+            sysroot=$t
+            break
+        fi
+    done
+
+    if test -z "$sysroot"; then
+        AC_MSG_ERROR([Could not find iOS SDK, expected something like /Applications/Xcode.app/Contents/Developer/Platforms/$platform.platform/Developer/SDKs/${platform}${pref_sdk_ver}])
+    fi
+
+    AC_MSG_RESULT($sysroot)
+
+    CXX="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch $arch -isysroot $sysroot $versionmin"
+    CC="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch $arch -isysroot $sysroot $versionmin"
+fi
+
 AC_MSG_CHECKING([whether to treat the installation as read-only])
 
 if test \( -z "$enable_readonly_installset" -a "$ENABLE_MACOSX_SANDBOX" = YES \) -o \
@@ -6937,6 +6978,15 @@ printf ("hello world\n");
 fi
 AC_SUBST(WINEGCC)
 
+if test $_os = iOS; then
+    enable_mpl_subset=yes
+    enable_postgresql_sdbc=no
+    enable_lotuswordpro=no
+    enable_neon=no
+    enable_extension_integration=no
+    with_ppds=no
+fi
+
 ENABLE_LWP=
 if test "$enable_lotuswordpro" = "yes"; then
    ENABLE_LWP="TRUE"
@@ -6946,6 +6996,7 @@ AC_SUBST(ENABLE_LWP)
 
 AC_MSG_CHECKING([MPL subset])
 MPL_SUBSET=
+
 if test "$enable_mpl_subset" = "yes"; then
    if test "x$enable_postgresql_sdbc" != "xno"; then
         AC_MSG_ERROR([need to --disable-postgresql-sdbc - the postgress database backend.])
@@ -9274,7 +9325,7 @@ dnl ===================================================================
 
 ENABLE_GCONF=""
 AC_MSG_CHECKING([whether to enable GConf support])
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gconf" = "yes"; then
+if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "iOS" -a "$enable_gconf" = "yes"; then
     ENABLE_GCONF="TRUE"
     AC_MSG_RESULT([yes])
     PKG_CHECK_MODULES( GCONF, gconf-2.0 gobject-2.0 )
@@ -9502,7 +9553,7 @@ if test "$enable_split_opt_features" = "yes"; then
 fi
 AC_SUBST(SPLIT_OPT_FEATURES)
 
-if test $_os = Darwin -o $_os = WINNT; then
+if test $_os = Darwin -o $_os = WINNT -o $_os = iOS; then
     if test "$enable_cairo_canvas" = yes; then
         AC_MSG_ERROR([The cairo canvas should not be used for this platform])
     fi
@@ -9572,6 +9623,10 @@ if test -z "$enable_opengl"; then
         # badly and crashes). In other words, use --enable-opengl only if you plan to hack on that
         # code for Windows.
         enable_opengl=no
+    elif test $_os = iOS; then
+        # As such with some suitable minor tweaks the Mac OpenGL transitions code would presumably
+        # build fine for iOS, too, but let's leave that for later
+        enable_opengl=no
     else
         enable_opengl=yes
     fi
diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index 695dd83..be996d0 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -1,26 +1,2 @@
 --build=i386-apple-darwin10.7.0
 --host=arm-apple-darwin10
---disable-cairo-canvas
---disable-ext-presenter-minimizer
---disable-extension-integration
---disable-gconf
---disable-gnome-vfs
---disable-gstreamer-0-10
---disable-gstreamer
---disable-lockdown
---disable-lotuswordpro
---disable-neon
---disable-odk
---disable-opengl
---disable-postgresql-sdbc
---disable-python
---disable-randr
---disable-randr-link
---disable-systray
---disable-vba
---enable-mpl-subset
---without-afms
---without-fonts
---without-java
---without-junit
---without-ppds
diff --git a/distro-configs/README b/distro-configs/README
index 38812fb..50006fb 100644
--- a/distro-configs/README
+++ b/distro-configs/README
@@ -17,9 +17,9 @@ on the autogen.sh command line thus:
 
 ./autogen.sh --with-distro=LibreOfficeFoo
 
-Contrary to the above, in the Android and iOS cases the amount of
-parameters you just must use is so large, that for convenience it is
-always easiest to use the corresponding distro-configs file. This is a
-bug and needs to be fixed; also configuring for those platforms needs
-to use sane (or only possible) defaults and work fine wihout any
+Contrary to the above, in the Android case the amount of parameters
+you just must use is so large, that for convenience it is always
+easiest to use the corresponding distro-configs file. This is a bug
+and needs to be fixed; also configuring for Android should ideally use
+sane (or the only possible) defaults and work fine wihout any
 parameters at all.


More information about the Libreoffice-commits mailing list