[Libreoffice-commits] .: configure.in

Riccardo Magliocchetti rm at kemper.freedesktop.org
Thu May 31 11:34:20 PDT 2012


 configure.in |   68 +++++++++++++++++++++++++++++++----------------------------
 1 file changed, 36 insertions(+), 32 deletions(-)

New commits:
commit 984239ef0d4563d30606f30e640b1e3b2d8f0c0e
Author: Riccardo Magliocchetti <riccardo.magliocchetti at gmail.com>
Date:   Thu May 31 20:26:47 2012 +0200

    Don't test cairo if enable_headless is set
    
    I've ended up using a feature switch, i think it is the less
    risky way of handle this, assuming that enable_cairo_canvas is
    enough to mark cairo as required, as in my previous try,  may be
    not that safe.
    The diff looks big because of reindenting a whole block.

diff --git a/configure.in b/configure.in
index 9706033..21f606b 100644
--- a/configure.in
+++ b/configure.in
@@ -148,6 +148,7 @@ test_randr=yes
 test_xrender=yes
 test_cups=yes
 test_fontconfig=yes
+test_cairo=yes
 
 # Default values, as such probably valid just for Linux, set
 # differently below just for Mac OS X,but at least better than
@@ -3706,6 +3707,7 @@ if test "$enable_headless" = "yes"; then
     test_kde=no
     test_kde4=no
     test_unix_quickstarter=no
+    test_cairo=no
 fi
 
 dnl check for cups support
@@ -8928,7 +8930,7 @@ elif test -z "$enable_cairo_canvas"; then
 fi
 
 ENABLE_CAIRO_CANVAS=""
-if test "$enable_cairo_canvas" = "yes"; then
+if test "$test_cairo" = "yes" -a "$enable_cairo_canvas" = "yes"; then
     ENABLE_CAIRO_CANVAS="TRUE"
 fi
 AC_SUBST(ENABLE_CAIRO_CANVAS)
@@ -10649,49 +10651,51 @@ dnl ===================================================================
 
 SYSTEM_CAIRO=""
 
-AC_MSG_CHECKING([whether to use the system cairo])
+if test "$test_cairo" = "yes" ; then
+    AC_MSG_CHECKING([whether to use the system cairo])
 
-if test "$with_system_cairo" = "yes"; then
-    SYSTEM_CAIRO=YES
-    AC_MSG_RESULT([yes])
+    if test "$with_system_cairo" = "yes"; then
+        SYSTEM_CAIRO=YES
+        AC_MSG_RESULT([yes])
 
-    PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
+        PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 )
 
-    if test "$test_xrender" = "yes"; then
-        if test "$with_system_xextensions_headers" != "no"; then
-            AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
-            AC_LANG_PUSH([C])
-            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
+        if test "$test_xrender" = "yes"; then
+            if test "$with_system_xextensions_headers" != "no"; then
+                AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8])
+                AC_LANG_PUSH([C])
+                AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <X11/extensions/Xrender.h>]],[[
 #ifdef PictStandardA8
 #else
       return fail;
 #endif
 ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no, X headers too old.])])
 
-            AC_LANG_POP([C])
-        fi
-    fi
-    libo_MINGW_CHECK_DLL([CAIRO], [libcairo])
-    libo_MINGW_TRY_DLL([FONTCONFIG], [libfontconfig])
-    libo_MINGW_TRY_DLL([FREETYPE], [libfreetype])
-    libo_MINGW_TRY_DLL([PIXMAN], [libpixman])
-    libo_MINGW_TRY_DLL([PNG15], [libpng15])
-else
-    AC_MSG_RESULT([no])
-
-    if test $_os = WINNT; then
-        dnl We only need cairo for Windows if we
-        dnl build librsvg or directx disabled
-        if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
-            BUILD_TYPE="$BUILD_TYPE CAIRO"
+                AC_LANG_POP([C])
+            fi
         fi
+        libo_MINGW_CHECK_DLL([CAIRO], [libcairo])
+        libo_MINGW_TRY_DLL([FONTCONFIG], [libfontconfig])
+        libo_MINGW_TRY_DLL([FREETYPE], [libfreetype])
+        libo_MINGW_TRY_DLL([PIXMAN], [libpixman])
+        libo_MINGW_TRY_DLL([PNG15], [libpng15])
     else
-        if test "$enable_cairo_canvas" = "yes"; then
-            BUILD_TYPE="$BUILD_TYPE CAIRO"
+        AC_MSG_RESULT([no])
+
+        if test $_os = WINNT; then
+            dnl We only need cairo for Windows if we
+            dnl build librsvg or directx disabled
+            if test "$ENABLE_LIBRSVG" != NO -o -z "$ENABLE_DIRECTX"; then
+                BUILD_TYPE="$BUILD_TYPE CAIRO"
+            fi
         else
-            if test "$with_system_cairo" != "yes"; then
-                if test "$ENABLE_LIBRSVG" != NO; then
-                    BUILD_TYPE="$BUILD_TYPE CAIRO"
+            if test "$enable_cairo_canvas" = "yes"; then
+                BUILD_TYPE="$BUILD_TYPE CAIRO"
+            else
+                if test "$with_system_cairo" != "yes"; then
+                    if test "$ENABLE_LIBRSVG" != NO; then
+                        BUILD_TYPE="$BUILD_TYPE CAIRO"
+                    fi
                 fi
             fi
         fi


More information about the Libreoffice-commits mailing list