e8ea0f0d2e
For now, each LOOL client has a separate child process (or none at all, if it has accessed only information found in the cache). This will obviously have to chnage to handle collaboration. Etc. The parent process talks the same Websocket protocol with the child processes. When there is a child process for a client, traffic from the client is forwarded as such to the child process and vice versa.
92 lines
2.9 KiB
Text
92 lines
2.9 KiB
Text
# -*- Mode: Autoconf; tab-width: 4; indent-tabs-mode: nil -*-
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
AC_PREREQ([2.69])
|
|
|
|
AC_INIT([loolwsd], [1.0], [libreoffice@collabora.com])
|
|
|
|
AM_INIT_AUTOMAKE([1.11 silent-rules])
|
|
|
|
AC_CONFIG_SRCDIR([LOOLWSD.cpp])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
# Checks for programs.
|
|
AC_PROG_CXX
|
|
|
|
# Declare options
|
|
AC_ARG_ENABLE([debug],
|
|
AS_HELP_STRING([--enable-debug],
|
|
[Enable debugging, link with debugging version of Poco libraries]))
|
|
|
|
AC_ARG_WITH([lokit-path],
|
|
AS_HELP_STRING([--with-lokit-path=<path>],
|
|
[Path the "include" directory with the LibreOfficeKit headers]))
|
|
|
|
AC_ARG_WITH([poco-includes],
|
|
AS_HELP_STRING([--with-poco-includes=<path>],
|
|
[Path the "include" directory with the Poco headers]))
|
|
|
|
AC_ARG_WITH([poco-libs],
|
|
AS_HELP_STRING([--with-poco-libs=<path>],
|
|
[Path the "lib" directory with the Poco libraries]))
|
|
|
|
# Handle options
|
|
AS_IF([test "$enable_debug" = yes],
|
|
[POCO_DEBUG_SUFFIX=d],
|
|
[POCO_DEBUG_SUFFIX=])
|
|
|
|
# Test for build environment
|
|
|
|
CXXFLAGS="$CXXFLAGS -std=c++11"
|
|
CXXFLAGS="$CXXFLAGS -Wall -Werror"
|
|
|
|
AS_IF([test -n "$with_lokit_path"],
|
|
[CPPFLAGS="$CPPFLAGS -I${with_lokit_path}"])
|
|
|
|
AS_IF([test -n "$with_poco_includes"],
|
|
[CPPFLAGS="$CPPFLAGS -I${with_poco_includes}"])
|
|
|
|
AS_IF([test -n "$with_poco_libs"],
|
|
[LDFLAGS="$LDFLAGS -L${with_poco_libs}"])
|
|
|
|
AS_IF([test `uname -s` != Darwin],
|
|
[AC_SEARCH_LIBS([dlopen],
|
|
[dl dld],
|
|
[],
|
|
[AC_MSG_ERROR([dlopen not found])])])
|
|
|
|
AC_SEARCH_LIBS([png_create_write_struct],
|
|
[png],
|
|
[],
|
|
[AC_MSG_ERROR([libpng not available?])])
|
|
|
|
LIBS="$LIBS -lPocoNet${POCO_DEBUG_SUFFIX} -lPocoUtil${POCO_DEBUG_SUFFIX} -lPocoXML${POCO_DEBUG_SUFFIX} -lPocoJSON${POCO_DEBUG_SUFFIX} -lPocoFoundation${POCO_DEBUG_SUFFIX}"
|
|
|
|
AC_LANG_PUSH([C++])
|
|
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])])
|
|
|
|
# How to check for C++ libraries? AC_CHECK_LIB works only for C. Let's
|
|
# not bother, garbage in--garbage out. We will find out when
|
|
# makeing...
|
|
|
|
AC_LANG_POP
|
|
|
|
test "$prefix" = NONE && prefix=$ac_default_prefix
|
|
LOOLWSD_CACHEDIR=${localstatedir}/cache/${PACKAGE}
|
|
while :; do
|
|
oldvalue=$LOOLWSD_CACHEDIR
|
|
LOOLWSD_CACHEDIR=`eval echo $LOOLWSD_CACHEDIR`
|
|
test $LOOLWSD_CACHEDIR = $oldvalue && break
|
|
done
|
|
|
|
AC_DEFINE_UNQUOTED([LOOLWSD_CACHEDIR],["$LOOLWSD_CACHEDIR"],[Cache folder])
|
|
AC_SUBST(LOOLWSD_CACHEDIR)
|
|
|
|
AC_CONFIG_FILES([Makefile])
|
|
AC_OUTPUT
|