summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac111
1 files changed, 79 insertions, 32 deletions
diff --git a/configure.ac b/configure.ac
index 606fc3ad..9b2f77f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,17 @@ CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, no, [
dnl ===========================================================================
+CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [
+ qt_REQUIRES="QtGui >= 4.4.0"
+ PKG_CHECK_MODULES(qt, $qt_REQUIRES, ,
+ [AC_MSG_RESULT(no)
+ qt_REQUIRES=""
+ use_qt="no (requires Qt4 development libraries)"
+ ])
+])
+
+dnl ===========================================================================
+
CAIRO_ENABLE_SURFACE_BACKEND(quartz, Quartz, auto, [
dnl There is no pkgconfig for quartz; lets do a header check
AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, , [use_quartz="no (requires ApplicationServices framework)"])
@@ -165,7 +176,7 @@ CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
if test "x$png_REQUIRES" = x; then
# libpng13 is GnuWin32's libpng-1.2.8 :-(
- for l in libpng12 libpng13 libpng10 ; do
+ for l in libpng12 libpng13 libpng10 libpng; do
if $PKG_CONFIG --exists $l ; then
png_REQUIRES=$l
use_png=yes
@@ -184,7 +195,7 @@ CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
])
dnl ===========================================================================
-CAIRO_ENABLE_SURFACE_BACKEND(gl, gl, no, [
+CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [
gl_REQUIRES="gl"
PKG_CHECK_MODULES(gl, $gl_REQUIRES, , [AC_MSG_RESULT(no)
use_gl="no (requires gl.pc)"])
@@ -197,32 +208,8 @@ CAIRO_ENABLE_SURFACE_BACKEND(gl, gl, no, [
use_gl="no (requires glew http://glew.sourceforge.net/)"
])
gl_NONPKGCONFIG_LIBS="-lGLEW"
-])
-
-CAIRO_ENABLE_SURFACE_BACKEND(gl_glx, GLX, auto, [
- if test "x$use_gl" != "xyes"; then
- use_gl_glx="no (requires --enable-gl)"
- else
- gl_glx_BASE=cairo-gl
- old_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="$CPPFLAGS $gl_CFLAGS $gl_NONPKGCONFIG_CFLAGS"
- AC_CHECK_HEADER(GL/glx.h,
- [],
- [use_gl_glx="no (requires GLX)"])
- CPPFLAGS=$old_CPPFLAGS
- fi
-])
-
-CAIRO_ENABLE_SURFACE_BACKEND(gl_egl, eagle, auto, [
- if test "x$use_gl" != "xyes"; then
- use_gl_egl="no (requires --enable-gl)"
- else
- gl_egl_BASE=cairo-gl
- gl_egl_REQUIRES="eagle"
- PKG_CHECK_MODULES(gl_egl, $gl_egl_REQUIRES, ,
- [AC_MSG_RESULT(no)
- use_gl_egl="no (requires eagle)"])
- fi
+ need_glx_functions=yes
+ need_eagle_functions=yes
])
dnl ===========================================================================
@@ -273,6 +260,60 @@ CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
dnl ===========================================================================
+CAIRO_ENABLE_SURFACE_BACKEND(vg, OpenVG, no, [
+ dnl There is no pkgconfig for OpenVG; lets do a header check
+ AC_CHECK_HEADER(VG/openvg.h,, [use_vg="no (OpenVG headers not found)"])
+ if test "x$use_vg" = "xyes"; then
+ vg_NONPKGCONFIG_CFLAGS=
+ vg_NONPKGCONFIG_LIBS="-lOpenVG"
+ need_egl_functions=yes
+ need_glx_functions=yes
+ fi
+])
+
+CAIRO_ENABLE_FUNCTIONS(eagle, eagle, auto, [
+ if test "x$need_eagle_functions" = "xyes"; then
+ eagle_REQUIRES="eagle"
+ PKG_CHECK_MODULES(eagle, $eagle_REQUIRES, ,
+ [AC_MSG_RESULT(no)
+ use_eagle="no (requires eagle)"])
+ else
+ use_eagle="no (not required by any backend)"
+ fi
+])
+
+CAIRO_ENABLE_FUNCTIONS(egl, EGL, auto, [
+ if test "x$need_egl_functions" = "xyes"; then
+ AC_CHECK_HEADER(EGL/egl.h,, [use_egl="no (EGL headers not found)"])
+ if test "x$use_egl" = "xyes"; then
+ egl_NONPKGCONFIG_CFLAGS=
+ egl_NONPKGCONFIG_LIBS=
+ for lib in EGL egl13 egl12 egl11; do
+ if test -z "$egl_NONPKGCONFIG_LIBS"; then
+ AC_CHECK_LIB($lib, eglGetError, egl_NONPKGCONFIG_LIBS="-l$lib")
+ fi
+ done
+ if test -z "$egl_NONPKGCONFIG_LIBS"; then
+ use_egl="no (EGL library not found)"
+ fi
+ fi
+ else
+ use_egl="no (not required by any backend)"
+ fi
+])
+
+CAIRO_ENABLE_FUNCTIONS(glx, GLX, auto, [
+ if test "x$need_glx_functions" = "xyes"; then
+ AC_CHECK_HEADER(GL/glx.h,, [use_glx="no (GLX headers not found)"])
+ glx_NONPKGCONFIG_CFLAGS=
+ glx_NONPKGCONFIG_LIBS="-lGL"
+ else
+ use_glx="no (not required by any backend)"
+ fi
+])
+
+dnl ===========================================================================
+
any2ppm_cs=no
CAIRO_ENABLE_SURFACE_BACKEND(script, script, no, [
any2ppm_cs=yes
@@ -333,10 +374,11 @@ CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
ft_LIBS="$FREETYPE_LIBS"
])
+FONTCONFIG_MIN_VERSION=2.2.95
CAIRO_ENABLE_FONT_BACKEND(fc, Fontconfig, auto, [
use_fc=$use_ft
if test "x$use_fc" = "xyes"; then
- fc_REQUIRES="fontconfig"
+ fc_REQUIRES="fontconfig >= $FONTCONFIG_MIN_VERSION"
PKG_CHECK_MODULES(FONTCONFIG, $fc_REQUIRES,,
[AC_MSG_RESULT(no); use_fc="no (requires $fc_REQUIRES)"])
fi
@@ -364,7 +406,7 @@ if test "x$use_ft" = "xyes"; then
fi
if test "x$use_fc" = "xyes"; then
- CAIRO_CHECK_FUNCS_WITH_FLAGS(FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])
+ CAIRO_CHECK_FUNCS_WITH_FLAGS(FcInit FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])
fi
dnl ===========================================================================
@@ -492,7 +534,7 @@ CAIRO_ENABLE(test_surfaces, test surfaces, no)
dnl ===========================================================================
CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
- pixman_REQUIRES="pixman-1 >= 0.12.0"
+ pixman_REQUIRES="pixman-1 >= 0.15.16"
PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, , [AC_MSG_RESULT(no)
use_image="no (requires $pixman_REQUIRES http://cairographics.org/releases/)"])
image_REQUIRES=$pixman_REQUIRES
@@ -502,6 +544,10 @@ CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
dnl ===========================================================================
+CAIRO_ENABLE_SURFACE_BACKEND(meta, meta, always)
+
+dnl ===========================================================================
+
CAIRO_ENABLE_FONT_BACKEND(user, user, always)
dnl ===========================================================================
@@ -579,7 +625,8 @@ fi
dnl ===========================================================================
# We use GTK+ for some utility/debugging tools
-PKG_CHECK_MODULES(gtk, "gtk+-2.0",, AC_MSG_RESULT(no))
+PKG_CHECK_MODULES(gtk, "gtk+-2.0",have_gtk=yes, have_gtk=no)
+AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")
SHAVE_INIT([build], [enable]) # dnl Make the output pretty