Permalink
Browse files

win32 build issues

attempt to make --with-cairo=path_to_cairo work with the php win
configure system (still flakey, sigh) and make the win32 font stuff
build properly
  • Loading branch information...
1 parent 744a81e commit 1071658615c6533d74b9bbf95c0b0a368cbe94f0 @auroraeosrose auroraeosrose committed Aug 9, 2012
Showing with 53 additions and 49 deletions.
  1. +1 −1 cairo_win32_font.c
  2. +52 −48 config.w32
View
@@ -247,7 +247,7 @@ PHP_METHOD(CairoWin32FontFace, __construct)
}
/* }}} */
-static function_entry cairo_win32_font_methods[] = {
+const zend_function_entry cairo_win32_font_methods[] = {
PHP_ME(CairoWin32FontFace, __construct, CairoWin32FontFace_construct_args, \
ZEND_ACC_PUBLIC | ZEND_ACC_CTOR)
{NULL, NULL, NULL}
View
@@ -1,48 +1,52 @@
-/* $Id$ */
-
-ARG_WITH("cairo", "Cairo Graphics Library Bindings", "no");
-
-if (PHP_CAIRO != "no") {
- if (CHECK_HEADER_ADD_INCLUDE("cairo/cairo.h", "CFLAGS_CAIRO", null, null, true)) {
- /* Check for static lib first, because that will need an extra define */
- if (CHECK_LIB("cairo_a.lib", "cairo", PHP_CAIRO)) {
- /* We don't care if this fails, but if it does exists, we need to link */
- CHECK_LIB("fontconfig.lib", "cairo", PHP_CAIRO);
-
- if (CHECK_LIB("freetype_a.lib", "cairo", PHP_CAIRO)) {
- AC_DEFINE("HAVE_FREETYPE", 1);
- }
- if (CHECK_LIB("Gdi32.lib", "cairo", PHP_CAIRO)) {
- 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_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)) {
- CHECK_LIB("fontconfig.lib", "cairo", PHP_CAIRO);
-
- if (CHECK_LIB("freetype_a.lib", "cairo", PHP_CAIRO)) {
- AC_DEFINE("HAVE_FREETYPE", 1);
- }
- if (CHECK_LIB("Gdi32.lib", "cairo", PHP_CAIRO)) {
- 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_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');
- }
-}
+/* $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_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_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');
+ }
+}

0 comments on commit 1071658

Please sign in to comment.