shithub: freetype+ttf2subf

Download patch

ref: d060a75b0d100780118cb2f0adc1bd0c6c016f17
parent: c49f69cb8c9d9b38179f760bf0cbbe4c78a3e296
author: Werner Lemberg <[email protected]>
date: Thu Jul 20 02:57:41 EDT 2000

Formatting.

Rudimentary support for autoconf (still using GNU make)

Say `make unix'.

git/fs: mount .git/fs: mount/attach disallowed
--- a/builds/ansi/memdebug.c
+++ b/builds/ansi/memdebug.c
@@ -4,11 +4,11 @@
 /*                                                                         */
 /*    Memory debugging functions (body only).                              */
 /*                                                                         */
-/*  Copyright 1996-1999 by                                                 */
+/*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
@@ -46,9 +46,7 @@
   {
     /* Now print the remaining blocks */
     if ( num_mem_blocks == 0 )
-    {
       fprintf( stderr, "No memory leaked!\n" );
-    }
     else
     {
       int  i;
@@ -66,6 +64,7 @@
                  (long)mem_blocks[i].base, mem_blocks[i].size );
       }
     }
+
     free( mem_blocks );
   }
 
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -57,6 +57,11 @@
 #                  object builds, respectively).  Set up cumulatively in
 #                  `src/<driver>/rules.mk'.
 #
+#   CLEAN
+#   DISTCLEAN      The sub-makefiles can append additional stuff to these two
+#                  variables which is to be removed for the `clean' resp.
+#                  `distclean' target.
+#
 #   TOP, SEP,
 #   LIBRARY, CC,
 #   A, I, O, T     Check `config.mk' for details.
@@ -242,20 +247,20 @@
 # on all systems though.
 #
 clean_freetype_std:
-	-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
+	-$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S) $(CLEAN)
 
 distclean_freetype_std: clean_freetype_std
 	-$(DELETE) $(FT_LIBRARY)
-	-$(DELETE) *.orig *~ core *.core
+	-$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
 
 # The Dos command shell does not support very long list of arguments, so
 # we are stuck with wildcards.
 #
 clean_freetype_dos:
-	-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O 2> nul
+	-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O $(CLEAN) 2> nul
 
 distclean_freetype_dos: clean_freetype_dos
-	-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) 2> nul
+	-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(FT_LIBRARY)) $(DISTCLEAN) 2> nul
 
 # Remove configuration file (used for distclean).
 #
--- /dev/null
+++ b/builds/unix/configure
@@ -1,0 +1,2514 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+  --enable-shared[=PKGS]  build shared libraries [default=yes]"
+ac_help="$ac_help
+  --enable-static[=PKGS]  build static libraries [default=yes]"
+ac_help="$ac_help
+  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
+ac_help="$ac_help
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+  --disable-libtool-lock  avoid locking (might break parallel builds)"
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # 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 << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=ftconfig.in
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says [email protected].
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+
+
+version_info='0:0:0'
+
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:588: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:609: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:627: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:653: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:683: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    case "`uname -s`" in
+    *win32* | *WIN32*)
+      # Extract the first word of "cl", so it can be a program name with args.
+set dummy cl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:734: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="cl"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+ ;;
+    esac
+  fi
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:766: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+cat > conftest.$ac_ext << EOF
+
+#line 777 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:782: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:808: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:813: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:822: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+
+ac_test_CFLAGS="${CFLAGS+set}"
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=
+echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:841: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:873: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 888 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 905 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <<EOF
+#line 922 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:928: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+
+if test "x$CC" = xgcc; then
+  XX_CFLAGS="-Wall"
+  XX_ANSIFLAGS="-pedantic -ansi"
+else
+  case "$host" in
+    *-dec-osf*)
+      XX_CFLAGS="-std1 -O2 -g3"
+      XX_ANSIFLAGS=
+      ;;
+    *)
+      XX_CFLAGS=
+      XX_ANSIFLAGS=
+      ;;
+  esac
+fi
+
+
+
+# Extract the first word of "rm", so it can be a program name with args.
+set dummy rm; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:974: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RMF'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RMF"; then
+  ac_cv_prog_RMF="$RMF" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RMF="rm -f"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RMF="$ac_cv_prog_RMF"
+if test -n "$RMF"; then
+  echo "$ac_t""$RMF" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Extract the first word of "rmdir", so it can be a program name with args.
+set dummy rmdir; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1003: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RMDIR'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RMDIR"; then
+  ac_cv_prog_RMDIR="$RMDIR" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RMDIR="rmdir"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RMDIR="$ac_cv_prog_RMDIR"
+if test -n "$RMDIR"; then
+  echo "$ac_t""$RMDIR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1041: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1095: checking for ANSI C header files" >&5
+if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1100 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1108: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1125 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 1143 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+if test "$cross_compiling" = yes; then
+  :
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1164 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:1175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+fi
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+
+fi
+
+for ac_hdr in fcntl.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1202: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1207 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1212: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:1240: checking for working const" >&5
+if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1245 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:1294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  cat >> confdefs.h <<\EOF
+#define const 
+EOF
+
+fi
+
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:1315: checking size of int" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1323 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(int));
+  exit(0);
+}
+EOF
+if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_int=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:1354: checking size of long" >&5
+if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1362 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:1373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_sizeof_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+fi
+
+fi
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+
+
+
+
+for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1398: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1403 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1408: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1437: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1442 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:1490: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1498 "configure"
+#include "confdefs.h"
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+   Here is a matrix of mmap possibilities:
+	mmap private not fixed
+	mmap private fixed at somewhere currently unmapped
+	mmap private fixed at somewhere already mapped
+	mmap shared not fixed
+	mmap shared fixed at somewhere currently unmapped
+	mmap shared fixed at somewhere already mapped
+   For private mappings, we should verify that changes cannot be read()
+   back from the file, nor mmap's back from the file at a different
+   address.  (There have been systems where private was not correctly
+   implemented like the infamous i386 svr4.0, and systems where the
+   VM page cache was not coherent with the filesystem buffer cache
+   like early versions of FreeBSD and possibly contemporary NetBSD.)
+   For shared mappings, we should conversely verify that changes get
+   propogated back to all the places they're supposed to be.
+
+   Grep wants private fixed already mapped.
+   The main things grep needs to know about mmap are:
+   * does it exist and is it safe to write into the mmap'd area
+   * how to use it (BSD variants)  */
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include <unistd.h>
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include <sys/param.h>
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+	char *data, *data2, *data3;
+	int i, pagesize;
+	int fd;
+
+	pagesize = getpagesize();
+
+	/*
+	 * First, make a file with some known garbage in it.
+	 */
+	data = malloc(pagesize);
+	if (!data)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		*(data + i) = rand();
+	umask(0);
+	fd = creat("conftestmmap", 0600);
+	if (fd < 0)
+		exit(1);
+	if (write(fd, data, pagesize) != pagesize)
+		exit(1);
+	close(fd);
+
+	/*
+	 * Next, try to mmap the file at a fixed address which
+	 * already has something else allocated at it.  If we can,
+	 * also make sure that we see the same garbage.
+	 */
+	fd = open("conftestmmap", O_RDWR);
+	if (fd < 0)
+		exit(1);
+	data2 = malloc(2 * pagesize);
+	if (!data2)
+		exit(1);
+	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data2 + i))
+			exit(1);
+
+	/*
+	 * Finally, make sure that changes to the mapped area
+	 * do not percolate back to the file as seen by read().
+	 * (This is a bug on some variants of i386 svr4.0.)
+	 */
+	for (i = 0; i < pagesize; ++i)
+		*(data2 + i) = *(data2 + i) + 1;
+	data3 = malloc(pagesize);
+	if (!data3)
+		exit(1);
+	if (read(fd, data3, pagesize) != pagesize)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data3 + i))
+			exit(1);
+	close(fd);
+	unlink("conftestmmap");
+	exit(0);
+}
+
+EOF
+if { (eval echo configure:1638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
+  FTSYS_SRC='$(BASE_)ftsystem.c'
+else
+  FTSYS_SRC='$(BUILD)/ftsystem.c'
+fi
+
+
+for ac_func in memcpy memmove
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:1670: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 1675 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:1698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+ 
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+case "$enableval" in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_fast_install=yes
+fi
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1795: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$ac_cv_prog_gcc" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1834: checking for ld used by GCC" >&5
+  ac_prog=`($CC -print-prog-name=ld) 2>&5`
+  case "$ac_prog" in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1858: checking for GNU ld" >&5
+else
+  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1861: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      ac_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  ac_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$ac_cv_path_LD"
+if test -n "$LD"; then
+  echo "$ac_t""$LD" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1896: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+  ac_cv_prog_gnu_ld=yes
+else
+  ac_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
+
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1912: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  ac_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -B"
+	break
+      elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	ac_cv_path_NM="$ac_dir/nm -p"
+	break
+      else
+	ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+fi
+fi
+
+NM="$ac_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1948: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+case "$target" in
+NONE) lt_target="$host" ;;
+*) lt_target="$target" ;;
+esac
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+  :
+fi
+
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case "$lt_target" in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 1997 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    case "`/usr/bin/file conftest.o`" in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:2019: checking whether the C compiler needs -belf" >&5
+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <<EOF
+#line 2024 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+
+esac
+
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
+DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "unix.mk:unix.in ftconfig.h:ftconfig.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@version_info@%$version_info%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@XX_CFLAGS@%$XX_CFLAGS%g
+s%@XX_ANSIFLAGS@%$XX_ANSIFLAGS%g
+s%@RMF@%$RMF%g
+s%@RMDIR@%$RMDIR%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@FTSYS_SRC@%$FTSYS_SRC%g
+s%@RANLIB@%$RANLIB%g
+s%@LN_S@%$LN_S%g
+s%@LIBTOOL@%$LIBTOOL%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"unix.mk:unix.in"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="ftconfig.h:ftconfig.in"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
+
--- a/builds/unix/configure.in
+++ b/builds/unix/configure.in
@@ -2,29 +2,23 @@
 dnl
 dnl Process this file with autoconf to produce a configure script.
 dnl
-dnl This file must be processed from the top FreeType 2 directory. E.g:
-dnl
-dnl   % autoconf config/unix/configure.in > config/unix/configure
-dnl
 
 AC_INIT(ftconfig.in)
 
-cnl Configuration file - stay in 8.3 limit
+dnl Configuration file - stay in 8.3 limit
 AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
 
-dnl Due to a bug in autoconf we must set $srcdir explicitly to an absolute
-dnl path.
-srcdir=`pwd`
+version_info='0:0:0'
+AC_SUBST(version_info)
 
-dnl Checks for system type.
+dnl checks for system type
 AC_CANONICAL_SYSTEM
 
-dnl Checks for programs.
+dnl checks for programs
 AC_PROG_CC
 AC_PROG_CPP
 
 dnl get Compiler flags right.
-
 if test "x$CC" = xgcc; then
   XX_CFLAGS="-Wall"
   XX_ANSIFLAGS="-pedantic -ansi"
@@ -46,17 +40,12 @@
 AC_CHECK_PROG(RMF, rm, rm -f)
 AC_CHECK_PROG(RMDIR, rmdir, rmdir)
 AC_PROG_INSTALL
-AC_PROG_LN_S
 
-dnl Checks for libraries.
-sinclude(net.m4)
-AC_LIBRARY_NET
+dnl checks for header files
+AC_HEADER_STDC
+AC_CHECK_HEADERS(fcntl.h unistd.h)
 
-dnl Checks for header files.
-AC_PATH_XTRA
-AC_CHECK_HEADERS(stdlib.h fcntl.h unistd.h)
-
-dnl Checks for typedefs, structures, and compiler characteristics.
+dnl checks for typedefs, structures, and compiler characteristics
 AC_C_CONST
 AC_CHECK_SIZEOF(int)
 AC_CHECK_SIZEOF(long)
@@ -66,30 +55,20 @@
 dnl Here we check whether we can use our mmap file component.
 AC_FUNC_MMAP
 if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
-  FT_SYSTEM_COMPONENT=ftsystem.c
+  FTSYS_SRC='$(BASE_)ftsystem.c'
 else
-  FT_SYSTEM_COMPONENT=config/unix/ftsystem.c
+  FTSYS_SRC='$(BUILD)/ftsystem.c'
 fi
-AC_SUBST(FT_SYSTEM_COMPONENT)
+AC_SUBST(FTSYS_SRC)
 
 AC_CHECK_FUNCS(memcpy memmove)
 
-# Turn off shared libraries during beta testing, since they
-# make the build process take too long
-#
-# AC_DISABLE_SHARED
-
 AM_PROG_LIBTOOL
 
-
-dnl Another bug: to make --srcdir work correctly we have to create the
-dnl directory hierarchy first since autoconf only uses mkdir.
-dnl $srcdir/config/unix/mkinstalldirs lib/arch/unix test/arch/unix
-
-dnl  Create the Unix-specific sub-Makefile "config/unix/unix.mk" that will be
-dnl  used by the build system..
+dnl create the Unix-specific sub-Makefile `builds/unix/unix.mk' that will be
+dnl used by the build system
 dnl
-AC_OUTPUT( unix.mk:unix.in )
+AC_OUTPUT(unix.mk:unix.in)
 
 
 dnl end of configure.in
--- a/builds/unix/detect.mk
+++ b/builds/unix/detect.mk
@@ -13,10 +13,6 @@
 # fully.
 
 
-# This will probably change a lot in the future if we are going to use
-# Automake/Autoconf...
-
-
 ifeq ($(PLATFORM),ansi)
 
   has_init := $(strip $(wildcard /sbin/init))
@@ -27,34 +23,46 @@
     DELETE   := rm -f
 
     # Test whether we are using gcc.  If so, we select the `unix-gcc.mk'
-    # configuration file.  Otherwise, the standard `unix.mk' is used which
-    # simply calls `cc -c' with no extra arguments.
+    # configuration file.  Otherwise, the configure script is called and
+    # `unix.mk' is created.
     #
+    # The use of the configure script can be forced by saying `make unix'.
+    #
     # Feel free to add support for other platform specific compilers in this
     # directory (e.g. solaris.mk + changes here to detect the platform).
     #
-    ifeq ($(firstword $(CC)),gcc)
-      is_gcc := 1
+    ifneq ($(findstring unix,$(MAKECMDGOALS)),)
+      CONFIG_FILE := unix.mk
+      setup: unix.mk
+      unix: setup
     else
-      ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
+      ifeq ($(firstword $(CC)),gcc)
         is_gcc := 1
+      else
+        ifneq ($(findstring gcc,$(shell $(CC) -v 2>&1)),)
+          is_gcc := 1
+        endif
       endif
-    endif
 
-    ifdef is_gcc
-      CONFIG_FILE := unix-gcc.mk
-    else
-      CONFIG_FILE := unix.mk
-    endif
+      ifdef is_gcc
+        CONFIG_FILE := unix-gcc.mk
+      else
+        CONFIG_FILE := unix.mk
+        setup: unix.mk
+      endif
 
-    # If `devel' is the requested target, use the development Makefile.
-    #
-    ifneq ($(findstring devel,$(MAKECMDGOALS)),)
-      CONFIG_FILE := unix-dev.mk
-      devel: setup
+      # If `devel' is the requested target, use the development Makefile.
+      #
+      ifneq ($(findstring devel,$(MAKECMDGOALS)),)
+        CONFIG_FILE := unix-dev.mk
+        devel: setup
+      endif
     endif
 
     setup: std_setup
+
+    unix.mk: builds/unix/unix.in
+	    cd builds/unix; ./configure
 
   endif # test Unix
 endif   # test PLATFORM
--- a/builds/unix/ftconfig.in
+++ b/builds/unix/ftconfig.in
@@ -1,14 +1,14 @@
 /***************************************************************************/
 /*                                                                         */
-/*  ftconfig.h                                                             */
+/*  ftconfig.in                                                            */
 /*                                                                         */
-/*    ANSI-specific configuration file (specification only).               */
+/*    UNIX-specific configuration file (specification only).               */
 /*                                                                         */
 /*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
-/*  This file is part of the FreeType project, and may only be used        */
-/*  modified and distributed under the terms of the FreeType project       */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
 /*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
@@ -19,27 +19,29 @@
   /*************************************************************************/
   /*                                                                       */
   /* This header file contains a number of macro definitions that are used */
-  /* by the rest of the engine. Most of the macros here are automatically  */
+  /* by the rest of the engine.  Most of the macros here are automatically */
   /* determined at compile time, and you should not need to change it to   */
-  /* port FreeType, except to compile the library with a non ANSI compiler */
+  /* port FreeType, except to compile the library with a non-ANSI          */
+  /* compiler.                                                             */
   /*                                                                       */
   /* Note however that if some specific modifications are needed, we       */
   /* advise you to place a modified copy in your build directory.          */
   /*                                                                       */
-  /* The build directory is usually "freetype/config/<system>", and        */
+  /* The build directory is usually `freetype/builds/<system>', and        */
   /* contains system-specific files that are always included first when    */
-  /* building the library..                                                */
+  /* building the library.                                                 */
   /*                                                                       */
-  /* This ANSI version should stay in "freetype/config"                    */
-  /*                                                                       */
   /*************************************************************************/
 
+
 #ifndef FTCONFIG_H
 #define FTCONFIG_H
 
-/* Include the header file containing all developer build options */
-#include <ftoption.h>
 
+  /* Include the header file containing all developer build options */
+#include <freetype/config/ftoption.h>
+
+
   /*************************************************************************/
   /*                                                                       */
   /*               PLATFORM-SPECIFIC CONFIGURATION MACROS                  */
@@ -47,28 +49,40 @@
   /* These macros can be toggled to suit a specific system.  The current   */
   /* ones are defaults used to compile FreeType in an ANSI C environment   */
   /* (16bit compilers are also supported).  Copy this file to your own     */
-  /* `freetype/arch/<system>'  directory, and edit it to port the engine.  */
+  /* `freetype/builds/<system>' directory, and edit it to port the engine. */
   /*                                                                       */
   /*************************************************************************/
 
-/* the number of bytes in an `int' type. */
-#define FT_SIZEOF_INT  4
 
-/* the number of bytes in a `long' type. */
-#define FT_SIZEOF_LONG 4
+#define HAVE_UNISTD_H  0
+#define HAVE_FCNTL_H   0
 
-/* Preferred alignment of data */
+#define SIZEOF_INT   2
+#define SIZEOF_LONG  2
+
+
+#define FT_SIZEOF_INT   SIZEOF_INT
+#define FT_SIZEOF_LONG  SIZEOF_LONG
+
+
+  /* Preferred alignment of data */
 #define FT_ALIGNMENT  8
 
 
+  /* UNUSED is a macro used to indicate that a given parameter is not used */
+  /* -- this is only used to get rid of unpleasant compiler warnings       */
+#ifndef FT_UNUSED
+#define FT_UNUSED( arg )  ( (arg) = (arg) )
+#endif
 
+
   /*************************************************************************/
   /*                                                                       */
   /*                     AUTOMATIC CONFIGURATION MACROS                    */
   /*                                                                       */
-  /*  These macros are computed from the ones defined above.  Don't touch  */
-  /*  their definition, unless you know precisely what you're doing.  No   */
-  /*  porter should need to mess with them.                                */
+  /* These macros are computed from the ones defined above.  Don't touch   */
+  /* their definition, unless you know precisely what you are doing.  No   */
+  /* porter should need to mess with them.                                 */
   /*                                                                       */
   /*************************************************************************/
 
@@ -93,12 +107,12 @@
   typedef unsigned long   FT_UInt32;
 
 #else
-#error "no 32bit type found - please check your configuration files"
+#error "no 32bit type found -- please check your configuration files"
 #endif
 
 #if FT_SIZEOF_LONG == 8
 
-  /* LONG64 must be defined when a 64-bit type is available */
+  /* FT_LONG64 must be defined if a 64-bit type is available */
 #define FT_LONG64
 #define FT_INT64   long
 
@@ -107,11 +121,13 @@
 
   /*************************************************************************/
   /*                                                                       */
-  /* many compilers provide the non-ANSI 'long long' 64-bit type.  You can */
-  /* activate it by defining the FTCALC_USE_LONG_LONG macro in `ftoption.h'*/
+  /* Many compilers provide the non-ANSI `long long' 64-bit type.  You can */
+  /* activate it by defining the FTCALC_USE_LONG_LONG macro in             */
+  /* `ftoption.h'.                                                         */
+  /*                                                                       */
   /* Note that this will produce many -ansi warnings during library        */
-  /* compilation, and that in many cases, the generated code will not be   */
-  /* smaller or faster !!                                                  */
+  /* compilation, and that in many cases,  the generated code will be      */
+  /* neither smaller nor faster!                                           */
   /*                                                                       */
 #ifdef FTCALC_USE_LONG_LONG
 
@@ -119,7 +135,7 @@
 #define FT_INT64   long long
 
 #endif /* FTCALC_USE_LONG_LONG */
-#endif
+#endif /* FT_SIZEOF_LONG == 8 */
 
 
 #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
@@ -131,19 +147,23 @@
 #endif
 
 #ifdef FT_MAKE_OPTION_SINGLE_LIBRARY_OBJECT
-#define  BASE_DEF    LOCAL_DEF
-#define  BASE_FUNC   LOCAL_FUNC
+#define  BASE_DEF( x )   static  x
+#define  BASE_FUNC( x )  static  x
 #else
-#define  BASE_DEF    extern
-#define  BASE_FUNC   /* nothing */
+#define  BASE_DEF( x )   extern  x
+#define  BASE_FUNC( x )  extern  x
 #endif
 
-#ifndef  EXPORT_DEF
-#define  EXPORT_DEF   extern
+#ifndef  FT_EXPORT_DEF
+#define  FT_EXPORT_DEF( x )   extern  x
 #endif
 
-#ifndef  EXPORT_FUNC
-#define  EXPORT_FUNC  /* nothing */
+#ifndef  FT_EXPORT_FUNC
+#define  FT_EXPORT_FUNC( x )  extern  x
+#endif
+
+#ifndef  FT_EXPORT_VAR
+#define  FT_EXPORT_VAR( x )   extern  x
 #endif
 
 #endif /* FTCONFIG_H */
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -1,32 +1,33 @@
-/**************************************************************************
- *
- *  ftsystem.c                                                        1.0
- *
- *    Unix-specific FreeType low-level system interface
- *
- *    This file contains the definition of interface used by FreeType
- *    to access low-level, i.e. memory management, i/o access as well
- *    as thread synchronisation.              
- *
- *
- *  Copyright 1996-2000 by                                                   
- *  David Turner, Robert Wilhelm, and Werner Lemberg                         
- *                                                                           
- *  This file is part of the FreeType project, and may only be used          
- *  modified and distributed under the terms of the FreeType project         
- *  license, LICENSE.TXT.  By continuing to use, modify, or distribute       
- *  this file you indicate that you have read the license and                 
- *  understand and accept it fully.                                          
- *                                                                           
- **************************************************************************/
+/***************************************************************************/
+/*                                                                         */
+/*  ftsystem.c                                                             */
+/*                                                                         */
+/*    Unix-specific FreeType low-level system interface (body).            */
+/*                                                                         */
+/*  Copyright 1996-2000 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
 
-#include <ftsystem.h>
-#include <fterrors.h>
+
 #include <ftconfig.h>
-#include <ftdebug.h>
+#include <freetype/internal/ftdebug.h>
+#include <freetype/ftsystem.h>
+#include <freetype/fterrors.h>
+#include <freetype/fttypes.h>
 
-/* Memory-mapping includes and definitions..                            */
-/*                                                                      */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+  /* memory-mapping includes and definitions                            */
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -36,102 +37,80 @@
 #define MAP_FILE  0x00
 #endif
 
-/*
- * The prototype for munmap() is not provided on SunOS.  This needs to
- * have a check added later to see if the GNU C library is being used.
- * If so, then this prototype is not needed.
- */
-#if defined(__sun__) && !defined(SVR4) && !defined(__SVR4)
-  extern int  munmap( caddr_t  addr, int  len );
+  /*************************************************************************/
+  /*                                                                       */
+  /* The prototype for munmap() is not provided on SunOS.  This needs to   */
+  /* have a check added later to see if the GNU C library is being used.   */
+  /* If so, then this prototype is not needed.                             */
+  /*                                                                       */
+#if defined( __sun__ ) && !defined( SVR4 ) && !defined( __SVR4 )
+  extern int  munmap( caddr_t  addr,
+                      int      len );
 #endif
 
 #include <sys/stat.h>
+
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
 
-
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-  /*********************************************************************/
-  /*                                                                   */
-  /*                       MEMORY MANAGEMENT INTERFACE                 */
-  /*                                                                   */
 
-/************************************************************************
- *
- * <FuncType>
- *    FT_Alloc_Func
- *
- * <Description>
- *    The memory allocator function type
- *
- * <Input>
- *    system    :: pointer to the system object
- *    size      :: requested size in bytes
- *
- * <Output>
- *    block     :: address of newly allocated block
- *
- * <Return>  
- *    Error code. 0 means success.
- *
- * <Note>
- *    If your allocation routine ALWAYS zeroes the new block, you
- *    should set the flag FT_SYSTEM_FLAG_ALLOC_ZEROES in your system
- *    object 'flags' field.
- *
- *    If you have set the flag FT_SYSTEM_FLAG_REPORT_CURRENT_ALLOC in
- *    your system's "system_flags" field, this function should update
- *    the "current_alloc" field of the system object.
- *
- ************************************************************************/
+  /*************************************************************************/
+  /*                                                                       */
+  /*                       MEMORY MANAGEMENT INTERFACE                     */
+  /*                                                                       */
+  /*************************************************************************/
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_alloc                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The memory allocation function.                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory :: A pointer to the memory object.                          */
+  /*    size   :: The requested size in bytes.                             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    block  :: The address of newly allocated block.                    */
+  /*                                                                       */
   static
   void*  ft_alloc( FT_Memory  memory,
                    long       size )
   {
-    (void)memory;
-    return malloc(size);
+    FT_UNUSED( memory );
+
+    return malloc( size );
   }
 
 
-/************************************************************************
- *
- * <FuncType>
- *    FT_Realloc_Func
- *
- * <Description>
- *    The memory reallocator function type
- *
- * <Input>
- *    system   :: pointer to the system object
- *    new_size :: new requested size in bytes
- *
- * <InOut>
- *    block    :: address of block in memory
- *
- * <Return>
- *    Error code. 0 means success.
- *
- * <Note>
- *    This function is _never_ called when the system flag 
- *    FT_SYSTEM_FLAG_NO_REALLOC is set. Instead, the engine will emulate
- *    realloc through "alloc" and "free".
- *
- *    Note that this is possible due to the fact that FreeType's
- *    "FT_Realloc" always requests the _current_ size of the reallocated
- *    block as a parameter, thus avoiding memory leaks.
- *
- *    If you have set the flag FT_SYSTEM_FLAG_REPORT_CURRENT_ALLOC in
- *    your system's "system_flags" field, this function should update
- *    the "current_alloc" field of the system object.
- *
- ************************************************************************/
-
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_realloc                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The memory reallocation function.                                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory   :: A pointer to the memory object.                        */
+  /*                                                                       */
+  /*    cur_size :: The current size of the allocated memory block.        */
+  /*                                                                       */
+  /*    new_size :: The newly requested size in bytes.                     */
+  /*                                                                       */
+  /*    block    :: The current address of the block in memory.            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The address of the reallocated memory block.                       */
+  /*                                                                       */
   static
   void*  ft_realloc( FT_Memory  memory,
                      long       cur_size,
@@ -138,53 +117,68 @@
                      long       new_size,
                      void*      block )
   {
-    (void)memory;
-    (void)cur_size;
+    FT_UNUSED( memory );
+    FT_UNUSED( cur_size );
 
     return realloc( block, new_size );
   }
 
 
-/************************************************************************
- *
- * <FuncType>
- *    FT_Free_Func
- *
- * <Description>
- *    The memory release function type
- *
- * <Input>
- *    system  :: pointer to the system object
- *    block   :: address of block in memory
- *
- * <Note>
- *    If you have set the flag FT_SYSTEM_FLAG_REPORT_CURRENT_ALLOC in
- *    your system's "system_flags" field, this function should update
- *    the "current_alloc" field of the system object.
- *
- ************************************************************************/
-
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_free                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The memory release function.                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory  :: A pointer to the memory object.                         */
+  /*                                                                       */
+  /*    block   :: The address of block in memory to be freed.             */
+  /*                                                                       */
   static
   void  ft_free( FT_Memory  memory,
                  void*      block )
   {
-    (void)memory;
+    FT_UNUSED( memory );
+
     free( block );
   }
 
-  /*********************************************************************/
-  /*                                                                   */
-  /*                     RESOURCE MANAGEMENT INTERFACE                 */
-  /*                                                                   */
 
-/* We use the macro STREAM_File as a convenience to extract the      */
-/* system-specific stream handle from a given FreeType stream object */
-#define STREAM_File(stream)  ((void*)stream->descriptor.pointer)
+  /*************************************************************************/
+  /*                                                                       */
+  /*                     RESOURCE MANAGEMENT INTERFACE                     */
+  /*                                                                       */
+  /*************************************************************************/
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* The macro FT_COMPONENT is used in trace mode.  It is an implicit      */
+  /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log  */
+  /* messages during execution.                                            */
+  /*                                                                       */
 #undef  FT_COMPONENT
 #define FT_COMPONENT  trace_io
 
+  /* We use the macro STREAM_FILE for convenience to extract the       */
+  /* system-specific stream handle from a given FreeType stream object */
+#define STREAM_FILE( stream )  ( (FILE*)stream->descriptor.pointer )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    ft_close_stream                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The function to close a stream.                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    stream :: A pointer to the stream object.                          */
+  /*                                                                       */
   static
   void  ft_close_stream( FT_Stream  stream )
   {
@@ -196,46 +190,66 @@
   }
 
 
-  extern
-  int  FT_New_Stream( const char*  filepathname,
-                      FT_Stream    stream )
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Stream                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new stream object.                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    filepathname :: The name of the stream (usually a file) to be      */
+  /*                    opened.                                            */
+  /*                                                                       */
+  /*    stream       :: A pointer to the stream object.                    */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_EXPORT_FUNC( FT_Error )  FT_New_Stream( const char*  filepathname,
+                                             FT_Stream    stream )
   {
     int          file;
     struct stat  stat_buf;
 
+
+    if ( !stream )
+      return FT_Err_Invalid_Stream_Handle;
+
     /* open the file */
     file = open( filepathname, O_RDONLY );
-    if (file < 0)
+    if ( file < 0 )
     {
-      FT_ERROR(( "FT.Unix.Open:" ));
+      FT_ERROR(( "FT_New_Stream:" ));
       FT_ERROR(( " could not open `%s'\n", filepathname ));
-      return FT_Err_Cannot_Open_Stream;
+      return FT_Err_Cannot_Open_Resource;
     }
 
-    if (fstat( file, &stat_buf ) < 0)
+    if ( fstat( file, &stat_buf ) < 0 )
     {
-      FT_ERROR(( "FT.Unix.Open:" ));
+      FT_ERROR(( "FT_New_Stream:" ));
       FT_ERROR(( " could not `fstat' file `%s'\n", filepathname ));
       goto Fail_Map;
     }
       
-    stream->size     = stat_buf.st_size;
-    stream->pos      = 0;
-    stream->base     = mmap( NULL,
-                             stream->size,
-                             PROT_READ,
-                             MAP_FILE | MAP_PRIVATE,
-                             file,
-                             0 );
+    stream->size = stat_buf.st_size;
+    stream->pos  = 0;
+    stream->base = mmap( NULL,
+                         stream->size,
+                         PROT_READ,
+                         MAP_FILE | MAP_PRIVATE,
+                         file,
+                         0 );
 
     if ( (long)stream->base == -1 )
     {
-      FT_ERROR(( "FT.Unix.Open:" ));
-      FT_ERROR(( " Could not map file `%s'\n", filepathname ));
+      FT_ERROR(( "FT_New_Stream:" ));
+      FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
       goto Fail_Map;
     }
 
-    close(file);
+    close( file );
 
     stream->descriptor.pointer = stream->base;
     stream->pathname.pointer   = (char*)filepathname;
@@ -243,7 +257,7 @@
     stream->close = ft_close_stream;
     stream->read  = 0;
     
-    FT_TRACE1(( "FT.Unix.Open:" ));
+    FT_TRACE1(( "FT_New_Stream:" ));
     FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
                 filepathname, stream->size ));
 
@@ -250,22 +264,34 @@
     return FT_Err_Ok;
     
   Fail_Map:
-    close(file);
-    stream->base      = NULL;
-    stream->size      = 0;
-    stream->pos       = 0;
+    close( file );
+
+    stream->base = NULL;
+    stream->size = 0;
+    stream->pos  = 0;
     
     return FT_Err_Cannot_Open_Stream;
   }
 
 
-  extern
-  FT_Memory  FT_New_Memory( void )
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Memory                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new memory object.                                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A pointer to the new memory object.  0 in case of error.           */
+  /*                                                                       */
+  FT_EXPORT_FUNC( FT_Memory )  FT_New_Memory( void )
   {
     FT_Memory  memory;
     
-    memory = (FT_Memory)malloc( sizeof(*memory) );
-    if (memory)
+
+    memory = (FT_Memory)malloc( sizeof ( *memory ) );
+    if ( memory )
     {
       memory->user    = 0;
       memory->alloc   = ft_alloc;
@@ -272,6 +298,9 @@
       memory->realloc = ft_realloc;
       memory->free    = ft_free;
     }
+
     return memory;
   }
 
+
+/* END */
--- a/builds/unix/net.m4
+++ /dev/null
@@ -1,55 +1,0 @@
-dnl
-dnl The following was written by [email protected]
-dnl
-dnl AC_LIBRARY_NET: Id: net.m4,v 1.4 1997/10/25 20:49:53 jhawk Exp 
-dnl
-dnl This test is for network applications that need socket() and
-dnl gethostbyname() -ish functions.  Under Solaris, those applications need to
-dnl link with "-lsocket -lnsl".  Under IRIX, they should *not* link with
-dnl "-lsocket" because libsocket.a breaks a number of things (for instance:
-dnl gethostbyname() under IRIX 5.2, and snoop sockets under most versions of
-dnl IRIX).
-dnl 
-dnl Unfortunately, many application developers are not aware of this, and
-dnl mistakenly write tests that cause -lsocket to be used under IRIX.  It is
-dnl also easy to write tests that cause -lnsl to be used under operating
-dnl systems where neither are necessary (or useful), such as SunOS 4.1.4, which
-dnl uses -lnsl for TLI.
-dnl 
-dnl This test exists so that every application developer does not test this in
-dnl a different, and subtly broken fashion.
-dnl 
-dnl It has been argued that this test should be broken up into two seperate
-dnl tests, one for the resolver libraries, and one for the libraries necessary
-dnl for using Sockets API. Unfortunately, the two are carefully intertwined and
-dnl allowing the autoconf user to use them independantly potentially results in
-dnl unfortunate ordering dependancies -- as such, such component macros would
-dnl have to carefully use indirection and be aware if the other components were
-dnl executed. Since other autoconf macros do not go to this trouble, and almost
-dnl no applications use sockets without the resolver, this complexity has not
-dnl been implemented.
-dnl
-dnl The check for libresolv is in case you are attempting to link statically
-dnl and happen to have a libresolv.a lying around (and no libnsl.a).
-dnl
-AC_DEFUN(AC_LIBRARY_NET, [
-   # Most operating systems have gethostbyname() in the default searched
-   # libraries (i.e. libc):
-   AC_CHECK_FUNC(gethostbyname, ,
-     # Some OSes (eg. Solaris) place it in libnsl:
-     AC_CHECK_LIB(nsl, gethostbyname, , 
-       # Some strange OSes (SINIX) have it in libsocket:
-       AC_CHECK_LIB(socket, gethostbyname, ,
-          # Unfortunately libsocket sometimes depends on libnsl.
-          # AC_CHECK_LIB's API is essentially broken so the following
-          # ugliness is necessary:
-          AC_CHECK_LIB(socket, gethostbyname,
-             LIBS="-lsocket -lnsl $LIBS",
-               AC_CHECK_LIB(resolv, gethostbyname),
-             -lnsl)
-       )
-     )
-   )
-  AC_CHECK_FUNC(socket, , AC_CHECK_LIB(socket, socket, ,
-    AC_CHECK_LIB(socket, socket, LIBS="-lsocket -lnsl $LIBS", , -lnsl)))
-  ])
--- a/builds/unix/unix.in
+++ b/builds/unix/unix.in
@@ -6,7 +6,7 @@
 # Copyright 1996-2000 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
-# This file is part of the FreeType project, and may only be used modified
+# This file is part of the FreeType project, and may only be used, modified,
 # and distributed under the terms of the FreeType project license,
 # LICENSE.TXT.  By continuing to use, modify, or distribute this file you
 # indicate that you have read the license and understand and accept it
@@ -17,12 +17,29 @@
   TOP := .
 endif
 
-DELETE   := @RMF@
-SEP      := /
-HOSTSEP  := $(SEP)
-BUILD    := $(TOP)/builds/unix
-PLATFORM := unix
+DELETE    := @RMF@
+DELDIR    := @RMDIR@
+SEP       := /
+HOSTSEP   := $(SEP)
+BUILD     := $(TOP)/builds/unix
+PLATFORM  := unix
 
+FTSYS_SRC := @FTSYS_SRC@
+
+DISTCLEAN += $(BUILD)/config.cache  \
+             $(BUILD)/config.log    \
+             $(BUILD)/config.status \
+             $(BUILD)/unix.mk       \
+             $(BUILD)/ftconfig.h    \
+             $(BUILD)/libtool
+
+
+prefix       := @prefix@
+exec_prefix  := @exec_prefix@
+libdir       := @libdir@
+version_info := @version_info@
+
+
 # The directory where all object files are placed.
 #
 # Note that this is not $(TOP)/obj!
@@ -36,7 +53,7 @@
 OBJ_DIR := obj
 
 
-# The directory where all library files are placed
+# The directory where all library files are placed.
 #
 # By default, this is the same as $(OBJ_DIR), however, this can be changed
 # to suit particular needs.
@@ -47,12 +64,12 @@
 # The object file extension.  This can be .o, .tco, .obj, etc., depending on
 # the platform.
 #
-O := o
+O := lo
 
 # The library file extension.  This can be .a, .lib, etc., depending on the
 # platform.
 #
-A := a
+A := la
 
 
 # The name of the final library file.  Note that the DOS-specific Makefile
@@ -81,7 +98,7 @@
 
 # Target flag.
 #
-T := -o    # Don't remove this comment line!  We need the space after `-o'.
+T := -o # Don't remove this comment line!  We need the space after `-o'.
 
 
 # C flags
@@ -99,7 +116,7 @@
 #
 ANSIFLAGS := @XX_ANSIFLAGS@
 
-# C compiler to use - we do libtool !!
+# C compiler to use -- we use libtool!
 #
 #
 CC := $(BUILD)/libtool --mode=compile $(CC)
@@ -109,27 +126,39 @@
   # Now include the main sub-makefile.  It contains all the rules used to
   # build the library with the previous variables defined.
   #
-  include $(TOP)/config/freetype.mk
+  include $(TOP)/builds/freetype.mk
 
   # The cleanup targets.
   #
-  clean_freetype: clean_freetype_std
-  distclean_freetype: distclean_freetype_std
+  clean_freetype: clean_freetype_unix
+  distclean_freetype: distclean_freetype_unix
 
+  # Unix cleaning and distclean rules.
+  #
+  clean_freetype_unix:
+	  -$(DELETE) $(BASE_OBJECTS) $(OBJ_M) $(OBJ_S)
+	  -$(DELETE) $(OBJ_DIR)/*.o $(CLEAN)
+
+  distclean_freetype_unix: clean_freetype_unix
+	  -$(DELETE) $(FT_LIBRARY)
+	  -$(DELETE) $(OBJ_DIR)/.libs/*
+	  -$(DELDIR) $(OBJ_DIR)/.libs
+	  -$(DELETE) *.orig *~ core *.core $(DISTCLEAN)
+
   # Librarian to use to build the static library
   #
-  FT_LIBRARIAN := $(AR) -r
+  FT_LIBRARIAN := $(BUILD)/libtool --mode=link $(CC)
 
 
-  # This final rule is used to link all object files into a single library. 
+  # This final rule is used to link all object files into a single library.
   # It is part of the system-specific sub-Makefile because not all
   # librarians accept a simple syntax like:
   #
-  #    librarian library_file {list of object files}
+  #   librarian library_file {list of object files}
   #
   $(FT_LIBRARY): $(OBJECTS_LIST)
-	  -$(DELETE) $@
-	  $(FT_LIBRARIAN) $@ $(OBJECTS_LIST)
+	  $(FT_LIBRARIAN) -o $@ $(OBJECTS_LIST) \
+                          -rpath $(libdir) -version-info $(version_info)
 
 endif
 
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -56,10 +56,10 @@
   /*************************************************************************/
 
 
-/* We use <limits.h> values to know the sizes of the types.  */
+  /* We use <limits.h> values to know the sizes of the types.  */
 #include <limits.h>
 
-/* The number of bytes in an `int' type.  */
+  /* The number of bytes in an `int' type.  */
 #if   UINT_MAX == 0xFFFFFFFF
 #define FT_SIZEOF_INT  4
 #elif UINT_MAX == 0xFFFF
@@ -70,7 +70,7 @@
 #error "Unsupported number of bytes in `int' type!"
 #endif
 
-/* The number of bytes in a `long' type.  */
+  /* The number of bytes in a `long' type.  */
 #if   ULONG_MAX == 0xFFFFFFFF
 #define FT_SIZEOF_LONG  4
 #elif ULONG_MAX > 0xFFFFFFFF && ULONG_MAX == 0xFFFFFFFFFFFFFFFF
@@ -80,12 +80,12 @@
 #endif
 
 
-/* Preferred alignment of data */
+  /* Preferred alignment of data */
 #define FT_ALIGNMENT  8
 
 
-/* UNUSED is a macro used to indicate that a given parameter is not used -- */
-/* this is only used to get rid of unpleasant compiler warnings             */
+  /* UNUSED is a macro used to indicate that a given parameter is not used */
+  /* -- this is only used to get rid of unpleasant compiler warnings       */
 #ifndef FT_UNUSED
 #define FT_UNUSED( arg )  ( (arg) = (arg) )
 #endif
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -278,15 +278,16 @@
   /*                                                                       */
   /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to       */
   /* access the internal name table in a SFNT-based format like TrueType   */
-  /* or OpenType. The name table contains various strings used to          */
-  /* describe the font, like family name, copyright, version, etc..        */
-  /* It does not contain any glyph name though..                           */
+  /* or OpenType.  The name table contains various strings used to         */
+  /* describe the font, like family name, copyright, version, etc.  It     */
+  /* does not contain any glyph name though.                               */
   /*                                                                       */
-  /* Accessing sfnt names is done through the functions declared in        */
-  /* <freetype/ftnames.h>                                                  */
+  /* Accessing SFNT names is done through the functions declared in        */
+  /* `freetype/ftnames.h'.                                                 */
   /*                                                                       */
-#define  TT_CONFIG_OPTION_SFNT_NAMES
+#define TT_CONFIG_OPTION_SFNT_NAMES
 
+
   /*************************************************************************/
   /*************************************************************************/
   /****                                                                 ****/
@@ -353,6 +354,7 @@
   /*                                                                       */
 #define T1_MAX_SUBRS_CALLS  8
 
+
   /*************************************************************************/
   /*                                                                       */
   /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.        */
@@ -359,6 +361,7 @@
   /*                                                                       */
 #define T1_MAX_CHARSTRINGS_OPERANDS  32
 
+
   /*************************************************************************/
   /*                                                                       */
   /* Define T1_CONFIG_OPTION_DISABLE_HINTER if you want to generate a      */
@@ -375,6 +378,7 @@
   /* unable to produce kerning distances.                                  */
   /*                                                                       */
 #undef T1_CONFIG_OPTION_NO_AFM
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -768,6 +768,7 @@
   /*                                                                       */
 #define FT_FACE_FLAG_MULTIPLE_MASTERS  0x100
 
+
   /*************************************************************************/
   /*                                                                       */
   /* <Constant>                                                            */
@@ -775,10 +776,11 @@
   /*                                                                       */
   /* <Description>                                                         */
   /*    A bit-field constant, used to indicate that the font contains      */
-  /*    glyph names that can be retrieved through FT_Get_Glyph_Name.       */
+  /*    glyph names that can be retrieved through FT_Get_Glyph_Name().     */
   /*                                                                       */
 #define FT_FACE_FLAG_GLYPH_NAMES       0x200
 
+
   /*************************************************************************/
   /*                                                                       */
   /* <Constant>                                                            */
@@ -2054,34 +2056,34 @@
   /*    FT_Get_Glyph_Name                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Retrieves the ASCII name of a given glyph in a face. This only     */
-  /*    works for those faces where FT_HAS_GLYPH_NAME(face) returns        */
-  /*    true.                                                              */
+  /*    Retrieves the ASCII name of a given glyph in a face.  This only    */
+  /*    works for those faces where FT_HAS_GLYPH_NAME(face) returns true.  */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face        :: A handle to a source face object.                   */
-  /*    glyph_index :: the glyph index.                                    */
   /*                                                                       */
-  /*    buffer      :: pointer to a target buffer where the name will be   */
-  /*                   copied..                                            */
+  /*    glyph_index :: The glyph index.                                    */
   /*                                                                       */
-  /*    buffer_max  :: the maximal number of bytes available in the buffer */
+  /*    buffer      :: A pointer to a target buffer where the name will be */
+  /*                   copied to.                                          */
   /*                                                                       */
+  /*    buffer_max  :: The maximal number of bytes available in the        */
+  /*                   buffer.                                             */
+  /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    An error is returned when the face doesn't provide glyph names     */
-  /*    or when the glyph index is invalid. In all cases of failure, the   */
-  /*    first byte of "buffer" will be set to 0 to indicate an empty       */
-  /*    name.                                                              */
+  /*    An error is returned if the face doesn't provide glyph names or if */
+  /*    the glyph index is invalid.  In all cases of failure, the first    */
+  /*    byte of `buffer' will be set to 0 to indicate an empty name.       */
   /*                                                                       */
-  /*    The glyph name is truncated to fit within the buffer if it's too   */
-  /*    long. The returned string is always zero-terminated                */
+  /*    The glyph name is truncated to fit within the buffer if it is too  */
+  /*    long.  The returned string is always zero-terminated.              */
   /*                                                                       */
   /*    This function is not compiled within the library if the config     */
   /*    macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in                */
-  /*    <freetype/config/ftoptions.h>                                      */
+  /*    `include/freetype/config/ftoptions.h'                              */
   /*                                                                       */
   FT_EXPORT_DEF( FT_Error )  FT_Get_Glyph_Name( FT_Face     face,
                                                 FT_UInt     glyph_index,
--- a/include/freetype/ftnames.h
+++ b/include/freetype/ftnames.h
@@ -3,9 +3,9 @@
 /*  ftnames.h                                                              */
 /*                                                                         */
 /*    Simple interface to access SFNT name tables (which are used          */
-/*    to hold font names, copyright info, notices, etc..)                  */
+/*    to hold font names, copyright info, notices, etc.).                  */
 /*                                                                         */
-/*    This is _not_ used to retrieve glyph names !!                        */
+/*    This is _not_ used to retrieve glyph names!                          */
 /*                                                                         */
 /*  Copyright 1996-2000 by                                                 */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
@@ -18,12 +18,15 @@
 /*                                                                         */
 /***************************************************************************/
 
+
 #ifndef FTNAMES_H
 #define FTNAMES_H
 
+
 #include <freetype/freetype.h>
 
-  typedef struct FT_SfntName_
+
+  typedef struct  FT_SfntName_
   {
     FT_UShort  platform_id;
     FT_UShort  encoding_id;
@@ -36,11 +39,14 @@
   } FT_SfntName;
 
 
-  FT_EXPORT_DEF(FT_UInt)  FT_Get_Sfnt_Name_Count( FT_Face  face );
+  FT_EXPORT_DEF( FT_UInt )  FT_Get_Sfnt_Name_Count( FT_Face  face );
   
-  FT_EXPORT_DEF(FT_Error) FT_Get_Sfnt_Name( FT_Face       face,
-                                            FT_UInt       index,
-                                            FT_SfntName*  aname );
+  FT_EXPORT_DEF( FT_Error )  FT_Get_Sfnt_Name( FT_Face       face,
+                                               FT_UInt       index,
+                                               FT_SfntName*  aname );
                                                
 
 #endif /* FTNAMES_H */
+
+
+/* END */
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -372,7 +372,7 @@
   /*    managing and loading font files of a given format.                 */
   /*                                                                       */
   /*  <Fields>                                                             */
-  /*     root         :: contains the fields of the root module class      */
+  /*     root         :: Contains the fields of the root module class.     */
   /*                                                                       */
   /*     clazz        :: A pointer to the font driver's class.  Note that  */
   /*                     this is NOT root.clazz.  `class' wasn't used      */
@@ -454,14 +454,15 @@
   /*                        handle to the current renderer for the         */
   /*                        ft_glyph_format_outline format.                */
   /*                                                                       */
-  /*    raster_pool_size :: size of the render pool in bytes               */
+  /*    auto_hinter      :: XXX                                            */
   /*                                                                       */
   /*    raster_pool      :: The raster object's render pool.  This can     */
   /*                        ideally be changed dynamically at run-time.    */
   /*                                                                       */
+  /*    raster_pool_size :: The size of the render pool in bytes.          */
   /*                                                                       */
+  /*    debug_hooks      :: XXX                                            */
   /*                                                                       */
-
   typedef struct  FT_LibraryRec_
   {
     FT_Memory           memory;           /* library's memory manager */
--- a/src/autohint/CatharonLicense.txt
+++ b/src/autohint/CatharonLicense.txt
@@ -1,7 +1,7 @@
                   The Catharon Open Source LICENSE
                     ----------------------------
 
-                            2000-Jul-4
+                            2000-Jul-04
 
           Copyright (C) 2000 by Catharon Productions, Inc.
  
@@ -10,9 +10,9 @@
 Introduction
 ============
 
-  This license  applies  to  source  files  distributed  by Catharon
-  Productions,  Inc.  in  several  archive  packages.  This  license
-  applies to all files found in such  packages  which  do  not  fall
+  This  license  applies to  source  files  distributed by  Catharon
+  Productions,  Inc.  in  several  archive packages.   This  license
+  applies  to all files  found in  such packages  which do  not fall
   under their own explicit license.
 
   This  license   was  inspired  by  the  BSD,   Artistic,  and  IJG
@@ -20,7 +20,7 @@
   and  use of  free  software in  commercial  and freeware  products
   alike.  As a consequence, its main points are that:
 
-    o We don't promise that this software works.  However, we are 
+    o We  don't promise that  this software works.  However,  we are
       interested in any kind of bug reports. (`as is' distribution)
 
     o You can  use this software for whatever you  want, in parts or
@@ -32,9 +32,9 @@
       Catharon Code. (`credits')
 
   We  specifically  permit  and  encourage  the  inclusion  of  this
-  software,  with  or without modifications, in commercial products.
-  We disclaim all  warranties  covering  the packages distributed by
-  Catharon Productions, Inc. and  assume  no  liability  related  to
+  software, with  or without modifications,  in commercial products.
+  We disclaim  all warranties  covering the packages  distributed by
+  Catharon  Productions, Inc.  and  assume no  liability related  to
   their use.
 
 
@@ -44,32 +44,32 @@
 0. Definitions
 --------------
 
-  Throughout  this license, the terms `Catharon Package', `package',
-  and  `Catharon  Code'  refer  to   the  set  of  files  originally
+  Throughout this license,  the terms `Catharon Package', `package',
+  and  `Catharon  Code'  refer   to  the  set  of  files  originally
   distributed by Catharon Productions, Inc.
 
-  `You' refers to the licensee, or person using the  project,  where
+  `You' refers to  the licensee, or person using  the project, where
   `using' is a generic term including compiling the project's source
-  code  as  well  as linking it to form a `program' or `executable'.
-  This program  is  referred  to  as  `a  program  using  one of the
+  code as  well as linking it  to form a  `program' or `executable'.
+  This  program  is referred  to  as `a  program  using  one of  the
   Catharon Packages'.
 
-  This license applies to all  files  distributed  in  the  original
-  Catharon  Package(s),  including  all  source  code,  binaries and
+  This  license applies  to all  files distributed  in  the original
+  Catharon  Package(s),  including  all  source code,  binaries  and
   documentation,  unless  otherwise  stated   in  the  file  in  its
-  original, unmodified form as distributed in the original  archive.
-  If  you  are unsure whether or not a particular file is covered by
+  original, unmodified form as  distributed in the original archive.
+  If you are  unsure whether or not a particular  file is covered by
   this license, you must contact us to verify this.
 
-  The  Catharon  Packages  are   copyright   (C)  2000  by  Catharon
-  Productions, Inc. All rights reserved except as specified below.
+  The  Catharon   Packages  are  copyright  (C)   2000  by  Catharon
+  Productions, Inc.  All rights reserved except as specified below.
 
 1. No Warranty
 --------------
 
   THE CATHARON PACKAGES ARE PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
-  KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT  NOT  LIMITED  TO,
-  WARRANTIES   OF  MERCHANTABILITY  AND  FITNESS  FOR  A  PARTICULAR
+  KIND, EITHER  EXPRESS OR IMPLIED,  INCLUDING, BUT NOT  LIMITED TO,
+  WARRANTIES  OF  MERCHANTABILITY   AND  FITNESS  FOR  A  PARTICULAR
   PURPOSE.  IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
   BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OF OR THE INABILITY TO
   USE THE CATHARON PACKAGE.
@@ -77,12 +77,12 @@
 2. Redistribution
 -----------------
 
-  This license  grants  a  worldwide,  royalty-free,  perpetual  and
-  irrevocable  right  and license to use, execute, perform, compile,
-  display,  copy,  create   derivative   works  of,  distribute  and
-  sublicense the Catharon Packages (in both source and  object  code
-  forms)  and  derivative  works  thereof  for  any  purpose; and to
-  authorize others to exercise  some  or  all  of the rights granted
+  This  license  grants  a  worldwide, royalty-free,  perpetual  and
+  irrevocable right  and license to use,  execute, perform, compile,
+  display,  copy,   create  derivative  works   of,  distribute  and
+  sublicense the  Catharon Packages (in both source  and object code
+  forms)  and  derivative works  thereof  for  any  purpose; and  to
+  authorize others  to exercise  some or all  of the  rights granted
   herein, subject to the following conditions:
 
     o Redistribution  of source code  must retain this  license file
@@ -92,13 +92,13 @@
       unaltered, original  files must be preserved in  all copies of
       source files.
 
-    o Redistribution in binary form must provide a  disclaimer  that
-      states  that  the  software  is  based  in part on the work of
-      Catharon Productions, Inc. in  the  distribution documentation.
+    o Redistribution  in binary form must provide  a disclaimer that
+      states  that the  software is  based in  part on  the  work of
+      Catharon Productions, Inc. in the distribution documentation.
 
-  These  conditions  apply  to any software derived from or based on
+  These conditions  apply to any  software derived from or  based on
   the Catharon Packages, not just  the unmodified files.  If you use
-  our work, you must acknowledge us.  However, no fee need  be  paid
+  our work, you  must acknowledge us.  However, no  fee need be paid
   to us.
 
 3. Advertising
@@ -108,16 +108,16 @@
   use  the  name  of  the  other  for  commercial,  advertising,  or
   promotional purposes without specific prior written permission.
 
-  We suggest, but do not require, that you use the following  phrase
+  We suggest, but do not  require, that you use the following phrase
   to refer to this software in your documentation: 'this software is
   based in part on the Catharon Typography Project'.
 
-  As you have not signed this  license,  you  are  not  required  to
-  accept  it.   However,  as  the  Catharon Packages are copyrighted
-  material, only this license,  or  another  one contracted with the
-  authors, grants you the right to use, distribute, and  modify  it.
-  Therefore,  by  using,  distributing,  or  modifying  the Catharon
-  Packages, you indicate  that  you  understand  and  accept all the
+  As  you have  not signed  this license,  you are  not  required to
+  accept  it.  However,  as  the Catharon  Packages are  copyrighted
+  material, only  this license, or  another one contracted  with the
+  authors, grants you  the right to use, distribute,  and modify it.
+  Therefore,  by  using,  distributing,  or modifying  the  Catharon
+  Packages,  you indicate  that you  understand and  accept  all the
   terms of this license.
 
 --- end of license.txt ---
--- a/src/autohint/ahangles.c
+++ b/src/autohint/ahangles.c
@@ -2,89 +2,97 @@
 /*                                                                         */
 /*  ahangles.h                                                             */
 /*                                                                         */
-/*    a routine used to compute vector angles with limited accuracy        */
+/*    A routine used to compute vector angles with limited accuracy        */
 /*    and very high speed.                                                 */
 /*                                                                         */
-/*  Copyright 2000: Catharon Productions Inc.                              */
+/*  Copyright 2000 Catharon Productions Inc.                               */
 /*  Author: David Turner                                                   */
 /*                                                                         */
 /*  This file is part of the Catharon Typography Project and shall only    */
 /*  be used, modified, and distributed under the terms of the Catharon     */
 /*  Open Source License that should come with this file under the name     */
-/*  "CatharonLicense.txt". By continuing to use, modify, or distribute     */
+/*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*  Note that this license is compatible with the FreeType license         */
+/*  Note that this license is compatible with the FreeType license.        */
 /*                                                                         */
 /***************************************************************************/
+
+
 #ifdef FT_FLAT_COMPILE
+
 #include "ahangles.h"
+
 #else
+
 #include <autohint/ahangles.h>
+
 #endif
 
-/* the following two tables are automatically generated with */
-/* the "mather.py" Python script..                           */
 
-static const AH_Angle  ah_arctan[ 1L << AH_ATAN_BITS ] =
-{
- 0, 0, 1, 1, 1, 2, 2, 2,
- 3, 3, 3, 3, 4, 4, 4, 5,
- 5, 5, 6, 6, 6, 7, 7, 7,
- 8, 8, 8, 9, 9, 9, 10, 10,
- 10, 10, 11, 11, 11, 12, 12, 12,
- 13, 13, 13, 14, 14, 14, 14, 15,
- 15, 15, 16, 16, 16, 17, 17, 17,
- 18, 18, 18, 18, 19, 19, 19, 20,
- 20, 20, 21, 21, 21, 21, 22, 22,
- 22, 23, 23, 23, 24, 24, 24, 24,
- 25, 25, 25, 26, 26, 26, 26, 27,
- 27, 27, 28, 28, 28, 28, 29, 29,
- 29, 30, 30, 30, 30, 31, 31, 31,
- 31, 32, 32, 32, 33, 33, 33, 33,
- 34, 34, 34, 34, 35, 35, 35, 35,
- 36, 36, 36, 36, 37, 37, 37, 38,
- 38, 38, 38, 39, 39, 39, 39, 40,
- 40, 40, 40, 41, 41, 41, 41, 42,
- 42, 42, 42, 42, 43, 43, 43, 43,
- 44, 44, 44, 44, 45, 45, 45, 45,
- 46, 46, 46, 46, 46, 47, 47, 47,
- 47, 48, 48, 48, 48, 48, 49, 49,
- 49, 49, 50, 50, 50, 50, 50, 51,
- 51, 51, 51, 51, 52, 52, 52, 52,
- 52, 53, 53, 53, 53, 53, 54, 54,
- 54, 54, 54, 55, 55, 55, 55, 55,
- 56, 56, 56, 56, 56, 57, 57, 57,
- 57, 57, 57, 58, 58, 58, 58, 58,
- 59, 59, 59, 59, 59, 59, 60, 60,
- 60, 60, 60, 61, 61, 61, 61, 61,
- 61, 62, 62, 62, 62, 62, 62, 63,
- 63, 63, 63, 63, 63, 64, 64, 64
-};
+  /* the following table has been automatically generated with */
+  /* the `mather.py' Python script                             */
 
+  const AH_Angle  ah_arctan[1L << AH_ATAN_BITS] =
+  {
+     0,  0,  1,  1,  1,  2,  2,  2,
+     3,  3,  3,  3,  4,  4,  4,  5,
+     5,  5,  6,  6,  6,  7,  7,  7,
+     8,  8,  8,  9,  9,  9, 10, 10,
+    10, 10, 11, 11, 11, 12, 12, 12,
+    13, 13, 13, 14, 14, 14, 14, 15,
+    15, 15, 16, 16, 16, 17, 17, 17,
+    18, 18, 18, 18, 19, 19, 19, 20,
+    20, 20, 21, 21, 21, 21, 22, 22,
+    22, 23, 23, 23, 24, 24, 24, 24,
+    25, 25, 25, 26, 26, 26, 26, 27,
+    27, 27, 28, 28, 28, 28, 29, 29,
+    29, 30, 30, 30, 30, 31, 31, 31,
+    31, 32, 32, 32, 33, 33, 33, 33,
+    34, 34, 34, 34, 35, 35, 35, 35,
+    36, 36, 36, 36, 37, 37, 37, 38,
+    38, 38, 38, 39, 39, 39, 39, 40,
+    40, 40, 40, 41, 41, 41, 41, 42,
+    42, 42, 42, 42, 43, 43, 43, 43,
+    44, 44, 44, 44, 45, 45, 45, 45,
+    46, 46, 46, 46, 46, 47, 47, 47,
+    47, 48, 48, 48, 48, 48, 49, 49,
+    49, 49, 50, 50, 50, 50, 50, 51,
+    51, 51, 51, 51, 52, 52, 52, 52,
+    52, 53, 53, 53, 53, 53, 54, 54,
+    54, 54, 54, 55, 55, 55, 55, 55,
+    56, 56, 56, 56, 56, 57, 57, 57,
+    57, 57, 57, 58, 58, 58, 58, 58,
+    59, 59, 59, 59, 59, 59, 60, 60,
+    60, 60, 60, 61, 61, 61, 61, 61,
+    61, 62, 62, 62, 62, 62, 62, 63,
+    63, 63, 63, 63, 63, 64, 64, 64
+  };
 
+
   LOCAL_FUNC
-  AH_Angle    ah_angle( FT_Vector*  v )
+  AH_Angle  ah_angle( FT_Vector*  v )
   {
     FT_Pos    dx, dy;
     AH_Angle  angle;
 
-    dx    = v->x;
-    dy    = v->y;
 
+    dx = v->x;
+    dy = v->y;
+
     /* check trivial cases */
-    if (dy == 0)
+    if ( dy == 0 )
     {
       angle = 0;
-      if (dx < 0)
+      if ( dx < 0 )
         angle = AH_PI;
       return angle;
     }
-    else if (dx == 0)
+    else if ( dx == 0 )
     {
       angle = AH_HALF_PI;
-      if (dy < 0)
+      if ( dy < 0 )
         angle = -AH_HALF_PI;
       return angle;
     }
@@ -100,6 +108,8 @@
     if ( dy < 0 )
     {
       FT_Pos  tmp;
+
+
       tmp = dx;
       dx  = -dy;
       dy  = tmp;
@@ -106,17 +116,18 @@
       angle -= AH_HALF_PI;
     }
 
-    if (dx == 0 && dy == 0)
+    if ( dx == 0 && dy == 0 )
       return 0;
 
-    if (dx == dy)
-      angle += AH_PI/4;
-    else if (dx > dy)
-      angle += ah_arctan[ FT_DivFix( dy, dx ) >> (16-AH_ATAN_BITS) ];
+    if ( dx == dy )
+      angle += AH_PI / 4;
+    else if ( dx > dy )
+      angle += ah_arctan[FT_DivFix( dy, dx ) >> ( 16 - AH_ATAN_BITS )];
     else
-      angle += AH_HALF_PI - ah_arctan[ FT_DivFix( dx, dy ) >> (16-AH_ATAN_BITS) ];
+      angle += AH_HALF_PI -
+               ah_arctan[FT_DivFix( dx, dy ) >> ( 16 - AH_ATAN_BITS )];
 
-    if (angle > AH_PI)
+    if ( angle > AH_PI )
       angle -= AH_2PI;
 
     return angle;
@@ -123,3 +134,4 @@
   }
 
 
+/* END */
--- a/src/autohint/ahangles.h
+++ b/src/autohint/ahangles.h
@@ -2,46 +2,62 @@
 /*                                                                         */
 /*  ahangles.h                                                             */
 /*                                                                         */
-/*    a routine used to compute vector angles with limited accuracy        */
+/*    A routine used to compute vector angles with limited accuracy        */
 /*    and very high speed.                                                 */
 /*                                                                         */
-/*  Copyright 2000: Catharon Productions Inc.                              */
+/*  Copyright 2000 Catharon Productions Inc.                               */
 /*  Author: David Turner                                                   */
 /*                                                                         */
 /*  This file is part of the Catharon Typography Project and shall only    */
 /*  be used, modified, and distributed under the terms of the Catharon     */
 /*  Open Source License that should come with this file under the name     */
-/*  "CatharonLicense.txt". By continuing to use, modify, or distribute     */
+/*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*  Note that this license is compatible with the FreeType license         */
+/*  Note that this license is compatible with the FreeType license.        */
 /*                                                                         */
 /***************************************************************************/
+
+
 #ifndef AGANGLES_H
 #define AGANGLES_H
 
+
 #ifdef FT_FLAT_COMPILE
+
 #include "ahtypes.h"
+
 #else
+
 #include <autohint/ahtypes.h>
+
 #endif
 
+
 #include <freetype/internal/ftobjs.h>
 
-/* PI expressed in ah_angles - we don't really need an important */
-/* precision, so 256 should be enough..                          */
-#define AH_PI         256
-#define AH_2PI        (AH_PI*2)
-#define AH_HALF_PI    (AH_PI/2)
-#define AH_2PIMASK    (AH_2PI-1)
 
-/* the number of bits to use to express an arc tangent */
-/* see the structure of the lookup table..             */
+  /* PI expressed in ah_angles -- we don't really need an important */
+  /* precision, so 256 should be enough                             */
+#define AH_PI       256
+#define AH_2PI      ( AH_PI * 2 )
+#define AH_HALF_PI  ( AH_PI / 2 )
+#define AH_2PIMASK  ( AH_2PI - 1 )
+
+  /* the number of bits used to express an arc tangent; */
+  /* see the structure of the lookup table              */
 #define AH_ATAN_BITS  8
 
-LOCAL_DEF  const AH_Angle    ah_arctan[ 1L << AH_ATAN_BITS ];
+  extern
+  const AH_Angle  ah_arctan[1L << AH_ATAN_BITS];
 
-LOCAL_DEF  AH_Angle    ah_angle( FT_Vector* v );
 
+  LOCAL_DEF
+  AH_Angle  ah_angle( FT_Vector*  v );
+
+
 #endif /* AGANGLES_H */
+
+
+/* END */
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -2,56 +2,67 @@
 /*                                                                         */
 /*  ahglobal.c                                                             */
 /*                                                                         */
-/*    routines used to compute global metrics automatically                */
+/*    Routines used to compute global metrics automatically.               */
 /*                                                                         */
-/*  Copyright 2000: Catharon Productions Inc.                              */
+/*  Copyright 2000 Catharon Productions Inc.                               */
 /*  Author: David Turner                                                   */
 /*                                                                         */
 /*  This file is part of the Catharon Typography Project and shall only    */
 /*  be used, modified, and distributed under the terms of the Catharon     */
 /*  Open Source License that should come with this file under the name     */
-/*  "CatharonLicense.txt". By continuing to use, modify, or distribute     */
+/*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*  Note that this license is compatible with the FreeType license         */
+/*  Note that this license is compatible with the FreeType license.        */
 /*                                                                         */
 /***************************************************************************/
+
+
 #ifdef FT_FLAT_COMPILE
+
 #include "ahglobal.h"
 #include "ahglyph.h"
+
 #else
+
 #include <autohint/ahglobal.h>
 #include <autohint/ahglyph.h>
+
 #endif
 
-#define MAX_TEST_CHARACTERS 12
 
-  static const char* blue_chars[ ah_blue_max ] =
-    {
-      "THEZOCQS",
-      "HEZLOCUS",
-      "xzroesc",
-      "xzroesc",
-      "pqgjy"
-    };
+#define MAX_TEST_CHARACTERS  12
 
+  static
+  const char*  blue_chars[ah_blue_max] =
+  {
+    "THEZOCQS",
+    "HEZLOCUS",
+    "xzroesc",
+    "xzroesc",
+    "pqgjy"
+  };
+
+
   /* simple insertion sort */
   static
-  void  sort_values( FT_Int  count, FT_Pos*  table )
+  void  sort_values( FT_Int   count,
+                     FT_Pos*  table )
   {
     FT_Int  i, j, swap;
 
+
     for ( i = 1; i < count; i++ )
     {
       for ( j = i; j > 1; j-- )
       {
-        if ( table[j] > table[j-1] )
+        if ( table[j] > table[j - 1] )
           break;
 
-        swap       = table[j];
-        table[j]   = table[j-1];
-        table[j-1] = swap;
+        swap         = table[j];
+        table[j]     = table[j - 1];
+        table[j - 1] = swap;
       }
     }
   }
@@ -60,12 +71,12 @@
   static
   FT_Error  ah_hinter_compute_blues( AH_Hinter*  hinter )
   {
-    AH_Blue      blue;
-    AH_Globals*  globals = &hinter->globals->design;
-    FT_Pos       flats [ MAX_TEST_CHARACTERS ];
-    FT_Pos       rounds[ MAX_TEST_CHARACTERS ];
-    FT_Int       num_flats;
-    FT_Int       num_rounds;
+    AH_Blue       blue;
+    AH_Globals*   globals = &hinter->globals->design;
+    FT_Pos        flats [MAX_TEST_CHARACTERS];
+    FT_Pos        rounds[MAX_TEST_CHARACTERS];
+    FT_Int        num_flats;
+    FT_Int        num_rounds;
 
     FT_Face       face;
     FT_GlyphSlot  glyph;
@@ -72,6 +83,7 @@
     FT_Error      error;
     FT_CharMap    charmap;
 
+
     face  = hinter->face;
     glyph = face->glyph;
 
@@ -78,13 +90,14 @@
     /* save current charmap */
     charmap = face->charmap;
 
-    /* do we have a Unicode charmap in there ?? */
+    /* do we have a Unicode charmap in there? */
     error = FT_Select_Charmap( face, ft_encoding_unicode );
-    if (error) goto Exit;
+    if ( error )
+      goto Exit;
 
-    /* we compute the blues simply by loading each character from the        */
-    /* 'blue_chars[blues]' string, then compute its top-most and bottom-most */
-    /* points                                                                */
+    /* we compute the blues simply by loading each character from the */
+    /* 'blue_chars[blues]' string, then compute its top-most and      */
+    /* bottom-most points                                             */
 
     AH_LOG(( "blue zones computation\n" ));
     AH_LOG(( "------------------------------------------------\n" ));
@@ -93,34 +106,39 @@
     {
       const char*  p     = blue_chars[blue];
       const char*  limit = p + MAX_TEST_CHARACTERS;
-      FT_Pos      *blue_ref, *blue_shoot;
+      FT_Pos       *blue_ref, *blue_shoot;
 
-      AH_LOG(( "blue %3d : ", (int)blue ));
 
+      AH_LOG(( "blue %3d: ", (int)blue ));
+
       num_flats  = 0;
       num_rounds = 0;
+
       for ( ; p < limit; p++ )
       {
-        FT_UInt        glyph_index;
-        FT_Vector*     extremum;
-        FT_Vector*     points;
-        FT_Vector*     point_limit;
-        FT_Vector*     point;
-        FT_Bool        round;
+        FT_UInt     glyph_index;
+        FT_Vector*  extremum;
+        FT_Vector*  points;
+        FT_Vector*  point_limit;
+        FT_Vector*  point;
+        FT_Bool     round;
 
+
         /* exit if we reach the end of the string */
-        if (!*p) break;
+        if ( !*p )
+          break;
 
-        AH_LOG(( "'%c'", *p ));
+        AH_LOG(( "`%c'", *p ));
 
-        /* load the character in the face - skip unknown or empty ones */
+        /* load the character in the face -- skip unknown or empty ones */
         glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
-        if (glyph_index == 0) continue;
+        if ( glyph_index == 0 )
+          continue;
 
         error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
-        if (error || glyph->outline.n_points <= 0) continue;
+        if ( error || glyph->outline.n_points <= 0 )
+          continue;
 
-
         /* now compute min or max point indices and coordinates */
         points      = glyph->outline.points;
         point_limit = points + glyph->outline.n_points;
@@ -128,7 +146,7 @@
         extremum    = point;
         point++;
 
-        if ( AH_IS_TOP_BLUE(blue) )
+        if ( AH_IS_TOP_BLUE( blue ) )
         {
           for ( ; point < point_limit; point++ )
             if ( point->y > extremum->y )
@@ -143,18 +161,19 @@
 
         AH_LOG(( "%5d", (int)extremum->y ));
 
-        /* now, see if the point belongs to a straight or round segment  */
-        /* we first need to find in which contour the extremum lies then */
-        /* see its previous and next points..                            */
+        /* now, check whether the point belongs to a straight or round  */
+        /* segment; we first need to find in which contour the extremum */
+        /* lies, then see its previous and next points                  */
         {
           FT_Int  index = extremum - points;
           FT_Int  n;
-          FT_Int  first = 0;
-          FT_Int  last, prev, next, end;
+          FT_Int  first, last, prev, next, end;
           FT_Pos  dist;
 
+
           last  = -1;
           first = 0;
+
           for ( n = 0; n < glyph->outline.n_contours; n++ )
           {
             end = glyph->outline.contours[n];
@@ -163,15 +182,15 @@
               last = end;
               break;
             }
-            first = end+1;
+            first = end + 1;
           }
 
-          /* XXX : should never happen !!! */
+          /* XXX: should never happen! */
           if ( last < 0 )
             continue;
 
           /* now look for the previous and next points that are not on the */
-          /* same Y coordinate. Threshold the "closeness" ..               */
+          /* same Y coordinate.  Threshold the `closeness'...              */
 
           prev = index;
           next = prev;
@@ -178,43 +197,49 @@
 
           do
           {
-            if (prev > first) prev--;
-                         else prev = last;
+            if ( prev > first )
+              prev--;
+            else
+              prev = last;
 
             dist = points[prev].y - extremum->y;
             if ( dist < -5 || dist > 5 )
               break;
 
-          } while (prev != index);
+          } while ( prev != index );
 
           do
           {
-            if (next < last)  next++;
-                         else next = first;
+            if ( next < last )
+              next++;
+            else
+              next = first;
 
             dist = points[next].y - extremum->y;
             if ( dist < -5 || dist > 5 )
               break;
 
-          } while (next != index);
+          } while ( next != index );
 
-          /* now, set the "round" flag depending on the segment's kind */
-          round = FT_CURVE_TAG(glyph->outline.tags[prev]) != FT_Curve_Tag_On ||
-                  FT_CURVE_TAG(glyph->outline.tags[next]) != FT_Curve_Tag_On ;
+          /* now, set the `round' flag depending on the segment's kind */
+          round =
+            FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_Curve_Tag_On ||
+            FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_Curve_Tag_On ;
 
           AH_LOG(( "%c ", round ? 'r' : 'f' ));
         }
 
-        if (round)
-          rounds[ num_rounds++ ] = extremum->y;
+        if ( round )
+          rounds[num_rounds++] = extremum->y;
         else
-          flats[ num_flats++ ] = extremum->y;
+          flats[num_flats++] = extremum->y;
       }
 
       AH_LOG(( "\n" ));
-      /* we have computed the contents of the 'rounds' and 'flats' tables */
-      /* now determine the reference and overshoot position of the blue   */
-      /* we simply take the median value after a simple short..           */
+
+      /* we have computed the contents of the `rounds' and `flats' tables, */
+      /* now determine the reference and overshoot position of the blue;   */
+      /* we simply take the median value after a simple short              */
       sort_values( num_rounds, rounds );
       sort_values( num_flats,  flats  );
 
@@ -228,31 +253,33 @@
       else if ( num_flats == 0 )
       {
         *blue_ref   =
-        *blue_shoot = rounds[ num_rounds/2 ];
+        *blue_shoot = rounds[num_rounds / 2];
       }
       else if ( num_rounds == 0 )
       {
         *blue_ref   =
-        *blue_shoot = flats[ num_flats/2 ];
+        *blue_shoot = flats[num_flats / 2];
       }
       else
       {
-        *blue_ref   = flats[ num_flats/2 ];
-        *blue_shoot = rounds[ num_rounds/2 ];
+        *blue_ref   = flats[num_flats / 2];
+        *blue_shoot = rounds[num_rounds / 2];
       }
 
-      /* there are sometimes problems, when the overshoot position of top    */
-      /* zones is under its reference position, or the opposite for bottom   */
-      /* zones. We must thus check everything there.. and correct the errors */
+      /* there are sometimes problems: if the overshoot position of top     */
+      /* zones is under its reference position, or the opposite for bottom  */
+      /* zones.  We must thus check everything there and correct the errors */
       if ( *blue_shoot != *blue_ref )
       {
-        FT_Pos   ref       = *blue_ref;
-        FT_Pos   shoot     = *blue_shoot;
+        FT_Pos   ref      = *blue_ref;
+        FT_Pos   shoot    = *blue_shoot;
         FT_Bool  over_ref = ( shoot > ref );
 
-        if ( AH_IS_TOP_BLUE(blue) ^ over_ref )
-          *blue_shoot = *blue_ref = (shoot+ref)/2;
+
+        if ( AH_IS_TOP_BLUE( blue ) ^ over_ref )
+          *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
       }
+
       AH_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
     }
 
@@ -269,34 +296,39 @@
   FT_Error  ah_hinter_compute_widths( AH_Hinter*  hinter )
   {
     /* scan the array of segments in each direction */
-    AH_Outline*    outline = hinter->glyph;
-    AH_Segment*    segments;
-    AH_Segment*    limit;
-    AH_Globals*    globals = &hinter->globals->design;
-    FT_Pos*        widths;
-    FT_Int         dimension;
-    FT_Int*        p_num_widths;
-    FT_Error       error = 0;
-    FT_Pos         edge_distance_threshold = 32000;
+    AH_Outline*  outline = hinter->glyph;
+    AH_Segment*  segments;
+    AH_Segment*  limit;
+    AH_Globals*  globals = &hinter->globals->design;
+    FT_Pos*      widths;
+    FT_Int       dimension;
+    FT_Int*      p_num_widths;
+    FT_Error     error = 0;
+    FT_Pos       edge_distance_threshold = 32000;
 
+
     globals->num_widths  = 0;
     globals->num_heights = 0;
 
-    /* for now, compute the standard width and height from the "o" character */
-    /* I started computing the stem width of the "i" and the stem height of  */
-    /* the "-", but it wasn't too good.. Moreover, we now have a single      */
-    /* character that gives us standard width and height                     */
+    /* For now, compute the standard width and height from the `o'       */
+    /* character.  I started computing the stem width of the `i' and the */
+    /* stem height of the "-", but it wasn't too good.  Moreover, we now */
+    /* have a single character that gives us standard width and height.  */
     {
       FT_UInt   glyph_index;
 
+
       glyph_index = FT_Get_Char_Index( hinter->face, 'o' );
-      if (glyph_index == 0) return 0;
+      if ( glyph_index == 0 )
+        return 0;
 
       error = FT_Load_Glyph( hinter->face, glyph_index, FT_LOAD_NO_SCALE );
-      if (error) goto Exit;
+      if ( error )
+        goto Exit;
 
       error = ah_outline_load( hinter->glyph, hinter->face );
-      if (error) goto Exit;
+      if ( error )
+        goto Exit;
 
       ah_outline_compute_segments( hinter->glyph );
       ah_outline_link_segments( hinter->glyph );
@@ -313,19 +345,22 @@
       AH_Segment*  link;
       FT_Int       num_widths = 0;
 
+
       for ( ; seg < limit; seg++ )
       {
         link = seg->link;
-        /* we only consider the stem segments there ! */
-        if (link && link->link == seg && link > seg)
+        /* we only consider stem segments there! */
+        if ( link && link->link == seg && link > seg )
         {
           FT_Int  dist;
 
+
           dist = seg->pos - link->pos;
-          if (dist < 0) dist = -dist;
+          if ( dist < 0 )
+            dist = -dist;
 
           if ( num_widths < 12 )
-            widths[ num_widths++ ] = dist;
+            widths[num_widths++] = dist;
         }
       }
 
@@ -333,7 +368,7 @@
       *p_num_widths = num_widths;
 
       /* we will now try to find the smallest width */
-      if (num_widths > 0 && widths[0] < edge_distance_threshold )
+      if ( num_widths > 0 && widths[0] < edge_distance_threshold )
         edge_distance_threshold = widths[0];
 
       segments     = outline->vert_segments;
@@ -343,13 +378,13 @@
 
     }
 
-    /* now, compute the edge distance threshold as a fraction of the */
-    /* smallest width in the font.. Set it in "hinter.glyph" too !!  */
-    if ( edge_distance_threshold == 32000)
+    /* Now, compute the edge distance threshold as a fraction of the */
+    /* smallest width in the font. Set it in `hinter.glyph' too!     */
+    if ( edge_distance_threshold == 32000 )
       edge_distance_threshold = 50;
 
     /* let's try 20% */
-    hinter->glyph->edge_distance_threshold = edge_distance_threshold/5;
+    hinter->glyph->edge_distance_threshold = edge_distance_threshold / 5;
 
   Exit:
     return error;
@@ -363,3 +398,5 @@
            ah_hinter_compute_blues ( hinter );
   }
 
+
+/* END */
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -2,37 +2,50 @@
 /*                                                                         */
 /*  ahglobal.h                                                             */
 /*                                                                         */
-/*    routines used to compute global metrics automatically                */
+/*    Routines used to compute global metrics automatically.               */
 /*                                                                         */
-/*  Copyright 2000: Catharon Productions Inc.                              */
+/*  Copyright 2000 Catharon Productions Inc.                               */
 /*  Author: David Turner                                                   */
 /*                                                                         */
 /*  This file is part of the Catharon Typography Project and shall only    */
 /*  be used, modified, and distributed under the terms of the Catharon     */
 /*  Open Source License that should come with this file under the name     */
-/*  "CatharonLicense.txt". By continuing to use, modify, or distribute     */
+/*  `CatharonLicense.txt'.  By continuing to use, modify, or distribute    */
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*  Note that this license is compatible with the FreeType license         */
+/*  Note that this license is compatible with the FreeType license.        */
 /*                                                                         */
 /***************************************************************************/
+
+
 #ifndef AGGLOBAL_H
 #define AGGLOBAL_H
 
 #ifdef FT_FLAT_COMPILE
+
 #include "ahtypes.h"
+
 #else
+
 #include <autohint/ahtypes.h>
+
 #endif
 
+
 #include <freetype/internal/ftobjs.h>  /* for LOCAL_DEF/LOCAL_FUNC */
 
-#define  AH_IS_TOP_BLUE(b)   ( (b) == ah_blue_capital_top || \
+
+#define AH_IS_TOP_BLUE( b )  ( (b) == ah_blue_capital_top || \
                                (b) == ah_blue_small_top   )
 
- /* compute global metrics automatically */
+
+  /* compute global metrics automatically */
   LOCAL_DEF
   FT_Error  ah_hinter_compute_globals( AH_Hinter*  hinter );
 
+
 #endif /* AGGLOBAL_H */
+
+
+/* END */
--- a/src/base/ftnames.c
+++ b/src/base/ftnames.c
@@ -1,33 +1,54 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftnames.c                                                              */
+/*                                                                         */
+/*    Simple interface to access SFNT name tables (which are used          */
+/*    to hold font names, copyright info, notices, etc.).                  */
+/*                                                                         */
+/*    This is _not_ used to retrieve glyph names!                          */
+/*                                                                         */
+/*  Copyright 1996-2000 by                                                 */
+/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
 #include <freetype/ftnames.h>
 #include <freetype/internal/tttypes.h>
 
-#ifdef FT_CONFIG_OPTION_GLYPH_NAMES
-#endif /* FT_CONFIG_OPTION_GLYPH_NAMES */
 
+#ifdef FT_CONFIG_OPTION_SFNT_NAMES
 
 
-
-#ifdef FT_CONFIG_OPTION_SFNT_NAMES
-  FT_EXPORT_FUNC(FT_UInt)  FT_Get_Sfnt_Name_Count( FT_Face  face )
+  FT_EXPORT_FUNC( FT_UInt )  FT_Get_Sfnt_Name_Count( FT_Face  face )
   {
-    return  ( face && FT_IS_SFNT(face) ? ((TT_Face)face)->num_names : 0 );
+    return face && ( FT_IS_SFNT( face ) ? ((TT_Face)face)->num_names : 0 );
   }
   
   
-  FT_EXPORT_FUNC(FT_Error) FT_Get_Sfnt_Name( FT_Face       face,
-                                             FT_UInt       index,
-                                             FT_SfntName*  aname )
+  FT_EXPORT_FUNC( FT_Error ) FT_Get_Sfnt_Name( FT_Face       face,
+                                               FT_UInt       index,
+                                               FT_SfntName*  aname )
   {
     FT_Error  error = FT_Err_Invalid_Argument;
     
-    if ( face && FT_IS_SFNT(face) )
+
+    if ( aname && face && FT_IS_SFNT( face ) )
     {
       TT_Face  ttface = (TT_Face)face;
       
-      if (index < ttface->num_names)
+
+      if ( index < ttface->num_names )
       {
         TT_NameRec*  name = ttface->name_table.names + index;
         
+
         aname->platform_id = name->platformID;
         aname->encoding_id = name->encodingID;
         aname->language_id = name->languageID;
@@ -41,4 +62,9 @@
     
     return error;
   }                                             
+
+
 #endif /* FT_CONFIG_OPTION_SFNT_NAMES */
+
+
+/* END */
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1031,7 +1031,7 @@
                                ( load_flags & FT_LOAD_MONOCHROME )
                                   ? ft_render_mode_mono
                                   : ft_render_mode_normal );
-    }	
+    }
 
   Exit:
     return error;
@@ -1120,6 +1120,7 @@
   {
     FT_Driver_Class*  clazz = driver->clazz;
 
+
     /* discard auto-hinting data */
     if ( face->autohint.finalizer )
       face->autohint.finalizer( face->autohint.data );
@@ -2259,34 +2260,34 @@
   /*    FT_Get_Glyph_Name                                                  */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Retrieves the ASCII name of a given glyph in a face. This only     */
-  /*    works for those faces where FT_HAS_GLYPH_NAME(face) returns        */
-  /*    true.                                                              */
+  /*    Retrieves the ASCII name of a given glyph in a face.  This only    */
+  /*    works for those faces where FT_HAS_GLYPH_NAME(face) returns true.  */
   /*                                                                       */
   /* <Input>                                                               */
   /*    face        :: A handle to a source face object.                   */
-  /*    glyph_index :: the glyph index.                                    */
   /*                                                                       */
-  /*    buffer      :: pointer to a target buffer where the name will be   */
-  /*                   copied..                                            */
+  /*    glyph_index :: The glyph index.                                    */
   /*                                                                       */
-  /*    buffer_max  :: the maximal number of bytes available in the buffer */
+  /*    buffer      :: A pointer to a target buffer where the name will be */
+  /*                   copied to.                                          */
   /*                                                                       */
+  /*    buffer_max  :: The maximal number of bytes available in the        */
+  /*                   buffer.                                             */
+  /*                                                                       */
   /* <Return>                                                              */
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    An error is returned when the face doesn't provide glyph names     */
-  /*    or when the glyph index is invalid. In all cases of failure, the   */
-  /*    first byte of "buffer" will be set to 0 to indicate an empty       */
-  /*    name.                                                              */
+  /*    An error is returned if the face doesn't provide glyph names or if */
+  /*    the glyph index is invalid.  In all cases of failure, the first    */
+  /*    byte of `buffer' will be set to 0 to indicate an empty name.       */
   /*                                                                       */
-  /*    The glyph name is truncated to fit within the buffer if it's too   */
-  /*    long. The returned string is always zero-terminated                */
+  /*    The glyph name is truncated to fit within the buffer if it is too  */
+  /*    long.  The returned string is always zero-terminated.              */
   /*                                                                       */
   /*    This function is not compiled within the library if the config     */
   /*    macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in                */
-  /*    <freetype/config/ftoptions.h>                                      */
+  /*    `include/freetype/config/ftoptions.h'                              */
   /*                                                                       */
   FT_EXPORT_FUNC( FT_Error )  FT_Get_Glyph_Name( FT_Face     face,
                                                  FT_UInt     glyph_index,
@@ -2295,26 +2296,32 @@
   {
     FT_Error  error = FT_Err_Invalid_Argument;
     
+
     /* clean up buffer */
-    if (buffer && buffer_max > 0)
+    if ( buffer && buffer_max > 0 )
       ((FT_Byte*)buffer)[0] = 0;
       
-    if ( face && glyph_index < (FT_UInt)face->num_glyphs &&  FT_HAS_GLYPH_NAMES(face) )
+    if ( face                                    &&
+         glyph_index < (FT_UInt)face->num_glyphs &&
+         FT_HAS_GLYPH_NAMES( face )              )
     {
       /* now, lookup for glyph name */
       FT_Driver        driver = face->driver;
-      FT_Module_Class* clazz  = FT_MODULE_CLASS(driver);
+      FT_Module_Class* clazz  = FT_MODULE_CLASS( driver );
 
-      if (clazz->get_interface)
+
+      if ( clazz->get_interface )
       {
         FT_Glyph_Name_Requester  requester;
         
-        requester = (FT_Glyph_Name_Requester)
-                        clazz->get_interface( FT_MODULE(driver), "glyph_name" );
-        if (requester)
+
+        requester = (FT_Glyph_Name_Requester)clazz->get_interface(
+                      FT_MODULE( driver ), "glyph_name" );
+        if ( requester )
           error = requester( face, glyph_index, buffer, buffer_max );
       }
     }
+
     return error;
   }                                                 
 
--- a/src/base/ftsystem.c
+++ b/src/base/ftsystem.c
@@ -61,6 +61,7 @@
   /*                                                                       */
   /* <Input>                                                               */
   /*    memory :: A pointer to the memory object.                          */
+  /*                                                                       */
   /*    size   :: The requested size in bytes.                             */
   /*                                                                       */
   /* <Return>                                                              */
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -90,22 +90,26 @@
 
 
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+
+
   static
-  FT_Error   get_sfnt_glyph_name( TT_Face      face,
-                                  FT_UInt      glyph_index,
-                                  FT_Pointer   buffer,
-                                  FT_UInt      buffer_max )
+  FT_Error  get_sfnt_glyph_name( TT_Face     face,
+                                 FT_UInt     glyph_index,
+                                 FT_Pointer  buffer,
+                                 FT_UInt     buffer_max )
   {
     FT_String*  gname;
     FT_Error    error;
     
+
     error = TT_Get_PS_Name( face, glyph_index, &gname );
-    if (!error && buffer_max > 0)
+    if ( !error && buffer_max > 0 )
     {
       FT_UInt  len = strlen( gname );
       
-      if (len >= buffer_max)
-        len = buffer_max-1;
+
+      if ( len >= buffer_max )
+        len = buffer_max - 1;
         
       MEM_Copy( buffer, gname, len );
       ((FT_Byte*)buffer)[len] = 0;
@@ -113,7 +117,10 @@
     
     return error;
   }                                  
-#endif
+
+
+#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
 
   static
   FT_Module_Interface  SFNT_Get_Interface( FT_Module    module,
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -319,8 +319,8 @@
               FT_FACE_FLAG_HORIZONTAL;    /* horizontal data   */
 
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
-      /* might need more polish to detect the presence of a Postscript name */
-      /* table in the font..                                                */
+      /* might need more polish to detect the presence of a Postscript */
+      /* name table in the font                                        */
       flags |= FT_FACE_FLAG_GLYPH_NAMES;
 #endif
 
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -107,26 +107,29 @@
 
 
   static
-  FT_Error   get_t1_glyph_name( T1_Face      face,
-                                FT_UInt      glyph_index,
-                                FT_Pointer   buffer,
-                                FT_UInt      buffer_max )
+  FT_Error  get_t1_glyph_name( T1_Face     face,
+                               FT_UInt     glyph_index,
+                               FT_Pointer  buffer,
+                               FT_UInt     buffer_max )
   {
     FT_String*  gname;
     
+
     gname = face->type1.glyph_names[glyph_index];
-    if (buffer_max > 0)
+
+    if ( buffer_max > 0 )
     {
       FT_UInt  len = strlen( gname );
       
-      if (len >= buffer_max)
-        len = buffer_max-1;
+
+      if ( len >= buffer_max )
+        len = buffer_max - 1;
         
       MEM_Copy( buffer, gname, len );
       ((FT_Byte*)buffer)[len] = 0;
     }
 
-    return 0;
+    return T1_Err_Ok;
   }                                  
 
 
--- a/src/type1z/z1driver.c
+++ b/src/type1z/z1driver.c
@@ -50,28 +50,30 @@
 #define FT_COMPONENT  trace_z1driver
 
 
-
   static
-  FT_Error   get_z1_glyph_name( T1_Face      face,
-                                FT_UInt      glyph_index,
-                                FT_Pointer   buffer,
-                                FT_UInt      buffer_max )
+  FT_Error  get_z1_glyph_name( T1_Face     face,
+                               FT_UInt     glyph_index,
+                               FT_Pointer  buffer,
+                               FT_UInt     buffer_max )
   {
     FT_String*  gname;
     
+
     gname = face->type1.glyph_names[glyph_index];
-    if (buffer_max > 0)
+
+    if ( buffer_max > 0 )
     {
       FT_UInt  len = strlen( gname );
       
+
       if (len >= buffer_max)
-        len = buffer_max-1;
+        len = buffer_max - 1;
         
       MEM_Copy( buffer, gname, len );
       ((FT_Byte*)buffer)[len] = 0;
     }
 
-    return 0;
+    return T1_Err_Ok;
   }                                  
 
 
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -482,7 +482,7 @@
 
       char_code -= first;
       if ( char_code < count )
-        result = char_code+1;
+        result = char_code + 1;
       else
         result = 0;
     }
@@ -515,7 +515,7 @@
       goto Exit;
     }
 
-    if (glyph_index > 0)
+    if ( glyph_index > 0 )
       glyph_index--;
     else
       glyph_index = font->header.default_char - font->header.first_char;