forked from gtkforphp/cairo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.w32
52 lines (44 loc) · 2.48 KB
/
config.w32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* $Id$ */
ARG_WITH("cairo", "Cairo Graphics Library Bindings", "no");
if (PHP_CAIRO != "no") {
if (CHECK_HEADER_ADD_INCLUDE("cairo/cairo.h", "CFLAGS_CAIRO", PHP_CAIRO + "\\include", null, true)) {
/* Check for static lib first, because that will need an extra define */
if (CHECK_LIB("cairo_a.lib", "cairo", PHP_CAIRO + "\\lib")) {
/* We don't care if this fails, but if it does exists, we need to link */
CHECK_LIB("fontconfig.lib", "cairo", PHP_CAIRO + "\\lib");
CHECK_HEADER_ADD_INCLUDE("fontconfig/fontconfig.h", "CFLAGS_CAIRO", PHP_CAIRO + "\\include", null, true);
if (CHECK_LIB("freetype_a.lib", "cairo", PHP_CAIRO + "\\lib")) {
CHECK_HEADER_ADD_INCLUDE("freetype/freetype.h", "CFLAGS_CAIRO", PHP_CAIRO + "\\include", null, true);
AC_DEFINE("HAVE_FREETYPE", 1);
}
if (CHECK_LIB("Gdi32.lib", "cairo", PHP_CAIRO + "\\lib")) {
AC_DEFINE("HAVE_WIN32_FONT", 1);
}
EXTENSION("cairo", "cairo.c cairo_error.c cairo_context.c cairo_pattern.c cairo_matrix.c cairo_path.c \
cairo_surface.c cairo_image_surface.c cairo_svg_surface.c cairo_pdf_surface.c cairo_ps_surface.c \
cairo_font.c cairo_font_options.c cairo_font_face.c cairo_scaled_font.c cairo_ft_font.c \
cairo_recording_surface.c cairo_sub_surface.c cairo_win32_font.c");
ADD_FLAG("CFLAGS_CAIRO", "/D CAIRO_WIN32_STATIC_BUILD=1");
AC_DEFINE("HAVE_CAIRO", 1);
} else if (CHECK_LIB("cairo.lib", "cairo", PHP_CAIRO + "\\lib")) {
CHECK_LIB("fontconfig.lib", "cairo", PHP_CAIRO + "\\lib");
CHECK_HEADER_ADD_INCLUDE("fontconfig/fontconfig.h", "CFLAGS_CAIRO", PHP_CAIRO + "\\include", null, true);
if (CHECK_LIB("freetype_a.lib", "cairo", PHP_CAIRO + "\\lib")) {
CHECK_HEADER_ADD_INCLUDE("freetype/freetype.h", "CFLAGS_CAIRO", PHP_CAIRO + "\\include", null, true);
AC_DEFINE("HAVE_FREETYPE", 1);
}
if (CHECK_LIB("Gdi32.lib", "cairo", PHP_CAIRO + "\\lib")) {
AC_DEFINE("HAVE_WIN32_FONT", 1);
}
EXTENSION("cairo", "cairo.c cairo_error.c cairo_context.c cairo_pattern.c cairo_matrix.c cairo_path.c \
cairo_surface.c cairo_image_surface.c cairo_svg_surface.c cairo_pdf_surface.c cairo_ps_surface.c \
cairo_font.c cairo_font_options.c cairo_font_face.c cairo_scaled_font.c cairo_ft_font.c \
cairo_recording_surface.c cairo_sub_surface.c cairo_win32_font.c");
AC_DEFINE("HAVE_CAIRO", 1);
} else {
WARNING('Could not find cairo.lib or cairo_a.lib; skipping');
}
} else {
WARNING('Could not find cairo.h; skipping');
}
}