summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-02-07 22:13:53 +0100
committerAndrea Canciani <ranma42@gmail.com>2011-02-14 11:07:02 +0100
commitd866bb0405bc989666f886e2c0e293a1fe718d74 (patch)
tree695d24d618f1d5844e9f0f2ffc5938aeb2a2e8d4 /configure.ac
parent219f0d49a33d553711e92fcc61fd794b98f31234 (diff)
xlib: Fix compilation when gradient functions are not available
It is not correct to rely on the version defined in render.h. The Xrender.h header is independent and might not define some functions available in RENDER 0.10. Their availability must be detected at configure time and the stubs must be defined only if the functions are not available. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31906
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 09bdd9fc..951e9607 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,6 +83,15 @@ CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
[use_xlib_xrender="no (requires $xlib_xrender_REQUIRES http://freedesktop.org/Software/xlibs)"])
CPPFLAGS=$old_CPPFLAGS
])
+
+ old_CFLAGS=$CFLAGS
+ old_LIBS=$LIBS
+ CFLAGS="$CFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS $xlib_xrender_CFLAGS $xlib_xrender_NONPKGCONFIG_CFLAGS"
+ LIBS="$LIBS $xlib_LIBS $xlib_NONPKGCONFIG_LIBS $xlib_xrender_LIBS $xlib_xrender_NONPKGCONFIG_LIBS"
+ AC_CHECK_FUNCS([XRenderCreateLinearGradient XRenderCreateRadialGradient XRenderCreateConicalGradient])
+ CFLAGS=$old_CFLAGS
+ LIBS=$old_LIBS
+
fi
])