diff options
author | jan Iversen <jani@libreoffice.org> | 2017-09-02 17:40:45 +0200 |
---|---|---|
committer | jan Iversen <jani@libreoffice.org> | 2017-09-04 21:00:07 +0200 |
commit | f7bc186bdabd420f5cfb0de62108413160b1e1de (patch) | |
tree | 0d7f51cede1a389983c05a170674bfd4f66541c4 /configure.ac | |
parent | 41092fe0bb0d2f49948bf2a1f27acb53f21a84aa (diff) |
iOS, update configure.ac to handle ios
Added enable-ios-simulator, and updated to do cross compile
Change-Id: Id9031aa2ad1e271f843cf1cba6e3b67d907b6df0
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 81a3ac0877ef..39f42eb6d0ed 100644 --- a/configure.ac +++ b/configure.ac @@ -716,7 +716,7 @@ darwin*) # Mac OS X or iOS test_freetype=no test_fontconfig=no test_dbus=no - if test "$host_cpu" = "armv7" -o "$host_cpu" = "arm64"; then + if test "$enable_ios_simulator" = "yes" -o "$host_cpu" = "armv7" -o "$host_cpu" = "arm64"; then _os=iOS test_gtk=no test_cups=no @@ -991,6 +991,11 @@ AC_SUBST(DLOPEN_LIBS) # if you use --disable-extension-integration. Is that really the # case? +AC_ARG_ENABLE(ios-simulator, + AS_HELP_STRING([--enable-ios-simulator], + [build i386 or x86_64 for ios simulator]) +) + libo_FUZZ_ARG_ENABLE(extension-integration, AS_HELP_STRING([--disable-extension-integration], [Disable integration of the built extensions in the installer of the @@ -2709,7 +2714,7 @@ dnl =================================================================== dnl Check OS X SDK and compiler dnl =================================================================== -if test $_os = Darwin; then +if test $_os = Darwin -o $_os = iOS; then # If no --with-macosx-sdk option is given, look for one @@ -2946,6 +2951,7 @@ if test $_os = iOS; then elif test "$build_cpu" = "x86_64"; then platform=iPhoneSimulator XCODE_ARCHS=x86_64 + BITNESS_OVERRIDE=64 versionmin=-mios-simulator-version-min=9.3 else platform=iPhoneOS @@ -3153,6 +3159,9 @@ if test "$_os" = "WINNT"; then BITNESS_OVERRIDE=64 fi fi +if test "$_os" = "iOS"; then + cross_compiling="yes" +fi if test "$cross_compiling" = "yes"; then export CROSS_COMPILING=TRUE @@ -4015,9 +4024,19 @@ darwin*) OS=IOS ;; i*86) - AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS]) + if test "$enable_ios_simulator" = "yes"; then + OS=IOS + CPUNAME=i386 + RTL_ARCH=i386 + PLATFORMID=macosx_i38 + else + AC_MSG_ERROR([Can't build 64-bit code in 32-bit OS]) + fi ;; x86_64) + if test "$enable_ios_simulator" = "yes"; then + OS=IOS + fi CPUNAME=X86_64 RTL_ARCH=X86_64 PLATFORMID=macosx_x86_64 @@ -6343,7 +6362,7 @@ _ACEOF fi fi - AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) + AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { @@ -6358,7 +6377,7 @@ _ACEOF else case "$host_cpu" in i?86|x86_64) - if test "$_os" = "Darwin"; then + if test "$_os" = "Darwin" -o "$_os" = "iOS"; then gccvisbroken=no else if $EGREP -q '@PLT|@GOT' visibility.s || test "$ENABLE_LTO" = "TRUE"; then |