PHP_ARG_WITH(xpm-dir, for the location of libXpm,
[ --with-xpm-dir[=DIR] GD: Set the path to libXpm install prefix], no, no)
-
-PHP_ARG_WITH(ttf, for FreeType 1.x support,
-[ --with-ttf[=DIR] GD: Include FreeType 1.x support], no, no)
PHP_ARG_WITH(freetype-dir, for FreeType 2,
[ --with-freetype-dir[=DIR] GD: Set the path to FreeType 2 install prefix], no, no)
fi
])
-AC_DEFUN([PHP_GD_FREETYPE1],[
- if test "$PHP_TTF" != "no"; then
- if test "$PHP_FREETYPE_DIR" = "no" -o "$PHP_FREETYPE_DIR" = ""; then
- if test -n "$PHP_TTF"; then
- for i in $PHP_TTF /usr/local /usr; do
- if test -f "$i/include/freetype.h"; then
- TTF_DIR=$i
- unset TTF_INC_DIR
- fi
- if test -f "$i/include/freetype/freetype.h"; then
- TTF_DIR=$i
- TTF_INC_DIR=$i/include/freetype
- fi
- if test -f "$i/include/freetype1/freetype/freetype.h"; then
- TTF_DIR=$i
- TTF_INC_DIR=$i/include/freetype1/freetype
- fi
- test -n "$TTF_DIR" && break
- done
- fi
- if test -n "$TTF_DIR" ; then
- AC_DEFINE(HAVE_LIBTTF,1,[ ])
- PHP_ADD_LIBRARY_WITH_PATH(ttf, $TTF_DIR/$PHP_LIBDIR, GD_SHARED_LIBADD)
- fi
- if test -z "$TTF_INC_DIR"; then
- TTF_INC_DIR=$TTF_DIR/include
- fi
- PHP_ADD_INCLUDE($TTF_INC_DIR)
- else
- AC_MSG_CHECKING(for FreeType 1 support)
- AC_MSG_RESULT([no - FreeType 2.x is to be used instead])
- fi
- fi
-])
-
AC_DEFUN([PHP_GD_FREETYPE2],[
if test "$PHP_FREETYPE_DIR" != "no"; then
PHP_GD_PNG
PHP_GD_XPM
PHP_GD_FREETYPE2
- PHP_GD_FREETYPE1
PHP_GD_T1LIB
dnl These are always available with bundled library
GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBFREETYPE"
fi
- if test -n "$TTF_DIR"; then
- GDLIB_CFLAGS="$GDLIB_CFLAGS -DHAVE_LIBTTF"
- fi
-
if test -n "$USE_GD_JIS_CONV"; then
AC_DEFINE(USE_GD_JISX0208, 1, [ ])
GDLIB_CFLAGS="$GDLIB_CFLAGS -DJISX0208"
PHP_GD_PNG
PHP_GD_XPM
PHP_GD_FREETYPE2
- PHP_GD_FREETYPE1
PHP_GD_T1LIB
dnl Header path
dnl Common for both builtin and external GD
dnl
if test "$PHP_GD" != "no"; then
- PHP_NEW_EXTENSION(gd, gd.c gdttf.c $extra_sources, $ext_shared,, \\$(GDLIB_CFLAGS))
+ PHP_NEW_EXTENSION(gd, gd.c $extra_sources, $ext_shared,, \\$(GDLIB_CFLAGS))
if test "$GD_MODULE_TYPE" = "builtin"; then
GDLIB_CFLAGS="-I$ext_srcdir/libgd $GDLIB_CFLAGS"
# include <ft2build.h>
# include FT_FREETYPE_H
# else
-# ifdef HAVE_LIBTTF
-# include <freetype.h>
-# endif
# endif
# include "gdttf.h"
#endif
#endif
php_info_print_table_row(2, "FreeType Version", tmp);
}
-#elif HAVE_LIBTTF
- php_info_print_table_row(2, "FreeType Linkage", "with TTF library");
- {
- char tmp[256];
- snprintf(tmp, sizeof(tmp), "%d.%d", TT_FREETYPE_MAJOR, TT_FREETYPE_MINOR);
- php_info_print_table_row(2, "FreeType Version", tmp);
- }
-#else
php_info_print_table_row(2, "FreeType Linkage", "with unknown library");
#endif
#endif
add_assoc_bool(return_value, "FreeType Support", 1);
#if HAVE_LIBFREETYPE
add_assoc_string(return_value, "FreeType Linkage", "with freetype", 1);
-#elif HAVE_LIBTTF
- add_assoc_string(return_value, "FreeType Linkage", "with TTF library", 1);
#else
add_assoc_string(return_value, "FreeType Linkage", "with unknown library", 1);
#endif