Commits

Anonymous committed f505eac

- sync to 2.0.17

Comments (0)

Files changed (10)

 
 bin_SCRIPTS = bdftogd
 
-noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac
+noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest
 
 EXTRA_DIST = README-JPEG.TXT README.TXT configure.pl bdftogd demoin.png err.out index.html install-item makefile.sample readme.jpn
 
-include_HEADERS = gd.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h
+include_HEADERS = gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h
 
 lib_LTLIBRARIES = libgd.la
 
-libgd_la_SOURCES = gd.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
+libgd_la_SOURCES = gd.c gdfx.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
 
 libgd_la_LDFLAGS = -version-info 2:0:0
 
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
+PTHREAD_CC = @PTHREAD_CC@
+PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
+PTHREAD_LIBS = @PTHREAD_LIBS@
 RANLIB = @RANLIB@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 
 bin_SCRIPTS = bdftogd
 
-noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac
+noinst_PROGRAMS = fontsizetest fontwheeltest gdtest gddemo gd2time gdtestft testac circletexttest
 
 EXTRA_DIST = README-JPEG.TXT README.TXT configure.pl bdftogd demoin.png err.out index.html install-item makefile.sample readme.jpn
 
-include_HEADERS = gd.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h
+include_HEADERS = gd.h gdfx.h gd_io.h gdcache.h gdfontg.h gdfontl.h gdfontmb.h gdfonts.h gdfontt.h
 
 lib_LTLIBRARIES = libgd.la
 
-libgd_la_SOURCES = gd.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
+libgd_la_SOURCES = gd.c gdfx.c gd_gd.c gd_gd2.c gd_io.c gd_io_dp.c gd_io_file.c gd_io_ss.c gd_jpeg.c gd_png.c gd_ss.c gd_topal.c gd_wbmp.c gdcache.c gdfontg.c gdfontl.c gdfontmb.c gdfonts.c gdfontt.c gdft.c gdhelpers.c gdhelpers.h gdkanji.c gdtables.c gdxpm.c jisx0208.h wbmp.c wbmp.h
 
 libgd_la_LDFLAGS = -version-info 2:0:0
 
 LTLIBRARIES = $(lib_LTLIBRARIES)
 
 libgd_la_LIBADD =
-am_libgd_la_OBJECTS = gd.lo gd_gd.lo gd_gd2.lo gd_io.lo gd_io_dp.lo \
-	gd_io_file.lo gd_io_ss.lo gd_jpeg.lo gd_png.lo gd_ss.lo \
-	gd_topal.lo gd_wbmp.lo gdcache.lo gdfontg.lo gdfontl.lo \
-	gdfontmb.lo gdfonts.lo gdfontt.lo gdft.lo gdhelpers.lo \
-	gdkanji.lo gdtables.lo gdxpm.lo wbmp.lo
+am_libgd_la_OBJECTS = gd.lo gdfx.lo gd_gd.lo gd_gd2.lo gd_io.lo \
+	gd_io_dp.lo gd_io_file.lo gd_io_ss.lo gd_jpeg.lo gd_png.lo \
+	gd_ss.lo gd_topal.lo gd_wbmp.lo gdcache.lo gdfontg.lo \
+	gdfontl.lo gdfontmb.lo gdfonts.lo gdfontt.lo gdft.lo \
+	gdhelpers.lo gdkanji.lo gdtables.lo gdxpm.lo wbmp.lo
 libgd_la_OBJECTS = $(am_libgd_la_OBJECTS)
 bin_PROGRAMS = annotate$(EXEEXT) gdparttopng$(EXEEXT) gdtopng$(EXEEXT) \
 	gd2copypal$(EXEEXT) gd2topng$(EXEEXT) pngtogd$(EXEEXT) \
 	pngtogd2$(EXEEXT) webpng$(EXEEXT)
 noinst_PROGRAMS = fontsizetest$(EXEEXT) fontwheeltest$(EXEEXT) \
 	gdtest$(EXEEXT) gddemo$(EXEEXT) gd2time$(EXEEXT) \
-	gdtestft$(EXEEXT) testac$(EXEEXT)
+	gdtestft$(EXEEXT) testac$(EXEEXT) circletexttest$(EXEEXT)
 PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
 annotate_SOURCES = annotate.c
 annotate_LDADD = $(LDADD)
 annotate_DEPENDENCIES = ./libgd.la
 annotate_LDFLAGS =
+circletexttest_SOURCES = circletexttest.c
+circletexttest_OBJECTS = circletexttest.$(OBJEXT)
+circletexttest_LDADD = $(LDADD)
+circletexttest_DEPENDENCIES = ./libgd.la
+circletexttest_LDFLAGS =
 fontsizetest_SOURCES = fontsizetest.c
 fontsizetest_OBJECTS = fontsizetest.$(OBJEXT)
 fontsizetest_LDADD = $(LDADD)
 depcomp = $(SHELL) $(top_srcdir)/config/depcomp
 am__depfiles_maybe = depfiles
 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/annotate.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/circletexttest.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/fontsizetest.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/fontwheeltest.Po ./$(DEPDIR)/gd.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gd2copypal.Po ./$(DEPDIR)/gd2time.Po \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontg.Plo ./$(DEPDIR)/gdfontl.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontmb.Plo ./$(DEPDIR)/gdfonts.Plo \
 @AMDEP_TRUE@	./$(DEPDIR)/gdfontt.Plo ./$(DEPDIR)/gdft.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gdhelpers.Plo ./$(DEPDIR)/gdkanji.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gdparttopng.Po ./$(DEPDIR)/gdtables.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/gdtest.Po ./$(DEPDIR)/gdtestft.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/gdtopng.Po ./$(DEPDIR)/gdxpm.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/pngtogd.Po ./$(DEPDIR)/pngtogd2.Po \
-@AMDEP_TRUE@	./$(DEPDIR)/testac.Po ./$(DEPDIR)/wbmp.Plo \
-@AMDEP_TRUE@	./$(DEPDIR)/webpng.Po
+@AMDEP_TRUE@	./$(DEPDIR)/gdfx.Plo ./$(DEPDIR)/gdhelpers.Plo \
+@AMDEP_TRUE@	./$(DEPDIR)/gdkanji.Plo ./$(DEPDIR)/gdparttopng.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gdtables.Plo ./$(DEPDIR)/gdtest.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gdtestft.Po ./$(DEPDIR)/gdtopng.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/gdxpm.Plo ./$(DEPDIR)/pngtogd.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/pngtogd2.Po ./$(DEPDIR)/testac.Po \
+@AMDEP_TRUE@	./$(DEPDIR)/wbmp.Plo ./$(DEPDIR)/webpng.Po
 COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
 	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
 LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
 CCLD = $(CC)
 LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
 	$(AM_LDFLAGS) $(LDFLAGS) -o $@
-DIST_SOURCES = $(libgd_la_SOURCES) annotate.c fontsizetest.c \
-	fontwheeltest.c gd2copypal.c gd2time.c gd2topng.c gddemo.c \
-	gdparttopng.c gdtest.c gdtestft.c gdtopng.c pngtogd.c \
-	pngtogd2.c testac.c webpng.c
+DIST_SOURCES = $(libgd_la_SOURCES) annotate.c circletexttest.c \
+	fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c \
+	gd2topng.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c \
+	pngtogd.c pngtogd2.c testac.c webpng.c
 HEADERS = $(include_HEADERS)
 
 
 	Makefile.in aclocal.m4 config.hin configure configure.ac \
 	depcomp install-sh missing mkinstalldirs
 DIST_SUBDIRS = $(SUBDIRS)
-SOURCES = $(libgd_la_SOURCES) annotate.c fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c gd2topng.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c pngtogd.c pngtogd2.c testac.c webpng.c
+SOURCES = $(libgd_la_SOURCES) annotate.c circletexttest.c fontsizetest.c fontwheeltest.c gd2copypal.c gd2time.c gd2topng.c gddemo.c gdparttopng.c gdtest.c gdtestft.c gdtopng.c pngtogd.c pngtogd2.c testac.c webpng.c
 
 all: config.h
 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
 annotate$(EXEEXT): $(annotate_OBJECTS) $(annotate_DEPENDENCIES) 
 	@rm -f annotate$(EXEEXT)
 	$(LINK) $(annotate_LDFLAGS) $(annotate_OBJECTS) $(annotate_LDADD) $(LIBS)
+circletexttest$(EXEEXT): $(circletexttest_OBJECTS) $(circletexttest_DEPENDENCIES) 
+	@rm -f circletexttest$(EXEEXT)
+	$(LINK) $(circletexttest_LDFLAGS) $(circletexttest_OBJECTS) $(circletexttest_LDADD) $(LIBS)
 fontsizetest$(EXEEXT): $(fontsizetest_OBJECTS) $(fontsizetest_DEPENDENCIES) 
 	@rm -f fontsizetest$(EXEEXT)
 	$(LINK) $(fontsizetest_LDFLAGS) $(fontsizetest_OBJECTS) $(fontsizetest_LDADD) $(LIBS)
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/annotate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/circletexttest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontsizetest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fontwheeltest.Po@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gd.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdfonts.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdfontt.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdft.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdfx.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdhelpers.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdkanji.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gdparttopng.Po@am__quote@

src/circletexttest.c

+#include <stdio.h>
+#include <gd.h>
+
+int
+main (int argc, char *argv[])
+{
+	FILE *in;
+	FILE *out;
+	gdImagePtr im;
+	int radius;
+	/* Create an image of text on a circle, with an
+		alpha channel so that we can copy it onto a
+		background */
+	in = fopen("eleanor.jpg", "rb");
+	if (!in) {
+		im = gdImageCreateTrueColor(300, 300);
+	} else {
+		im = gdImageCreateFromJpeg(in);
+		fclose(in);
+	}
+	if (gdImageSX(im) < gdImageSY(im)) {
+		radius = gdImageSX(im) / 2;
+	} else {
+		radius = gdImageSY(im) / 2;
+	}
+	gdImageStringFTCircle(
+		im,
+		gdImageSX(im) / 2,
+		gdImageSY(im) / 2,
+		radius,
+		radius / 2,
+		0.8,
+		"arial",
+		24,
+		"top text",
+		"bottom text",
+		gdTrueColorAlpha(192, 100, 255, 32));
+	out = fopen("gdfx.png", "wb");
+	if (!out) {
+		fprintf(stderr, "Can't create gdfx.png\n");
+		return 1;
+	}
+	gdImagePng(im, out);
+	fclose(out);
+	gdImageDestroy(im);
+	return 0;
+}
+
 /* Define to 1 if you have the <png.h> header file. */
 #undef HAVE_PNG_H
 
+/* Define if you have POSIX threads libraries and header files. */
+#undef HAVE_PTHREAD
+
 /* Define to 1 if you have the <stddef.h> header file. */
 #undef HAVE_STDDEF_H
 
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define to the necessary symbol if this constant uses a non-standard name on
+   your system. */
+#undef PTHREAD_CREATE_JOINABLE
+
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.57 for GD 2.0.15.
+# Generated by GNU Autoconf 2.57 for GD 2.0.17.
 #
 # Report bugs to <gd@boutell.com>.
 #
 # Identity of this package.
 PACKAGE_NAME='GD'
 PACKAGE_TARNAME='gd'
-PACKAGE_VERSION='2.0.15'
-PACKAGE_STRING='GD 2.0.15'
+PACKAGE_VERSION='2.0.17'
+PACKAGE_STRING='GD 2.0.17'
 PACKAGE_BUGREPORT='gd@boutell.com'
 
 ac_unique_file="gd.c"
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS GDLIB_MAJOR GDLIB_MINOR GDLIB_REVISION GDLIBNAME INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL LIBICONV LTLIBICONV LIBPNG_CONFIG FREETYPE_CONFIG LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS GDLIB_MAJOR GDLIB_MINOR GDLIB_REVISION GDLIBNAME INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os LN_S ECHO RANLIB ac_ct_RANLIB CPP EGREP LIBTOOL LIBICONV LTLIBICONV LIBPNG_CONFIG FREETYPE_CONFIG PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GD 2.0.15 to adapt to many kinds of systems.
+\`configure' configures GD 2.0.17 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GD 2.0.15:";;
+     short | recursive ) echo "Configuration of GD 2.0.17:";;
    esac
   cat <<\_ACEOF
 
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
   cat <<\_ACEOF
-GD configure 2.0.15
+GD configure 2.0.17
 generated by GNU Autoconf 2.57
 
 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GD $as_me 2.0.15, which was
+It was created by GD $as_me 2.0.17, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   $ $0 $@
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=15
+GDLIB_REVISION=17
 GDLIBNAME=gd
 
 
 
 # Define the identity of the package.
  PACKAGE=gd
- VERSION=2.0.15
+ VERSION=2.0.17
 
 
 cat >>confdefs.h <<_ACEOF
 #AC_FUNC_VPRINTF
 #AC_CHECK_FUNCS([floor memset sqrt strchr strdup strtol])
 
+
 echo "$as_me:$LINENO: checking for sin" >&5
 echo $ECHO_N "checking for sin... $ECHO_C" >&6
 if test "${ac_cv_func_sin+set}" = set; then
   ac_cv_lib_Xpm_XpmReadFileToXpmImage=no
 fi
 
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+echo $ECHO_N "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... $ECHO_C" >&6
+        cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char pthread_join ();
+int
+main ()
+{
+pthread_join ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+echo $ECHO_N "checking whether pthreads work without any flags... $ECHO_C" >&6
+                ;;
+
+                -*)
+                echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+echo $ECHO_N "checking whether pthreads work with $flag... $ECHO_C" >&6
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                *)
+                echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+echo $ECHO_N "checking for the pthreads library -l$flag... $ECHO_C" >&6
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  acx_pthread_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+echo "${ECHO_T}$acx_pthread_ok" >&6
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+echo $ECHO_N "checking for joinable pthread attribute... $ECHO_C" >&6
+        cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_JOINABLE;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ok=PTHREAD_CREATE_JOINABLE
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ok=unknown
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+        if test x"$ok" = xunknown; then
+                cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_UNDETACHED;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ok=PTHREAD_CREATE_UNDETACHED
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ok=unknown
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_CREATE_JOINABLE $ok
+_ACEOF
+
+        fi
+        echo "$as_me:$LINENO: result: ${ok}" >&5
+echo "${ECHO_T}${ok}" >&6
+        if test x"$ok" = xunknown; then
+                { echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
+echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
+        fi
+
+        echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+echo $ECHO_N "checking if more special flags are required for pthreads... $ECHO_C" >&6
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        echo "$as_me:$LINENO: result: ${flag}" >&5
+echo "${ECHO_T}${flag}" >&6
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$PTHREAD_CC"; then
+  ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_PTHREAD_CC="cc_r"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+  echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+echo "${ECHO_T}$PTHREAD_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+        PTHREAD_CC="$CC"
+fi
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
+
+        :
+else
+        acx_pthread_ok=no
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
 echo "$as_me:$LINENO: result:
 ** Configuration summary for $PACKAGE $VERSION:
 
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
+   Support for pthreads:             $acx_pthread_ok
 " >&5
 echo "${ECHO_T}
 ** Configuration summary for $PACKAGE $VERSION:
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
+   Support for pthreads:             $acx_pthread_ok
 " >&6
 
                                         ac_config_files="$ac_config_files Makefile config/Makefile config/gdlib-config test/Makefile"
 } >&5
 cat >&5 <<_CSEOF
 
-This file was extended by GD $as_me 2.0.15, which was
+This file was extended by GD $as_me 2.0.17, which was
 generated by GNU Autoconf 2.57.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
 
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-GD config.status 2.0.15
+GD config.status 2.0.17
 configured by $0, generated by GNU Autoconf 2.57,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 s,@LTLIBICONV@,$LTLIBICONV,;t t
 s,@LIBPNG_CONFIG@,$LIBPNG_CONFIG,;t t
 s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
+s,@PTHREAD_CC@,$PTHREAD_CC,;t t
+s,@PTHREAD_LIBS@,$PTHREAD_LIBS,;t t
+s,@PTHREAD_CFLAGS@,$PTHREAD_CFLAGS,;t t
 s,@LIBOBJS@,$LIBOBJS,;t t
 s,@LTLIBOBJS@,$LTLIBOBJS,;t t
 CEOF
 AC_PREREQ(2.54)
 
 #HEY! Change BOTH the vesion number and the GDLIB_REVISION setting!
-AC_INIT([GD], [2.0.15], [gd@boutell.com])
+AC_INIT([GD], [2.0.17], [gd@boutell.com])
 AC_CONFIG_SRCDIR([gd.c])
 AC_CONFIG_AUX_DIR(config)
 
 GDLIB_MAJOR=2
 GDLIB_MINOR=0
-GDLIB_REVISION=15
+GDLIB_REVISION=17
 GDLIBNAME=gd
 
 AC_SUBST(GDLIB_MAJOR)
 #AC_FUNC_VPRINTF
 #AC_CHECK_FUNCS([floor memset sqrt strchr strdup strtol])
 
+AC_DEFUN([ACX_PTHREAD], [
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_LANG_SAVE
+AC_LANG_C
+acx_pthread_ok=no
+
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
+        AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test x"$acx_pthread_ok" = xno; then
+                PTHREAD_LIBS=""
+                PTHREAD_CFLAGS=""
+        fi
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+fi
+
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
+
+# Create a list of thread flags to try.  Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all.
+
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt"
+
+# The ordering *is* (sometimes) important.  Some notes on the
+# individual items follow:
+
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+#       other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+#      doesn't hurt to check since this sometimes defines pthreads too;
+#      also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+
+case "${host_cpu}-${host_os}" in
+        *solaris*)
+
+        # On Solaris (at least, for some versions), libc contains stubbed
+        # (non-functional) versions of the pthreads routines, so link-based
+        # tests will erroneously succeed.  (We need to link with -pthread or
+        # -lpthread.)  (The stubs are missing pthread_cleanup_push, or rather
+        # a function called by this macro, so we could check for that, but
+        # who knows whether they'll stub that too in a future libc.)  So,
+        # we'll just look for -pthreads and -lpthread first:
+
+        acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+        ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+        case $flag in
+                none)
+                AC_MSG_CHECKING([whether pthreads work without any flags])
+                ;;
+
+                -*)
+                AC_MSG_CHECKING([whether pthreads work with $flag])
+                PTHREAD_CFLAGS="$flag"
+                ;;
+
+                *)
+                AC_MSG_CHECKING([for the pthreads library -l$flag])
+                PTHREAD_LIBS="-l$flag"
+                ;;
+        esac
+
+        save_LIBS="$LIBS"
+        save_CFLAGS="$CFLAGS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Check for various functions.  We must include pthread.h,
+        # since some functions may be macros.  (On the Sequent, we
+        # need a special flag -Kthread to make this header compile.)
+        # We check for pthread_join because it is in -lpthread on IRIX
+        # while pthread_create is in libc.  We check for pthread_attr_init
+        # due to DEC craziness with -lpthreads.  We check for
+        # pthread_cleanup_push because it is one of the few pthread
+        # functions on Solaris that doesn't have a non-functional libc stub.
+        # We try pthread_create on general principles.
+        AC_TRY_LINK([#include <pthread.h>],
+                    [pthread_t th; pthread_join(th, 0);
+                     pthread_attr_init(0); pthread_cleanup_push(0, 0);
+                     pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
+                    [acx_pthread_ok=yes])
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        AC_MSG_RESULT($acx_pthread_ok)
+        if test "x$acx_pthread_ok" = xyes; then
+                break;
+        fi
+
+        PTHREAD_LIBS=""
+        PTHREAD_CFLAGS=""
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+        save_LIBS="$LIBS"
+        LIBS="$PTHREAD_LIBS $LIBS"
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+        # Detect AIX lossage: threads are created detached by default
+        # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+        AC_MSG_CHECKING([for joinable pthread attribute])
+        AC_TRY_LINK([#include <pthread.h>],
+                    [int attr=PTHREAD_CREATE_JOINABLE;],
+                    ok=PTHREAD_CREATE_JOINABLE, ok=unknown)
+        if test x"$ok" = xunknown; then
+                AC_TRY_LINK([#include <pthread.h>],
+                            [int attr=PTHREAD_CREATE_UNDETACHED;],
+                            ok=PTHREAD_CREATE_UNDETACHED, ok=unknown)
+        fi
+        if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+                AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok,
+                          [Define to the necessary symbol if this constant
+                           uses a non-standard name on your system.])
+        fi
+        AC_MSG_RESULT(${ok})
+        if test x"$ok" = xunknown; then
+                AC_MSG_WARN([we do not know how to create joinable pthreads])
+        fi
+
+        AC_MSG_CHECKING([if more special flags are required for pthreads])
+        flag=no
+        case "${host_cpu}-${host_os}" in
+                *-aix* | *-freebsd*)     flag="-D_THREAD_SAFE";;
+                *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+        esac
+        AC_MSG_RESULT(${flag})
+        if test "x$flag" != xno; then
+                PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+        fi
+
+        LIBS="$save_LIBS"
+        CFLAGS="$save_CFLAGS"
+
+        # More AIX lossage: must compile with cc_r
+        AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC})
+else
+        PTHREAD_CC="$CC"
+fi
+
+AC_SUBST(PTHREAD_LIBS)
+AC_SUBST(PTHREAD_CFLAGS)
+AC_SUBST(PTHREAD_CC)
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+        ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
+        :
+else
+        acx_pthread_ok=no
+        $2
+fi
+AC_LANG_RESTORE
+])dnl ACX_PTHREAD
+
 dnl do we need to specify -lm explicitly?
 AC_CHECK_FUNC(sin,,[AC_CHECK_LIB(m,sin)])
 
   ac_cv_lib_Xpm_XpmReadFileToXpmImage=no
 fi
 
+ACX_PTHREAD()
+
 dnl report configuration
 AC_MSG_RESULT([
 ** Configuration summary for $PACKAGE $VERSION:
    Support for JPEG library:         $ac_cv_lib_jpeg_jpeg_set_defaults
    Support for Freetype 2.x library: $ac_cv_lib_freetype_FT_Init_FreeType
    Support for Xpm library:          $ac_cv_lib_Xpm_XpmReadFileToXpmImage
+   Support for pthreads:             $acx_pthread_ok
 ])
 
 AC_CONFIG_FILES([Makefile config/Makefile config/gdlib-config test/Makefile])
 static void gdImageBrushApply (gdImagePtr im, int x, int y);
 static void gdImageTileApply (gdImagePtr im, int x, int y);
 static void gdImageAntiAliasedApply (gdImagePtr im, int x, int y);
-static int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
+int gdImageGetTrueColorPixel (gdImagePtr im, int x, int y);
 
 gdImagePtr
 gdImageCreate (int sx, int sy)
       gd = (im->green[i] - g);
       bd = (im->blue[i] - b);
       /* gd 2.02: whoops, was - b (thanks to David Marwood) */
-      ad = (im->blue[i] - a);
+      /* gd 2.16: was blue rather than alpha! Geez! Thanks to 
+		Artur Jakub Jerzak */
+      ad = (im->alpha[i] - a);
       dist = rd * rd + gd * gd + bd * bd + ad * ad;
       if (first || (dist < mindist))
 	{
     }
 }
 
-static int
+int
 gdImageGetTrueColorPixel (gdImagePtr im, int x, int y)
 {
   int p = gdImageGetPixel (im, x, y);
   stx = (int *) gdMalloc (sizeof (int) * srcW);
   sty = (int *) gdMalloc (sizeof (int) * srcH);
   accum = 0;
+  /* Fixed by Mao Morimoto 2.0.16 */
   for (i = 0; (i < srcW); i++)
     {
-      int got;
-      accum += (double) dstW / (double) srcW;
-      got = (int) floor (accum);
-      stx[i] = got;
-      accum -= got;
+      stx[i] = dstW * (i+1) / srcW - dstW * i / srcW ;
     }
-  accum = 0;
   for (i = 0; (i < srcH); i++)
     {
-      int got;
-      accum += (double) dstH / (double) srcH;
-      got = (int) floor (accum);
-      sty[i] = got;
-      accum -= got;
+      sty[i] = dstH * (i+1) / srcH - dstH * i / srcH ;
     }
   for (i = 0; (i < gdMaxColors); i++)
     {
 	  maxy = p[i].y;
 	}
     }
+  /* 2.0.16: Optimization by Ilia Chipitsine -- don't waste time offscreen */
+  if (miny < 0) {
+    miny = 0;
+  }
+  if (maxy >= gdImageSY(im)) {
+    maxy = gdImageSY(im) - 1;
+  } 
   /* Fix in 1.3: count a vertex only once */
   for (y = miny; (y <= maxy); y++)
     {
   *y2P = im->cy2;
 }
 
+
   void gdImageStringUp16 (gdImagePtr im, gdFontPtr f, int x, int y,
 			  unsigned short *s, int color);
 
-/* clean up after using fonts in gdImageStringFT() */
-  void gdFreeFontCache ();
+/* 2.0.16: for thread-safe use of gdImageStringFT and friends,
+  call this before allowing any thread to call gdImageStringFT. 
+  Otherwise it is invoked by the first thread to invoke
+  gdImageStringFT, with a very small but real risk of a race condition. 
+  Return 0 on success, nonzero on failure to initialize freetype. */
+int gdFontCacheSetup (void);
+
+/* Optional: clean up after application is done using fonts in 
+  gdImageStringFT(). */
+void gdFontCacheShutdown (void);
 
 /* Calls gdImageStringFT. Provided for backwards compatibility only. */
   char *gdImageStringTTF (gdImage * im, int *brect, int fg, char *fontlist,
 /* resolution affects ttf font rendering, particularly hinting */
 #define GD_RESOLUTION           96	/* pixels per inch */
 
+/* newfangled special effects */
+#include "gdfx.h"
+
 #ifdef __cplusplus
 }
 #endif
 		      else
 			{
 			  ch = gdGetC (in);
-			  if (ch == EOF)
+			  if ((int)ch == EOF)
 			    {
 			      ch = 0;
 			      /*printf("EOF while reading file\n"); */
 <html>
 <head>
-<TITLE>gd 2.0.15</TITLE>
+<TITLE>gd 2.0.17</TITLE>
 </head>
 <body bgcolor="#FFFFFF">
 <!-- BANNER HERE -->
-<h1>This is gd 2.0.15.</h1>
+<h1>This is gd 2.0.17.</h1>
 <p>
-<H2>gd 2.0.15</H2>
+<H2>gd 2.0.17</H2>
 <H3>A graphics library for fast image creation</H3>
 <H3>Follow this link to the
 <A HREF="http://www.boutell.com/gd/">latest version
 of this document</A>.</H3>
 <blockquote>
 <strong>UPGRADING USERS: READ THIS FIRST!</strong>
-gd 2.0.5 and above install by default to /usr/local/lib and
+Modern versions of gd install by default to /usr/local/lib and
 /usr/local/include. If you already have an older version of gd
 in /usr/lib and /usr/include, you may wish to use:
 <pre>
 new installation overwrites the old.
 <p>
 <strong>ABOUT GD AND GIF:</strong>
-gd 2.0.15 creates PNG, JPEG and WBMP images, not GIF images. This is a 
+gd 2.0.17 creates PNG, JPEG and WBMP images, not GIF images. This is a 
 good thing.  PNG is a more compact format, and full compression is
 available.  JPEG works best with photographic images, and is still
 more compatible with the major Web browsers than even PNG is. WBMP is
 intended for wireless devices (not regular web browsers). Old
 code will need modification to call gdImagePng or gdImageJpeg instead
 of gdImageGif. <strong>Please do not ask us to send you the old GIF
-version of GD.</strong> Unisys holds a patent on the LZW compression
-algorithm, which is used in fully compressed GIF images. The best
+version of GD.</strong> Yes, Unisys still holds a patent on the LZW compression
+algorithm in some countries. The best
 solution is to move to legally unencumbered, well-compressed,
 modern image formats such as PNG and JPEG as soon as possible.
 
 <p>
-gd 2.0.15 <strong>requires</strong> that the following libraries 
+gd 2.0.17 <strong>requires</strong> that the following libraries 
 also be installed, in order to produce the related image formats.
 You may skip libraries associated with formats you do not use:
 <p>
 <H3>Table of Contents</H3>
 <UL>
 <LI><A HREF="#notice">Credits and license terms</A>
-<LI><A HREF="#whatsnew2.0.15">What's new in version "XYZ" of GD?</A>
+<LI><A HREF="#whatsnew2.0.17">What's new in version "XYZ" of GD?</A>
 <LI><A HREF="#whatis">What is gd?</A>
 <LI><A HREF="#gdother">What if I want to use another programming language?</A>
 <LI><A HREF="#required">What else do I need to use gd?</A>
 of gd, the following copyright statement covers all of the authors
 who have required such a statement. <strong>If you are aware of any oversights
 in this copyright notice, please contact
-<a href="mailto:boutell@boutell.com">Thomas Boutell</a> who will be
+<a href="http://www.boutell.com/contact">Thomas Boutell</a> who will be
 pleased to correct them.</strong>
 <pre>
 COPYRIGHT STATEMENT FOLLOWS THIS LINE
 <A NAME="gdother"><H3>What if I want to use another programming
 language?</h3></A>
 Not all of these tools are necessarily up to date and fully compatible
-with 2.0.15.
+with 2.0.17.
 <h4>PHP</h4>
 A variant of gd 2.x is included in PHP 4.3.0. It is also possible
-to patch PHP 4.2.3 for use with gd 2.0.15; see the
+to patch PHP 4.2.3 for use with gd 2.0.17; see the
 <a href="http://www.boutell.com/gd/">gd home page</a> for a link to
 that information. It would be a Good Idea to merge all of the things
 that are better in mainstream gd and all of the things that are
 <a href="http://stein.cshl.org/WWW/software/GD/">
 GD.pm</a> library, which uses gd as the basis for a set of
 Perl 5.x classes. Highly recommended.
+<h4>OCaml</h4>
+gd can be used from OCaml, thanks to
+<a href="http://gd4o.sourceforge.net/">Matt Gushee's GD4O project</a>.
 <h4>Tcl</h4>
 gd can be used from Tcl with John Ellson's
 <a href=http://www.graphviz.org/pub/>Gdtclft</a>
 <li><a href="http://martin.gleeson.com/fly/">fly</a>, by Martin Gleeson
 </ul>
 <P>
+<A NAME="whatsnew2.0.17"><H3>What's new in version 2.0.17?</H3></A>
+<P>
+Minor compilation and packaging problems with 2.0.16 were corrected.
+If 2.0.16 compiled without errors for you, then you don't need
+to upgrade to 2.0.17.
+<P>
+<A NAME="whatsnew2.0.16"><H3>What's new in version 2.0.16?</H3></A>
+<P>
+<ul>
+<li>Thread safety for freetype text output. Background: all gd functions
+were already thread safe, as long as only one thread manipulates each
+image -- except for gdImageStringFT and gdImageStringFTEx. This is because
+of a shared freetype font cache. Sharing the cache between images
+is worthwhile, so "configure" now detects pthreads and uses it to
+wrap freetype text output in a critical section if available. There is
+also critical section support under WIN32. Those who wish to be
+strictly thread-safe should call the new function
+<a href="#gdFontCacheSetup">gdFontCacheSetup</a> before allowing any
+thread to use freetype text calls. Otherwise this function is automatically
+invoked on the first use of freetype, with a very small but real chance
+of a race condition.
+<li><a href="#gdImageSquareToCircle">gdImageSquareToCircle</a> performs
+a "polar coordinate transform," returning a new image in which the
+X axis of the original has been remapped to theta (angle) and the
+Y axis of the original has been remapped to rho (distance from center).
+<li><a href="#gdImageStringFTCircle">gdImageStringFTCircle</a> wraps
+text in a circle around a specified center point. This function 
+takes advantage of <a href="#gdImageSquareToCircle">gdImageSquareToCircle</a>.
+The result is very smooth, although it takes some time to compute.
+Thanks to Steve Bassi for sponsoring this work.
+<li><a href="#gdImageSharpen">gdImageSharpen</a>, contributed by
+Paul Troughton. Thank you.
+<li>Christophe Thomas corrected gdft.c to include freetype header
+files in the way that is now mandatory in freetype 2.1.6 and above.
+<li>Gustavo Scotti fixed a memory leak in gdft.c.
+<li>Clipping rectangle respected in freetype text output. Thanks to Matt
+McNabb.
+<li>Paul den Dulk found a degenerate case that crashes
+gdImageToPalette. Fixed.
+<li>Optimization by Ilia Chipitsine to avoid wasting time with
+offscreen scanlines during polygon rasterization.
+<li>Optimized PNG saving by Phong Tran. Speeds up saves a 
+little bit. 
+</ul>
+<P>
 <A NAME="whatsnew2.0.15"><H3>What's new in version 2.0.15?</H3></A>
 <P>
 <ul>
 <P>
 <A NAME="getgd"><H3>How do I get gd?</H3></A>
 <ul>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.15.tar.gz">Gzipped Tar File (Unix)</a>
-<li><a href="http://www.boutell.com/gd/http/gd-2.0.15.zip">.ZIP File (Windows)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.17.tar.gz">Gzipped Tar File (Unix)</a>
+<li><a href="http://www.boutell.com/gd/http/gd-2.0.17.zip">.ZIP File (Windows)</a>
 </ul>
 <P>
 <A NAME="buildgd"><H3>How do I build gd?</H3></A>
 consult with an experienced user of your system. Sorry, we cannot
 answer questions about basic Internet skills.
 <p>
-Unpacking the archive will produce a directory called "gd-2.0.15".
+Unpacking the archive will produce a directory called "gd-2.0.17".
 <p>
 <h4>For Unix</h4>
-<code>cd</code> to the 2.0.15 directory and type:
+<code>cd</code> to the 2.0.17 directory and type:
 <p>
 <code>./configure</code>
 <P>
 <LI><A HREF="#query">Query functions (not color-related)</A></LI>
 <LI><A HREF="#fonts">Font and text-handling functions</A></LI>
 <LI><A HREF="#colors">Color handling functions</A></LI>
-<LI><A HREF="#copying">Copying, resizing and rotating functions</A></LI>
+<LI><A HREF="#copying">Copying, resizing, rotating, deformation and filter
+functions</A></LI>
 <LI><A HREF="#misc">Miscellaneous Functions</A></LI>
 <LI><A HREF="#constants">Constants</A></LI>
 </UL>
 <DT><A NAME="gdIoCtx">gdIOCtx</a> <strong>(TYPE)</strong>
 <DD>
 Most of the gd functions that read and write files, such as
-<a href="#gdImagePng">gdImagePng</a> and <a href="#gdImageCreateFromJpeg</a>,
+<a href="#gdImagePng">gdImagePng</a> and <a href="#gdImageCreateFromJpeg"></a>,
 also have variants that accept a gdIOCtx structure; see
 <a href="#gdImagePngCtx">gdImagePngCtx</a> and 
-<a href="#gdImageCreateFromJpegCtx</a>. Those who wish to provide
+<a href="#gdImageCreateFromJpegCtx">gdImageCreateFromJpegCtx</a>. Those who wish to provide
 their own custom routines to read and write images can populate a
 gdIOCtx structure with functions of their own devising to 
 to read and write data. For image reading, the only mandatory
 <DT><A NAME="gdImageCreateFromJpeg">gdImageCreateFromJpeg(FILE *in)</A>
 <strong>(FUNCTION)</strong>
 <br>
-<A NAME="gdImageCreateFromJpegCtx">gdImageCreateFromJpegCtx(FILE *in)</A>
-<strong>(FUNCTION)</strong>
-<p><DT><A NAME="gdImageCreateFromJpeg">gdImageCreateFromJpeg(FILE *in)</A>
-<strong>(FUNCTION)</strong>
-<br>
-<A NAME="gdImageCreateFromJpegCtx">gdImageCreateFromJpegCtx(FILE *in)</A>
+<A NAME="gdImageCreateFromJpegCtx">gdImageCreateFromJpegCtx(gdIOCtx *in)</A>
 <strong>(FUNCTION)</strong>
 <p>
 <DD>
 /* Destroy it */
 <A HREF="#gdImageDestroy">gdImageDestroy</A>(im);
 </PRE>
-<DT><A NAME="gdImageFilledEllipse">void gdImageFilledEllipse(gdImagePtr im, int cx, int cy, int w, int h, int s, int e, int color)</A>
+<DT><A NAME="gdImageFilledEllipse">void gdImageFilledEllipse(gdImagePtr im, int cx, int cy, int w, int h, int color)</A>
 <STRONG> (FUNCTION)</STRONG>
 <DD>
 gdImageFilledEllipse is used to draw an ellipse centered at the given point,
 with the specified width and height in pixels. The ellipse is filled in
-the color specified by the last argument. A circle can be drawn
-by beginning from 0 degrees and ending at 360 degrees, with
-width and height being equal. e must be greater than s. Values greater
-than 360 are interpreted modulo 360.
+the color specified by the last argument. 
 <PRE>
 ... inside a function ...
 <A HREF="#gdImagePtr">gdImagePtr</A> im;
 white = <A HREF="#gdImageColorAllocate">gdImageColorAllocate</A>(im, 255, 255, 255);	
 /* Draw a centered string. */
 gdImageString(im, gdFontLarge,
-	im->w / 2 - (strlen(s) * gdFontLarge->w / 2),
-	im->h / 2 - gdFontLarge->h / 2,
+	im->sx / 2 - (strlen(s) * gdFontLarge->w / 2),
+	im->sy / 2 - gdFontLarge->h / 2,
 	s, white);
 /* ... Do something with the image, such as saving it to a file... */
 /* Destroy it */
 with the 8 elements representing the 4 corner coordinates of the
 bounding rectangle.
 <TABLE BORDER="1">
-<TR><TD ALIGN="LEFT" VALIGN="TOP" >0</TD><TD ALIGN="LEFT" VALIGN="TOP">
+<TR><TD ALIGN="LEFT" VALIGN="TOP">0</TD><TD ALIGN="LEFT" VALIGN="TOP">
 lower left corner, X position</TD></TR>
-<TR><TD ALIGN="LEFT" VALIGN="TOP >1</TD><TD ALIGN="LEFT" VALIGN="TOP">
+<TR><TD ALIGN="LEFT" VALIGN="TOP">1</TD><TD ALIGN="LEFT" VALIGN="TOP">
 lower left corner, Y position</TD></TR>
-<TR><TD ALIGN="LEFT" VALIGN="TOP >2</TD><TD ALIGN="LEFT" VALIGN="TOP">
+<TR><TD ALIGN="LEFT" VALIGN="TOP">2</TD><TD ALIGN="LEFT" VALIGN="TOP">
 lower right corner, X position</TD></TR>
 <TR><TD ALIGN="LEFT" VALIGN="TOP">3</TD><TD ALIGN="LEFT" VALIGN="TOP">
 lower right corner, Y position</TD></TR>
 are attempted.
 <p>
 For more information, see <a href="#gdImageStringFT">gdImageStringFT</a>.
+<DT><A NAME="gdImageStringFTCircle">
+char *gdImageStringFTCircle(gdImagePtr im,
+        int cx,
+        int cy,
+        double radius,
+        double textRadius,
+        double fillPortion,
+        char *font,
+        double points,
+        char *top,
+        char *bottom,
+        int fgcolor)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>
+Draws the text strings specified by <code>top</code> and <code>bottom</code> 
+on <code>im</code>, curved along the edge of a circle of radius 
+<code>radius</code>, with its center at <code>cx</code> and <code>cy</code>. 
+<code>top</code> is written clockwise
+along the top; <code>bottom</code> is written counterclockwise
+along the bottom. <code>textRadius</code> determines the "height"
+of each character; if <code>textRadius</code> is 1/2 of 
+<code>radius</code>,
+characters extend halfway from the edge to the center.
+<code>fillPortion</code> varies from 0 to 1.0, with useful values
+from about 0.4 to 0.9, and determines how much of the
+180 degrees of arc assigned to each section of text
+is actually occupied by text; 0.9 looks better than
+1.0 which is rather crowded. <code>font</code> is a freetype
+font; see gdImageStringFT. <code>points</code> is passed to the
+freetype engine and has an effect on hinting; although
+the size of the text is determined by <code>radius</code>, 
+<code>textRadius</code>, and <code>fillPortion</code>, you should 
+pass a point size that
+"hints" appropriately -- if you know the text will be
+large, pass a large point size such as 24.0 to get the
+best results. <code>fgcolor</code> can be any color, and may have
+an alpha component, do blending, etc.
+<p>
+Returns 0 on success, or an error string otherwise.
+<pre>
+#include &lt;stdio.h&gt;
+#include &lt;gd.h&gt;
+
+int main (int argc, char *argv[])
+{
+        FILE *in;
+        FILE *out;
+        gdImagePtr im;
+        int radius;
+        /* Create an image of text on a circle, with an
+                alpha channel so that we can copy it onto a
+                background */
+        in = fopen("mypicture.jpg", "rb");
+        if (!in) {
+                im = gdImageCreateTrueColor(300, 300);
+        } else {
+                im = gdImageCreateFromJpeg(in);
+                fclose(in);
+        }
+        if (gdImageSX(im) &lt; gdImageSY(im)) {
+                radius = gdImageSX(im) / 2;
+        } else {
+                radius = gdImageSY(im) / 2;
+        }
+        gdStringFTCircle(
+                im,
+                gdImageSX(im) / 2,
+                gdImageSY(im) / 2,
+                radius,
+                radius / 2,
+                0.8,
+                "arial",
+                24,
+                "top text",
+                "bottom text",
+                gdTrueColorAlpha(240, 240, 255, 32));
+        out = fopen("gdfx.png", "wb");
+        if (!out) {
+                fprintf(stderr, "Can't create gdfx.png\n");
+                return 1;
+        }
+        gdImagePng(im, out);
+        fclose(out);
+        gdImageDestroy(im);
+        return 0;
+}
+</pre>
+
+<p>
+For more information, see <a href="#gdImageStringFTEx">gdImageStringFTEx</a>
+and <a href="#gdImageSquareToCircle">gdImageSquareToCircle</a>.
 <DT><A NAME="gdImageStringTTF">
 char *gdImageStringTTF(gdImagePtr im, int *brect,
 	int fg, char *fontname, double ptsize, double angle,
 <strong>DEPRECATED.</strong> This function simply invokes
 <a href="#gdImageStringFT">gdImageStringFT</a> for backwards
 compatibility with old code that was written with FreeType 1.x.
+<DT><A NAME="gdFontCacheSetup">
+int gdFontCacheSetup(void)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>
+This function initializes the font cache for freetype text output
+functions such as <a href="#gdImageStringFTEx">gdImageStringFTEx</a>.
+If this function is not called by the programmer, it is invoked
+automatically on the first truetype text output call, which is
+perfectly safe <b>unless</b> the application is multithreaded.
+Multithreaded applications should directly invoke this function before
+allowing any thread to use freetype text output. Returns 0 on success,
+nonzero if the freetype library fails to initialize.
+<DT><A NAME="gdFontCacheShutdown">
+void gdFontCacheShutdown(void)</A>
+<STRONG>(FUNCTION)</STRONG>
+<DD>
+This function releases the memory used by the freetype font cache
+and the text output mutex. Applications that use gd for their
+entire lifetime, then exit, need not call this function.
 </DL>
 <H3><A NAME="colors">Color-handling functions</A></H3>
 <DL>
 not be used with palette-based images. If you need to write
 code which is compatible with both palette-based and
 truecolor images, use <a href="#gdImageColorResolve">gdImageColorResolve</a>.
-<DT><A NAME="gdImageTrueColorAlpha">
-void gdImageTrueColorAlpha(int red, int green, int blue, int alpha)</A>
+<DT><A NAME="gdTrueColorAlpha">
+void gdTrueColorAlpha(int red, int green, int blue, int alpha)</A>
 <STRONG>(MACRO)</STRONG>
 <DD>
-gdImageTrueColorAlpha returns an RGBA color value for use when
+gdTrueColorAlpha returns an RGBA color value for use when
 drawing on a truecolor image with alpha channel transparency. Red, 
 green, and blue are all
 in the range between 0 (off) and 255 (maximum). Alpha is in the
                 gdImageSX(im_in),
                 gdImageSY(im_in),
                 a); 
+}
 out = fopen("large.png", "wb");
 <A HREF="#gdImagePng">gdImagePng</A>(im_out, out);
 fclose(out);
 Copies a palette from one image to another, attempting to match the colors in the target image
 to the colors
 in the source palette.
+<DT><A NAME="gdImageSquareToCircle">void gdImageSquareToCircle(gdImagePtr im, int radius)</a>
+<STRONG> (FUNCTION)</STRONG>
+<DD>
+<b>im MUST be square, but can have any size.</b> Returns a new image
+of width and height radius * 2, in which the X axis of
+the original has been remapped to theta (angle) and the Y axis
+of the original has been remapped to rho (distance from center).
+This is known as a "polar coordinate transform."
+See also <a href="#gdImageStringFTCircle">gdImageStringFTCircle</a>, which
+uses this function internally.
+<DT><A NAME="gdImageSharpen">void gdImageSharpen(gdImagePtr im, int pct)</a>
+<STRONG> (FUNCTION)</STRONG>
+<DD>
+Sharpens the specified image. pct is a sharpening percentage, and
+can be greater than 100. Silently does nothing to non-truecolor images.
+Silently does nothing for pct<0. Transparency/alpha channel are not
+altered.    
 </DL>
 <H3><A NAME="misc">Miscellaneous Functions</A></H3>
 <DL>
 <h4>Free Support</h4>
 
 Anyone can mail questions about the gd library to
-<a href="mailto:boutell@boutell.com">boutell@boutell.com</a>. However, 
+<a href="http://www.boutell.com/contact">Thomas Boutell</a>. However, 
 I receive a very large volume of email on
 many subjects, and while I do my best to respond to all queries this can
 take some time. Sometimes the response must take the form of an eventual
 directly by credit card. Purchase orders are also accepted from
 Fortune 500 corporations and institutions in good standing.
 To make arrangements, contact 
-<a href="mailto:support@boutell.com">support@boutell.com</a>. To avoid delay
+<a href="http://www.boutell.com/contact">Boutell.Com support</a>. To avoid delay
 and/or confusion, be sure to specifically mention that you wish to
 purchase gd support at the hourly rate above.
 
 <A HREF="#gdBrushed">gdBrushed</A> |
 <A HREF="#gdDashSize">gdDashSize</A> |
 <A HREF="#gdFont">gdFont</A> |
+<A HREF="#gdFontCacheSetup">gdFontCacheSetup</A> |
+<A HREF="#gdFontCacheShutdown">gdFontCacheShutdown</A> |
 <A HREF="#gdFontPtr">gdFontPtr</A> |
 <A HREF="#gdFree">gdFree</A> |
 <A HREF="#gdImage">gdImage</A> |
 <A HREF="#gdImageSetStyle">gdImageSetStyle</A> |
 <A HREF="#gdImageSetThickness">gdImageSetThickness</A> |
 <A HREF="#gdImageSetTile">gdImageSetTile</A> |
+<A HREF="#gdImageSharpen">gdImageSharpen</A> |
+<A HREF="#gdImageSquareToCircle">gdImageSquareToCircle</A> |
 <A HREF="#gdImageString">gdImageString</A> |
 <A HREF="#gdImageString16">gdImageString16</A> |
 <A HREF="#gdImageStringFT">gdImageStringFT</A> |
+<A HREF="#gdImageStringFTCircle">gdImageStringFTCircle</A> |
 <A HREF="#gdImageStringFTEx">gdImageStringFTEx</A> |
 <A HREF="#gdImageStringTTF">gdImageStringTTF</A> |
 <A HREF="#gdImageStringUp">gdImageStringUp</A> |
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.