[cairo-commit] build/configure.ac.warnings test/Makefile.am

Behdad Esfahbod behdad at kemper.freedesktop.org
Wed Sep 17 12:58:08 PDT 2008


 build/configure.ac.warnings |    7 +++++++
 test/Makefile.am            |    3 +++
 2 files changed, 10 insertions(+)

New commits:
commit 85a4f0dcee6e6d954f0e458f1bd5b26ff1e70464
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Wed Sep 17 01:05:16 2008 +0100

    Workaround undefined functions required by rsvg & poppler.
    
    If the native windowing system is disable (e.g. --disable-xlib) then the
    test suite fails to build since the vector converters typically depend
    upon gdk-pixbuf-2.0, which in turn depends upon a native gdk which
    requires cairo to be built with support for the native windowing system. A
    mess that should be resolved by separating rsvg and poppler into core and
    higher-level libraries, but which we can workaround by simply ignoring
    errors from undefined functions at link time.

diff --git a/build/configure.ac.warnings b/build/configure.ac.warnings
index 27b790d..f6f68c5 100644
--- a/build/configure.ac.warnings
+++ b/build/configure.ac.warnings
@@ -63,3 +63,10 @@ AC_CACHE_CHECK([how to enable unused result warnings], cairo_cv_warn_unused_resu
 ])
 AC_DEFINE_UNQUOTED([WARN_UNUSED_RESULT], [$cairo_cv_warn_unused_result],
 	  [Define to the value your compiler uses to support the warn-unused-result attribute])
+
+dnl check linker flags
+AC_CACHE_CHECK([how to allow undefined symbols in shared libraries used by test suite], cairo_cv_test_undefined_ldflags,
+	       [CAIRO_CC_TRY_FLAG([-Wl,--allow-shlib-undefined],
+				  [cairo_cv_test_undefined_ldflags="-Wl,--allow-shlib-undefined]")])
+CAIRO_TEST_UNDEFINED_LDFLAGS="$cairo_cv_test_undefined_ldflags"
+AC_SUBST(CAIRO_TEST_UNDEFINED_LDFLAGS)
diff --git a/test/Makefile.am b/test/Makefile.am
index 039b991..14da49d 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -883,6 +883,7 @@ if BUILD_ANY2PPM
 check_PROGRAMS += any2ppm
 any2ppm_CFLAGS = $(POPPLER_CFLAGS) $(LIBRSVG_CFLAGS)
 # add LDADD, so poppler/librsvg uses "our" cairo
+any2ppm_LDFLAGS = $(CAIRO_TEST_UNDEFINED_LDFLAGS)
 any2ppm_LDADD  = $(LDADD) $(POPPLER_LIBS) $(LIBRSVG_LIBS)
 endif
 
@@ -890,6 +891,7 @@ if CAIRO_CAN_TEST_PDF_SURFACE
 check_PROGRAMS += pdf2png
 pdf2png_CFLAGS = $(POPPLER_CFLAGS)
 # add LDADD, so poppler uses "our" cairo
+pdf2png_LDFLAGS = $(CAIRO_TEST_UNDEFINED_LDFLAGS)
 pdf2png_LDADD  = $(LDADD) $(POPPLER_LIBS)
 endif
 
@@ -897,6 +899,7 @@ if CAIRO_CAN_TEST_SVG_SURFACE
 check_PROGRAMS += svg2png
 svg2png_CFLAGS = $(LIBRSVG_CFLAGS)
 # add LDADD, so librsvg uses "our" cairo
+svg2png_LDFLAGS = $(CAIRO_TEST_UNDEFINED_LDFLAGS)
 svg2png_LDADD  = $(LDADD) $(LIBRSVG_LIBS)
 endif
 


More information about the cairo-commit mailing list