2015-03-09 04:11:15 -05:00
# -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil -*-
# Process this file with autoconf to produce a configure script.
2017-08-10 02:50:36 -05:00
AC_PREREQ([2.63])
2015-03-09 04:11:15 -05:00
2019-05-22 05:06:59 -05:00
AC_INIT([loolwsd], [master], [libreoffice@lists.freedesktop.org])
2019-05-27 02:09:49 -05:00
LT_INIT([shared, disable-static, dlopen])
2015-03-09 04:11:15 -05:00
2017-08-10 02:50:36 -05:00
AM_INIT_AUTOMAKE([1.10 subdir-objects tar-pax -Wno-portability])
2015-03-09 04:11:15 -05:00
2016-04-12 02:39:53 -05:00
AC_CONFIG_MACRO_DIR([m4])
2018-10-30 05:37:31 -05:00
# We don't want to require pkg-config and PKG_CHECK_MODULES on macOS
m4_if(m4_esyscmd_s([uname -s]),Linux,[],[m4_define([PKG_CHECK_MODULES],[])])
2015-12-19 12:38:44 -06:00
LOOLWSD_VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'`
LOOLWSD_VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'`
LOOLWSD_VERSION_MICRO=`echo $VERSION | awk -F. '{print $3}'`
LOOLWSD_VERSION="$LOOLWSD_VERSION_MAJOR.$LOOLWSD_VERSION_MINOR.$LOOLWSD_VERSION_MICRO"
AC_SUBST([LOOLWSD_VERSION_MAJOR])
AC_SUBST([LOOLWSD_VERSION_MINOR])
AC_SUBST([LOOLWSD_VERSION_MICRO])
AC_SUBST([LOOLWSD_VERSION])
2017-02-03 07:28:48 -06:00
AC_DEFINE_UNQUOTED([LOOLWSD_VERSION],[["$LOOLWSD_VERSION"]],[LibreOffice Online WebSocket server version])
2015-12-19 12:38:44 -06:00
2016-04-15 09:07:24 -05:00
# try to add a git hash for a version if we're developing
2016-05-09 07:43:21 -05:00
LOOLWSD_VERSION_HASH="$LOOLWSD_VERSION"
2017-04-28 04:54:18 -05:00
git_hash=`cd ${srcdir} && ( cat dist_git_hash 2> /dev/null || git log -1 --format=%h 2> /dev/null )`
2016-04-15 09:07:24 -05:00
if test "z$git_hash" != "z"; then
LOOLWSD_VERSION_HASH=$git_hash
fi
2016-05-10 04:19:32 -05:00
AC_SUBST([LOOLWSD_VERSION_HASH])
2016-04-15 09:07:24 -05:00
2017-02-03 07:28:48 -06:00
AC_DEFINE_UNQUOTED([LOOLWSD_VERSION_HASH],[["$LOOLWSD_VERSION_HASH"]],[LibreOffice Online git hash if present])
2016-04-15 09:07:24 -05:00
2016-11-24 08:56:06 -06:00
AC_CONFIG_SRCDIR([wsd/LOOLWSD.cpp])
2015-03-09 04:11:15 -05:00
2016-04-12 03:09:10 -05:00
AC_CONFIG_HEADERS([config.h])
2015-03-09 04:11:15 -05:00
# Checks for programs.
AC_PROG_CXX
2015-12-23 08:55:56 -06:00
AC_PROG_CC
2015-03-09 04:11:15 -05:00
2015-05-11 03:21:07 -05:00
AC_LANG_PUSH([C++])
2015-05-04 12:17:41 -05:00
AS_IF([test `uname -s` = Linux],
[AC_PATH_PROG([SETCAP], setcap,[],[/bin:/usr/bin:/sbin:/usr/sbin])]
AS_IF([test -z "$SETCAP"],
[AC_MSG_ERROR([The setcap command is needed. It might be in a package called libcap-progs.])]))
2015-04-23 08:00:43 -05:00
2019-10-24 11:35:30 -05:00
# check for python modules
for MODULE in lxml polib; do
AC_MSG_CHECKING([for ${MODULE} for python3])
if /usr/bin/env python3 -c "import ${MODULE}" 2> /dev/null ; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
AC_MSG_ERROR([${MODULE} for python3 is needed. It might be in a package called python3-${MODULE}.])
fi
done
2015-03-09 04:11:15 -05:00
# Declare options
AC_ARG_ENABLE([debug],
AS_HELP_STRING([--enable-debug],
[Enable debugging, link with debugging version of Poco libraries]))
2019-02-12 04:47:24 -06:00
AC_ARG_ENABLE([browsersync],
AS_HELP_STRING([--enable-browsersync],
[Don't copy files to the target directory but create the symlink to allow browsersync usage]))
2019-04-14 11:24:45 -05:00
AC_ARG_ENABLE([anonymization],
AS_HELP_STRING([--enable-anonymization],
[Enable anonymization/obfuscation of user-data in logs]))
2018-06-03 13:02:44 -05:00
2018-08-31 05:24:17 -05:00
AC_ARG_ENABLE([iosapp],
AS_HELP_STRING([--enable-iosapp],
[Use in a tree where the only purpose is to build the HTML and CSS stuff
2018-10-30 04:25:33 -05:00
to be copied to a Mac where the iOS app is being built, *or* in a tree where
2018-11-01 17:37:01 -05:00
you will build the iOS app.]))
2018-10-30 04:25:33 -05:00
2018-11-01 17:37:01 -05:00
AC_ARG_WITH([iosapp-appicon],
AS_HELP_STRING([--with-iosapp-appicon=<path>],
[Point to a directory containing an icon set to use instead of the default empty one.]))
2018-11-27 09:06:22 -06:00
AC_ARG_WITH([iosapp-fonts],
AS_HELP_STRING([--with-iosapp-fonts=<path>],
[Point to a directory containing .ttf or .otf files to be bundled in the iOS app (and
thus installed on the device for use of the LO core code).]))
2019-06-18 09:10:26 -05:00
AC_ARG_WITH([app-branding],
AS_HELP_STRING([--with-app-branding=<path>],
2019-04-22 07:22:04 -05:00
[Point to a directory containing a branding.css file and possibly other files it references,
to be bundled and used by the iOS app. The directory structure is copied to
"loleaflet/dist/branding" and that directory ends upp in the app bundle as "branding".]))
2018-10-16 17:22:24 -05:00
AC_ARG_ENABLE([gtkapp],
AS_HELP_STRING([--enable-gtkapp],
[Use in a tree where the only purpose is to build the gtk+ "app" that is supposed
to work similarly to the iOS app, from the JavaScript and the pseudo WebSocket
2018-10-17 15:39:08 -05:00
message plumbing point of view. See gtk/README.]))
2018-10-16 17:22:24 -05:00
2019-02-11 12:02:46 -06:00
AC_ARG_ENABLE([androidapp],
AS_HELP_STRING([--enable-androidapp],
[Use in a tree where the only purpose is to build the Android app that is supposed
to work similarly to the iOS app, from the JavaScript and the pseudo WebSocket
message plumbing point of view.]))
2019-06-18 07:41:42 -05:00
AC_ARG_WITH(android-package-name,
AS_HELP_STRING([--with-android-package-name="org.libreoffice.androidapp"],
[Set Android package name of the build.]),
,)
2019-03-30 13:12:19 -05:00
AC_ARG_WITH([app-name],
AS_HELP_STRING([--with-app-name=<name>],
[Set the user-visible name of the app you build.]))
2019-06-21 03:43:53 -05:00
AC_ARG_WITH([icon-theme],
AS_HELP_STRING([--with-icon-theme=<path>],
[Path to custom icon theme (similiar to loleflet/images).]))
2019-04-16 05:53:38 -05:00
AC_ARG_WITH(vendor,
AS_HELP_STRING([--with-vendor="John the Builder"],
[Set vendor of the build.]),
,)
AC_ARG_WITH(info-url,
AS_HELP_STRING([--with-info-url="https://john-the-builder.org"],
[Set the info url of the build.]),
,)
2017-06-30 05:10:38 -05:00
AC_ARG_ENABLE([seccomp],
AS_HELP_STRING([--disable-seccomp],
[Disable use of linux/seccomp.h header when kernel on target system does not support it.
Beware of the security consequences!]))
2015-03-09 04:11:15 -05:00
AC_ARG_WITH([lokit-path],
AS_HELP_STRING([--with-lokit-path=<path>],
2016-01-06 07:37:21 -06:00
[Path to the "include" directory with the LibreOfficeKit headers]))
2015-03-09 04:11:15 -05:00
2016-04-05 11:41:10 -05:00
AC_ARG_WITH([lo-path],
AS_HELP_STRING([--with-lo-path=<path>],
[Path to a working installation directory or instdir of LibreOffice]))
2018-11-01 17:37:01 -05:00
AC_ARG_WITH([lo-builddir],
AS_HELP_STRING([--with-lo-builddir=<path>],
2019-02-13 04:32:49 -06:00
[Mandatory, and relevant, in a tree where building the iOS or Android app.
2018-11-04 04:48:00 -06:00
Path to a the build directory of the LibreOffice core source tree you want to use.
2019-02-13 04:32:49 -06:00
In case of macOS, you MUST manually edit the ios/Mobile.xcodeproj/project.pbxproj
2018-11-04 04:48:00 -06:00
file and change the references to "../ios-device" to refer to the corresponding
LibreOffice core source directory (which typically would be the same as the build
directory you specify with this option).]))
2018-11-01 17:37:01 -05:00
2016-09-27 06:40:44 -05:00
AC_ARG_WITH([logfile],
AS_HELP_STRING([--with-logfile=<path>],
[Path to the location of the logfile.]))
2015-03-09 04:11:15 -05:00
AC_ARG_WITH([poco-includes],
AS_HELP_STRING([--with-poco-includes=<path>],
2016-01-06 07:37:21 -06:00
[Path to the "include" directory with the Poco headers]))
2015-03-09 04:11:15 -05:00
AC_ARG_WITH([poco-libs],
AS_HELP_STRING([--with-poco-libs=<path>],
2016-01-06 07:37:21 -06:00
[Path to the "lib" directory with the Poco libraries]))
2015-03-09 04:11:15 -05:00
2015-05-22 04:53:43 -05:00
AC_ARG_WITH([libpng-includes],
AS_HELP_STRING([--with-libpng-includes=<path>],
2016-01-06 07:37:21 -06:00
[Path to the "include" directory with the libpng headers]))
2015-05-22 04:53:43 -05:00
AC_ARG_WITH([libpng-libs],
AS_HELP_STRING([--with-libpng-libs=<path>],
2016-01-06 07:37:21 -06:00
[Path to the "lib" directory with the libpng libraries]))
2015-05-22 04:53:43 -05:00
2016-09-20 12:32:30 -05:00
AC_ARG_WITH([cppunit-includes],
AS_HELP_STRING([--with-cppunit-includes=<path>],
[Path to the "include" directory with the Cppunit headers]))
AC_ARG_WITH([cppunit-libs],
AS_HELP_STRING([--with-cppunit-libs=<path>],
[Path to the "lib" directory with the Cppunit libraries]))
2016-04-08 04:24:52 -05:00
AC_ARG_ENABLE([ssl],
AS_HELP_STRING([--disable-ssl],
[Compile without SSL support]))
2017-10-06 03:54:11 -05:00
AC_ARG_WITH([support-public-key],
AS_HELP_STRING([--with-support-public-key=<public-key-name.pub>],
2018-02-13 02:31:11 -06:00
[Implements signed key with expiration required for support. Targeted at LibreOffice Online Service Providers.]))
2017-07-21 09:33:19 -05:00
2016-07-13 21:01:23 -05:00
AC_ARG_WITH([max-connections],
2017-10-04 03:59:04 -05:00
AS_HELP_STRING([--with-max-connections],
2017-01-03 14:19:02 -06:00
[Set the limit on the total number of client connections. Def: 20, Min: 3.]))
AC_ARG_WITH([max-documents],
2017-10-04 03:59:04 -05:00
AS_HELP_STRING([--with-max-documents],
2017-01-03 14:19:02 -06:00
[Set the limit on the total number of documents. Def: 10, Min: 2.]))
2016-07-13 21:01:23 -05:00
2019-09-21 15:29:56 -05:00
AC_ARG_WITH([sanitizer],
AS_HELP_STRING([--with-sanitizer],
[Enable one or more compatible sanitizers. E.g. --with-sanitizer=address,undefined,leak]))
2016-12-22 08:04:07 -06:00
AC_ARG_WITH([compiler-plugins],
AS_HELP_STRING([--with-compiler-plugins=<path>],
[Experimental! Unlikely to work for anyone except Noel! Enable compiler plugins that will perform additional checks during
building.]))
2018-02-01 07:49:44 -06:00
AC_ARG_ENABLE([setcap],
AS_HELP_STRING([--disable-setcap],
[Do not set capabilities on files. For packaging builds]))
2018-02-08 08:27:12 -06:00
AC_ARG_ENABLE([werror],
AS_HELP_STRING([--disable-werror],
[Do not turn warnings into errors.]))
2018-12-11 05:55:16 -06:00
AC_ARG_ENABLE([vereign],
AS_HELP_STRING([--enable-vereign],
[Set Vereign document_signing_url configuration key to the default app.vereign.com.]))
2015-03-09 04:11:15 -05:00
# Handle options
2016-01-04 02:16:22 -06:00
AS_IF([test "$enable_debug" = yes -a -n "$with_poco_libs"],
2015-03-09 04:11:15 -05:00
[POCO_DEBUG_SUFFIX=d],
[POCO_DEBUG_SUFFIX=])
2016-04-12 04:00:33 -05:00
ENABLE_DEBUG=
2016-09-27 06:40:44 -05:00
LOOLWSD_LOGLEVEL="warning"
LOOLWSD_LOG_TO_FILE="false"
LOOLWSD_LOGFILE="/var/log/loolwsd.log"
2019-04-14 11:24:45 -05:00
LOOLWSD_ANONYMIZE_USER_DATA=false
2016-12-15 03:56:54 -06:00
LOLEAFLET_LOGGING="false"
2016-04-11 16:11:38 -05:00
debug_msg="secure mode: product build"
2018-06-23 18:52:27 -05:00
anonym_msg=""
2016-04-12 04:00:33 -05:00
if test "$enable_debug" = "yes"; then
2016-04-14 05:42:12 -05:00
AC_DEFINE([ENABLE_DEBUG],1,[Whether to compile in some extra debugging support code and disable some security pieces])
2016-04-12 04:00:33 -05:00
ENABLE_DEBUG=true
2016-09-27 06:40:44 -05:00
LOOLWSD_LOGLEVEL="trace"
LOOLWSD_LOG_TO_FILE="true"
2016-09-27 07:30:45 -05:00
LOOLWSD_LOGFILE="/tmp/loolwsd.log"
2019-04-14 11:24:45 -05:00
LOOLWSD_ANONYMIZE_USER_DATA=false
2016-12-15 03:56:54 -06:00
LOLEAFLET_LOGGING="true"
2016-04-15 08:23:44 -05:00
debug_msg="low security debugging mode"
2016-04-14 05:42:12 -05:00
else
AC_DEFINE([ENABLE_DEBUG],0,[Whether to compile in some extra debugging support code and disable some security pieces])
2016-04-11 16:11:38 -05:00
fi
2016-04-12 04:00:33 -05:00
AC_SUBST(ENABLE_DEBUG)
2016-09-27 06:40:44 -05:00
AC_SUBST(LOOLWSD_LOGLEVEL)
AC_SUBST(LOOLWSD_LOG_TO_FILE)
2016-12-15 03:56:54 -06:00
AC_SUBST(LOLEAFLET_LOGGING)
2016-09-27 06:40:44 -05:00
2019-02-12 04:47:24 -06:00
ENABLE_BROWSERSYNC=
browsersync_msg="disabled: copy files to the target directory"
if test "$enable_browsersync" = "yes"; then
AC_DEFINE([ENABLE_BROWSERSYNC],1,[Whether to create symlinks instead of copying files to the target dorectory to run browsersync])
ENABLE_BROWSERSYNC=true
browsersync_msg="enabled: create symlinks in the target directory"
else
AC_DEFINE([ENABLE_BROWSERSYNC],0,[Whether to create symlinks instead of copying files to the target dorectory to run browsersync])
fi
AC_SUBST(ENABLE_BROWSERSYNC)
2016-09-27 06:40:44 -05:00
if test -n "$with_logfile" ; then
LOOLWSD_LOGFILE="$with_logfile"
fi
AC_SUBST(LOOLWSD_LOGFILE)
2016-04-11 16:11:38 -05:00
2019-04-14 11:24:45 -05:00
if test "$enable_anonymization" = "yes" ; then
LOOLWSD_ANONYMIZE_USER_DATA=true
anonym_msg="anonymization of user-data is enabled"
2018-06-03 13:02:44 -05:00
fi
2019-04-14 11:24:45 -05:00
AC_DEFINE_UNQUOTED([LOOLWSD_ANONYMIZE_USER_DATA],[$LOOLWSD_ANONYMIZE_USER_DATA],[Enable permanent anonymization in logs])
AC_SUBST(LOOLWSD_ANONYMIZE_USER_DATA)
2018-06-03 13:02:44 -05:00
2018-10-30 05:05:17 -05:00
if test -z "$anonym_msg"; then
2019-04-14 11:24:45 -05:00
anonym_msg="anonymization of user-data is disabled"
2018-06-23 18:52:27 -05:00
fi
2018-11-01 17:37:01 -05:00
2019-02-13 04:32:49 -06:00
# macOS: When configuring for building the app itself, on macOS, we need these.
# But not when just configuring for building the JS on Linux, for copying over
# to the Mac.
# Android: We need these to setup the CMakeLists.txt properly.
LOBUILDDIR=
POCOINCLUDE=
POCOLIB=
2019-02-13 10:28:01 -06:00
POCODEBUG=
2019-02-13 04:32:49 -06:00
if test \( "$enable_iosapp" = "yes" -a `uname -s` = "Darwin" \) -o \( "$enable_androidapp" = "yes" \); then
AC_MSG_CHECKING([for LibreOffice build tree to build against])
if test -z "$with_lo_builddir"; then
AC_MSG_ERROR([You MUST use the --with-lo-builddir option when configuring the mobile app build tree.])
fi
LOBUILDDIR="$with_lo_builddir"
# Sanity check, just a random object file in the LibreOffice build tree
if test \( "$enable_iosapp" = "yes" -a -f "$LOBUILDDIR/workdir/CxxObject/vcl/ios/iosinst.o" \) -o \( "$enable_androidapp" = "yes" -a -f "$LOBUILDDIR/workdir/LinkTarget/StaticLibrary/liblibpng.a" \); then
AC_MSG_RESULT([$LOBUILDDIR])
else
AC_MSG_ERROR([This is not a LibreOffice core build directory: $LOBUILDDIR])
fi
AC_MSG_CHECKING([for Poco include directory to build against])
if test -z "$with_poco_includes"; then
AC_MSG_ERROR([You MUST use the --with-poco-includes option when configuring the mobile app build tree.])
fi
POCOINCLUDE="$with_poco_includes"
# Sanity check
if test -f "$POCOINCLUDE/Poco/Poco.h"; then
AC_MSG_RESULT([$POCOINCLUDE])
else
AC_MSG_ERROR([This is not a Poco include directory: $POCOINCLUDE])
fi
AC_MSG_CHECKING([for Poco lib directory to build against])
if test -z "$with_poco_libs"; then
AC_MSG_ERROR([You MUST use the --with-poco-libs option when configuring the mobile app build tree.])
fi
POCOLIB="$with_poco_libs"
# Sanity check
if test -f "$POCOLIB/libPocoFoundation.a"; then
AC_MSG_RESULT([$POCOLIB])
else
AC_MSG_ERROR([This is not a Poco lib directory: $POCOLIB])
fi
2019-02-13 10:28:01 -06:00
if test "$ENABLE_DEBUG" = "true" ; then
POCODEBUG=d
fi
2019-02-13 04:32:49 -06:00
fi
AC_SUBST(LOBUILDDIR)
AC_SUBST(POCOINCLUDE)
AC_SUBST(POCOLIB)
2019-02-13 10:28:01 -06:00
AC_SUBST(POCODEBUG)
2019-02-13 04:32:49 -06:00
2019-02-13 05:09:36 -06:00
LIBPNG_INCLUDES="$with_libpng_includes"
LIBPNG_LIBS="$with_libpng_libs"
LOKIT_PATH=`readlink -f $with_lokit_path`
if test "$enable_androidapp" = "yes"; then
if test -z "$LIBPNG_INCLUDES" ; then
LIBPNG_INCLUDES="$LOBUILDDIR/workdir/UnpackedTarball/libpng"
fi
if test -z "$LIBPNG_LIBS" ; then
LIBPNG_LIBS="$LOBUILDDIR/workdir/LinkTarget/StaticLibrary"
fi
if test -z "$LOKIT_PATH" ; then
LOKIT_PATH=`readlink -f $LOBUILDDIR/include`
fi
fi
AC_SUBST(LIBPNG_INCLUDES)
AC_SUBST(LIBPNG_LIBS)
AC_SUBST(LOKIT_PATH)
2019-06-18 07:41:42 -05:00
ENABLE_ANDROIDAPP=
ANDROID_PACKAGE_NAME=
if test "$enable_androidapp" = "yes"; then
ENABLE_ANDROIDAPP=true
AC_MSG_CHECKING([for Android package name])
if test -z "$with_android_package_name" -o "$with_android_package_name" = "no"; then
ANDROID_PACKAGE_NAME="org.libreoffice.androidapp"
AC_MSG_RESULT([not set, using $ANDROID_PACKAGE_NAME])
else
ANDROID_PACKAGE_NAME="$with_android_package_name"
AC_MSG_RESULT([$ANDROID_PACKAGE_NAME])
fi
fi
AC_SUBST(ENABLE_ANDROIDAPP)
AM_CONDITIONAL([ENABLE_ANDROIDAPP], [test "$ENABLE_ANDROIDAPP" = "true"])
AC_SUBST(ANDROID_PACKAGE_NAME)
2019-03-30 13:12:19 -05:00
APP_NAME="LOOL"
if test -n "$with_app_name"; then
APP_NAME="$with_app_name"
fi
AC_DEFINE_UNQUOTED([APP_NAME],["$APP_NAME"],[The user-visible name of the app you build.])
AC_SUBST(APP_NAME)
2019-04-16 05:53:38 -05:00
VENDOR=
AC_MSG_CHECKING([for vendor])
if test -z "$with_vendor" -o "$with_vendor" = "no"; then
VENDOR="$USERNAME"
if test -z "$VENDOR"; then
VENDOR="$USER"
fi
if test -z "$VENDOR"; then
VENDOR="`id -u -n`"
fi
AC_MSG_RESULT([not set, using $VENDOR])
else
VENDOR="$with_vendor"
AC_MSG_RESULT([$VENDOR])
fi
AC_SUBST(VENDOR)
INFO_URL='https://www.libreoffice.org'
if test -n "$with_info_url" -a "$with_info_url" != "no"; then
INFO_URL="$with_info_url"
fi
AC_SUBST(INFO_URL)
2018-08-31 05:24:17 -05:00
ENABLE_IOSAPP=
2019-02-24 06:44:06 -06:00
IOSAPP_BUNDLE_VERSION=
2018-11-01 17:37:01 -05:00
2018-08-31 05:24:17 -05:00
if test "$enable_iosapp" = "yes"; then
ENABLE_IOSAPP=true
2019-02-24 06:44:06 -06:00
if test -f BUNDLE-VERSION; then
IOSAPP_BUNDLE_VERSION=$(cat BUNDLE-VERSION)
else
IOSAPP_BUNDLE_VERSION=1
fi
echo $IOSAPP_BUNDLE_VERSION >BUNDLE-VERSION
2018-08-31 05:24:17 -05:00
fi
2019-02-24 06:44:06 -06:00
2018-08-31 05:24:17 -05:00
AC_SUBST(ENABLE_IOSAPP)
AM_CONDITIONAL([ENABLE_IOSAPP], [test "$ENABLE_IOSAPP" = "true"])
2019-02-24 06:44:06 -06:00
AC_SUBST(IOSAPP_BUNDLE_VERSION)
2018-08-31 05:24:17 -05:00
2019-06-21 03:43:53 -05:00
AC_MSG_CHECKING([for custom icon theme])
CUSTOM_ICONS_DIRECTORY=
if test -d "$with_icon_theme"; then
CUSTOM_ICONS_DIRECTORY=`readlink -f $with_icon_theme`
AC_MSG_RESULT([$CUSTOM_ICONS_DIRECTORY])
else
AC_MSG_RESULT([no])
fi
AC_SUBST(CUSTOM_ICONS_DIRECTORY)
2018-10-16 17:22:24 -05:00
ENABLE_GTKAPP=
if test "$enable_gtkapp" = "yes"; then
ENABLE_GTKAPP=true
fi
AC_SUBST(ENABLE_GTKAPP)
AM_CONDITIONAL([ENABLE_GTKAPP], [test "$ENABLE_GTKAPP" = "true"])
2016-07-19 04:17:41 -05:00
MAX_CONNECTIONS=20
2017-10-26 08:53:43 -05:00
AS_IF([test -n "$with_max_connections" && test "$with_max_connections" -gt "0"],
2016-07-13 21:01:23 -05:00
[MAX_CONNECTIONS="$with_max_connections"])
2017-01-03 14:19:02 -06:00
AS_IF([test "$MAX_CONNECTIONS" -lt "3"],
[MAX_CONNECTIONS="3"])
2016-08-21 07:19:52 -05:00
AC_DEFINE_UNQUOTED([MAX_CONNECTIONS],[$MAX_CONNECTIONS],[Limit the maximum number of open connections])
2016-07-13 21:01:23 -05:00
AC_SUBST(MAX_CONNECTIONS)
2017-01-03 14:19:02 -06:00
MAX_DOCUMENTS=10
2017-10-26 08:53:43 -05:00
AS_IF([test -n "$with_max_documents" && test "$with_max_documents" -gt "0"],
2017-01-03 14:19:02 -06:00
[MAX_DOCUMENTS="$with_max_documents"])
AS_IF([test "$MAX_DOCUMENTS" -gt "$MAX_CONNECTIONS"],
[MAX_DOCUMENTS="$MAX_CONNECTIONS"])
AS_IF([test "$MAX_DOCUMENTS" -lt "2"],
[MAX_DOCUMENTS="2"])
AC_DEFINE_UNQUOTED([MAX_DOCUMENTS],[$MAX_DOCUMENTS],[Limit the maximum number of open documents])
AC_SUBST(MAX_DOCUMENTS)
2016-10-23 12:30:54 -05:00
2018-12-11 05:55:16 -06:00
VEREIGN_URL=
if test "$enable_vereign" = "yes"; then
VEREIGN_URL="https://app.vereign.com"
fi
AC_DEFINE_UNQUOTED([VEREIGN_URL],["$VEREIGN_URL"],[Default value of per_documents.document_signing_url])
AC_SUBST(VEREIGN_URL)
2015-03-09 04:11:15 -05:00
# Test for build environment
2018-10-17 02:26:01 -05:00
AS_IF([test "$ENABLE_GTKAPP" != true],
[CXXFLAGS="$CXXFLAGS -std=c++11"
CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow"])
2018-02-08 08:27:12 -06:00
CFLAGS="$CFLAGS -Wall -Wextra"
AC_MSG_CHECKING([whether to turn warnings to errors])
if test -z "$enable_werror" -o "$enable_werror" = "yes"; then
AC_MSG_RESULT([yes])
CXXFLAGS="$CXXFLAGS -Werror"
CFLAGS="$CFLAGS -Werror"
else
AC_MSG_RESULT([no])
fi
2015-03-09 04:11:15 -05:00
2019-09-21 15:29:56 -05:00
AC_MSG_CHECKING([whether to turn sanitizers on])
if test "x$with_sanitizer" != "x"; then
AC_MSG_RESULT([yes ($with_sanitizer)])
SANITIZER_FLAGS="-O1 -fno-omit-frame-pointer -fsanitize=$with_sanitizer -frtti -static-libasan"
CXXFLAGS="$CXXFLAGS $SANITIZER_FLAGS"
CFLAGS="$CFLAGS $SANITIZER_FLAGS"
else
AC_MSG_RESULT([no])
fi
2017-08-10 02:50:36 -05:00
# check for C++11 support
HAVE_CXX11=
AC_MSG_CHECKING([whether $CXX supports C++14 or C++11])
for flag in -std=gnu++14 -std=gnu++1y -std=c++14 -std=c++1y -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x ; do
save_CXXFLAGS=$CXXFLAGS
CXXFLAGS="$CXXFLAGS $flag -Werror"
AC_LANG_PUSH([C++])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <algorithm>
#include <functional>
#include <vector>
void f(std::vector<int> & v, std::function<bool(int, int)> fn) {
std::sort(v.begin(), v.end(), fn);
}
]])],[CXXFLAGS_CXX11=$flag])
AC_LANG_POP([C++])
CXXFLAGS=$save_CXXFLAGS
if test -n "$CXXFLAGS_CXX11"; then
HAVE_CXX11=TRUE
break
fi
done
if test "$HAVE_CXX11" = TRUE; then
AC_MSG_RESULT([yes ($CXXFLAGS_CXX11)])
else
AC_MSG_ERROR(no)
fi
2019-02-13 05:09:36 -06:00
AS_IF([test -n "$LOKIT_PATH"],
[CPPFLAGS="$CPPFLAGS -I${LOKIT_PATH}"])
lokit_msg="$LOKIT_PATH"
2016-04-05 11:41:10 -05:00
2019-10-08 06:46:19 -05:00
AS_IF([test "$ENABLE_IOSAPP" != "true" -a "$ENABLE_ANDROIDAPP" != "true"],
[AC_MSG_CHECKING([for LibreOffice path])
if test -n "$with_lo_path"; then
# strip trailing '/' from LO_PATH, 'ln -s' with such path will otherwise fail
LO_PATH="${with_lo_path%/}"
AC_MSG_RESULT([found])
else
AC_MSG_RESULT([not found])
AC_MSG_ERROR([LibreOffice path must be configured: --with-lo-path])
fi
])
2019-10-01 03:35:38 -05:00
2016-04-11 12:21:16 -05:00
JAIL_PATH=not-set
SYSTEMPLATE_PATH=not-set
2016-04-05 11:41:10 -05:00
have_lo_path=false
AC_MSG_CHECKING([whether to run tests against a LibreOffice])
2019-10-01 03:35:38 -05:00
version_file="$with_lo_path/program/versionrc"
if test -f $version_file; then
JAILS_PATH="\${abs_top_builddir}/jails"
SYSTEMPLATE_PATH="\${abs_top_builddir}/systemplate"
have_lo_path=true
lo_msg="test against $LO_PATH"
AC_MSG_RESULT([yes])
2016-04-05 11:41:10 -05:00
else
2019-10-01 03:35:38 -05:00
lo_msg="no integration tests"
AC_MSG_RESULT([no])
2016-04-05 11:41:10 -05:00
fi
2019-10-01 03:35:38 -05:00
2016-04-05 11:41:10 -05:00
AC_SUBST(LO_PATH)
2017-03-20 13:07:01 -05:00
AC_DEFINE_UNQUOTED([LO_PATH],["$LO_PATH"],[Path to LibreOffice installation])
2016-04-11 12:21:16 -05:00
AC_SUBST(JAILS_PATH)
AC_SUBST(SYSTEMPLATE_PATH)
2016-04-05 11:41:10 -05:00
AM_CONDITIONAL(HAVE_LO_PATH,[test "$have_lo_path" = "true"])
2015-03-09 04:11:15 -05:00
AS_IF([test -n "$with_poco_includes"],
2016-07-11 02:54:56 -05:00
[CPPFLAGS="$CPPFLAGS -isystem ${with_poco_includes}"])
2015-03-09 04:11:15 -05:00
AS_IF([test -n "$with_poco_libs"],
2015-05-04 12:52:05 -05:00
[LDFLAGS="$LDFLAGS -L${with_poco_libs}"])
2019-02-13 05:09:36 -06:00
AS_IF([test -n "$LIBPNG_INCLUDES"],
[CPPFLAGS="$CPPFLAGS -isystem ${LIBPNG_INCLUDES}"])
2015-05-22 04:53:43 -05:00
2019-02-13 05:09:36 -06:00
AS_IF([test -n "$LIBPNG_LIBS"],
[LDFLAGS="$LDFLAGS -L${LIBPNG_LIBS}"])
2015-05-22 04:53:43 -05:00
2016-09-20 12:32:30 -05:00
AS_IF([test -n "$with_cppunit_includes"],
[CPPFLAGS="$CPPFLAGS -isystem ${with_cppunit_includes}"])
AS_IF([test -n "$with_cppunit_libs"],
[LDFLAGS="$LDFLAGS -L${with_cppunit_libs}"])
2015-05-04 12:52:05 -05:00
AS_IF([test `uname -s` = Linux],
[AS_IF([test -n "$with_poco_libs"],
[LDFLAGS="$LDFLAGS -Wl,-rpath,${with_poco_libs}"])])
2015-03-09 04:11:15 -05:00
2016-09-20 12:32:30 -05:00
AS_IF([test `uname -s` = Linux],
[AS_IF([test -n "$with_cppunit_libs"],
[LDFLAGS="$LDFLAGS -Wl,-rpath,${with_cppunit_libs}"])])
2017-08-12 00:07:02 -05:00
AS_IF([test `uname -s` != Darwin],
[AC_SEARCH_LIBS([dlopen],
[dl dld],
[],
[AC_MSG_ERROR([dlopen not found])])])
2019-02-11 12:02:46 -06:00
AS_IF([test "$ENABLE_IOSAPP" != "true" -a "$ENABLE_ANDROIDAPP" != "true"],
2018-10-30 04:25:33 -05:00
[AC_SEARCH_LIBS([png_create_write_struct],
[png],
[],
[AC_MSG_ERROR([libpng not available?])])
PKG_CHECK_MODULES([ZLIB], [zlib])
PKG_CHECK_MODULES([CPPUNIT], [cppunit])
])
2015-03-09 04:11:15 -05:00
2019-02-11 12:02:46 -06:00
AS_IF([test `uname -s` = Linux -a "$ENABLE_ANDROIDAPP" != "true"],
2015-05-04 12:17:41 -05:00
[AC_SEARCH_LIBS([cap_get_proc],
[cap],
[],
[AC_MSG_ERROR([libcap not available?])])])
2015-04-27 13:55:36 -05:00
2018-10-17 02:26:01 -05:00
AS_IF([test "$ENABLE_GTKAPP" = true],
[PKG_CHECK_MODULES([WEBKIT],[webkit2gtk-4.0])])
2017-04-05 04:57:28 -05:00
AM_CONDITIONAL([ENABLE_DEBUG], [test "$ENABLE_DEBUG" = "true"])
2019-02-12 04:47:24 -06:00
AM_CONDITIONAL([ENABLE_BROWSERSYNC], [test "$ENABLE_BROWSERSYNC" = "true"])
2016-04-14 11:47:35 -05:00
2018-11-01 16:20:15 -05:00
mobile_app=
2019-02-13 06:22:25 -06:00
ENABLE_MOBILEAPP=
2019-02-12 05:16:40 -06:00
MOBILEAPP=0
2018-11-01 16:20:15 -05:00
AC_MSG_CHECKING([Is this a mobile app])
2019-02-11 12:02:46 -06:00
if test "$enable_gtkapp" = "yes" -o "$enable_iosapp" = "yes" -o "$enable_androidapp"; then
2018-11-01 16:20:15 -05:00
AC_MSG_RESULT([Yes])
mobile_app=true;
2019-02-12 03:15:51 -06:00
MOBILEAPP=1
2019-02-13 06:22:25 -06:00
ENABLE_MOBILEAPP=true
2018-11-01 16:20:15 -05:00
else
AC_MSG_RESULT([No])
fi
2019-02-12 03:15:51 -06:00
AC_DEFINE_UNQUOTED([MOBILEAPP],[$MOBILEAPP],[Define to 1 if this is a mobileapp (eg. Android) build.])
2019-02-13 06:22:25 -06:00
AC_SUBST(ENABLE_MOBILEAPP)
AM_CONDITIONAL([ENABLE_MOBILEAPP], [test "$ENABLE_MOBILEAPP" = "true"])
2018-11-01 16:20:15 -05:00
2018-06-03 16:51:43 -05:00
ENABLE_SSL=true
2018-11-01 16:20:15 -05:00
if test "$enable_ssl" != "no" -a "$mobile_app" != "true"; then
2016-04-11 16:11:38 -05:00
ssl_msg="ssl enabled"
2016-04-14 03:34:37 -05:00
ENABLE_SSL=true
2018-11-01 16:20:15 -05:00
AC_DEFINE([ENABLE_SSL],1,[Whether to enable SSL])
2016-04-11 16:11:38 -05:00
else
ssl_msg="insecure: ssl disabled"
2018-06-03 16:51:43 -05:00
ENABLE_SSL=false
2018-11-01 16:20:15 -05:00
AC_DEFINE([ENABLE_SSL],0,[Whether to enable SSL])
2016-04-11 16:11:38 -05:00
fi
2018-11-01 16:20:15 -05:00
AM_CONDITIONAL([ENABLE_SSL], [$ENABLE_SSL])
2016-04-13 11:31:10 -05:00
AC_SUBST(ENABLE_SSL)
2019-02-11 12:02:46 -06:00
AS_IF([test "$ENABLE_ANDROIDAPP" != "true"],
[AC_CHECK_HEADERS([security/pam_appl.h],
[],
[AC_MSG_ERROR([header security/pam_appl.h not found, install PAM development package])])
AC_CHECK_LIB(pam, pam_start, [], [AC_MSG_ERROR([No. Install PAM development package])])])
2018-03-03 06:33:15 -06:00
2019-01-08 11:49:12 -06:00
AC_MSG_CHECKING([whether to build with support public key])
2017-10-06 03:54:11 -05:00
if test "x$with_support_public_key" != "x"; then
AC_DEFINE([ENABLE_SUPPORT_KEY],1,[Whether to enable support key])
# generate the public key include
echo -e "#ifndef INCLUDED_SUPPORT_PUBLIC_KEY_HPP\n#define INCLUDED_SUPPORT_PUBLIC_KEY_HPP\n#include <string>\nconst static std::string SUPPORT_PUBLIC_KEY(" > "${srcdir}/common/support-public-key.hpp"
sed 's/\(.*\)/"\1\\n"/' "$with_support_public_key" >> "${srcdir}/common/support-public-key.hpp"
echo -e ");\n#endif" >> "${srcdir}/common/support-public-key.hpp"
2019-01-08 11:49:12 -06:00
AC_MSG_RESULT([yes])
2017-10-06 03:54:11 -05:00
else
AC_DEFINE([ENABLE_SUPPORT_KEY],0,[Whether to enable support key])
rm -f "${srcdir}/common/support-public-key.hpp"
2019-01-08 11:49:12 -06:00
AC_MSG_RESULT([no])
2017-10-06 03:54:11 -05:00
fi
2017-07-21 09:33:19 -05:00
AC_SUBST(ENABLE_SUPPORT_KEY)
2019-10-30 04:03:49 -05:00
LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoNetSSL${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX} -lPocoCrypto${POCO_DEBUG_SUFFIX}"
2015-03-09 04:11:15 -05:00
2018-10-30 04:25:33 -05:00
AS_IF([test "$ENABLE_IOSAPP" != "true"],
[AC_CHECK_HEADERS([LibreOfficeKit/LibreOfficeKit.h],
[],
[AC_MSG_ERROR([header LibreOfficeKit/LibreOfficeKit.h not found, perhaps you want to use --with-lokit-path])])
AC_CHECK_HEADERS([Poco/Net/WebSocket.h],
[],
[AC_MSG_ERROR([header Poco/Net/WebSocket.h not found, perhaps you want to use --with-poco-includes])])
DISABLE_SECCOMP=
if test "$enable_seccomp" != "no"; then
AC_CHECK_HEADERS([linux/seccomp.h],
[],
[AC_MSG_ERROR([critical security header linux/seccomp.h not found. If kernel on target system does not support SECCOMP, you can use --disable-seccomp, but mind the security consequences.])])
AC_DEFINE([DISABLE_SECCOMP],0,[Whether to disable SECCOMP])
else
AC_DEFINE([DISABLE_SECCOMP],1,[Whether to disable SECCOMP])
fi
AC_MSG_CHECKING([Whether OpenSSL has PKCS5_PBKDF2_HMAC()])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_NUMBER < 0x10001000L
#error PKCS5_PBKDF2_HMAC() is in OpenSSL 1.0.1 or newer
#endif
])],
[AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],1,[whether OpenSSL has PKCS5_PBKDF2_HMAC()])],
[AC_MSG_RESULT([no])
AC_MSG_WARN([OpenSSL is too old. Secure password storage for Admin Console is not supported.])
AC_DEFINE([HAVE_PKCS5_PBKDF2_HMAC],0,[Whether OpenSSL has PKCS5_PBKDF2_HMAC()])])
AC_MSG_CHECKING([POCO version])
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
#include <Poco/Version.h>
#if POCO_VERSION < 0x01070100
#error Require Poco 1.7.1 or newer
#endif
])],
[AC_MSG_RESULT([OK])],
[AC_MSG_ERROR([The POCO version is too old])])
# If poco is built with --unbundled, it uses the system pcre library
AC_MSG_CHECKING([If we need to link with -lpcre])
AC_LINK_IFELSE([AC_LANG_SOURCE([
#include <Poco/RegularExpression.h>
int main(int argc, char **argv)
{
2019-10-30 07:51:48 -05:00
(void)argc;
2018-10-30 04:25:33 -05:00
Poco::RegularExpression e("abc.[def]");
Poco::RegularExpression::Match m;
return e.match(argv[[1]], m);
}
])],
[AC_MSG_RESULT([No])],
[AC_MSG_RESULT([Yes])
LIBS="$LIBS -lpcre"])
])
AS_IF([test `uname -s` = "Linux"],
# We need npm and node only on Linux, both in the normal Online case,
# and when only building JS for the iOS app. When building the iOS app itself on macOS,
# don't do this.
[AC_PATH_PROG(NPM, npm, no)
if test "$NPM" = "no"; then
AC_MSG_ERROR([npm required to build loleaflet, but not installed])
else
NPM_VER=`npm -v | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
2019-04-01 06:13:44 -05:00
if test "$NPM_VER" -lt 50000; then
AC_MSG_ERROR([This npm version is too old, upgrade to >= 5.0.0])
2018-10-30 04:25:33 -05:00
fi
fi
AC_PATH_PROG(NODE, node, no)
if test "$NODE" = "no"; then
AC_MSG_ERROR([node required to build loleaflet, but not installed])
else
NODE_VER=`node --version | sed 's/^v//' | awk -F. '{ print (($1 * 100) + $2) * 100 + $3;}'`
if test "$NODE_VER" -lt 60000; then
AC_MSG_ERROR([This node version is old, upgrade to >= 6.0.0])
fi
fi
])
2016-12-22 08:04:07 -06:00
# need this after the other stuff that uses the compiler because we don't want to run configure-tests with the plugins enabled
AS_IF([test -n "$with_compiler_plugins"],
2017-12-18 16:40:36 -06:00
[CPPFLAGS="$CPPFLAGS -Xclang -load -Xclang ${with_compiler_plugins}/compilerplugins/obj/plugin.so -Xclang -add-plugin -Xclang loplugin -Xclang -plugin-arg-loplugin -Xclang --lool-base-path=\${abs_top_srcdir}"])
2016-12-22 08:04:07 -06:00
2016-04-14 05:34:11 -05:00
LOOLWSD_CONFIGDIR=${sysconfdir}/${PACKAGE}
2016-03-24 04:37:17 -05:00
AC_SUBST(LOOLWSD_CONFIGDIR)
2016-04-14 05:34:11 -05:00
LOOLWSD_DATADIR=${datadir}/${PACKAGE}
AC_SUBST(LOOLWSD_DATADIR)
2018-02-01 07:49:44 -06:00
AS_IF([test "$enable_setcap" != "no"],
[AC_DEFINE([ENABLE_SETCAP],1,[Whether to enable setting of capabilities])],
[AC_DEFINE([ENABLE_SETCAP],0,[Whether to enable setting of capabilities])])
AM_CONDITIONAL([ENABLE_SETCAP], [test "$enable_setcap" != "no"])
ENABLE_SETCAP=
if test "$enable_setcap" != "no"; then
ENABLE_SETCAP=true
setcap_msg="setcap enabled"
else
setcap_msg="setcap disabled"
fi
AC_SUBST(ENABLE_SETCAP)
2018-04-12 14:57:00 -05:00
AC_CONFIG_LINKS([discovery.xml:discovery.xml])
AC_CONFIG_LINKS([loolkitconfig.xcu:loolkitconfig.xcu])
AC_CONFIG_LINKS([loleaflet/package.json:loleaflet/package.json])
2019-03-30 15:32:49 -05:00
AC_LINK_FILES([loleaflet/archived-packages], [loleaflet/archived-packages])
2018-04-12 14:57:00 -05:00
2019-06-18 09:10:26 -05:00
APP_BRANDING_DIR=
if test "$with_app_branding" != no -a -d "$with_app_branding"; then
APP_BRANDING_DIR="$with_app_branding"
fi
AC_SUBST(APP_BRANDING_DIR)
2018-11-27 09:06:22 -06:00
AS_IF([test "$ENABLE_IOSAPP" = "true"],
[
if test `uname -s` = "Darwin"; then
IOSAPP_FONTS=''
2019-01-22 15:49:47 -06:00
mkdir -p ios/Mobile/Fonts
2018-11-27 09:06:22 -06:00
if test "$with_iosapp_fonts" != no -a -d "$with_iosapp_fonts"; then
AC_MSG_NOTICE([copying fonts to be bundled])
IOSAPP_FONTS=`find "$with_iosapp_fonts" -type f |
while read fname; do
cp "$fname" ios/Mobile/Fonts
echo '<string>Fonts/'$(basename $fname)'</string>'
done`
fi
2019-04-22 07:22:04 -05:00
rm -rf ios/Mobile/Branding
mkdir ios/Mobile/Branding
2019-06-18 09:10:26 -05:00
if test -n "$APP_BRANDING_DIR" ; then
2019-04-22 07:22:04 -05:00
AC_MSG_NOTICE([copying branding files])
2019-07-12 10:22:58 -05:00
mkdir -p ios/Mobile/Branding
2019-06-18 09:10:26 -05:00
(cd "$APP_BRANDING_DIR" && tar cf - .) | (cd ios/Mobile/Branding && tar xf -)
2019-04-22 07:22:04 -05:00
else
# A Branding/branding.css file must exist, it is
# referenced unconditionally in loleaflet.html in the
# iOS app.
touch ios/Mobile/Branding/branding.css
fi
2018-11-27 09:06:22 -06:00
fi
])
AC_SUBST(IOSAPP_FONTS)
2015-05-20 12:10:17 -05:00
AC_CONFIG_FILES([Makefile
2019-07-11 04:29:13 -05:00
android/app/appSettings.gradle
android/lib/libSettings.gradle
android/lib/src/main/cpp/CMakeLists.txt
2019-06-19 04:21:40 -05:00
android/Makefile
2018-10-17 02:26:01 -05:00
gtk/Makefile
2018-11-26 17:03:00 -06:00
ios/config.h
2018-11-22 08:50:57 -06:00
ios/Mobile/Info.plist
2015-10-21 05:01:47 -05:00
test/Makefile
2016-12-12 06:23:32 -06:00
loleaflet/Makefile
2018-05-18 08:48:19 -05:00
loleaflet/npm-shrinkwrap.json
2016-04-14 08:06:49 -05:00
loolwsd.spec
2017-03-20 17:22:26 -05:00
loolwsd.xml
debian/loolwsd.postinst])
2016-04-11 12:21:16 -05:00
AC_CONFIG_FILES([test/run_unit.sh],[chmod +x test/run_unit.sh])
2015-03-09 04:11:15 -05:00
AC_OUTPUT
2015-05-11 03:21:07 -05:00
AC_LANG_POP
2015-10-21 05:01:47 -05:00
2018-11-01 17:37:01 -05:00
AS_IF([test "$ENABLE_IOSAPP" = "true"],
[
2018-11-02 11:03:11 -05:00
if test `uname -s` = "Darwin"; then
# Sadly I can't figure out any better way to avoid having to
# edit the Xcode project file manually. Create symlinks to the
# LibreOffice core source and build trees, and to the Poco
# installation.
AC_MSG_NOTICE([creating symbolic links for the Xcode project to use])
if test -L lobuilddir-symlink; then
rm -f lobuilddir-symlink
elif test -f lobuilddir-symlink; then
AC_MSG_ERROR([lobuilddir-symlink exists and is not a symbolic link])
fi
ln -s "$LOBUILDDIR" lobuilddir-symlink
if test -L pocoinclude-symlink; then
rm -f pocoinclude-symlink
elif test -f pocoinclude-symlink; then
AC_MSG_ERROR([pocoinclude-symlink exists and is not a symbolic link])
fi
ln -s "$POCOINCLUDE" pocoinclude-symlink
if test -L pocolib-symlink; then
rm -f pocolib-symlink
elif test -f pocolib-symlink; then
AC_MSG_ERROR([pocolib-symlink exists and is not a symbolic link])
fi
ln -s "$POCOLIB" pocolib-symlink
eval `grep 'export ICU_MAJOR=' "$LOBUILDDIR/config_host.mk"`
if test -L ICU.dat; then
rm -f ICU.dat
elif test -f ICU.dat; then
AC_MSG_ERROR([ICU.dat exists and is not a symbolic link])
fi
ln -s "$LOBUILDDIR/workdir/CustomTarget/ios/resources/icudt${ICU_MAJOR}l.dat" ICU.dat
# Sadly Xcode doesn't like it if AppIcon.appiconset is a
# symlink, so make it a directory of symlinks to the actual png
# and json files.
2018-11-22 08:50:57 -06:00
rm -rf ios/Mobile/Assets.xcassets/AppIcon.appiconset
mkdir ios/Mobile/Assets.xcassets/AppIcon.appiconset
2018-11-02 11:03:11 -05:00
if test -n "$with_iosapp_appicon"; then
2018-11-22 08:50:57 -06:00
ln -s "$with_iosapp_appicon"/* ios/Mobile/Assets.xcassets/AppIcon.appiconset
2018-11-02 11:03:11 -05:00
else
2018-11-22 08:50:57 -06:00
ln -s ios/Mobile/Assets.xcassets/Empty.appiconset/* ios/Mobile/Assets.xcassets/AppIcon.appiconset
2018-11-02 11:03:11 -05:00
fi
2018-11-01 17:37:01 -05:00
fi
],
[
echo "
2016-04-05 11:41:10 -05:00
Configuration:
LOKit path ${lokit_msg}
2017-03-20 13:07:01 -05:00
LO path $LO_PATH
2016-04-05 11:41:10 -05:00
LO integration tests ${lo_msg}
2016-04-11 16:11:38 -05:00
SSL support $ssl_msg
Debug & low security $debug_msg
2018-06-23 18:52:27 -05:00
Anonymization $anonym_msg
2018-02-01 07:49:44 -06:00
Set capabilities $setcap_msg
2019-02-12 04:47:24 -06:00
Browsersync $browsersync_msg
2016-04-11 12:21:16 -05:00
2016-04-11 16:11:38 -05:00
\$ make # to compile"
if test -n "$with_lo_path"; then
echo " \$ make run # to start loolwsd
2019-02-12 04:47:24 -06:00
\$ make sync-writer|calc|impress # to start browsersync with specified app
2016-04-05 11:41:10 -05:00
"
2016-04-11 16:11:38 -05:00
fi
2018-11-01 17:37:01 -05:00
])
2016-04-05 11:41:10 -05:00
2015-10-21 05:01:47 -05:00
dnl vim:set shiftwidth=4 softtabstop=4 expandtab: