1 dnl Process this file with autoconf to produce a configure script.
3 dnl Copyright (C) 2012-2014 Peter Breitenlohner <tex-live@tug.org>
5 dnl This file is free software; the copyright holder
6 dnl gives unlimited permission to copy and/or distribute it,
7 dnl with or without modifications, as long as this notice is preserved.
9 m4_include([version.ac])[] dnl define cairo_version
10 AC_INIT([cairo (TeX Live)], cairo_version, [tex-k@tug.org])
12 AC_CONFIG_SRCDIR([cairo-src/src/cairo.h])
13 AC_CONFIG_AUX_DIR([../../build-aux])
14 AC_CONFIG_MACRO_DIRS([../../m4 m4])
16 AC_USE_SYSTEM_EXTENSIONS
25 KPSE_COMPILER_VISIBILITY
28 if test "x$GCC" = xyes; then
29 AS_CASE([`$CC -dumpversion`],
31 [4.* | 5.*], [cairo_attribute_flag=-Wno-attributes])
33 AC_SUBST([CAIRO_ATTRIBUTE_FLAG], [$cairo_attribute_flag])
35 AC_CHECK_SIZEOF([void *])
36 AC_CHECK_SIZEOF([int])
37 AC_CHECK_SIZEOF([long])
38 AC_CHECK_SIZEOF([long long])
39 AC_CHECK_SIZEOF([size_t])
41 dnl Checks for precise integer types
42 AC_CHECK_HEADERS([sys/int_types.h])
43 AC_CHECK_TYPES([uint64_t, uint128_t, __uint128_t])
45 AC_CONFIG_HEADERS([config.h cairo-features.h])
47 AM_CONDITIONAL([build], [test "x$enable_build" != xno])
48 AC_SEARCH_LIBS([sqrt], [m])
59 [0, [gobject functions]],
62 [0, [win32 functions]],
63 [0, [xcb shm functions]],
67 [1, [observer surface]],
68 [1, [recording surface]],
71 [0, [quartz surface]],
72 [0, [script surface]],
77 [0, [xlib xrender surface]],
80 AM_CONDITIONAL([CAIRO_HAS_QUARTZ_IMAGE_SURFACE], [false])
81 AM_CONDITIONAL([CAIRO_HAS_OS2_SURFACE], [false])
82 AM_CONDITIONAL([CAIRO_HAS_GL_SURFACE], [false])
86 if test "x$enable_build" != xno || test -f config.force; then
88 KPSE_ADD_FLAGS([pixman])
89 AC_CHECK_FUNC([pixman_version_string], , [AC_ERROR([pixman not found])])
92 echo timestamp >config.force
95 AC_SUBST([CAIRO_TREE], [cairo-src])
97 AC_CONFIG_FILES([Makefile cairo/Makefile])