summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorRiccardo Magliocchetti <riccardo.magliocchetti@gmail.com>2012-02-10 17:28:49 +0100
committerMichael Meeks <michael.meeks@suse.com>2012-02-17 16:44:56 +0000
commit2130deb2d13f7cbb5b5e55c061ad794e47e6999d (patch)
tree8d612af075ed67d74a69aa1294159ed7de18c21d /configure.in
parentget clucene building under windows-msvc (diff)
downloadcore-2130deb2d13f7cbb5b5e55c061ad794e47e6999d.tar.gz
core-2130deb2d13f7cbb5b5e55c061ad794e47e6999d.zip
Introduce headless switch for X / cairo / toolkit less build
The plan is to reduce dependencies to be easier to deploy libreoffice server side in headless mode.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in53
1 files changed, 46 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index 486d061e758f..0f45e0921697 100644
--- a/configure.in
+++ b/configure.in
@@ -733,6 +733,11 @@ AC_ARG_ENABLE(kde4,
both KDE3 and KDE4.]),
,)
+AC_ARG_ENABLE(headless,
+ AS_HELP_STRING([--enable-headless],
+ [Disable building of GUIs to reduce dependencies. Useful for server usage.]),
+,)
+
AC_ARG_ENABLE(unix-qstart-libpng,
AS_HELP_STRING([--disable-unix-qstart-libpng],
[On UNIX systems, we have a faster splash app, that can use libpng to
@@ -3131,6 +3136,10 @@ solaris*)
;;
esac
+if test "$enable_headless" = "yes"; then
+ GUIBASE=headless
+fi
+
INPATH="${OUTPATH}${PROEXT}"
OUTDIR="$SRC_ROOT/solver/$INPATH"
SOLARINC="-I. -I$SRC_ROOT/solver/$INPATH/inc/external -I$SRC_ROOT/solver/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
@@ -3369,6 +3378,19 @@ else
fi
AC_SUBST(DISABLE_STRIP)
+if test "$enable_headless" = "yes"; then
+ # be sure to do not mess with uneeded stuff
+ test_randr=no
+ test_xrender=no
+ test_cups=no
+ test_fontconfig=yes
+ test_gtk=no
+ build_gstreamer=no
+ test_kde=no
+ test_kde4=no
+ test_unix_quickstarter=no
+fi
+
dnl check for cups support
dnl ===================================================================
if test "$test_cups" = "yes"; then
@@ -7351,7 +7373,12 @@ AC_SUBST(ENABLE_NSPLUGIN)
dnl ***************************************
dnl testing for X libraries and includes...
dnl ***************************************
-if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS; then
+WANT_X11="no"
+if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
+ WANT_X11="yes"
+fi
+
+if test WANT_X11 = "yes"; then
AC_PATH_X
AC_PATH_XTRA
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
@@ -7404,7 +7431,7 @@ if test "$XINC" != "no_x_includes" -a "$XINC" != "/usr/include" ; then
fi
AC_SUBST(XLIB)
-if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then
+if test WANT_X11 = "yes"; then
dnl ===================================================================
dnl Check for Composite.h for Mozilla plugin
dnl ===================================================================
@@ -7424,7 +7451,7 @@ dnl ===================================================================
dnl Check for system Xrender
dnl ===================================================================
AC_MSG_CHECKING([whether to use Xrender])
-if test "$test_xrender" = "yes"; then
+if test WANT_X11 = "yes" -a "$test_xrender" = "yes"; then
AC_MSG_RESULT([yes])
AC_CHECK_LIB([Xrender], [XRenderQueryVersion], [:],
[AC_MSG_ERROR(libXrender not found or functional)], [])
@@ -7442,7 +7469,7 @@ dnl ===================================================================
dnl Check for XRandr
dnl ===================================================================
AC_MSG_CHECKING([whether to enable RandR support])
-if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
+if test WANT_X11 = "yes" -a "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then
if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then
XRANDR_DLOPEN="TRUE"
AC_MSG_RESULT([configured to dlopen libXrandr at runtime])
@@ -8080,6 +8107,16 @@ if test "x$enable_kde4" = "xyes"; then
fi
AC_SUBST(ENABLE_KDE4)
+ENABLE_HEADLESS=""
+if test "x$enable_headless" = "xyes"; then
+ ENABLE_HEADLESS="TRUE"
+ SCPDEFS="$SCPDEFS -DHEADLESS"
+ R="headless"
+ # this does not work see hack in Library_vcl.mk
+ AC_DEFINE(HEADLESS)
+fi
+AC_SUBST(ENABLE_HEADLESS)
+
if test -z "$R"; then
AC_MSG_RESULT([none])
else
@@ -9739,7 +9776,7 @@ SYSTEM_CAIRO=""
AC_MSG_CHECKING([whether to use the system cairo])
-if test "$with_system_cairo" = "yes"; then
+if test "$enable_cairo_canvas" = "yes" -a "$with_system_cairo" = "yes"; then
SYSTEM_CAIRO=YES
AC_MSG_RESULT([yes])
@@ -9769,8 +9806,10 @@ else
if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
BUILD_TYPE="$BUILD_TYPE CAIRO"
fi
- else
- BUILD_TYPE="$BUILD_TYPE CAIRO"
+ else
+ if test "$enable_cairo_canvas" = "yes"; then
+ BUILD_TYPE="$BUILD_TYPE CAIRO"
+ fi
fi
fi