70 lines
2.4 KiB
Plaintext
70 lines
2.4 KiB
Plaintext
$NetBSD: patch-ac,v 1.7 2014/03/23 09:55:59 spz Exp $
|
|
|
|
Adjustments for zlib, png and freetype2
|
|
|
|
--- ext/gd/config.m4.orig 2013-12-10 19:04:57.000000000 +0000
|
|
+++ ext/gd/config.m4
|
|
@@ -45,18 +45,7 @@ dnl Checks for the configure options
|
|
dnl
|
|
|
|
AC_DEFUN([PHP_GD_ZLIB],[
|
|
- if test "$PHP_ZLIB_DIR" != "no" && test "$PHP_ZLIB_DIR" != "yes"; then
|
|
- if test -f "$PHP_ZLIB_DIR/include/zlib/zlib.h"; then
|
|
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
|
|
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include/zlib"
|
|
- elif test -f "$PHP_ZLIB_DIR/include/zlib.h"; then
|
|
- PHP_ZLIB_DIR="$PHP_ZLIB_DIR"
|
|
- PHP_ZLIB_INCDIR="$PHP_ZLIB_DIR/include"
|
|
- else
|
|
- AC_MSG_ERROR([Can't find zlib headers under "$PHP_ZLIB_DIR"])
|
|
- fi
|
|
- else
|
|
- for i in /usr/local /usr; do
|
|
+ for i in "$PHP_ZLIB_DIR" /usr/local /usr; do
|
|
if test -f "$i/include/zlib/zlib.h"; then
|
|
PHP_ZLIB_DIR="$i"
|
|
PHP_ZLIB_INCDIR="$i/include/zlib"
|
|
@@ -65,7 +54,6 @@ AC_DEFUN([PHP_GD_ZLIB],[
|
|
PHP_ZLIB_INCDIR="$i/include"
|
|
fi
|
|
done
|
|
- fi
|
|
])
|
|
|
|
AC_DEFUN([PHP_GD_JPEG],[
|
|
@@ -108,13 +96,13 @@ AC_DEFUN([PHP_GD_PNG],[
|
|
AC_MSG_ERROR([PNG support requires ZLIB. Use --with-zlib-dir=<DIR>])
|
|
fi
|
|
|
|
- PHP_CHECK_LIBRARY(png,png_write_image,
|
|
+ PHP_CHECK_LIBRARY(png16,png_write_image,
|
|
[
|
|
PHP_ADD_INCLUDE($GD_PNG_DIR/include)
|
|
PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
|
|
- PHP_ADD_LIBRARY_WITH_PATH(png, $GD_PNG_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
|
|
+ PHP_ADD_LIBRARY_WITH_PATH(png16, $GD_PNG_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
|
|
],[
|
|
- AC_MSG_ERROR([Problem with libpng.(a|so) or libz.(a|so). Please check config.log for more information.])
|
|
+ AC_MSG_ERROR([Problem with libpng16.(a|so) or libz.(a|so). Please check config.log for more information.])
|
|
],[
|
|
-L$PHP_ZLIB_DIR/$PHP_LIBDIR -lz -L$GD_PNG_DIR/$PHP_LIBDIR
|
|
])
|
|
@@ -162,7 +150,7 @@ AC_DEFUN([PHP_GD_FREETYPE2],[
|
|
if test "$PHP_FREETYPE_DIR" != "no"; then
|
|
|
|
for i in $PHP_FREETYPE_DIR /usr/local /usr; do
|
|
- if test -f "$i/include/freetype2/freetype/freetype.h"; then
|
|
+ if test -f "$i/include/ft2build.h" -o -f "$i/include/freetype2/ft2build.h"; then
|
|
FREETYPE2_DIR=$i
|
|
FREETYPE2_INC_DIR=$i/include/freetype2
|
|
break
|
|
@@ -170,7 +158,7 @@ AC_DEFUN([PHP_GD_FREETYPE2],[
|
|
done
|
|
|
|
if test -z "$FREETYPE2_DIR"; then
|
|
- AC_MSG_ERROR([freetype.h not found.])
|
|
+ AC_MSG_ERROR([ft2build.h not found.])
|
|
fi
|
|
|
|
PHP_CHECK_LIBRARY(freetype, FT_New_Face,
|