]> granicus.if.org Git - php/commitdiff
- drop freetype1 support
authorPierre Joye <pajoye@php.net>
Sun, 2 Oct 2005 18:01:51 +0000 (18:01 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 2 Oct 2005 18:01:51 +0000 (18:01 +0000)
ext/gd/config.m4
ext/gd/gd.c
ext/gd/gdcache.c
ext/gd/libgd/gdcache.c
ext/gd/php_gd.h

index 28a75386d7e17e537d699d7e295adb56a06155a8..2c5bb4a9e7aa15313a55116931800f7ff6d639f2 100644 (file)
@@ -27,9 +27,6 @@ fi
 
 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)
@@ -141,41 +138,6 @@ AC_DEFUN([PHP_GD_XPM],[
   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
 
@@ -289,7 +251,6 @@ dnl Various checks for GD features
   PHP_GD_PNG
   PHP_GD_XPM
   PHP_GD_FREETYPE2
-  PHP_GD_FREETYPE1
   PHP_GD_T1LIB
 
 dnl These are always available with bundled library
@@ -336,10 +297,6 @@ dnl enable the support in bundled GD 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"
@@ -357,7 +314,6 @@ dnl Various checks for GD features
   PHP_GD_PNG
   PHP_GD_XPM
   PHP_GD_FREETYPE2
-  PHP_GD_FREETYPE1
   PHP_GD_T1LIB
 
 dnl Header path
@@ -406,7 +362,7 @@ dnl
 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"
index 9230190a9ad77b8409f571689acdf029ecca2239..8f6c567bd1fc2d890ae9ce54b029540f1f680442 100644 (file)
@@ -72,9 +72,6 @@ static void php_free_ps_enc(zend_rsrc_list_entry *rsrc TSRMLS_DC);
 #  include <ft2build.h>
 #  include FT_FREETYPE_H
 # else
-#  ifdef HAVE_LIBTTF
-#   include <freetype.h>
-#  endif
 # endif
 # include "gdttf.h"
 #endif
@@ -506,14 +503,6 @@ PHP_MINFO_FUNCTION(gd)
 #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
@@ -569,8 +558,6 @@ PHP_FUNCTION(gd_info)
        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
index 63df228de9f24a7e3f7a19797ef4af23abfcfcdf..a728d8254831e2f4cc0de6893e0ba0a46ec1e483 100644 (file)
@@ -44,7 +44,7 @@
 #else
 #include <php_config.h>
 #endif
-#if (HAVE_LIBTTF | HAVE_LIBFREETYPE) && !defined(HAVE_GD_CACHE_CREATE)
+#if HAVE_LIBFREETYPE && !defined(HAVE_GD_CACHE_CREATE)
 
 #include "gdcache.h"
 
index a6e507a4bb91816609b6584657a76e8436159318..e3b057a3ee4701d1394ef3f29d677c3dc55c7a9e 100644 (file)
@@ -1,13 +1,9 @@
 #include "gd.h"
 #include "gdhelpers.h"
 
-#ifdef HAVE_LIBTTF
-#define NEED_CACHE 1
-#else
 #ifdef HAVE_LIBFREETYPE
 #define NEED_CACHE 1
 #endif
-#endif
 
 #ifdef NEED_CACHE
 
@@ -211,4 +207,4 @@ main (char *argv[], int argc)
 }
 
 #endif /* TEST */
-#endif /* HAVE_LIBTTF */
+#endif /* HAVE_NEEDCACHE */
index cc011b75b7b2681846ac9f8958fd2ce5e18f558d..4f93ccdd80416cd69b16c492f3e8ec8b17e56bb1 100644 (file)
@@ -24,7 +24,7 @@
 
 #define HAVE_GDIMAGECREATEFROMPNG 1
 
-#if HAVE_LIBTTF|HAVE_LIBFREETYPE
+#if HAVE_LIBFREETYPE
 #define ENABLE_GD_TTF
 #endif