diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 85 |
1 files changed, 77 insertions, 8 deletions
diff --git a/configure.in b/configure.in index 63a154ea..a2df768a 100644 --- a/configure.in +++ b/configure.in @@ -3,7 +3,7 @@ AC_INIT(src/cairo.h) dnl =========================================================================== # Package version number, (as distinct from shared library version) -CAIRO_VERSION=0.1.16 +CAIRO_VERSION=0.1.20 # libtool shared library version @@ -36,25 +36,94 @@ AC_STDC_HEADERS dnl =========================================================================== -AC_PATH_XTRA +AC_ARG_ENABLE(xlib, + [ --disable-xlib Disable cairo's Xlib backend], + [use_xlib=$enableval], [use_xlib=yes]) -if test "x$have_x" != "xyes"; then +if test "x$use_xlib" != "xyes"; then XLIB_SURFACE_FEATURE=CAIRO_HAS_NO_XLIB_SURFACE + AM_CONDITIONAL(CAIRO_HAS_XLIB_SURFACE, false) else XLIB_SURFACE_FEATURE=CAIRO_HAS_XLIB_SURFACE - PKG_CHECK_MODULES(XRENDER, xrender >= 0.6) + dnl Check for Xrender header files if the Xrender package is not installed: + PKG_CHECK_MODULES(XRENDER, xrender >= 0.6,[ + XRENDER_REQUIRES=xrender],[ + AC_CHECK_HEADER(X11/extensions/Xrender.h,[ + AC_PATH_XTRA + XRENDER_LIBS="$X_LIBS -lXrender -lXext -lX11 $X_EXTRA_LIBS"],[ + AC_MSG_ERROR(Xrender not found perhaps use --disable-xlib?)])]) + AM_CONDITIONAL(CAIRO_HAS_XLIB_SURFACE, true) fi AC_SUBST(XLIB_SURFACE_FEATURE) +AC_SUBST(XRENDER_CFLAGS) +AC_SUBST(XRENDER_LIBS) +AC_SUBST(XRENDER_REQUIRES) -dnl This is needed for conditional compilation of xlib code in Makefile.am : -dnl XXX: I'd prefer to have only one test of $have_x, would that be easy? -AM_CONDITIONAL(CAIRO_HAS_XLIB_SURFACE, test x$have_x = xyes) +dnl =========================================================================== + +AC_ARG_ENABLE(xcb, + [ --disable-xcb Disable cairo's XCB backend], + [use_xcb=$enableval], [use_xcb=no]) + +if test "x$use_xcb" != "xyes"; then + XCB_SURFACE_FEATURE=CAIRO_HAS_NO_XCB_SURFACE + AM_CONDITIONAL(CAIRO_HAS_XCB_SURFACE, false) +else + XCB_SURFACE_FEATURE=CAIRO_HAS_XCB_SURFACE + PKG_CHECK_MODULES(XCB, xcb) + AM_CONDITIONAL(CAIRO_HAS_XCB_SURFACE, true) +fi + +AC_SUBST(XCB_SURFACE_FEATURE) +AC_SUBST(XCB_CFLAGS) +AC_SUBST(XCB_LIBS) + +dnl =========================================================================== + +AC_ARG_ENABLE(ps, + [ --disable-ps Disable cairo's PostScript backend], + [use_ps=$enableval], [use_ps=yes]) + +if test "x$use_ps" != "xyes"; then + PS_SURFACE_FEATURE=CAIRO_HAS_NO_PS_SURFACE + AM_CONDITIONAL(CAIRO_HAS_PS_SURFACE, false) +else + PS_SURFACE_FEATURE=CAIRO_HAS_PS_SURFACE + PS_LIBS=-lz + AM_CONDITIONAL(CAIRO_HAS_PS_SURFACE, true) +fi + +AC_SUBST(PS_SURFACE_FEATURE) +AC_SUBST(PS_LIBS) + +dnl =========================================================================== + +AC_ARG_ENABLE(png, + [ --enable-png Enable cairo's PNG backend], + [use_png=$enableval], [use_png=no]) + +if test "x$use_png" != "xyes"; then + PNG_SURFACE_FEATURE=CAIRO_HAS_NO_PNG_SURFACE + AM_CONDITIONAL(CAIRO_HAS_PNG_SURFACE, false) +else + PNG_SURFACE_FEATURE=CAIRO_HAS_PNG_SURFACE + PKG_CHECK_MODULES(PNG, libpng12, + [PNG_REQUIRES=libpng12],[ + PKG_CHECK_MODULES(PNG, libpng10, + [PNG_REQUIRES=libpng10])]) + AM_CONDITIONAL(CAIRO_HAS_PNG_SURFACE, true) +fi + +AC_SUBST(PNG_SURFACE_FEATURE) +AC_SUBST(PNG_CFLAGS) +AC_SUBST(PNG_LIBS) +AC_SUBST(PNG_REQUIRES) dnl =========================================================================== PKG_CHECK_MODULES(FONTCONFIG, fontconfig) -PKG_CHECK_MODULES(CAIRO, slim >= 0.2.0 libic >= 0.1.3) +PKG_CHECK_MODULES(CAIRO, libpixman >= 0.1.0) # Test for freetype2 separate from pkg-config since at least up to # 2003-06-07, there was no freetype2.pc in the release. |